.bsp-app {
    max-width: 900px;
    margin: 20px auto;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1A1A1A;
    box-sizing: border-box;
}
.bsp-app *, .bsp-app *::before, .bsp-app *::after { box-sizing: border-box; }

.bsp-app-locked {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.bsp-app-locked h3 { font-size: 22px; margin-bottom: 10px; color: #993556; }
.bsp-btn-primary {
    display: inline-block; padding: 10px 24px;
    background: linear-gradient(135deg, #D4537E, #7F77DD);
    color: white !important; text-decoration: none;
    border-radius: 10px; font-weight: 500; margin-top: 10px;
}

.bsp-header {
    background: linear-gradient(135deg, #D4537E, #7F77DD);
    color: white; padding: 20px 18px;
    border-radius: 14px; margin-bottom: 16px;
}
.bsp-header h1 { font-size: 22px; font-weight: 600; margin: 0 0 4px; color: white; }
.bsp-subtitle { font-size: 13px; opacity: 0.9; }

.bsp-nav {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
    background: #fff; padding: 6px;
    border-radius: 10px; margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    position: sticky; top: 10px; z-index: 10;
}
.bsp-nav-btn {
    background: transparent; border: none; padding: 12px 6px;
    border-radius: 8px; font-size: 12px; font-weight: 500;
    color: #6B6B68; cursor: pointer; transition: all 0.15s;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    font-family: inherit;
}
.bsp-nav-btn:hover { background: #F5F2EE; }
.bsp-nav-btn.active { background: #FBEAF0; color: #993556; }
.bsp-nav-icon { font-size: 18px; }

.bsp-view { display: none; }
.bsp-view.active { display: block; }

.bsp-card {
    background: #fff; border-radius: 12px; padding: 16px;
    margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.bsp-card-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; }

.bsp-app input[type="text"],
.bsp-app input[type="date"],
.bsp-app input[type="search"],
.bsp-app input[type="number"],
.bsp-app select {
    font-family: inherit; font-size: 15px;
    width: 100%; padding: 10px 12px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 10px; background: #fff;
    color: #1A1A1A;
    box-sizing: border-box;
}
.bsp-app input:focus, .bsp-app select:focus {
    outline: none; border-color: #D4537E;
}
.bsp-search { margin-bottom: 12px; }
.bsp-row {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 8px; margin-bottom: 10px;
}
.bsp-hint {
    font-size: 12px; color: #6B6B68; margin-top: 8px;
}
.bsp-hint a { color: #993556; }

.bsp-stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px; margin-bottom: 16px;
}
.bsp-stat-card {
    background: #fff; padding: 14px; border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.bsp-stat-label {
    font-size: 11px; color: #6B6B68;
    text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 4px;
}
.bsp-stat-value { font-size: 24px; font-weight: 600; }

.bsp-person-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}
.bsp-person-card {
    background: #fff; border-radius: 10px; padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    cursor: pointer; transition: all 0.15s;
    display: flex; align-items: center; justify-content: space-between;
    border: 2px solid transparent;
}
.bsp-person-card:hover { border-color: #F4C0D1; transform: translateY(-1px); }
.bsp-person-card.disabled { opacity: 0.5; cursor: not-allowed; }
.bsp-person-card.bsp-flash { background: #E1F5EE; border-color: #0F6E56; }
.bsp-person-name { font-size: 14px; font-weight: 500; }
.bsp-person-sub { font-size: 12px; color: #6B6B68; margin-top: 2px; }

.bsp-badge {
    font-size: 11px; padding: 3px 9px;
    border-radius: 12px; font-weight: 600; white-space: nowrap;
    display: inline-block;
}
.bsp-badge-24 { background: #EEEDFE; color: #3C3489; }
.bsp-badge-open { background: #E1F5EE; color: #085041; }
.bsp-badge-low { background: #FAEEDA; color: #854F0B; }
.bsp-badge-zero { background: #FCEBEB; color: #791F1F; }

.bsp-row-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; border-radius: 10px; gap: 10px;
    background: #fff; margin-bottom: 4px;
}
.bsp-row-name { font-weight: 500; font-size: 14px; }
.bsp-row-info { font-size: 13px; color: #6B6B68; }
.bsp-row-sub { font-size: 11px; color: #999996; }
.bsp-orario { font-size: 11px; color: #999996; margin-left: 4px; }
.bsp-warning { color: #854F0B; }
.bsp-danger { color: #A32D2D; }
.bsp-success { color: #0F6E56; }

.bsp-empty {
    text-align: center; padding: 40px 20px;
    color: #6B6B68; font-size: 14px;
}
.bsp-stats-text {
    font-size: 13px; color: #6B6B68;
    margin-bottom: 10px; padding: 0 4px;
}
.bsp-storico-list { max-height: 600px; overflow-y: auto; }

.bsp-toast {
    position: fixed; bottom: 20px; left: 50%;
    transform: translateX(-50%);
    background: #1A1A1A; color: white;
    padding: 12px 20px; border-radius: 10px;
    font-size: 14px; font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 99999; opacity: 0;
    transition: opacity 0.2s; pointer-events: none;
    max-width: 90vw; text-align: center;
}
.bsp-toast.show { opacity: 1; }
.bsp-toast.success { background: #0F6E56; }
.bsp-toast.error { background: #A32D2D; }

@media (max-width: 480px) {
    .bsp-nav-btn { font-size: 11px; padding: 10px 4px; }
    .bsp-nav-icon { font-size: 16px; }
    .bsp-person-grid { grid-template-columns: 1fr; }
    .bsp-header { padding: 16px 14px; }
    .bsp-header h1 { font-size: 19px; }
    .bsp-stat-value { font-size: 20px; }
}
