/*
 * GMA Commercial Suite - THEME (spec section 12). Loaded after Bootstrap 5.3, before app.css.
 * Everything that decides how the suite looks lives here: bundled fonts, colour/spacing tokens,
 * and the Bootstrap component overrides. app.css only lays things out using these tokens.
 *
 *   navy   #0B3D5C  sidebar, headings, movement strip
 *   teal   #0EA5A0  accent: active nav bar, focus rings, borders, icons, chart series
 *   teal-dark #0F766E  teal that carries text: button fills, links, selected items.
 *                    White on #0EA5A0 is only 3.0:1; on #0F766E it is 5.5:1 (WCAG AA needs 4.5:1).
 *   page #F8FAFC, cards #FFFFFF, status: green / amber / red / blue / grey
 *
 * 8px spacing grid, 10px card radius, subtle shadows only, 14px Inter with tabular figures. No dark mode.
 * tests/test_theme.py checks the contrast of every text/background pair below and that report.css
 * (PDF + print) uses the same colours.
 */

/* ---------------------------------------------------------------- fonts (static/fonts, OFL) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-400.woff2") format("woff2"), url("../fonts/inter-400.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/inter-500.woff2") format("woff2"), url("../fonts/inter-500.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/inter-600.woff2") format("woff2"), url("../fonts/inter-600.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/inter-700.woff2") format("woff2"), url("../fonts/inter-700.woff") format("woff"); }
@font-face { font-family: "Noto Sans Bengali"; font-style: normal; font-weight: 400; font-display: swap; unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
  src: url("../fonts/noto-bengali-400.woff2") format("woff2"), url("../fonts/noto-bengali-400.woff") format("woff"); }
@font-face { font-family: "Noto Sans Bengali"; font-style: normal; font-weight: 600 700; font-display: swap; unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
  src: url("../fonts/noto-bengali-600.woff2") format("woff2"), url("../fonts/noto-bengali-600.woff") format("woff"); }

/* ---------------------------------------------------------------- tokens */
:root {
  --navy: #0B3D5C; --navy-2: #0F4C72; --navy-3: #082E46;
  --teal: #0EA5A0; --teal-dark: #0F766E; --teal-darker: #115E59; --teal-tint: #F0FDFA; --teal-soft: #CCFBF1; --teal-line: #99F6E4;
  --bg: #F8FAFC; --card: #FFFFFF; --text: #0F172A; --muted: #64748B; --border: #E2E8F0; --border-strong: #CBD5E1;
  --success: #15803D; --success-bg: #F0FDF4; --warning: #B45309; --warning-bg: #FFFBEB;
  --danger: #B91C1C; --danger-bg: #FEF2F2; --info: #1D4ED8; --info-bg: #EFF6FF; --neutral: #475569; --neutral-bg: #F1F5F9;
  --radius: 10px; --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05); --shadow-md: 0 4px 12px rgba(15, 23, 42, .08);
  --sidebar-text: #CBD5E1; --sidebar-label: #9DB9CE; --sidebar-hover: var(--navy-2); --zebra: #FAFBFC; --thead: #F1F5F9;
  --success-soft: #DCFCE7; --warning-ink: #92400E; --warning-soft: #FEF3C7; --danger-soft: #FEE2E2; --info-soft: #DBEAFE;
  --muted-light: #94A3B8; --danger-line: #FECACA; --warning-line: #FDE68A; --warning-deep: #78350F; --skeleton: #EEF2F6;
  --text-2: #334155; --teal-on-navy: #5EEAD4; --group-bg: #EEF2F7; --danger-on-navy: #FCA5A5;
  --sidebar-w: 240px; --sidebar-w-collapsed: 64px; --topbar-h: 56px;
  --font: "Inter", "Noto Sans Bengali", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Bootstrap 5.3 variables */
  --bs-body-font-family: var(--font);
  --bs-body-font-size: 14px;
  --bs-body-color: var(--text);
  --bs-body-bg: #FFFFFF;          /* inputs, cards, menus; the page itself uses --bg (body rule below) */
  --bs-secondary-color: var(--muted);
  --bs-border-color: var(--border);
  --bs-border-radius: var(--radius-sm);
  --bs-border-radius-lg: var(--radius);
  --bs-primary: var(--teal); --bs-primary-rgb: 14, 165, 160;
  --bs-link-color: var(--teal-dark); --bs-link-color-rgb: 15, 118, 110;
  --bs-link-hover-color: var(--teal-darker); --bs-link-hover-color-rgb: 17, 94, 89;
  --bs-focus-ring-color: rgba(14, 165, 160, .3);
  --bs-success: var(--success); --bs-danger: var(--danger); --bs-warning: var(--warning); --bs-info: var(--info);
}
html { font-size: 14px; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); }
h1 { font-size: 20px; font-weight: 700; margin: 0; color: var(--navy); }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 12px; color: var(--navy); }
.muted { color: var(--muted); }
.count.muted, .count { color: var(--neutral); }
code { color: var(--navy); background: var(--neutral-bg); padding: 1px 5px; border-radius: 4px; font-size: .88em; word-break: break-word; }
pre code { padding: 0; background: none; color: inherit; }
::selection { background: var(--teal-soft); color: var(--navy); }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table, .form-control, kbd, .badge { font-variant-numeric: tabular-nums; }
.ccy { font-size: .85em; font-weight: 600; color: var(--muted); }
.pre-line { white-space: pre-line; }
.inline-form { display: inline; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.skip-link { position: absolute; left: 8px; top: 8px; z-index: 2000; background: #fff; padding: 8px 12px; border-radius: var(--radius-sm); }

/* ---------------------------------------------------------------- Bootstrap accent = teal */
.btn { --bs-btn-font-weight: 600; --bs-btn-padding-x: 14px; --bs-btn-padding-y: 6px; --bs-btn-font-size: 14px;
  --bs-btn-border-radius: var(--radius-sm); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.btn-sm { --bs-btn-padding-x: 10px; --bs-btn-padding-y: 3px; --bs-btn-font-size: 13px; }
.btn-primary { --bs-btn-bg: var(--teal-dark); --bs-btn-border-color: var(--teal-dark); --bs-btn-hover-bg: var(--teal-darker); --bs-btn-hover-border-color: var(--teal-darker);
  --bs-btn-active-bg: var(--navy); --bs-btn-active-border-color: var(--navy); --bs-btn-disabled-bg: var(--teal-dark); --bs-btn-disabled-border-color: var(--teal-dark);
  --bs-btn-focus-shadow-rgb: 14, 165, 160; }
.btn-outline-primary { --bs-btn-color: var(--teal-dark); --bs-btn-border-color: var(--teal); --bs-btn-hover-bg: var(--teal-dark); --bs-btn-hover-border-color: var(--teal-dark);
  --bs-btn-active-bg: var(--teal-dark); --bs-btn-active-border-color: var(--teal-dark); --bs-btn-focus-shadow-rgb: 14, 165, 160; }
.btn-outline-secondary { --bs-btn-color: var(--navy); --bs-btn-border-color: var(--border-strong); --bs-btn-bg: #fff;
  --bs-btn-hover-color: var(--navy); --bs-btn-hover-bg: var(--teal-tint); --bs-btn-hover-border-color: var(--teal);
  --bs-btn-active-color: var(--navy); --bs-btn-active-bg: var(--teal-soft); --bs-btn-active-border-color: var(--teal); }
.btn-outline-danger { --bs-btn-color: var(--danger); --bs-btn-border-color: var(--danger-line); --bs-btn-bg: #fff; --bs-btn-hover-bg: var(--danger); --bs-btn-hover-border-color: var(--danger); }
.btn-link { --bs-btn-color: var(--teal-dark); --bs-btn-hover-color: var(--teal-darker); --bs-btn-font-weight: 500; }
.btn-icon { --bs-btn-padding-x: 8px; --bs-btn-padding-y: 4px; --bs-btn-color: var(--navy); --bs-btn-hover-bg: var(--neutral-bg); --bs-btn-hover-color: var(--navy);
  --bs-btn-active-bg: var(--border); font-size: 18px; position: relative; }
.form-control, .form-select { font-size: 14px; border-color: var(--border-strong); border-radius: var(--radius-sm); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--teal); box-shadow: 0 0 0 .2rem rgba(14, 165, 160, .2); }
.form-check-input:checked { background-color: var(--teal-dark); border-color: var(--teal-dark); }
.form-label { font-weight: 600; font-size: 13px; margin-bottom: 4px; color: var(--text); }
.form-text { font-size: 12px; color: var(--muted); }
.req { color: var(--danger); }
.pagination { --bs-pagination-color: var(--navy); --bs-pagination-active-bg: var(--teal-dark); --bs-pagination-active-border-color: var(--teal-dark);
  --bs-pagination-hover-color: var(--teal-dark); --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(14, 165, 160, .25); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--teal-dark); --bs-dropdown-link-hover-bg: var(--teal-tint); --bs-dropdown-font-size: 14px; box-shadow: var(--shadow-md); border-color: var(--border); }
.dropdown-item i { width: 18px; color: var(--muted); }
.nav-tabs { --bs-nav-tabs-link-active-color: var(--navy); --bs-nav-link-color: var(--muted); --bs-nav-link-hover-color: var(--teal-dark); }
.nav-tabs .nav-link.active { font-weight: 600; border-bottom-color: #fff; box-shadow: inset 0 2px 0 var(--teal); }
.modal-content { border-radius: var(--radius); border: 0; box-shadow: 0 20px 50px rgba(15, 23, 42, .25); }
.tooltip { --bs-tooltip-bg: var(--navy); --bs-tooltip-font-size: 12px; }
.alert { border-radius: var(--radius-sm); display: flex; gap: 8px; align-items: flex-start; }
.alert > .bi { margin-top: 2px; }
.alert-dismissible .btn-close { padding: 12px; }
kbd { border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font: 11px/1.6 ui-monospace, Consolas, monospace;
  background: #fff; color: var(--neutral); }

/* ---------------------------------------------------------------- badges (status registry tones) */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  white-space: nowrap; vertical-align: middle; line-height: 1.3; color: var(--neutral); background: var(--neutral-bg); }
.badge .bi { font-size: 11px; }
h1 .badge { font-size: 12px; margin-left: 4px; }
.badge-success { color: var(--success); background: var(--success-soft); }
.badge-warning { color: var(--warning-ink); background: var(--warning-soft); }
.badge-danger { color: var(--danger); background: var(--danger-soft); }
.badge-info { color: var(--info); background: var(--info-soft); }
.badge-neutral { color: var(--neutral); background: var(--neutral-bg); }

