  :root {
    /* Brand */
    --brand:      #1B78FF;
    --brand-lt:   #5BA3FF;
    --brand-dk:   #1258CC;

    /* Sidebar / Topbar - CLEAN WHITE chrome. Nav/header sit on white with dark text and
       the brand blue as the only accent (active item, badges, buttons). */
    --sidebar-bg:   #FFFFFF;
    --topbar-bg:    #FFFFFF;
    --sidebar-border: #E6EBF2;

    /* Chrome text/state tokens (drive the light nav + header - every former white-on-dark rule points here) */
    --chrome-fg:        #475569;   /* nav item / bell / menu default text */
    --chrome-fg-strong: #0F172A;   /* titles, active + hover text, user name, logo */
    --chrome-muted:     #64748B;   /* user email, secondary (AA on white) */
    --chrome-hover-bg:  #F1F5F9;   /* nav item hover wash */
    --chrome-active-bg: #EAF2FF;   /* active nav wash */
    --chrome-active-fg: #1258CC;   /* active nav text (brand-dk) */

    /* Page content area (light) */
    --page-bg:       #F1F5F9;
    --card-bg:       #FFFFFF;
    --card-border:   #E2E8F0;
    --card-shadow:   0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
    --card-shadow-md: 0 4px 12px rgba(0,0,0,0.09), 0 2px 4px rgba(0,0,0,0.05);

    /* Text */
    --text-primary:   #0F172A;
    --text-secondary: #64748B;
    /* Readable de-emphasized tier - AA on white (4.76:1). Faint value moved to --text-placeholder. */
    --text-tertiary:  #64748B;
    /* Intentionally-faint tier: placeholder/decorative use ONLY (hint labels, dash/strikethrough). */
    --text-placeholder: #94A3B8;

    /* Inputs */
    --input-bg:     #FFFFFF;
    --input-border: #CBD5E1;
    --input-focus:  #1B78FF;

    /* Table */
    --table-header-bg:    #F8FAFC;
    --table-header-color: #475569;
    --table-border:       #E2E8F0;
    --table-row-hover:    #F8FAFC;

    /* Status colors */
    --green:    #16a34a;
    --green-lt: #dcfce7;
    --red:      #dc2626;
    --red-lt:   #fee2e2;
    --orange:   #ea580c;
    --orange-lt:#ffedd5;
    --yellow:   #d97706;
    --yellow-lt:#fef3c7;
    --purple:   #7c3aed;
    --purple-lt:#ede9fe;
    --blue:     #1B78FF;
    --blue-lt:  #dbeafe;

    /* Legacy aliases used by sidebar/topbar (kept in sync with the softened chrome above) */
    --navy:       #263044;
    --navy-light: #2E3A54;
    --navy-dark:  #1B2334;
    --amber:      #1B78FF;
    --amber-lt:   #5BA3FF;
    --white:      #ffffff;
    --gray-50:    #2a2f3f;
    --gray-100:   #2e3448;
    --gray-200:   #3a4055;
    --gray-400:   #888ea8;
    --gray-600:   #aab2cc;
    --gray-800:   #e8eaf0;
    --border:     #2e3448;
    --surface:    #2E3A54;
    --text:       #ffffff;
    --text-off:   #e8eaf0;
    --text-muted: #888ea8;
    --text-muted-color: #888ea8;

    --sidebar-w:  260px;
    --topbar-h:   64px;
    --radius:     10px;
    --radius-sm:  7px;
    --shadow:     0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg:  0 16px 40px rgba(0,0,0,0.14), 0 4px 8px rgba(0,0,0,0.07);

    /* Typography - body stays Inter; headings get their own face (Poppins) so the
       app reads as designed, not default. Bebas Neue stays for the logo + big stat numbers.
       Change --font-heading in one place to re-theme all headings. */
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Newsreader', Georgia, 'Times New Roman', serif;
    --font-display: 'Bebas Neue', sans-serif;
  }
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  body { font-family: 'Inter', sans-serif; background: var(--page-bg); min-height: 100vh; color: var(--text-primary); }

  /* ── Topbar ── */
  .topbar {
    background: var(--topbar-bg);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--sidebar-border);
  }
  .topbar-brand { font-size: 18px; font-weight: 800; color: var(--chrome-fg-strong); letter-spacing: 0.5px; }
  .topbar-brand span { color: #1B78FF; }
  .topbar-sub   { font-size: 11px; font-weight: 600; color: var(--chrome-muted); margin-left: 10px;
                  background: #1B78FF22; border: 1px solid #1B78FF44; border-radius: 4px;
                  padding: 2px 7px; letter-spacing: 0.5px; text-transform: uppercase; }
  .topbar-right { display: flex; align-items: center; gap: 16px; }
  .topbar-right a { color: var(--chrome-fg); font-size: 13px; text-decoration: none; transition: color 0.15s; }
  .topbar-right a:hover { color: #1B78FF; }

  /* ── Layout ── */
  .container { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }

  h1 { font-size: 22px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
  .page-sub { font-size: 14px; color: var(--text-secondary); margin-bottom: 32px; }

  /* ── Cards / Sections ── */
  .section { background: var(--card-bg); border-radius: 12px; border: 1px solid var(--card-border); margin-bottom: 28px; overflow: hidden; box-shadow: 0 1px 3px rgba(27,120,255,0.06); }
  .section-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--table-header-bg);
  }
  .section-title { font-size: 14px; font-weight: 700; color: #1B78FF; }
  .section-body  { padding: 0; overflow-x: auto; }

  /* ── Tables ── */
  table { width: 100%; border-collapse: collapse; font-size: 13px; }
  th { padding: 8px 12px; text-align: left; font-size: 11px; font-weight: 600;
       color: #1B78FF; text-transform: uppercase; letter-spacing: 0.5px;
       background: var(--table-header-bg); border-bottom: 2px solid var(--table-border); white-space: nowrap; }
  td { padding: 10px 12px; border-bottom: 1px solid var(--table-border); color: var(--text-primary); }
  tr:last-child td { border-bottom: none; }
  tr:hover td { background: var(--table-row-hover); }

  /* ── Badges ── */
  .badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
  .badge-used  { background: #fee2e2; color: #b91c1c; }
  .badge-avail { background: #d1fae5; color: #065f46; }

  /* ── Buttons ── */
  .btn {
    padding: 8px 16px; border: none; border-radius: 7px;
    font-size: 13px; font-weight: 600; font-family: 'Inter', sans-serif;
    cursor: pointer; transition: opacity 0.15s;
  }
  .btn:hover { opacity: 0.85; }
  .btn-primary { background: #1B78FF; color: #ffffff; }
  .btn-danger  { background: #fee2e2; color: #b91c1c; }
  .btn-copy    { background: #EEF3FF; color: #1B78FF; border: 1px solid #D1DCF5; }

  /* ── Code display ── */
  .code-text { font-family: monospace; font-size: 15px; font-weight: 700; letter-spacing: 3px; color: #1B78FF; }

  .empty { padding: 32px; text-align: center; color: var(--text-tertiary); font-size: 13px; }

  /* Feedback status badges */
  .fb-open        { background: #fef3c7; color: #92400e; }
  .fb-in_progress { background: #dbeafe; color: #1e40af; }
  .fb-resolved    { background: #d1fae5; color: #065f46; }
  .fb-desc { font-size: 13px; max-width: 340px; white-space: pre-wrap; word-break: break-word; }
  .fb-status-select {
    font-size: 12px; padding: 4px 8px; border-radius: 6px;
    border: 1px solid var(--input-border); font-family: 'Inter', sans-serif; cursor: pointer;
  }

  /* ── Stat cards ── */
  .stat-row { display: flex; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
  .stat { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px;
          padding: 18px 24px; flex: 1; min-width: 120px;
          box-shadow: 0 1px 3px rgba(27,120,255,0.06); }
  .stat-value { font-size: 28px; font-weight: 800; color: #1B78FF; }
  .stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

  /* ── Toast ── */
  .toast {
    position: fixed; bottom: 24px; right: 24px;
    background: #1E1E1E; color: #fff; border: 1px solid #1B78FF44;
    padding: 12px 20px; border-radius: 8px;
    font-size: 13px; font-weight: 500;
    opacity: 0; transition: opacity 0.2s; pointer-events: none;
  }
  .toast.show { opacity: 1; }

  /* ── Access denied ── */
  #access-denied { display: none; padding: 80px 24px; text-align: center; }
  #access-denied h2 { color: #dc2626; margin-bottom: 8px; }
  #access-denied p  { color: var(--text-secondary); }
  #main-content { display: none; }

  /* ── Metrics charts grid ── */
  .charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  @media (max-width: 640px) { .charts-grid { grid-template-columns: 1fr; } }
