/* ============================================================
   H&L Salud SAS — Admin Panel Design System
   Brand: Light Blue #3BA3DE · Navy #1B4B7A
   ============================================================ */

/* --- RESET --- */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}

:root{
  /* Brand */
  --brand:         #3BA3DE;
  --brand-dark:    #1B4B7A;
  --brand-light:   #E8F4FC;
  --brand-hover:   #2E8FC5;
  --brand-10:      rgba(59,163,222,.10);
  --brand-06:      rgba(59,163,222,.06);

  /* Neutrals */
  --text:          #1E293B;
  --text-secondary:#64748B;
  --text-muted:    #94A3B8;
  --border:        #E2E8F0;
  --bg:            #F8FAFC;
  --surface:       #FFFFFF;

  /* Semantic */
  --success:       #10B981;
  --success-bg:    #ECFDF5;
  --warning:       #F59E0B;
  --warning-bg:    #FFFBEB;
  --danger:        #EF4444;
  --danger-bg:     #FEF2F2;

  /* Layout */
  --sidebar-w:     260px;
  --sidebar-collapsed: 72px;
  --header-h:      64px;
  --radius:        8px;
  --radius-sm:     4px;
  --radius-lg:     12px;
  --shadow-sm:     0 1px 2px rgba(0,0,0,.05);
  --shadow:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:     0 4px 12px rgba(0,0,0,.08);
  --shadow-lg:     0 10px 30px rgba(0,0,0,.10);

  /* Typography */
  --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;
}

html,body{
  height:100%;
  font-family:var(--font);
  font-size:14px;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
a{text-decoration:none;color:inherit}
ul{list-style:none}
button{font-family:var(--font);cursor:pointer;border:none;background:none;font-size:14px;color:var(--text)}
input,select,textarea{font-family:var(--font);font-size:14px;color:var(--text)}
hr{border:none;border-top:1px solid var(--border);margin:8px 0}

/* --- LAYOUT SHELL --- */
.app{display:flex;min-height:100vh}

/* --- SIDEBAR --- */
.sidebar{
  position:fixed;top:0;left:0;bottom:0;
  width:var(--sidebar-w);
  background:var(--brand-dark);
  color:#fff;
  display:flex;flex-direction:column;
  z-index:100;
  transition:width .25s cubic-bezier(.4,0,.2,1);
  overflow:hidden;
}
.sidebar-logo{
  padding:20px 16px 16px;
  border-bottom:1px solid rgba(255,255,255,.1);
  flex-shrink:0;
  display:flex;
  justify-content:center;
}
.sidebar-logo img{
  width:100%;
  height:auto;
  display:block;
  background:#fff;
  border-radius:8px;
  padding:10px 16px;
}
.sidebar-logo .logo-text{
  display:flex;align-items:center;gap:10px;
}
.sidebar-logo .logo-badge{
  font-size:10px;font-weight:700;
  letter-spacing:.5px;
  text-transform:uppercase;
  color:rgba(255,255,255,.5);
  padding:2px 6px;
  border:1px solid rgba(255,255,255,.15);
  border-radius:4px;
  margin-top:4px;
}

.sidebar-nav{
  flex:1;overflow-y:auto;
  padding:12px 0;
}
.sidebar-nav::-webkit-scrollbar{width:4px}
.sidebar-nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,.15);border-radius:2px}

.nav-section{padding:0 12px;margin-bottom:4px}
.nav-label{
  font-size:10px;font-weight:700;
  text-transform:uppercase;letter-spacing:1px;
  color:rgba(255,255,255,.35);
  padding:12px 12px 6px;
}

.nav-item{
  display:flex;align-items:center;gap:12px;
  padding:10px 14px;
  border-radius:var(--radius);
  font-size:13px;font-weight:500;
  color:rgba(255,255,255,.7);
  transition:all .15s ease;
  margin-bottom:2px;
  cursor:pointer;
  text-decoration:none;
}
.nav-item:hover{
  background:rgba(255,255,255,.08);
  color:#fff;
}
.nav-item.active{
  background:rgba(255,255,255,.12);
  color:#fff;
  font-weight:600;
}
.nav-item.active::before{
  content:'';
  position:absolute;left:0;
  width:3px;height:28px;
  background:var(--brand);
  border-radius:0 3px 3px 0;
}
.nav-item .icon{
  width:20px;height:20px;flex-shrink:0;
  opacity:.7;
}
.nav-item.active .icon,.nav-item:hover .icon{opacity:1}

.sidebar-footer{
  padding:12px 16px;
  border-top:1px solid rgba(255,255,255,.1);
  flex-shrink:0;
}
.sidebar-user{
  display:flex;align-items:center;gap:10px;
  padding:8px;border-radius:var(--radius);
  transition:background .15s;
  cursor:pointer;
}
.sidebar-user:hover{background:rgba(255,255,255,.08)}
.user-avatar-circle{
  width:36px;height:36px;
  border-radius:50%;
  background:var(--brand);
  display:flex;align-items:center;justify-content:center;
  font-size:14px;font-weight:700;color:#fff;
  flex-shrink:0;
}
.user-meta{min-width:0;flex:1}
.user-meta .name{font-size:13px;font-weight:600;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.user-meta .role{font-size:11px;color:rgba(255,255,255,.45)}
.sidebar-user .logout-icon{
  width:18px;height:18px;color:rgba(255,255,255,.4);
  transition:color .15s;flex-shrink:0;
}
.sidebar-user:hover .logout-icon{color:rgba(255,255,255,.8)}

/* --- MAIN AREA --- */
.main{
  margin-left:var(--sidebar-w);
  flex:1;
  display:flex;flex-direction:column;
  min-height:100vh;
  transition:margin-left .25s ease;
}

/* --- TOP BAR --- */
.topbar{
  height:var(--header-h);
  background:var(--surface);
  border-bottom:1px solid var(--border);
  display:flex;align-items:center;
  justify-content:space-between;
  padding:0 32px;
  flex-shrink:0;
  position:sticky;top:0;z-index:50;
}
.topbar-left{display:flex;align-items:center;gap:16px}
.topbar-left h1{font-size:18px;font-weight:700;color:var(--text)}
.breadcrumb{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--text-secondary)}
.breadcrumb a{color:var(--text-muted);transition:color .15s}
.breadcrumb a:hover{color:var(--brand)}
.breadcrumb .sep{color:var(--text-muted)}

.topbar-right{display:flex;align-items:center;gap:12px}

/* --- PAGE CONTENT --- */
.page{flex:1;padding:28px 32px 40px}

/* --- BUTTONS --- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:9px 18px;
  border-radius:var(--radius);
  font-size:13px;font-weight:600;
  cursor:pointer;
  transition:all .15s ease;
  white-space:nowrap;
  border:1px solid transparent;
  line-height:1.4;
}
.btn-primary{
  background:var(--brand);color:#fff;
  border-color:var(--brand);
}
.btn-primary:hover{background:var(--brand-hover);border-color:var(--brand-hover)}
.btn-primary:active{transform:scale(.98)}

.btn-outline{
  background:var(--surface);color:var(--text);
  border-color:var(--border);
}
.btn-outline:hover{border-color:var(--text-muted);background:var(--bg)}

.btn-ghost{
  background:transparent;color:var(--text-secondary);
  padding:8px 12px;
}
.btn-ghost:hover{background:var(--bg);color:var(--text)}

.btn-danger{background:var(--danger);color:#fff;border-color:var(--danger)}
.btn-danger:hover{background:#DC2626}

.btn-danger-ghost{color:var(--danger);background:transparent}
.btn-danger-ghost:hover{background:var(--danger-bg)}

.btn-sm{padding:6px 12px;font-size:12px}
.btn-lg{padding:12px 24px;font-size:15px}
.btn-icon{padding:8px;border-radius:var(--radius)}

.btn .icon{width:16px;height:16px}

/* --- CARDS --- */
.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);
}
.card-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 24px;
  border-bottom:1px solid var(--border);
}
.card-header h2,.card-header h3{font-size:15px;font-weight:700;color:var(--text)}
.card-body{padding:24px}
.card-body.flush{padding:0}

/* --- KPI CARDS --- */
.kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:20px;margin-bottom:28px}
.kpi{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:22px 24px;
  box-shadow:var(--shadow-sm);
}
.kpi-label{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:var(--text-secondary);margin-bottom:8px}
.kpi-value{font-size:36px;font-weight:800;color:var(--text);line-height:1;margin-bottom:12px}
.kpi-badges{display:flex;gap:8px;flex-wrap:wrap}

.badge{
  display:inline-flex;align-items:center;gap:4px;
  padding:3px 10px;border-radius:20px;
  font-size:11px;font-weight:600;
}
.badge svg{width:10px;height:10px}
.badge-success{background:var(--success-bg);color:var(--success)}
.badge-danger{background:var(--danger-bg);color:var(--danger)}
.badge-warning{background:var(--warning-bg);color:var(--warning)}
.badge-info{background:var(--brand-light);color:var(--brand)}

/* --- CHARTS ROW --- */
.chart-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:20px;margin-bottom:28px}
.chart-card{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);overflow:hidden;
}
.chart-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 20px;border-bottom:1px solid var(--border);
}
.chart-header h3{font-size:14px;font-weight:700;color:var(--text)}
.chart-body{padding:20px}
.chart-center{display:flex;flex-direction:column;align-items:center;gap:16px}

/* Bar chart */
.bar-chart{display:flex;flex-direction:column;gap:10px}
.bar-row{display:flex;align-items:center;gap:12px}
.bar-label{width:140px;font-size:12px;color:var(--text-secondary);text-align:right;flex-shrink:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bar-track{flex:1;height:22px;display:flex;border-radius:4px;overflow:hidden;background:var(--bg)}
.bar-segment{height:100%;transition:width .4s ease}
.seg-gray{background:#CBD5E1}
.seg-light{background:#7DD3FC}
.seg-medium{background:var(--brand)}
.seg-dark{background:var(--brand-dark)}

.chart-legend{display:flex;flex-wrap:wrap;gap:14px;margin-top:16px}
.legend-item{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:var(--text-secondary)}
.legend-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}

.pie-legend{display:flex;flex-direction:column;gap:6px}

.doughnut-wrapper{position:relative;display:inline-flex;align-items:center;justify-content:center}
.doughnut-center{position:absolute;display:flex;flex-direction:column;align-items:center}
.doughnut-number{font-size:32px;font-weight:800;color:var(--text);line-height:1}
.doughnut-label{font-size:12px;color:var(--text-secondary)}

/* --- TABLES --- */
.table{width:100%;border-collapse:collapse;font-size:13px}
.table thead th{
  text-align:left;padding:12px 16px;
  font-size:11px;font-weight:700;
  text-transform:uppercase;letter-spacing:.5px;
  color:var(--text-muted);
  border-bottom:1px solid var(--border);
  background:var(--bg);
  white-space:nowrap;
}
.table tbody td{
  padding:14px 16px;
  border-bottom:1px solid var(--border);
  color:var(--text);
  vertical-align:middle;
}
.table tbody tr:last-child td{border-bottom:none}
.table tbody tr:hover{background:var(--brand-06)}
.table-actions{display:flex;gap:6px;white-space:nowrap}

/* --- STATE BADGES --- */
.state-badge{
  display:inline-flex;align-items:center;
  padding:4px 10px;border-radius:20px;
  font-size:12px;font-weight:600;white-space:nowrap;
}
.state-pending{background:var(--warning-bg);color:#D97706}
.state-confirmed,.state-active{background:var(--success-bg);color:var(--success)}
.state-started{background:var(--brand-light);color:var(--brand)}
.state-ended{background:var(--bg);color:var(--text-muted)}
.state-canceled,.state-inactive{background:var(--danger-bg);color:var(--danger)}

/* --- FORMS --- */
.field{margin-bottom:16px}
.field label{
  display:block;font-size:12px;font-weight:600;
  color:var(--text-secondary);
  text-transform:uppercase;letter-spacing:.5px;
  margin-bottom:6px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="date"],
.field input[type="time"],
.field select,
.field textarea{
  width:100%;padding:10px 14px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface);
  color:var(--text);
  transition:border-color .15s, box-shadow .15s;
  outline:none;
}
.field input:focus,.field select:focus,.field textarea:focus{
  border-color:var(--brand);
  box-shadow:0 0 0 3px var(--brand-10);
}
.field textarea{resize:vertical;min-height:60px}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.field-hint{font-size:11px;color:var(--text-muted);margin-top:4px}

/* --- MODALS --- */
.modal-overlay{
  display:none;position:fixed;inset:0;
  background:rgba(15,23,42,.5);
  backdrop-filter:blur(4px);
  z-index:2000;
  align-items:center;justify-content:center;
}
.modal-overlay.open{display:flex}
.modal{
  background:var(--surface);
  border-radius:var(--radius-lg);
  width:520px;max-width:95vw;max-height:90vh;
  overflow-y:auto;
  box-shadow:var(--shadow-lg);
  animation:modalIn .2s ease;
}
@keyframes modalIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.modal-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:20px 24px 0;
}
.modal-header h2{font-size:18px;font-weight:700;color:var(--text)}
.modal-close{
  width:32px;height:32px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  transition:background .15s;color:var(--text-muted);
}
.modal-close:hover{background:var(--bg);color:var(--text)}
.modal-body{padding:20px 24px 24px}
.modal-footer{
  display:flex;justify-content:flex-end;gap:10px;
  padding-top:16px;border-top:1px solid var(--border);margin-top:8px;
}

/* --- STEPS INDICATOR --- */
.steps-indicator{display:flex;gap:8px;margin-bottom:24px}
.step-dot{flex:1;height:4px;border-radius:2px;background:var(--border);transition:background .15s}
.step-dot.active{background:var(--brand)}
.step-dot.done{background:var(--success)}

/* --- SLOT GRID --- */
.slot-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));
  gap:8px;max-height:280px;overflow-y:auto;padding:4px 0;
}
.slot-btn{
  padding:10px 8px;border:1px solid var(--border);
  border-radius:var(--radius);font-size:13px;text-align:center;
  transition:all .15s;cursor:pointer;background:var(--surface);
}
.slot-btn:hover{border-color:var(--brand);background:var(--brand-06)}
.slot-btn.selected{border-color:var(--brand);background:var(--brand-10);color:var(--brand);font-weight:600}
.slot-btn .slot-time{font-weight:600}
.slot-btn .slot-area{font-size:11px;color:var(--text-secondary);margin-top:2px}
.slot-btn.overbooking{border-color:var(--warning);background:var(--warning-bg)}
.slot-btn.overbooking .slot-area::after{content:" (sobre-cupo)";color:var(--warning)}

/* --- CUSTOMER SEARCH --- */
.customer-results{max-height:160px;overflow-y:auto;border:1px solid var(--border);border-radius:var(--radius);margin-top:4px}
.customer-results:empty{display:none}
.customer-item{
  padding:10px 12px;cursor:pointer;
  display:flex;justify-content:space-between;align-items:center;
  transition:background .15s;border-bottom:1px solid var(--border);
}
.customer-item:last-child{border-bottom:none}
.customer-item:hover{background:var(--bg)}
.customer-item.selected{background:var(--brand-06)}
.customer-item .cust-name{font-weight:600;font-size:13px}
.customer-item .cust-id{font-size:12px;color:var(--text-secondary)}

/* --- TOGGLE --- */
.toggle-row{display:flex;align-items:center;justify-content:space-between;padding:8px 0}
.toggle-row span{font-size:13px}
.toggle{position:relative;width:40px;height:22px}
.toggle input{opacity:0;width:0;height:0}
.toggle-slider{
  position:absolute;inset:0;background:var(--border);
  border-radius:11px;cursor:pointer;transition:background .15s;
}
.toggle-slider::before{
  content:"";position:absolute;width:18px;height:18px;
  border-radius:50%;background:#fff;top:2px;left:2px;
  transition:transform .15s;
}
.toggle input:checked+.toggle-slider{background:var(--brand)}
.toggle input:checked+.toggle-slider::before{transform:translateX(18px)}
.toggle-inline{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--text-secondary);cursor:pointer}
.toggle-inline input[type="checkbox"]{accent-color:var(--brand)}

/* --- BOOKING SUCCESS --- */
.booking-success{text-align:center;padding:32px 16px}
.booking-success .success-icon{
  width:56px;height:56px;border-radius:50%;
  background:var(--success-bg);
  display:inline-flex;align-items:center;justify-content:center;
  margin-bottom:16px;
}
.booking-success .success-icon svg{width:28px;height:28px;color:var(--success)}
.booking-success h3{font-size:16px;margin-bottom:8px}
.booking-success p{font-size:13px;color:var(--text-secondary)}

/* --- AGENDA --- */
.agenda-controls{display:flex;align-items:center;gap:16px;margin-bottom:28px;flex-wrap:wrap}
.agenda-header-actions{display:flex;align-items:center;gap:8px}
.date-picker-wrapper{position:relative;display:inline-flex;align-items:center}
.date-input{position:absolute;opacity:0;width:0;height:0;pointer-events:none}
.date-display{
  padding:7px 14px;font-size:14px;font-weight:600;
  color:var(--text);cursor:pointer;
  border:1px solid var(--border);border-radius:var(--radius);
  background:var(--surface);white-space:nowrap;
  transition:border-color .15s;
}
.date-display:hover{border-color:var(--text-muted)}
.date-picker-wrapper:focus-within .date-display{border-color:var(--brand)}

.agenda-summary{display:flex;align-items:center;gap:10px;margin-bottom:24px;flex-wrap:wrap}
.summary-chip{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 14px;border-radius:20px;
  font-size:12px;font-weight:600;
  background:var(--surface);color:var(--text);
  border:1px solid var(--border);
}
.summary-chip .icon{width:15px;height:15px;color:var(--text-muted)}
.chip-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.chip-confirmed .chip-dot{background:var(--success)}
.chip-pending .chip-dot{background:var(--warning)}
.chip-canceled .chip-dot{background:var(--danger)}

.search-bar{
  display:flex;align-items:center;gap:8px;
  padding:8px 14px;border:1px solid var(--border);
  border-radius:var(--radius);flex:1;max-width:360px;
  background:var(--surface);
  transition:border-color .15s;
}
.search-bar:focus-within{border-color:var(--brand)}
.search-bar .icon{color:var(--text-muted);width:18px;height:18px;flex-shrink:0}
.search-bar input{border:none;padding:0;flex:1;font-size:14px;background:transparent;outline:none}

/* --- AREA GROUPS (Agenda) --- */
.area-group{
  margin-bottom:20px;border:1px solid var(--border);
  border-radius:var(--radius-lg);overflow:hidden;
  background:var(--surface);box-shadow:var(--shadow-sm);
}
.area-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 20px;
  background:var(--bg);border-bottom:1px solid var(--border);
}
.area-title{display:flex;align-items:center;gap:10px}
.area-title .icon{width:20px;height:20px;color:var(--brand)}
.area-title h3{font-size:14px;font-weight:700;color:var(--text)}
.area-count{
  font-size:11px;font-weight:600;
  color:var(--text-secondary);padding:3px 10px;
  border-radius:12px;background:var(--surface);
  border:1px solid var(--border);
}

.booking-list{display:flex;flex-direction:column}
.booking-card{
  display:grid;grid-template-columns:160px 1fr auto;
  align-items:center;gap:16px;padding:14px 20px;
  border-bottom:1px solid var(--border);transition:background .12s;
}
.booking-card:last-child{border-bottom:none}
.booking-card:hover{background:var(--brand-06)}
.booking-card.canceled{opacity:.55}

.booking-time{display:flex;align-items:center;gap:4px;flex-shrink:0}
.time-start{font-size:14px;font-weight:700;color:var(--text)}
.time-sep{color:var(--text-muted);font-size:12px}
.time-end{font-size:13px;color:var(--text-secondary)}
.time-duration{
  font-size:11px;color:var(--text-muted);margin-left:6px;
  padding:2px 6px;border-radius:var(--radius-sm);background:var(--bg);
}

.booking-info{min-width:0}
.booking-patient{display:flex;align-items:center;gap:10px;margin-bottom:2px}
.patient-name{font-size:14px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.patient-name.anonymous{color:var(--text-muted);font-style:italic;font-weight:400}
.patient-id{font-size:12px;color:var(--text-secondary);flex-shrink:0}
.booking-details{display:flex;align-items:center;gap:8px}
.detail-specialty{font-size:12px;color:var(--brand);font-weight:600}
.detail-plan{font-size:12px;color:var(--text-secondary)}
.detail-plan::before{content:"·";margin-right:8px}

/* --- LOADING --- */
.agenda-loading{display:flex;flex-direction:column;align-items:center;gap:12px;padding:60px 20px;color:var(--text-secondary);font-size:14px}
.loading-spinner{
  width:32px;height:32px;
  border:3px solid var(--border);
  border-top-color:var(--brand);
  border-radius:50%;
  animation:spin .7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

.slots-empty,.slots-loading{text-align:center;padding:24px 16px;color:var(--text-secondary);font-size:13px}

/* --- EMPTY & WELCOME --- */
.empty-state,.welcome-content{
  display:flex;flex-direction:column;align-items:center;
  justify-content:center;text-align:center;
  padding:80px 40px;
}
.empty-state h2,.welcome-content h2{
  font-size:20px;font-weight:700;color:var(--brand-dark);margin-bottom:8px;
}
.empty-state p,.welcome-content p{
  color:var(--text-secondary);max-width:400px;line-height:1.6;
}
.welcome-icon{
  width:80px;height:80px;border-radius:20px;
  background:var(--brand-light);
  display:flex;align-items:center;justify-content:center;
  margin-bottom:24px;
}
.welcome-icon svg{width:40px;height:40px;color:var(--brand)}

/* --- SUB-PAGE WITH SIDEBAR --- */
.sub-layout{display:flex;min-height:calc(100vh - var(--header-h))}
.sub-sidebar{
  width:var(--sidebar-w);
  background:var(--surface);
  border-right:1px solid var(--border);
  flex-shrink:0;overflow-y:auto;
}
.sub-sidebar-title{
  display:flex;align-items:center;gap:10px;
  padding:20px 20px 16px;
  border-bottom:1px solid var(--border);
}
.sub-sidebar-title h2{font-size:15px;font-weight:700;color:var(--text);flex:1}
.sub-nav{padding:8px 12px}
.sub-nav-item{
  display:flex;align-items:center;gap:10px;
  padding:9px 12px;border-radius:var(--radius);
  font-size:13px;font-weight:500;
  color:var(--text-secondary);
  transition:all .15s;margin-bottom:2px;
}
.sub-nav-item:hover{background:var(--bg);color:var(--text)}
.sub-nav-item.active{background:var(--brand-10);color:var(--brand);font-weight:600}
.sub-nav-item .icon{width:18px;height:18px;flex-shrink:0;opacity:.6}
.sub-nav-item.active .icon{opacity:1}

.sub-main{flex:1;background:var(--bg);overflow-y:auto}
.sub-content{padding:28px 32px}
.sub-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}
.sub-header h2{font-size:18px;font-weight:700;color:var(--text)}

.btn-back{
  display:flex;align-items:center;justify-content:center;
  width:32px;height:32px;border-radius:var(--radius);
  color:var(--text-muted);transition:all .15s;
}
.btn-back:hover{background:var(--bg);color:var(--text)}

/* --- SECTION HEADER --- */
.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}
.section-header h1{font-size:20px;font-weight:700;color:var(--text)}
.section-subtitle{color:var(--text-secondary);margin-bottom:24px;font-size:14px;margin-top:-16px}

/* --- REPORTS --- */
.filter-bar{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:24px;align-items:flex-end}
.filter-bar select,.filter-bar input[type="date"]{
  padding:9px 14px;border:1px solid var(--border);
  border-radius:var(--radius);background:var(--surface);
  font-size:13px;color:var(--text);
}
.filter-bar select:focus,.filter-bar input:focus{border-color:var(--brand);outline:none}

/* --- RESPONSIVE --- */
@media(max-width:1200px){
  .kpi-grid{grid-template-columns:1fr 1fr}
  .chart-grid{grid-template-columns:1fr}
}
@media(max-width:768px){
  .sidebar{display:none}
  .main{margin-left:0}
  .page{padding:20px 16px}
  .booking-card{grid-template-columns:1fr;gap:8px}
  .kpi-grid{grid-template-columns:1fr}
}
