/* ═══════════════════════════════════════════════════════════════
   Salão Manager — Design System
   Dark glassmorphism com acentos dourados
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Cores base */
  --bg-primary:    #0f0f0f;
  --bg-secondary:  #1a1a1a;
  --bg-tertiary:   #242424;
  --text-primary:  #f0f0f0;
  --text-secondary:#9a9a9a;
  --text-muted:    #666;

  /* Accent */
  --primary:       #D4AF37;
  --primary-light: #F3E5AB;
  --primary-dark:  #A88920;
  --primary-alpha: rgba(212,175,55,0.12);
  --primary-glow:  rgba(212,175,55,0.3);

  /* Semânticas */
  --danger:        #ef4444;
  --danger-alpha:  rgba(239,68,68,0.15);
  --success:       #10b981;
  --success-alpha: rgba(16,185,129,0.15);
  --warning:       #f59e0b;
  --warning-alpha: rgba(245,158,11,0.15);
  --info:          #3b82f6;
  --info-alpha:    rgba(59,130,246,0.15);

  /* Bordas e superfícies */
  --border:        rgba(255,255,255,0.08);
  --border-light:  rgba(255,255,255,0.04);
  --glass-bg:      rgba(26,26,26,0.8);

  /* Raios */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  20px;
  --r-full:9999px;

  /* Sombras */
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-gold: 0 0 20px rgba(212,175,55,0.15);

  /* Sidebar */
  --sidebar-w: 260px;
  --header-h:  60px;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; }

/* ── Layout ─────────────────────────────────────────────────────── */
.layout-container {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform 0.25s ease;
}
.logo-container {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 28px 24px 20px;
}
.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), #FFD700);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: #000;
  box-shadow: var(--shadow-gold);
  flex-shrink: 0;
}
.logo-icon svg { width: 18px; height: 18px; }
.logo-text h1 { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.5px; }
.logo-text span { font-size: 0.7rem; color: var(--primary); text-transform: uppercase; letter-spacing: 2px; }

.nav-menu { flex: 1; padding: 8px 12px; overflow-y: auto; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  margin-bottom: 2px;
}
.nav-item:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.nav-item.active { color: var(--primary); background: var(--primary-alpha); }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.user-profile {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 36px; height: 36px;
  background: var(--primary);
  color: #000;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.75rem; color: var(--text-secondary); }

/* Mobile sidebar overlay */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 199;
  backdrop-filter: blur(2px);
}

/* ── Main Content ─────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 36px 40px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 80% 10%, rgba(212,175,55,0.04) 0%, transparent 40%),
    radial-gradient(circle at 20% 90%, rgba(212,175,55,0.03) 0%, transparent 40%);
}

/* ── Mobile header ─────────────────────────────────────────────────── */
.mobile-header {
  display: none;
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  padding: 0 16px;
  align-items: center;
  gap: 12px;
}
.mobile-logo { display: flex; align-items: center; gap: 10px; flex: 1; }
.menu-toggle {
  background: none; border: none;
  color: var(--text-primary);
  padding: 8px;
  border-radius: var(--r-sm);
}

/* ── Page header ─────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 4px; }
.page-header p.text-secondary { font-size: 0.875rem; }

/* ── Glassmorphism card ─────────────────────────────────────────────── */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--r-lg); }
.card-header { padding: 18px 22px; border-bottom: 1px solid var(--border); }
.card-body { padding: 22px; }

/* ── Grid stats ─────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  padding: 22px;
  border-radius: var(--r-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.stat-card:hover { border-color: var(--primary-dark); transform: translateY(-2px); }
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
}
.stat-label { font-size: 0.78rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--primary); }
.stat-sub { font-size: 0.8rem; color: var(--text-secondary); margin-top: 4px; }
.stat-icon { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); opacity: 0.08; }
.stat-icon svg { width: 48px; height: 48px; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-weight: 600; font-size: 0.875rem;
  transition: all 0.2s;
  border: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-primary {
  background: var(--primary); color: #000;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-light); transform: translateY(-1px); }
.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,0.06); }
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover:not(:disabled) { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.15); }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-danger:hover:not(:disabled)  { background: #dc2626; transform: translateY(-1px); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #059669; }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-xs { padding: 5px 10px; font-size: 0.75rem; }
.btn-icon { padding: 9px; }
.btn-full { width: 100%; }

/* Icon buttons */
.icon-btn-small {
  background: none; border: none;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: var(--r-sm);
  transition: all 0.2s;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn-small:hover { color: var(--primary); background: var(--primary-alpha); }
.icon-btn-small.danger:hover { color: var(--danger); background: var(--danger-alpha); }

/* ── Inputs ─────────────────────────────────────────────────────────── */
.input-group { margin-bottom: 18px; }
.input-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 7px;
  font-weight: 500;
}
.input-field {
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.2s;
}
.input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-alpha);
}
.input-field::placeholder { color: var(--text-muted); }
.input-field option { background: var(--bg-secondary); }
.input-error { border-color: var(--danger) !important; }
.field-error { font-size: 0.78rem; color: var(--danger); margin-top: 4px; }
.input-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

/* ── Table ─────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th {
  padding: 13px 18px;
  text-align: left;
  color: var(--text-secondary);
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td { padding: 14px 18px; border-bottom: 1px solid var(--border-light); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.action-buttons { display: flex; gap: 6px; justify-content: flex-end; }

/* ── Badges / Status ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.75rem; font-weight: 600;
}
.badge-gold    { background: var(--primary-alpha); color: var(--primary); }
.badge-success { background: var(--success-alpha); color: var(--success); }
.badge-danger  { background: var(--danger-alpha);  color: var(--danger); }
.badge-warning { background: var(--warning-alpha); color: var(--warning); }
.badge-info    { background: var(--info-alpha);    color: var(--info); }
.badge-gray    { background: rgba(255,255,255,0.06); color: var(--text-secondary); }

.status-badge { @extend .badge; }
.status-AGENDADO  { background: var(--info-alpha);    color: var(--info); }
.status-CONCLUIDO { background: var(--success-alpha); color: var(--success); }
.status-CANCELADO { background: var(--danger-alpha);  color: var(--danger); }
.status-PENDENTE  { background: var(--warning-alpha); color: var(--warning); }
.status-SOLICITADO{ background: var(--info-alpha);    color: var(--info); }
.status-PAGO      { background: var(--success-alpha); color: var(--success); }
.status-DESCONTADO{ background: rgba(255,255,255,0.06); color: var(--text-secondary); }
.status-RECUSADO  { background: var(--danger-alpha);  color: var(--danger); }

/* ── Modal ─────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modal-in 0.2s ease-out;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 28px 0;
  margin-bottom: 20px;
}
.modal-header h3 { font-size: 1.15rem; font-weight: 700; }
.modal-body  { padding: 0 28px 22px; }
.modal-footer{
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 18px 28px;
  border-top: 1px solid var(--border);
}
.modal-close {
  background: none; border: none;
  color: var(--text-secondary);
  padding: 4px;
  border-radius: var(--r-sm);
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text-primary); }

/* ── Alert ─────────────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 18px;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-warning { background: var(--warning-alpha); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }
.alert-danger  { background: var(--danger-alpha);  color: var(--danger);  border: 1px solid rgba(239,68,68,0.2); }
.alert-success { background: var(--success-alpha); color: var(--success); border: 1px solid rgba(16,185,129,0.2); }
.alert-info    { background: var(--info-alpha);    color: var(--info);    border: 1px solid rgba(59,130,246,0.2); }

/* ── Toast notifications ─────────────────────────────────────────────── */
#toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  min-width: 280px;
  max-width: 420px;
  animation: toast-in 0.3s ease-out;
  pointer-events: all;
}
.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-info    { border-left: 3px solid var(--info); }
.toast-out { animation: toast-out 0.3s ease-in forwards; }

/* ── Loader ─────────────────────────────────────────────────────────── */
.loader {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.loader-lg { width: 40px; height: 40px; border-width: 3px; }
.loading-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  gap: 16px;
}

/* ── Empty state ─────────────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-secondary);
}
.empty-state svg { width: 48px; height: 48px; opacity: 0.3; margin-bottom: 16px; }
.empty-state p { font-size: 0.9rem; }

/* ── Agenda ─────────────────────────────────────────────────────────── */
.calendar-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.calendar-day-header {
  text-align: center;
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-secondary);
  padding: 8px 0;
  text-transform: uppercase;
}
.calendar-cell {
  aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 6px 4px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  border: 1px solid transparent;
}
.calendar-cell:hover { background: rgba(255,255,255,0.04); border-color: var(--border); }
.calendar-cell.selected { background: var(--primary-alpha); border-color: var(--primary); }
.calendar-cell.today .day-number {
  background: var(--primary); color: #000;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.calendar-cell.faded { opacity: 0.3; }
.day-number { font-size: 0.85rem; font-weight: 500; line-height: 1; }
.day-dots { display: flex; gap: 2px; margin-top: 3px; flex-wrap: wrap; justify-content: center; }
.dot { width: 5px; height: 5px; background: var(--primary); border-radius: 50%; }

/* Appointment cards */
.appointment-card {
  padding: 18px 20px; margin-bottom: 12px;
  display: flex; gap: 20px; align-items: flex-start;
  border-radius: var(--r-lg);
  transition: border-color 0.2s;
}
.appointment-card:hover { border-color: rgba(255,255,255,0.12); }
.app-time {
  font-size: 1rem; font-weight: 700; color: var(--primary);
  min-width: 52px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.app-time svg { width: 14px; height: 14px; opacity: 0.7; }
.app-details { flex: 1; min-width: 0; }
.app-details h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; }
.app-phone { font-size: 0.8rem; color: var(--text-secondary); font-weight: 400; }
.app-service-item {
  font-size: 0.82rem; color: var(--text-secondary);
  padding: 6px 0; border-top: 1px solid var(--border-light);
  margin-top: 4px;
}
.app-service-item:first-child { border-top: none; }
.srv-name { color: var(--text-primary); font-weight: 500; }
.srv-employees { display: flex; gap: 5px; margin-top: 4px; flex-wrap: wrap; }
.emp-badge {
  background: rgba(212,175,55,0.1);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 500;
}
.app-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.app-total { font-size: 1.1rem; font-weight: 700; color: var(--success); }

/* Service item in modal */
.service-item-box {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 10px;
  position: relative;
}
.service-item-box:hover { border-color: rgba(255,255,255,0.12); }
.employees-list { margin-top: 12px; }
.emp-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }

/* Filter pills */
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-pill {
  padding: 6px 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
}
.filter-pill:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.2); }
.filter-pill.active { background: var(--primary-alpha); color: var(--primary); border-color: var(--primary); }

/* ── Acertos ─────────────────────────────────────────────────────────── */
.acerto-card { padding: 22px; margin-bottom: 16px; border-radius: var(--r-lg); }
.acerto-header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.acerto-avatar {
  width: 44px; height: 44px;
  background: var(--primary-alpha);
  color: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
}
.acerto-totals { display: flex; gap: 20px; flex-wrap: wrap; }
.acerto-total-item { text-align: center; }
.acerto-total-item .value { font-size: 1.25rem; font-weight: 700; }
.acerto-total-item .label { font-size: 0.75rem; color: var(--text-secondary); }

/* ── Search box ─────────────────────────────────────────────────────── */
.search-box {
  position: relative;
  max-width: 320px;
}
.search-box svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-secondary);
  pointer-events: none;
}
.search-box .input-field { padding-left: 38px; }

/* ── Forms layout ─────────────────────────────────────────────────────── */
.form-row { display: flex; gap: 16px; }
.form-row > * { flex: 1; }

/* ── Utility ─────────────────────────────────────────────────────────── */
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-gold      { color: var(--primary); }
.text-success   { color: var(--success); }
.text-danger    { color: var(--danger); }
.text-warning   { color: var(--warning); }
.text-right     { text-align: right; }
.text-center    { text-align: center; }
.font-bold      { font-weight: 700; }
.font-semibold  { font-weight: 600; }
.font-medium    { font-weight: 500; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.d-none { display: none !important; }
.d-flex { display: flex !important; }

/* ── Animations ─────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96) translateY(-10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-fade-in { animation: fadeIn 0.25s ease-out; }

/* ── Financeiro ─────────────────────────────────────────────────────── */
.finance-card { padding: 20px; border-radius: var(--r-lg); margin-bottom: 12px; }
.progress-bar-wrap { height: 6px; background: rgba(255,255,255,0.06); border-radius: var(--r-full); margin-top: 6px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); border-radius: var(--r-full); transition: width 0.4s ease; }

/* ── Scrollbar ─────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ═══ RESPONSIVE ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .sidebar-overlay.active { display: block; }

  .mobile-header { display: flex; }
  .main-content  { margin-left: 0; padding: 16px; }
  .page-header h2 { font-size: 1.4rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .appointment-card { flex-direction: column; }
  .form-row { flex-direction: column; }
  .modal-content { max-height: 95vh; }
  .modal-header, .modal-body, .modal-footer { padding-left: 20px; padding-right: 20px; }
  .data-table { font-size: 0.8rem; }
  .data-table th, .data-table td { padding: 10px 12px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 1.3rem; }
  .btn { padding: 9px 14px; font-size: 0.82rem; }
}

/* ── Print ─────────────────────────────────────────────────────────── */
@media print {
  .sidebar, .page-header button, .action-buttons, .modal-overlay { display: none !important; }
  .main-content { margin-left: 0; padding: 0; }
  body { background: #fff; color: #000; }
  .glass-panel, .card { border: 1px solid #ccc; box-shadow: none; }
}
