/* ============================================================
   Muscle Manage — Martial Arts Academy Management Platform
   Design System / Core Styles
   ============================================================ */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Brand */
  --brand-navy:      #0d1b2a;
  --brand-navy-700:  #14273c;
  --brand-navy-600:  #1b3a57;
  --brand-blue:      #2563eb;
  --brand-blue-600:  #1d4ed8;
  --brand-blue-700:  #1e40af;
  --brand-blue-soft: #e6effe;
  --brand-gold:      #d4a017;
  --brand-gold-soft: #fbf3dd;

  /* Neutrals */
  --white:      #ffffff;
  --gray-25:    #fbfcfe;
  --gray-50:    #f6f8fb;
  --gray-100:   #eef2f7;
  --gray-200:   #e2e8f0;
  --gray-300:   #cbd5e1;
  --gray-400:   #94a3b8;
  --gray-500:   #64748b;
  --gray-600:   #475569;
  --gray-700:   #334155;
  --gray-800:   #1e293b;
  --gray-900:   #0f172a;

  /* Semantic */
  --success:      #16a34a;
  --success-soft: #dcfce7;
  --warning:      #ea8a0c;
  --warning-soft: #fef3c7;
  --danger:       #dc2626;
  --danger-soft:  #fee2e2;
  --info:         #0ea5e9;
  --info-soft:    #e0f2fe;
  --purple:       #7c3aed;
  --purple-soft:  #ede9fe;

  /* Surfaces (light) */
  --app-bg:        var(--gray-50);
  --surface:       var(--white);
  --surface-2:     var(--gray-25);
  --surface-3:     var(--gray-100);
  --border:        var(--gray-200);
  --border-strong: var(--gray-300);

  /* Text */
  --text:      var(--gray-900);
  --text-2:    var(--gray-600);
  --text-3:    var(--gray-400);
  --text-inv:  var(--white);

  /* Sidebar */
  --side-bg:       var(--brand-navy);
  --side-bg-2:     var(--brand-navy-700);
  --side-text:     #aab7c9;
  --side-text-hi:  #ffffff;
  --side-active:   rgba(37,99,235,0.16);
  --side-border:   rgba(255,255,255,0.06);

  /* Effects */
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --shadow-xs: 0 1px 2px rgba(15,23,42,.06);
  --shadow-sm: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --shadow:    0 4px 12px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.04);
  --shadow-lg: 0 12px 32px rgba(15,23,42,.12), 0 4px 8px rgba(15,23,42,.06);
  --shadow-xl: 0 24px 60px rgba(15,23,42,.18);
  --ring:      0 0 0 3px rgba(37,99,235,.22);

  --sidebar-w: 264px;
  --topbar-h:  64px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Sora', var(--font-sans);
  --trans: 180ms cubic-bezier(.4,0,.2,1);
}

/* ---------- DARK THEME ---------- */
:root[data-theme="dark"] {
  --app-bg:        #0a1220;
  --surface:       #111c2e;
  --surface-2:     #0e1826;
  --surface-3:     #16233a;
  --border:        #1f3049;
  --border-strong: #2a3f5c;

  --text:     #e8eef7;
  --text-2:   #9fb0c6;
  --text-3:   #64748b;

  --gray-50:  #0e1826;
  --gray-100: #16233a;
  --gray-200: #1f3049;

  --side-bg:   #0a1220;
  --side-bg-2: #0e1826;
  --brand-blue-soft: rgba(37,99,235,.18);
  --brand-gold-soft: rgba(212,160,23,.16);
  --success-soft: rgba(22,163,74,.18);
  --warning-soft: rgba(234,138,12,.18);
  --danger-soft:  rgba(220,38,38,.18);
  --info-soft:    rgba(14,165,233,.18);
  --purple-soft:  rgba(124,58,237,.20);

  --shadow-xs: 0 1px 2px rgba(0,0,0,.4);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow:    0 4px 12px rgba(0,0,0,.45);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.55);
  --shadow-xl: 0 24px 60px rgba(0,0,0,.6);
}

/* ---------- 2. BASE ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--app-bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,h5 { font-family: var(--font-display); font-weight: 700; color: var(--text); margin: 0; letter-spacing: -.01em; }
a { color: var(--brand-blue); text-decoration: none; }
a:hover { text-decoration: none; }
::selection { background: var(--brand-blue-soft); color: var(--brand-blue-700); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 20px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }
::-webkit-scrollbar-track { background: transparent; }

.muted { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.tabular { font-variant-numeric: tabular-nums; }
.fw-6 { font-weight: 600; }
.fw-7 { font-weight: 700; }

/* ---------- 3. APP SHELL ---------- */
.app { min-height: 100vh; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  background: var(--side-bg);
  border-right: 1px solid var(--side-border);
  display: flex; flex-direction: column; z-index: 1040;
  transition: transform var(--trans);
}
.sidebar__brand {
  height: var(--topbar-h); display: flex; align-items: center; gap: 11px;
  padding: 0 20px; border-bottom: 1px solid var(--side-border); flex-shrink: 0;
}
.sidebar__logo {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-700));
  display: grid; place-items: center; color: #fff; font-size: 18px;
  box-shadow: 0 4px 12px rgba(37,99,235,.4);
}
.sidebar__name { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.1; }
.sidebar__logo--img { background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.25); overflow: hidden; }
.sidebar__logo--img img { width: 100%; height: 100%; object-fit: contain; }
.sidebar__name--academy {
  font-size: 15px; line-height: 1.25; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sidebar__name small { display: block; color: var(--brand-gold); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }

.sidebar__nav { flex: 1; overflow-y: auto; padding: 12px 12px 20px; }
.sidebar__nav::-webkit-scrollbar { width: 6px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); }
.nav-group-label {
  color: #5f7592; font-size: 10.5px; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; padding: 16px 12px 7px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; margin: 1px 0;
  border-radius: 9px; color: var(--side-text); font-weight: 500; font-size: 13.5px;
  cursor: pointer; transition: var(--trans); position: relative; white-space: nowrap;
}
.nav-item i { font-size: 17px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item:hover { background: var(--side-bg-2); color: var(--side-text-hi); }
.nav-item.active { background: var(--side-active); color: #fff; font-weight: 600; }
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; background: var(--brand-blue); border-radius: 0 4px 4px 0;
}
.nav-item .nav-badge {
  margin-left: auto; background: var(--brand-blue); color: #fff; font-size: 10px;
  font-weight: 700; padding: 1px 7px; border-radius: 20px;
}
.nav-item .nav-badge.gold { background: var(--brand-gold); }

/* ---------- 4. TOPBAR ---------- */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1020;
  display: flex; align-items: center; gap: 12px; padding: 0 22px;
}
.topbar__search {
  flex: 1; max-width: 440px; position: relative;
}
.topbar__search input {
  width: 100%; height: 40px; padding: 0 14px 0 40px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-size: 13.5px; transition: var(--trans);
}
.topbar__search input:focus { border-color: var(--brand-blue); background: var(--surface); box-shadow: var(--ring); }
.topbar__search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 16px; }
.topbar__search kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-sans); font-size: 11px; color: var(--text-3);
  background: var(--surface-3); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px;
}
.topbar__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--text-2); display: grid; place-items: center;
  cursor: pointer; transition: var(--trans); position: relative; font-size: 18px;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .dot {
  position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--surface);
}

/* Branch selector */
.branch-select {
  display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2);
  cursor: pointer; transition: var(--trans); font-weight: 600; font-size: 13px; color: var(--text);
}
.branch-select:hover { border-color: var(--border-strong); background: var(--surface); }
.branch-select .pin { color: var(--brand-blue); font-size: 16px; }
.branch-select small { color: var(--text-3); font-weight: 500; }

.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 4px 6px 4px 4px; border-radius: 40px;
  cursor: pointer; transition: var(--trans); border: 1px solid transparent;
}
.user-chip:hover { background: var(--surface-3); }

.avatar {
  border-radius: 50%; object-fit: cover; flex-shrink: 0; font-weight: 700;
  display: inline-grid; place-items: center; color: #fff; background: var(--brand-blue);
  width: 36px; height: 36px; font-size: 13px;
}
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.xl { width: 88px; height: 88px; font-size: 30px; }
.avatar.ring { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--brand-blue-soft); }

/* Quick add button */
.btn-quickadd {
  height: 40px; padding: 0 16px; border-radius: 10px; border: none; font-weight: 600; font-size: 13.5px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-700)); color: #fff;
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; transition: var(--trans);
  box-shadow: 0 4px 12px rgba(37,99,235,.32);
}
.btn-quickadd:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(37,99,235,.42); color:#fff; }
.btn-ai {
  height: 40px; padding: 0 14px; border-radius: 10px; font-weight: 600; font-size: 13px;
  background: var(--brand-navy); color: #fff; border: 1px solid var(--brand-navy-600);
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; transition: var(--trans);
}
.btn-ai:hover { color:#fff; background: var(--brand-navy-700); transform: translateY(-1px); }
.btn-ai .spark { color: var(--brand-gold); }

/* ---------- 5. PAGE CONTENT ---------- */
.page { padding: 26px 26px 60px; flex: 1; max-width: 1560px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 24px; }
.page-head .sub { color: var(--text-2); margin-top: 3px; font-size: 14px; }
.page-head .spacer { flex: 1; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.breadcrumb-row { display: flex; align-items: center; gap: 7px; color: var(--text-3); font-size: 12.5px; margin-bottom: 10px; }
.breadcrumb-row a { color: var(--text-2); }
.breadcrumb-row i { font-size: 12px; }

/* ---------- 6. BUTTONS ---------- */
.btn { font-weight: 600; font-size: 13.5px; border-radius: 10px; transition: var(--trans); border: 1px solid transparent; display: inline-flex; align-items: center; gap: 7px; }
.btn:focus-visible { box-shadow: var(--ring); }
.btn-primary { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.btn-primary:hover { background: var(--brand-blue-600); border-color: var(--brand-blue-600); color: #fff; }
.btn-navy { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
.btn-navy:hover { background: var(--brand-navy-700); color: #fff; }
.btn-gold {
  background: var(--brand-gold); border-color: var(--brand-gold); color: #3a2c05;
  /* Bootstrap's .btn:hover/:active read these; without them the background goes transparent. */
  --bs-btn-hover-bg: var(--brand-gold); --bs-btn-hover-border-color: var(--brand-gold); --bs-btn-hover-color: #3a2c05;
  --bs-btn-active-bg: var(--brand-gold); --bs-btn-active-border-color: var(--brand-gold); --bs-btn-active-color: #3a2c05;
}
.btn-gold:hover { filter: brightness(1.05); color: #3a2c05; }
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { background: var(--surface-3); color: var(--text); border-color: var(--gray-400); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-soft { background: var(--brand-blue-soft); color: var(--brand-blue-700); }
.btn-soft:hover { background: var(--brand-blue-soft); filter: brightness(.97); color: var(--brand-blue-700); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.05); color:#fff; }
.btn-icon { width: 36px; height: 36px; padding: 0; justify-content: center; }
.btn-sm { font-size: 12.5px; padding: 5px 11px; border-radius: 8px; }
.btn-lg { font-size: 15px; padding: 11px 22px; border-radius: 12px; }

/* ---------- 7. CARDS ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 15.5px; }
.card-head .sub { font-size: 12.5px; color: var(--text-2); margin-top: 1px; }
.card-head .spacer { flex: 1; }
.card-body { padding: 20px; }
.card-hover { transition: var(--trans); }
.card-hover:hover { box-shadow: var(--shadow); border-color: var(--border-strong); transform: translateY(-2px); }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; box-shadow: var(--shadow-xs); position: relative; overflow: hidden; transition: var(--trans);
}
.stat:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.stat__ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; }
.stat__label { color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.stat__value { font-family: var(--font-display); font-size: 27px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.stat__foot { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 12px; }
.stat__spark { position: absolute; right: 0; bottom: 0; width: 100px; height: 40px; opacity: .5; }
.trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12px; padding: 2px 7px; border-radius: 20px; }
.trend.up { color: var(--success); background: var(--success-soft); }
.trend.down { color: var(--danger); background: var(--danger-soft); }
.trend.flat { color: var(--text-2); background: var(--surface-3); }

.tint-blue  { background: var(--brand-blue-soft); color: var(--brand-blue); }
.tint-gold  { background: var(--brand-gold-soft); color: var(--brand-gold); }
.tint-green { background: var(--success-soft); color: var(--success); }
.tint-orange{ background: var(--warning-soft); color: var(--warning); }
.tint-red   { background: var(--danger-soft); color: var(--danger); }
.tint-info  { background: var(--info-soft); color: var(--info); }
.tint-purple{ background: var(--purple-soft); color: var(--purple); }
.tint-navy  { background: var(--brand-navy); color: #fff; }

/* ---------- 8. BADGES / PILLS ---------- */
.badge-pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px; white-space: nowrap; line-height: 1.4;
}
.badge-pill i { font-size: 8px; }
.b-green { background: var(--success-soft); color: var(--success); }
.b-red   { background: var(--danger-soft); color: var(--danger); }
.b-orange{ background: var(--warning-soft); color: #b45309; }
.b-blue  { background: var(--brand-blue-soft); color: var(--brand-blue-700); }
.b-gray  { background: var(--surface-3); color: var(--text-2); }
.b-gold  { background: var(--brand-gold-soft); color: #92710d; }
.b-purple{ background: var(--purple-soft); color: var(--purple); }
.b-info  { background: var(--info-soft); color: #0369a1; }
:root[data-theme="dark"] .b-orange { color: #fbbf24; }
:root[data-theme="dark"] .b-gold { color: #f0c14b; }
:root[data-theme="dark"] .b-info { color: #38bdf8; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 500; color: var(--text-2);
}

/* Belt badges */
.belt { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; }
.belt::before { content:''; width:22px; height:9px; border-radius:3px; border:1px solid rgba(0,0,0,.15); }
.belt-white::before  { background:#f1f5f9; }
.belt-yellow::before { background:#facc15; }
.belt-orange::before { background:#fb923c; }
.belt-green::before  { background:#22c55e; }
.belt-blue::before   { background:#3b82f6; }
.belt-brown::before  { background:#92400e; }
.belt-black::before  { background:#1e293b; }
.belt-red::before    { background:#ef4444; }

/* ---------- 9. TABLES ---------- */
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); }
.table-wrap { overflow-x: auto; }
table.dtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.dtable thead th {
  text-align: left; font-weight: 600; color: var(--text-2); font-size: 11.5px; letter-spacing: .04em;
  text-transform: uppercase; padding: 12px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0;
}
table.dtable tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.dtable tbody tr { transition: background var(--trans); }
table.dtable tbody tr:hover { background: var(--surface-2); }
table.dtable tbody tr:last-child td { border-bottom: none; }
/* Totals row */
table.dtable tfoot td, table.dtable tfoot th {
  padding: 14px 16px; background: var(--surface-2); border-top: 1px solid var(--border);
  font-weight: 700; white-space: nowrap; vertical-align: middle;
}
table.dtable tfoot .dt-total-strong { font-size: 15px; }
.cell-user { display: flex; align-items: center; gap: 11px; }
.cell-user b { font-weight: 600; display: block; color: var(--text); font-size: 13.5px; }
.cell-user small { color: var(--text-3); font-size: 12px; }

/* Toolbar (filters/search) */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.search-inline { position: relative; }
.search-inline input { height: 40px; padding: 0 12px 0 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13.5px; min-width: 260px; }
.search-inline input:focus { border-color: var(--brand-blue); box-shadow: var(--ring); }
.search-inline i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.select-pill, select.form-select { height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 500; padding: 0 34px 0 12px; }
.form-select:focus, .form-control:focus { border-color: var(--brand-blue); box-shadow: var(--ring); }

/* Segmented control */
.segment { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; }
.segment button, .segment a.btn { border: none; background: transparent; color: var(--text-2); font-weight: 600; font-size: 12.5px; padding: 6px 13px; border-radius: 8px; cursor: pointer; transition: var(--trans); text-decoration: none; }
.segment button:hover:not(.active), .segment a.btn:hover:not(.active) { color: var(--text); background: color-mix(in srgb, var(--surface) 50%, transparent); }
.segment button.active, .segment a.btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }

/* ---------- 10. PROGRESS ---------- */
.pbar { height: 7px; border-radius: 20px; background: var(--surface-3); overflow: hidden; }
.pbar > span { display: block; height: 100%; border-radius: 20px; background: var(--brand-blue); }
.pbar.gold > span { background: var(--brand-gold); }
.pbar.green > span { background: var(--success); }
.pbar.red > span { background: var(--danger); }
.capacity-txt { font-size: 12px; color: var(--text-2); font-weight: 600; }

/* ---------- 11. FORMS ---------- */
.form-label { font-weight: 600; font-size: 13px; color: var(--text); margin-bottom: 6px; }
.form-control, .form-select { border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13.5px; padding: 9px 12px; }
.form-control::placeholder { color: var(--text-3); }
.form-hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.form-section-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: 6px 0 4px; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.input-icon .form-control { padding-left: 36px; }

/* ---------- 12. MODALS / OFFCANVAS ---------- */
.modal-content { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-xl); }
.modal-header { border-bottom: 1px solid var(--border); padding: 18px 22px; }
.modal-title { font-size: 17px; font-weight: 700; font-family: var(--font-display); }
.modal-body { padding: 22px; }
.modal-footer { border-top: 1px solid var(--border); padding: 14px 22px; }
.offcanvas { background: var(--surface); color: var(--text); border-left: 1px solid var(--border); }

/* ---------- 13. DROPDOWN ---------- */
.dropdown-menu {
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  background: var(--surface); padding: 6px; font-size: 13.5px; min-width: 200px;
}
.dropdown-item { border-radius: 8px; padding: 8px 11px; color: var(--text); font-weight: 500; display: flex; align-items: center; gap: 10px; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface-3); color: var(--text); }
.dropdown-item i { font-size: 16px; color: var(--text-2); width: 18px; }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger i { color: var(--danger); }
.dropdown-divider { border-color: var(--border); margin: 6px 4px; }
.dropdown-header { color: var(--text-3); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 8px 11px 4px; }

/* ---------- 14. TABS ---------- */
.tabbar { display: flex; gap: 3px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabbar button {
  border: none; background: transparent; color: var(--text-2); font-weight: 600; font-size: 13.5px;
  padding: 12px 15px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: var(--trans); white-space: nowrap;
}
.tabbar button:hover { color: var(--text); }
.tabbar button.active { color: var(--brand-blue); border-bottom-color: var(--brand-blue); }

/* ---------- 15. TOASTS ---------- */
.toast-stack { position: fixed; top: 78px; right: 22px; z-index: 1090; display: flex; flex-direction: column; gap: 10px; width: 340px; max-width: calc(100vw - 32px); }
.toast-item {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand-blue);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 13px 14px; display: flex; gap: 11px;
  align-items: flex-start; animation: toastIn .32s cubic-bezier(.2,.8,.2,1);
}
.toast-item.success { border-left-color: var(--success); }
.toast-item.warning { border-left-color: var(--warning); }
.toast-item.error   { border-left-color: var(--danger); }
.toast-item .t-ico { font-size: 20px; margin-top: 1px; }
.toast-item.success .t-ico { color: var(--success); }
.toast-item.warning .t-ico { color: var(--warning); }
.toast-item.error .t-ico { color: var(--danger); }
.toast-item.info .t-ico { color: var(--brand-blue); }
.toast-item b { font-size: 13.5px; display: block; }
.toast-item p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-2); }
.toast-item .t-x { margin-left: auto; color: var(--text-3); cursor: pointer; background: none; border: none; font-size: 16px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* ---------- 16. EMPTY / SKELETON ---------- */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state .es-ico { width: 68px; height: 68px; border-radius: 18px; background: var(--surface-3); color: var(--text-3); display: grid; place-items: center; font-size: 30px; margin: 0 auto 16px; }
.empty-state h4 { font-size: 16px; margin-bottom: 5px; }
.empty-state p { color: var(--text-2); max-width: 340px; margin: 0 auto 16px; }
.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------- 17. AI ASSISTANT ---------- */
.ai-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 1050; height: 52px; padding: 0 20px;
  border-radius: 40px; border: none; cursor: pointer; font-weight: 600; font-size: 14px;
  background: linear-gradient(135deg, var(--brand-navy-600), var(--brand-navy)); color: #fff;
  display: inline-flex; align-items: center; gap: 9px; box-shadow: var(--shadow-lg);
  transition: var(--trans);
}
.ai-fab:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); }
.ai-fab .spark { color: var(--brand-gold); font-size: 18px; }
.ai-panel {
  position: fixed; right: 0; top: 0; bottom: 0; width: 420px; max-width: 100vw; z-index: 1080;
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-xl);
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column;
}
.ai-panel.open { transform: none; }
.ai-panel__head { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 11px; background: var(--brand-navy); color: #fff; }
.ai-panel__head .a-logo { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg,var(--brand-blue),var(--brand-blue-700)); display: grid; place-items: center; font-size: 19px; }
.ai-panel__head b { font-family: var(--font-display); font-size: 15px; }
.ai-panel__head small { color: #93c5fd; font-size: 11.5px; display: flex; align-items: center; gap: 5px; }
.ai-panel__head .x { margin-left: auto; color: #cbd5e1; cursor: pointer; background: none; border: none; font-size: 22px; }
.ai-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.ai-msg { display: flex; gap: 10px; max-width: 90%; }
.ai-msg.me { align-self: flex-end; flex-direction: row-reverse; }
.ai-msg .bubble { padding: 11px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; }
.ai-msg.bot .bubble { background: var(--surface-3); border-top-left-radius: 4px; }
.ai-msg.me .bubble { background: var(--brand-blue); color: #fff; border-top-right-radius: 4px; }
.ai-msg .a-ava { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; font-size: 15px; }
.ai-msg.bot .a-ava { background: var(--brand-navy); color: var(--brand-gold); }
.ai-suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 12px; }
.ai-suggest button { font-size: 12px; padding: 7px 12px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); cursor: pointer; transition: var(--trans); text-align: left; }
.ai-suggest button:hover { border-color: var(--brand-blue); color: var(--brand-blue); background: var(--brand-blue-soft); }
.ai-input { padding: 14px 16px; border-top: 1px solid var(--border); display: flex; gap: 9px; }
.ai-input input { flex: 1; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); padding: 0 14px; color: var(--text); font-size: 13.5px; }
.ai-input button { width: 42px; height: 42px; border-radius: 12px; border: none; background: var(--brand-blue); color: #fff; cursor: pointer; font-size: 17px; }
.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); margin: 0 1px; animation: blink 1.2s infinite; }
.typing span:nth-child(2){animation-delay:.2s} .typing span:nth-child(3){animation-delay:.4s}
@keyframes blink { 0%,60%,100%{opacity:.3;transform:translateY(0)} 30%{opacity:1;transform:translateY(-3px)} }

/* ---------- 18. COMMAND PALETTE ---------- */
.cmdk-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(3px); z-index: 1085; display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.cmdk-overlay.open { display: flex; }
.cmdk { width: 620px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); overflow: hidden; animation: cmdkIn .18s ease; }
@keyframes cmdkIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
.cmdk__input { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.cmdk__input i { font-size: 20px; color: var(--text-3); }
.cmdk__input input { flex: 1; border: none; background: transparent; font-size: 16px; color: var(--text); outline: none; }
.cmdk__results { max-height: 52vh; overflow-y: auto; padding: 8px; }
.cmdk-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 10px 12px 5px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 13.5px; font-weight: 500; }
.cmdk-item:hover, .cmdk-item.sel { background: var(--brand-blue-soft); color: var(--brand-blue-700); }
.cmdk-item .ci-ico { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; font-size: 16px; color: var(--text-2); }
.cmdk-item:hover .ci-ico { background: var(--surface); }
.cmdk-item .ci-meta { margin-left: auto; font-size: 11px; color: var(--text-3); }
.cmdk__foot { border-top: 1px solid var(--border); padding: 9px 16px; display: flex; gap: 16px; font-size: 11.5px; color: var(--text-3); }
.cmdk__foot kbd { background: var(--surface-3); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-family: var(--font-sans); }

/* ---------- 19. KANBAN ---------- */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.kanban-col { min-width: 288px; width: 288px; flex-shrink: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; }
.kanban-col__head { padding: 12px 14px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 13px; }
.kanban-col__head .k-count { margin-left: auto; background: var(--surface-3); color: var(--text-2); font-size: 11px; padding: 1px 8px; border-radius: 20px; }
.kanban-col__head .k-dot { width: 9px; height: 9px; border-radius: 50%; }
.kanban-col__body { padding: 10px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 60px; flex: 1; }
.kanban-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; cursor: grab; box-shadow: var(--shadow-xs); transition: var(--trans); }
.kanban-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.kanban-card.dragging { opacity: .5; transform: rotate(2deg); }
.kanban-col.drop-target { outline: 2px dashed var(--brand-blue); outline-offset: -3px; }

/* ---------- 20. MISC ---------- */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.dot-sep { color: var(--text-3); margin: 0 6px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--text-2); }
.kv .v { font-weight: 600; }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item::before { content: ''; position: absolute; left: -22px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand-blue); }
.tl-item.gold::before { border-color: var(--brand-gold); }
.tl-item.green::before { border-color: var(--success); }
.tl-item small { color: var(--text-3); font-size: 12px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row-g { display: flex; gap: 20px; align-items: flex-start; }

/* chart holders */
.chart-holder { position: relative; width: 100%; }

/* funnel */
.funnel-row { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.funnel-bar { height: 44px; border-radius: 10px; display: flex; align-items: center; padding: 0 16px; color: #fff; font-weight: 600; font-size: 13.5px; transition: var(--trans); }
.funnel-meta { width: 130px; font-size: 12.5px; color: var(--text-2); text-align: right; flex-shrink: 0; }

/* switch label */
.form-check-input:checked { background-color: var(--brand-blue); border-color: var(--brand-blue); }
.form-switch .form-check-input { width: 40px; height: 22px; }

/* soft panel */
.soft-panel { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.gold-accent { border-top: 3px solid var(--brand-gold); }
.blue-accent { border-top: 3px solid var(--brand-blue); }

/* public site helpers appended in components.css via responsive as needed */
