/* ══════════════════════════════════════════════
   WEVIAN Business — CSS Clean / Light
   Inspirado em Stripe, Notion, Linear
══════════════════════════════════════════════ */

:root {
  --bg: #f8f9fa;
  --bg2: #ffffff;
  --bg3: #f1f3f5;
  --bg4: #e9ecef;
  --border: #e5e7eb;
  --border2: #d1d5db;
  --text: #111827;
  --text2: #6b7280;
  --text3: #9ca3af;
  --primary: #1a7fc4;
  --primary2: #1d6faa;
  --primary3: #3b9dd4;
  --primary-light: #eff6ff;
  --primary-glow: rgba(26,127,196,0.08);
  --accent: #1db88a;
  --accent2: #17a47a;
  --accent-light: #f0fdf8;
  --accent-glow: rgba(29,184,138,0.08);
  --red: #ef4444;
  --red-light: #fef2f2;
  --red-dim: rgba(239,68,68,0.08);
  --orange: #f59e0b;
  --orange-light: #fffbeb;
  --orange-dim: rgba(245,158,11,0.08);
  --gold: #d97706;
  --gold-light: #fef3c7;
  --gold-dim: rgba(217,119,6,0.08);
  --green: #1db88a;
  --green-light: #f0fdf8;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 10px 15px rgba(0,0,0,0.07), 0 4px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 25px rgba(0,0,0,0.08), 0 10px 10px rgba(0,0,0,0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --sidebar-width: 248px;
  --sidebar-collapsed: 60px;
  --font-display: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'DM Mono', monospace;
  --font-body: 'Inter', sans-serif;
}

/* ── Reset ── */
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width:4px; height:4px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border2); border-radius:4px; }

/* ══════════════════════════════════════════════
   SCREENS
══════════════════════════════════════════════ */
.screen { display:none !important; }
.screen.active { display:flex !important; flex-direction:column; min-height:100vh; }

/* ══════════════════════════════════════════════
   SPLASH
══════════════════════════════════════════════ */
#splash {
  align-items:center; justify-content:center;
  background: #fff;
  position:relative;
}
.splash-inner { text-align:center; animation:fadeUp 0.6s ease both; }
.splash-wordmark {
  font-size:40px; font-weight:800; letter-spacing:-0.02em;
  color: var(--text);
}
.splash-wordmark span { color: var(--primary); }
.splash-sub { font-size:13px; color:var(--text3); letter-spacing:0.05em; margin-top:6px; }
.splash-badge {
  display:inline-block; margin-top:12px; padding:4px 12px;
  background:var(--primary-light); border:1px solid rgba(26,127,196,0.2);
  border-radius:20px; font-size:11px; font-weight:600;
  color:var(--primary); letter-spacing:0.1em;
}
.splash-line { width:32px; height:2px; background:var(--primary); margin:24px auto; border-radius:2px; opacity:0.3; }
.splash-loader-wrap { display:flex; justify-content:center; gap:6px; }
.splash-dot { width:6px; height:6px; border-radius:50%; background:var(--primary); opacity:0.25; animation:dotPulse 1.4s ease infinite; }
.splash-dot:nth-child(2) { animation-delay:0.2s; background:var(--accent); }
.splash-dot:nth-child(3) { animation-delay:0.4s; }
@keyframes dotPulse { 0%,100%{opacity:0.25;transform:scale(1)} 50%{opacity:1;transform:scale(1.3)} }

/* ══════════════════════════════════════════════
   AUTH
══════════════════════════════════════════════ */
#auth {
  align-items:center; justify-content:center;
  background: var(--bg); padding:24px;
}
.auth-box { width:100%; max-width:400px; animation:fadeUp 0.5s ease both; }
.auth-brand { text-align:center; margin-bottom:32px; }
.auth-wordmark { font-size:28px; font-weight:800; letter-spacing:-0.02em; color:var(--text); }
.auth-wordmark span { color:var(--primary); }
.auth-badge { display:inline-block; margin-top:6px; padding:3px 10px; background:var(--primary-light); border:1px solid rgba(26,127,196,0.2); border-radius:20px; font-size:10px; font-weight:600; color:var(--primary); letter-spacing:0.1em; }
.auth-tagline { font-size:13px; color:var(--text3); margin-top:4px; }

.auth-tabs { display:flex; background:var(--bg3); border:1px solid var(--border); border-radius:var(--radius-xs); padding:3px; margin-bottom:20px; }
.auth-tab { flex:1; padding:8px; text-align:center; font-size:13px; font-weight:500; color:var(--text3); cursor:pointer; border-radius:4px; transition:all 0.2s; }
.auth-tab.active { background:#fff; color:var(--text); box-shadow:var(--shadow-xs); }

.auth-form { display:flex; flex-direction:column; gap:10px; }
.auth-field { display:flex; flex-direction:column; gap:4px; }
.auth-label { font-size:12px; font-weight:500; color:var(--text2); }
.auth-input {
  padding:10px 12px; background:#fff; border:1.5px solid var(--border);
  border-radius:var(--radius-xs); color:var(--text); font-size:14px;
  font-family:var(--font-body); outline:none; transition:border 0.15s, box-shadow 0.15s;
}
.auth-input:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(26,127,196,0.08); }
.auth-input::placeholder { color:var(--text3); }

.auth-btn {
  padding:11px; border:none; border-radius:var(--radius-xs);
  color:#fff; font-size:14px; font-weight:600; cursor:pointer;
  transition:all 0.2s; font-family:var(--font-body);
  background: var(--primary);
  box-shadow: 0 1px 2px rgba(26,127,196,0.3);
  margin-top:4px;
}
.auth-btn:hover { background:var(--primary2); box-shadow:0 4px 12px rgba(26,127,196,0.3); transform:translateY(-1px); }
.auth-btn:active { transform:translateY(0); }

.auth-error { background:var(--red-light); border:1px solid rgba(239,68,68,0.2); border-radius:var(--radius-xs); padding:10px 12px; font-size:12px; color:var(--red); display:none; }
.auth-error.show { display:block; }
.auth-footer { text-align:center; margin-top:16px; font-size:13px; color:var(--text3); }
.auth-footer a { color:var(--primary); cursor:pointer; font-weight:500; }

/* ══════════════════════════════════════════════
   DASHBOARD LAYOUT
══════════════════════════════════════════════ */
#dashboard { flex-direction:row; min-height:100vh; }

/* ══════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.25s cubic-bezier(0.4,0,0.2,1);
  z-index: 50;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }

/* Brand */
.sidebar-brand {
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  overflow: hidden;
}
.sidebar-logo {
  width: 30px; height: 30px; flex-shrink: 0;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
  letter-spacing: -0.02em;
}
.sidebar-brand-text { overflow: hidden; white-space: nowrap; }
.sidebar-wordmark { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.sidebar-tagline { font-size: 10px; color: var(--primary); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 1px; }

/* Toggle button */
.sidebar-toggle {
  position: absolute; top: 18px; right: -11px;
  width: 22px; height: 22px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 9px; color: var(--text3);
  transition: all 0.2s; z-index: 51;
  box-shadow: var(--shadow-xs);
}
.sidebar-toggle:hover { background:var(--primary); color:#fff; border-color:var(--primary); }

/* Toggle PF/PJ */
.mode-toggle {
  margin: 10px 10px 4px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 3px;
  display: flex;
  overflow: hidden;
  white-space: nowrap;
}
.mode-btn {
  flex: 1; padding: 6px 8px; text-align: center;
  font-size: 11px; font-weight: 600; cursor: pointer;
  border-radius: 4px; transition: all 0.2s;
  color: var(--text3);
}
.mode-btn.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-xs); }
.sidebar.collapsed .mode-toggle { display:none; }
.sidebar.collapsed .sidebar-brand { cursor: default; }

/* Nav groups */
.nav-group { padding: 6px 8px 0; }
.nav-group:has(.nav-item[data-label="Agendamentos"]) .nav-group-label,
.nav-group-label.salao { color: #a78bfa; }
.nav-group-label {
  font-size: 10px; color: var(--text3);
  letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 600; padding: 8px 8px 4px;
  white-space: nowrap; overflow: hidden;
  transition: opacity 0.2s;
}
.sidebar.collapsed .nav-group-label { opacity: 0; }

.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--radius-xs);
  cursor: pointer; font-size: 13px; font-weight: 500;
  color: var(--text2); transition: all 0.15s;
  margin-bottom: 1px; white-space: nowrap; overflow: hidden;
}
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: var(--primary-light); color: var(--primary); }
.nav-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-text { transition: opacity 0.2s; font-size: 13px; }
.sidebar.collapsed .nav-text { opacity: 0; width: 0; }
.nav-badge {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700; padding: 2px 5px;
  border-radius: 20px; flex-shrink: 0;
}
.sidebar.collapsed .nav-badge { display:none; }

/* Tooltip collapsed */
.sidebar.collapsed .nav-item { position: relative; }
.sidebar.collapsed .nav-item:hover::after {
  content: attr(data-label);
  position: absolute; left: calc(var(--sidebar-collapsed) + 4px);
  background: var(--text); color: #fff;
  font-size: 12px; font-weight: 500; padding: 5px 10px;
  border-radius: var(--radius-xs); white-space: nowrap;
  z-index: 100; pointer-events: none;
  box-shadow: var(--shadow-md);
}

/* Sidebar footer */
.sidebar-footer {
  margin-top: auto; padding: 10px 8px;
  border-top: 1px solid var(--border);
}
.user-card {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--radius-xs);
  cursor: pointer; transition: background 0.15s; overflow: hidden;
}
.user-card:hover { background: var(--bg3); }
.user-ava {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.user-info { overflow: hidden; white-space: nowrap; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text); }
.user-plan { font-size: 11px; color: var(--primary); font-weight: 500; }
.sidebar.collapsed .user-info { display:none; }

/* ══════════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════════ */
.main { flex: 1; overflow-y: auto; background: var(--bg); min-width: 0; }

/* Topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: #fff; z-index: 10;
}
.topbar-left { display:flex; align-items:center; gap:12px; }
.mobile-menu-btn {
  display: none; background: none; border: none;
  color: var(--text2); font-size: 20px; cursor: pointer; padding: 4px;
}
.topbar-title { font-size: 15px; font-weight: 600; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-badge {
  padding: 3px 10px; border-radius: 20px;
  background: var(--primary-light); border: 1px solid rgba(26,127,196,0.15);
  font-size: 11px; font-weight: 600; color: var(--primary);
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notif { position:relative; cursor:pointer; font-size:18px; color:var(--text3); transition:color 0.2s; }
.notif:hover { color:var(--text); }
.notif-dot { position:absolute; top:-1px; right:-1px; width:7px; height:7px; background:var(--red); border-radius:50%; border:2px solid #fff; }

/* Content */
.content { padding: 24px 28px; max-width: 1200px; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeUp 0.25s ease both; }

/* ══════════════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════════════ */
.page-header { margin-bottom: 20px; }
.page-title { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing:-0.02em; display:flex; align-items:center; gap:8px; }
.page-title span { font-size: 20px; }
.page-sub { font-size: 13px; color: var(--text3); margin-top: 3px; }

/* ══════════════════════════════════════════════
   STAT CARDS
══════════════════════════════════════════════ */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stats-grid-2 { grid-template-columns: repeat(2, 1fr); }

.stat-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  transition: box-shadow 0.2s, transform 0.2s;
  box-shadow: var(--shadow-xs);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-card.primary { border-left: 3px solid var(--primary); }

.stat-icon { font-size: 18px; margin-bottom: 10px; }
.stat-label { font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.stat-value { font-size: 24px; font-weight: 700; line-height: 1; color: var(--text); letter-spacing: -0.02em; }
.stat-value.blue { color: var(--primary); }
.stat-value.green { color: var(--accent); }
.stat-value.red { color: var(--red); }
.stat-value.orange { color: var(--orange); }
.stat-delta { font-size: 11px; margin-top: 6px; color: var(--text3); display:flex; align-items:center; gap:4px; font-weight: 500; }
.stat-delta.up { color: var(--accent); }
.stat-delta.down { color: var(--red); }

/* ══════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════ */
.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  margin-bottom: 16px; box-shadow: var(--shadow-xs);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title { font-size: 12px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.06em; }
.card-action { font-size: 12px; font-weight: 500; color: var(--primary); cursor: pointer; transition: color 0.15s; }
.card-action:hover { color: var(--primary2); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }

/* ══════════════════════════════════════════════
   BOTÕES
══════════════════════════════════════════════ */
.btn {
  padding: 9px 16px; border: none; border-radius: var(--radius-xs);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.15s; font-family: var(--font-body);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(26,127,196,0.2); }
.btn-primary:hover { background: var(--primary2); transform: translateY(-1px); box-shadow: 0 4px 8px rgba(26,127,196,0.25); }
.btn-secondary { background: #fff; border: 1px solid var(--border); color: var(--text2); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-danger { background: var(--red-light); border: 1px solid rgba(239,68,68,0.2); color: var(--red); }
.btn-danger:hover { background: rgba(239,68,68,0.15); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; padding: 11px; }

/* ══════════════════════════════════════════════
   FORMULÁRIOS
══════════════════════════════════════════════ */
.form-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text2); }
.form-input {
  padding: 9px 12px; background: #fff;
  border: 1.5px solid var(--border); border-radius: var(--radius-xs);
  color: var(--text); font-size: 13px; font-family: var(--font-body);
  outline: none; transition: border 0.15s, box-shadow 0.15s; width: 100%;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,127,196,0.08); }
.form-input::placeholder { color: var(--text3); }
.form-select {
  padding: 9px 12px; background: #fff;
  border: 1.5px solid var(--border); border-radius: var(--radius-xs);
  color: var(--text); font-size: 13px; font-family: var(--font-body);
  outline: none; transition: border 0.15s; width: 100%; cursor: pointer;
}
.form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,127,196,0.08); }
.form-row { display: grid; gap: 12px; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-hint { font-size: 11px; color: var(--text3); margin-top: 3px; }

/* ══════════════════════════════════════════════
   LISTAS
══════════════════════════════════════════════ */
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: var(--radius-xs);
  background: #fff; border: 1px solid var(--border);
  margin-bottom: 6px; transition: box-shadow 0.15s, border-color 0.15s;
  box-shadow: var(--shadow-xs);
}
.list-item:hover { border-color: var(--border2); box-shadow: var(--shadow-sm); }
.list-icon {
  width: 36px; height: 36px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.list-icon.blue { background: var(--primary-light); }
.list-icon.green { background: var(--accent-light); }
.list-icon.red { background: var(--red-light); }
.list-icon.orange { background: var(--orange-light); }
.list-icon.gold { background: var(--gold-light); }
.list-info { flex: 1; min-width: 0; }
.list-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { font-size: 11px; color: var(--text3); margin-top: 2px; }
.list-right { text-align: right; flex-shrink: 0; }
.list-amount { font-size: 14px; font-weight: 700; }
.list-amount.blue { color: var(--primary); }
.list-amount.green { color: var(--accent); }
.list-amount.red { color: var(--red); }
.list-amount.orange { color: var(--orange); }
.list-date { font-size: 11px; color: var(--text3); margin-top: 2px; }
.list-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.list-action { font-size: 11px; font-weight: 500; cursor: pointer; transition: color 0.15s; padding: 3px 6px; border-radius: 4px; }
.list-action.edit { color: var(--primary); }
.list-action.edit:hover { background: var(--primary-light); }
.list-action.delete { color: var(--red); opacity: 0.6; }
.list-action.delete:hover { opacity: 1; background: var(--red-light); }
.list-action.check { color: var(--accent); }
.list-action.check:hover { background: var(--accent-light); }

/* ══════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.03em;
}
.badge-green { background: var(--accent-light); color: var(--accent2); border: 1px solid rgba(29,184,138,0.2); }
.badge-red { background: var(--red-light); color: var(--red); border: 1px solid rgba(239,68,68,0.15); }
.badge-blue { background: var(--primary-light); color: var(--primary); border: 1px solid rgba(26,127,196,0.15); }
.badge-orange { background: var(--orange-light); color: var(--orange); border: 1px solid rgba(245,158,11,0.2); }
.badge-gold { background: var(--gold-light); color: var(--gold); border: 1px solid rgba(217,119,6,0.2); }

/* ══════════════════════════════════════════════
   INSIGHTS / ALERTAS
══════════════════════════════════════════════ */
.insight {
  background: #fff; border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-xs); padding: 12px 16px;
  margin-bottom: 10px; font-size: 13px; color: var(--text2); line-height: 1.6;
  box-shadow: var(--shadow-xs);
}
.insight strong { color: var(--text); font-weight: 600; }
.insight.success { border-left-color: var(--accent); background: var(--accent-light); }
.insight.warning { border-left-color: var(--orange); background: var(--orange-light); }
.insight.danger { border-left-color: var(--red); background: var(--red-light); }
.insight.info { border-left-color: var(--primary); background: var(--primary-light); }

/* ══════════════════════════════════════════════
   PROGRESS BAR
══════════════════════════════════════════════ */
.progress-wrap { margin: 8px 0; }
.progress-labels { display: flex; justify-content: space-between; margin-bottom: 6px; }
.progress-labels span { font-size: 11px; color: var(--text3); font-weight: 500; }
.progress-labels strong { font-size: 11px; color: var(--primary); font-weight: 700; }
.progress-bar { height: 5px; background: var(--bg3); border-radius: 5px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 5px; transition: width 0.8s ease; background: var(--primary); }
.progress-fill.danger { background: var(--red); }

/* ══════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
.modal {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
}
.modal-header { padding: 20px 20px 0; display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-title { font-size: 16px; font-weight: 700; color: var(--text); }
.modal-close { background: none; border: none; color: var(--text3); font-size: 20px; cursor: pointer; padding: 4px; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 0 20px 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

@keyframes slideUp { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* ══════════════════════════════════════════════
   TABS INTERNAS
══════════════════════════════════════════════ */
.inner-tabs { display: flex; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 3px; margin-bottom: 16px; }
.inner-tab { flex: 1; padding: 7px; text-align: center; font-size: 12px; font-weight: 500; color: var(--text3); cursor: pointer; border-radius: 4px; transition: all 0.15s; }
.inner-tab.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: var(--shadow-xs); }

/* ══════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════ */
.empty-state { text-align: center; padding: 40px 20px; }
.empty-state-icon { font-size: 32px; margin-bottom: 10px; opacity: 0.4; }
.empty-state-text { font-size: 13px; color: var(--text3); font-weight: 500; }

/* ══════════════════════════════════════════════
   SIDEBAR OVERLAY (mobile)
══════════════════════════════════════════════ */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 49;
}
.sidebar-overlay.open { display: block; }

/* ══════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════ */
@keyframes fadeUp { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed; left: -100%; top: 0; height: 100vh;
    width: var(--sidebar-width) !important;
    transition: left 0.3s cubic-bezier(0.4,0,0.2,1);
    z-index: 50; box-shadow: var(--shadow-lg);
  }
  .sidebar.mobile-open { left: 0; }
  .sidebar-toggle { display: none; }
  .mobile-menu-btn { display: flex; }
  .content { padding: 16px 16px 80px; }
  .topbar { padding: 12px 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}