/* ============================================================
   Crafted by Design — Business Suite v5
   styles.css — Navy/Gold brand theme, sidebar layout
   ============================================================ */

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

/* ── BRAND TOKENS ──────────────────────────────────────────── */
@font-face {
  font-family: "Cinzel";
  src: url("/brand/fonts/Cinzel-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cinzel";
  src: url("/brand/fonts/Cinzel-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cinzel";
  src: url("/brand/fonts/Cinzel-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cinzel";
  src: url("/brand/fonts/Cinzel-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cinzel";
  src: url("/brand/fonts/Cinzel-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy:        #05101D;
  --navy-mid:    #0D1F36;
  --navy-light:  #162840;
  --gold:        #C99A39;
  --gold-light:  #E8C870;
  --gold-dim:    rgba(201,154,57,.15);

  /* Light theme */
  --bg:          #faf8f4;
  --bg2:         #f0ece3;
  --bg3:         #e5ddd0;
  --text:        #1a1208;
  --text2:       #6b5e4a;
  --text3:       #9c8f7c;
  --border:      rgba(0,0,0,.10);
  --border2:     rgba(0,0,0,.20);
  --accent:      var(--gold);
  --accent-fg:   var(--navy);

  --green:       #3B6D11;
  --green-bg:    #EAF3DE;
  --amber:       #854F0B;
  --amber-bg:    #FAEEDA;
  --red:         #A32D2D;
  --red-bg:      #FCEBEB;
  --blue:        #6A88A4;
  --blue-bg:     #EAF0F5;
  --info:        #6A88A4;
  --info-bg:     #EAF0F5;
  --warn:        #854F0B;
  --warn-bg:     #FAEEDA;
  --success:     #3B6D11;
  --success-bg:  #EAF3DE;
  --danger:      #A32D2D;
  --danger-bg:   #FCEBEB;

  --radius:      8px;
  --radius-lg:   12px;
  --font:        system-ui, -apple-system, sans-serif;
  --font-display: "Cinzel", Georgia, serif;
  --font-ui:      system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:        ui-monospace, monospace;

  --sb-width:    220px;
  --hdr-h:       48px;

  /* Sidebar always navy */
  --sb-bg:       var(--navy);
  --sb-text:     #b8c4d4;
  --sb-text-dim: #6a7d94;
  --sb-active-bg: var(--gold-dim);
  --sb-active:   var(--gold);

  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow-md:   0 3px 10px rgba(0,0,0,.10);

  /* ── CBD design-system tokens ─────────────────────────────── */
  --cbd-navy:        #05101D;
  --cbd-navy-deep:   #030C13;
  --cbd-navy-soft:   #0D1F36;
  --cbd-navy-line:   #162840;
  --cbd-gold:        #C99A39;
  --cbd-gold-bright: #E8C870;
  --cbd-gold-deep:   #9A7A2D;
  --cbd-gold-wash:   rgba(201,154,57,0.12);
  --cbd-cream:       #faf8f4;
  --cbd-cream-soft:  #f3eee3;
  --cbd-cream-line:  #e6dec9;
  --cbd-ink:         #1a1410;
  --cbd-ink-soft:    #4a4036;
  --cbd-ink-mute:    #8a7d6f;
  --cbd-bone:        #f0ead8;
  --cbd-bone-soft:   #c9c0a8;
  --cbd-bone-mute:   #8a8270;
  --cbd-flag-red:    #b22234;
  --cbd-flag-blue:   #3c3b6e;

  /* Motion */
  --dur-fast:    120ms;
  --dur-base:    200ms;
  --dur-slow:    400ms;
  --ease-out:    cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in:     cubic-bezier(0.55, 0.06, 0.68, 0.19);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Design-system shadows */
  --shadow-card:    0 1px 0 rgba(255,255,255,0.6) inset, 0 1px 2px rgba(26,20,16,0.04), 0 8px 20px rgba(26,20,16,0.06);
  --shadow-raised:  0 12px 28px rgba(26,20,16,0.10);
  --shadow-engrave: inset 0 1px 0 rgba(26,20,16,0.08), inset 0 -1px 0 rgba(255,255,255,0.5);

  /* Spacing scale */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;

  /* Additional radii */
  --radius-sm:   4px;
  --radius-xl:   18px;
  --radius-pill: 999px;
}

/* ── DARK THEME ─────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:          #111a26;
  --bg2:         #182232;
  --bg3:         #1f2e42;
  --text:        #e0d8c8;
  --text2:       #8a9eb8;
  --text3:       #4a6080;
  --border:      rgba(255,255,255,.08);
  --border2:     rgba(255,255,255,.16);
  --accent:      var(--gold);
  --accent-fg:   var(--navy);

  --green:       #8fc44a;
  --green-bg:    #162d08;
  --amber:       #e8961e;
  --amber-bg:    #3a1f02;
  --red:         #e88080;
  --red-bg:      #3d0f0f;
  --blue:        #6ba4e0;
  --blue-bg:     #06264a;
  --info:        #6ba4e0;
  --info-bg:     #06264a;
  --warn:        #e8961e;
  --warn-bg:     #3a1f02;
  --success:     #8fc44a;
  --success-bg:  #162d08;
  --danger:      #e88080;
  --danger-bg:   #3d0f0f;

  --shadow-sm:   0 1px 3px rgba(0,0,0,.25);
  --shadow-md:   0 3px 12px rgba(0,0,0,.35);
}

/* Fallback for users with dark OS preference and no explicit toggle */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #111a26;
    --bg2:         #182232;
    --bg3:         #1f2e42;
    --text:        #e0d8c8;
    --text2:       #8a9eb8;
    --text3:       #4a6080;
    --border:      rgba(255,255,255,.08);
    --border2:     rgba(255,255,255,.16);
    --green:       #8fc44a;
    --green-bg:    #162d08;
    --amber:       #e8961e;
    --amber-bg:    #3a1f02;
    --red:         #e88080;
    --red-bg:      #3d0f0f;
    --blue:        #6ba4e0;
    --blue-bg:     #06264a;
    --info:        #6ba4e0;
    --info-bg:     #06264a;
    --warn:        #e8961e;
    --warn-bg:     #3a1f02;
    --success:     #8fc44a;
    --success-bg:  #162d08;
    --danger:      #e88080;
    --danger-bg:   #3d0f0f;
    --shadow-sm:   0 1px 3px rgba(0,0,0,.25);
    --shadow-md:   0 3px 12px rgba(0,0,0,.35);
  }
}

/* ── BASE ─────────────────────────────────────────────────── */
html, body { height: 100%; }

body {
  font-family: var(--font);
  background:  var(--bg);
  color:       var(--text);
  font-size:   13px;
  line-height: 1.5;
  overflow:    hidden;
}

a { color: inherit; }

