/* Sovereign Roster Combined Master Stylesheet v2.2.1 */

/* --- START tokens.css --- */
/* ==========================================================================
   SOVEREIGN ROSTER — DESIGN TOKENS
   Calm, dense, precise operations interface (WCAG AA compliant, 4px grid)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Typography / Fonts (Vendored local WOFF2, no external CDNs)
   -------------------------------------------------------------------------- */

/* Saira: Headings, KPI numbers, Section titles */
@font-face {
  font-family: 'Saira';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/vendor/fonts/saira-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Saira';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/vendor/fonts/saira-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Saira';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/static/vendor/fonts/saira-latin-700-normal.woff2') format('woff2');
}

/* IBM Plex Sans: UI, body, tables, labels */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/vendor/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/vendor/fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/vendor/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
}

/* IBM Plex Mono: SIA numbers, employee numbers, postcodes, phone numbers, IDs */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/vendor/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/vendor/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
}

/* --------------------------------------------------------------------------
   2. Root Variables
   -------------------------------------------------------------------------- */
:root {
  /* Brand Blues */
  --blue-950: #061633;
  --blue-900: #0a2259;
  --blue-800: #0e2f7a;
  --blue-600: #1d5fe0; /* Primary brand action */
  --blue-500: #3b78ee;
  --blue-100: #e6eefc;
  --blue-50:  #f2f6fd;

  /* Brand Golds (Accents only: active markers, thin rules, highlights) */
  --gold-500: #ebc96a;
  --gold-600: #c9a24b;
  --gold-100: #fbf3d9;

  /* Neutrals */
  --text-primary:   #14213d;
  --text-secondary: #3a4a68;
  --text-muted:     #6b778c;
  --border-input:   #c3cde0;
  --border-hairline:#d9e0ec;
  --fill-subtle:    #eaeef5;
  --bg-page:        #f4f6fa;
  --surface:        #ffffff;

  /* Status Tokens (Text on Tint - WCAG AA verified) */
  --status-success-text: #167a54;
  --status-success-bg:   #e3f4ec;
  --status-warning-text: #8a6200;
  --status-warning-bg:   #fdf1cc;
  --status-danger-text:  #a82727;
  --status-danger-bg:    #fbe4e4;
  --status-info-text:    #1850c0;
  --status-info-bg:      #e6eefc;
  --status-neutral-text: #4b5870;
  --status-neutral-bg:   #eaeef5;

  /* Typography Font Families */
  --font-display: 'Saira', sans-serif;
  --font-body:    'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Typography Scale */
  --font-size-kpi:   32px;
  --font-size-title: 24px;
  --font-size-h2:    18px;
  --font-size-h3:    15px;
  --font-size-card:  14px;
  --font-size-body:  14px;
  --font-size-table: 13px;
  --font-size-label: 12.5px;
  --font-size-meta:  12px;
  --font-size-small: 11px;

  /* 4px Spacing Grid */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Radii */
  --radius-tag:    2px;
  --radius-input:  3px;
  --radius-button: 3px;
  --radius-panel:  4px;

  /* Control Heights */
  --control-height:    34px;
  --control-height-sm: 30px;
  --table-row-height:  40px;

  /* Shadows (Minimal, flat design - only for overlay layers) */
  --shadow-dropdown: 0 4px 12px rgba(6, 22, 51, 0.12);
  --shadow-modal:    0 12px 32px rgba(6, 22, 51, 0.20);

  /* Focus & Borders */
  --border-hairline-width: 1px;
  --focus-ring-color: var(--blue-600);
  --focus-ring: 2px solid var(--blue-600);
  --focus-offset: 2px;
}


/* --- START base.css --- */
/* ==========================================================================
   SOVEREIGN ROSTER — BASE (Reset, Typography, Form Controls)
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Accessibility: Skip to Content */
.skip-link {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  top: 10px;
  left: 10px;
  z-index: 99999;
}
.skip-link:focus {
  position: fixed !important;
  top: 12px !important;
  left: 12px !important;
  width: auto !important;
  height: auto !important;
  padding: 8px 16px !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
  background: var(--blue-600) !important;
  color: #ffffff !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
  outline: 2px solid #ffffff !important;
  outline-offset: 2px !important;
  z-index: 999999 !important;
  text-decoration: none !important;
}

/* Global Keyboard Focus */
:focus-visible {
  outline: 2px solid var(--blue-600) !important;
  outline-offset: 2px !important;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: var(--space-2);
  line-height: 1.25;
}

h1 { font-size: var(--font-size-title); letter-spacing: -0.01em; }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }

p {
  margin-top: 0;
  margin-bottom: var(--space-3);
}

small, .text-muted, .text-secondary {
  color: var(--text-muted);
  font-size: var(--font-size-meta);
}

.mono, code, kbd, samp, .sia-no, .emp-no, .postcode, .phone-no {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.tnum, table td, table th, .stat-num, .kpi-num {
  font-variant-numeric: tabular-nums;
}

/* Form Inputs & Controls (Engineered 34px height on 4px grid) */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="search"],
select,
textarea,
.form-control,
.form-select {
  width: 100%;
  height: var(--control-height);
  padding: 0 var(--space-3);
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  color: var(--text-primary);
  background-color: var(--surface);
  border: var(--border-hairline-width) solid var(--border-input);
  border-radius: var(--radius-input);
  line-height: var(--control-height);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

textarea,
textarea.form-control {
  height: auto;
  min-height: 80px;
  line-height: 1.4;
  padding: var(--space-2) var(--space-3);
}

.form-control-sm,
.form-select-sm {
  height: var(--control-height-sm);
  font-size: var(--font-size-table);
  padding: 0 var(--space-2);
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
  border-color: var(--blue-600);
  outline: 2px solid var(--blue-600);
  outline-offset: 1px;
}

input:disabled,
select:disabled,
textarea:disabled,
.form-control:disabled {
  background-color: var(--fill-subtle);
  color: var(--text-muted);
  cursor: not-allowed;
  border-color: var(--border-hairline);
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: var(--font-size-label);
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.form-hint {
  font-size: var(--font-size-meta);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

.form-error {
  font-size: var(--font-size-meta);
  color: var(--status-danger-text);
  margin-top: var(--space-1);
  font-weight: 500;
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* --- START components.css --- */
/* ==========================================================================
   SOVEREIGN ROSTER — COMPONENTS
   Buttons, Tags, Tables, Panels, Dropdowns, Modals, Empty States, Toolbars
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--control-height);
  padding: 0 var(--space-4);
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  font-weight: 500;
  line-height: var(--control-height);
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  border: var(--border-hairline-width) solid transparent;
  border-radius: var(--radius-button);
  background-color: var(--surface);
  color: var(--text-primary);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  background-color: var(--fill-subtle);
}

.btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.btn-sm {
  height: var(--control-height-sm);
  padding: 0 var(--space-2);
  font-size: var(--font-size-table);
  line-height: var(--control-height-sm);
}

.btn-lg {
  height: 40px;
  padding: 0 var(--space-5);
  font-size: 15px;
  line-height: 40px;
}

/* Primary Button */
.btn-primary {
  background-color: var(--blue-600);
  border-color: var(--blue-600);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--blue-800);
  border-color: var(--blue-800);
  color: #ffffff;
}
.btn-primary:active {
  background-color: var(--blue-900);
  border-color: var(--blue-900);
  color: #ffffff;
}

/* Secondary / Outline Button */
.btn-secondary,
.btn-outline,
.btn-default {
  background-color: var(--surface);
  border-color: var(--border-input);
  color: var(--text-secondary);
}
.btn-secondary:hover,
.btn-outline:hover,
.btn-default:hover {
  background-color: var(--fill-subtle);
  border-color: var(--border-hairline);
  color: var(--text-primary);
}

/* Danger Button (Outline per spec) */
.btn-danger {
  background-color: var(--surface);
  border-color: var(--status-danger-text);
  color: var(--status-danger-text);
}
.btn-danger:hover {
  background-color: var(--status-danger-bg);
  border-color: var(--status-danger-text);
  color: #8c1e1e;
}
.btn-danger:active {
  background-color: #f8cfcf;
  border-color: #8c1e1e;
  color: #8c1e1e;
}


/* Link Button */
.btn-link {
  background: none;
  border-color: transparent;
  color: var(--blue-600);
  padding: 0 var(--space-1);
}
.btn-link:hover {
  background: none;
  text-decoration: underline;
  color: var(--blue-800);
}

/* --------------------------------------------------------------------------
   2. Status Tags / Badges (Text on Tint, WCAG AA compliant)
   -------------------------------------------------------------------------- */
.tag,
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-body);
  font-size: var(--font-size-meta);
  font-weight: 600;
  line-height: 1.4;
  padding: 2px 6px;
  border-radius: var(--radius-tag);
  white-space: nowrap;
}

.tag-success,
.status-valid,
.status-active {
  background-color: var(--status-success-bg);
  color: var(--status-success-text);
}

.tag-warning,
.status-expiring {
  background-color: var(--status-warning-bg);
  color: var(--status-warning-text);
}

.tag-danger,
.status-expired,
.status-blocked,
.status-missing {
  background-color: var(--status-danger-bg);
  color: var(--status-danger-text);
}

.tag-info {
  background-color: var(--status-info-bg);
  color: var(--status-info-text);
}

.tag-neutral,
.status-inactive {
  background-color: var(--status-neutral-bg);
  color: var(--status-neutral-text);
}

/* Section Chip */
.chip-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-meta);
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--cat, var(--blue-600));
  background-color: color-mix(in srgb, var(--cat, var(--blue-600)) 12%, white);
}
.chip-cat.chip-extra {
  background-color: transparent;
  border: 1px dashed color-mix(in srgb, var(--cat, var(--blue-600)) 50%, white);
}

/* --------------------------------------------------------------------------
   3. Tables (Compact, 40px row height, hairline borders)
   -------------------------------------------------------------------------- */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: var(--border-hairline-width) solid var(--border-hairline);
  border-radius: var(--radius-panel);
  background: var(--surface);
}

table.table,
.table-dense {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-table);
  text-align: left;
}

table.table th,
.table-dense th {
  height: 36px;
  padding: var(--space-1) var(--space-3);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background-color: #eef2f8;
  border-bottom: var(--border-hairline-width) solid var(--border-hairline);
  white-space: nowrap;
}

table.table td,
.table-dense td {
  height: var(--table-row-height);
  padding: var(--space-1) var(--space-3);
  vertical-align: middle;
  border-bottom: var(--border-hairline-width) solid var(--border-hairline);
  color: var(--text-primary);
}

table.table tr:last-child td,
.table-dense tr:last-child td {
  border-bottom: 0;
}

table.table tbody tr:hover,
.table-dense tbody tr:hover {
  background-color: var(--blue-50);
}

/* Numeric columns right-aligned with tabular figures */
table.table td.num,
table.table th.num,
table.table td.text-end,
table.table th.text-end {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Long text truncated with tooltip */
.cell-truncate {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

.loading-text {
  font-size: var(--font-size-meta);
  color: var(--text-muted);
  font-style: italic;
}


/* --------------------------------------------------------------------------
   4. Panels & Cards (Flat, 4px radius, 1px border)
   -------------------------------------------------------------------------- */
.panel,
.card {
  background: var(--surface);
  border: var(--border-hairline-width) solid var(--border-hairline);
  border-radius: var(--radius-panel);
  box-shadow: none;
  margin-bottom: var(--space-4);
  position: relative;
}

.panel-header,
.card-header {
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--border-hairline-width) solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--surface);
  border-radius: var(--radius-panel) var(--radius-panel) 0 0;
}

.panel-title,
.card-title {
  font-family: var(--font-display);
  font-size: var(--font-size-card);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.panel-body,
.card-body {
  padding: var(--space-4);
}

.panel-footer,
.card-footer {
  padding: var(--space-3) var(--space-4);
  border-top: var(--border-hairline-width) solid var(--border-hairline);
  background-color: var(--fill-subtle);
  border-radius: 0 0 var(--radius-panel) var(--radius-panel);
}

/* --------------------------------------------------------------------------
   5. Stat Tiles (KPI strip)
   -------------------------------------------------------------------------- */
.stat-tile {
  background: var(--surface);
  border: var(--border-hairline-width) solid var(--border-hairline);
  border-radius: var(--radius-panel);
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
}

.stat-tile-label {
  font-size: var(--font-size-label);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.stat-tile-num,
.stat-num,
.kpi-num {
  font-family: var(--font-display);
  font-size: var(--font-size-kpi);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-tile-sub {
  font-size: var(--font-size-meta);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* --------------------------------------------------------------------------
   6. Table Toolbar & Bulk Bar
   -------------------------------------------------------------------------- */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border: var(--border-hairline-width) solid var(--border-hairline);
  border-bottom: 0;
  border-radius: var(--radius-panel) var(--radius-panel) 0 0;
  flex-wrap: wrap;
}

.bulkbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: var(--blue-50);
  border: var(--border-hairline-width) solid var(--blue-100);
  border-radius: var(--radius-panel);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   7. Empty States
   -------------------------------------------------------------------------- */
.empty-state,
.empty-hint {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--text-muted);
}

.empty-state-icon,
.empty-hint i {
  font-size: 32px;
  color: var(--border-input);
  margin-bottom: var(--space-2);
  display: block;
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.empty-state-description {
  font-size: var(--font-size-body);
  max-width: 44ch;
  margin: 0 auto var(--space-3);
}

/* --------------------------------------------------------------------------
   8. Dropdowns & Modals (Only places with subtle elevation)
   -------------------------------------------------------------------------- */
.dropdown-menu {
  background: var(--surface);
  border: var(--border-hairline-width) solid var(--border-hairline);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-dropdown);
  padding: var(--space-1) 0;
  min-width: 180px;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-body);
  color: var(--text-primary);
  text-decoration: none;
}
.dropdown-item:hover {
  background-color: var(--fill-subtle);
  color: var(--blue-600);
}

.modal-content {
  background: var(--surface);
  border: var(--border-hairline-width) solid var(--border-hairline);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}

.modal-header {
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--border-hairline-width) solid var(--border-hairline);
  background-color: var(--surface);
}

.modal-body {
  padding: var(--space-4);
}

.modal-footer {
  padding: var(--space-3) var(--space-4);
  border-top: var(--border-hairline-width) solid var(--border-hairline);
  background-color: var(--fill-subtle);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
}


/* --- START layout.css --- */
/* ==========================================================================
   SOVEREIGN ROSTER — LAYOUT
   App Shell, 232px Sidebar, 52px Top Bar, Page Header with Gold Accent
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Shell Grid / Layout
   -------------------------------------------------------------------------- */
.page {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-page);
}

.page-wrapper {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--bg-page);
}

.page-body {
  flex: 1 1 auto;
  padding: var(--space-4) var(--space-6);
}

@media (max-width: 768px) {
  .page-body {
    padding: var(--space-3) var(--space-3);
  }
}

/* --------------------------------------------------------------------------
   2. Sidebar (232px Solid Blue-950, Calm & Precise)
   -------------------------------------------------------------------------- */
:root {
  --sidebar-width: 232px;
  --topbar-height: 52px;
}

.navbar-vertical {
  width: var(--sidebar-width) !important;
  min-width: var(--sidebar-width) !important;
  max-width: var(--sidebar-width) !important;
  background: var(--blue-950) !important; /* Solid, flat, no gradients */
  border-right: var(--border-hairline-width) solid var(--blue-900) !important;
  padding: 0 !important;
  z-index: 1020;
  overflow-x: hidden !important;
  box-sizing: border-box;
}

.navbar-vertical .container-fluid {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
  box-sizing: border-box;
}

.navbar-vertical .navbar-brand {
  height: var(--topbar-height);
  padding: var(--space-2) var(--space-4) !important;
  margin: 0;
  display: flex;
  align-items: center;
  background: var(--blue-950);
  border-bottom: var(--border-hairline-width) solid rgba(255, 255, 255, 0.08);
}

.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  display: block;
  max-width: 170px;
  height: auto;
}

.navbar-vertical .navbar-collapse {
  flex: 1 1 auto;
  overflow-y: hidden;
  overflow-x: hidden !important;
  padding: var(--space-2) 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

.navbar-vertical .navbar-nav {
  overflow-x: hidden !important;
}

/* Group Headers */
.navbar-vertical .nav-group {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7487a8;
  padding: var(--space-3) var(--space-4) var(--space-1);
  list-style: none;
}

/* Navigation Links */
.navbar-vertical .nav-item {
  list-style: none;
  margin: 1px var(--space-2);
}

.navbar-vertical .nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--control-height);
  padding: 0 var(--space-3) !important;
  border-radius: var(--radius-button);
  color: #c3cee2 !important;
  font-size: var(--font-size-table);
  font-weight: 500;
  text-decoration: none;
  position: relative;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.navbar-vertical .nav-link .nav-link-icon {
  font-size: 16px;
  color: #8fa0bd;
  flex: 0 0 18px;
  display: flex;
  align-items: center;
}

.navbar-vertical .nav-link-title {
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.navbar-vertical .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #ffffff !important;
}

.navbar-vertical .nav-link.active {
  background-color: rgba(255, 255, 255, 0.10);
  color: #ffffff !important;
  font-weight: 600;
}

/* Active Nav Gold Marker (Logo accent) */
.navbar-vertical .nav-link.active::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-2));
  top: 15%;
  bottom: 15%;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background-color: var(--gold-500);
}

.navbar-vertical .nav-link.active .nav-link-icon {
  color: var(--gold-500);
}

/* Sub-nav Category items */
.nav-sub {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 28px;
  padding: 0 var(--space-3) 0 var(--space-5);
  margin: 1px var(--space-2);
  border-radius: var(--radius-button);
  color: #b6c4de !important;
  font-size: var(--font-size-meta);
  text-decoration: none;
}

.nav-sub:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #ffffff !important;
}

.nav-sub.active {
  background-color: rgba(255, 255, 255, 0.10);
  color: #ffffff !important;
  font-weight: 600;
}

.nav-sub .dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background-color: var(--cat, var(--blue-500));
  flex: 0 0 auto;
}

.nav-sub .n {
  margin-left: auto;
  font-size: 11px;
  color: #8fa0bd;
  font-variant-numeric: tabular-nums;
}

/* Bottom User Card in Sidebar */
.side-user {
  margin: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: rgba(255, 255, 255, 0.04);
  border-top: var(--border-hairline-width) solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-panel);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  box-sizing: border-box;
  max-width: calc(100% - 16px);
  overflow: hidden;
}

.side-user .user-name {
  font-size: var(--font-size-meta);
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-user .user-role {
  font-size: 11px;
  color: #8fa0bd;
}

.side-user .btn-sm {
  font-size: 11px !important;
  padding: 3px 6px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* --------------------------------------------------------------------------
   3. Top Bar (52px Header)
   -------------------------------------------------------------------------- */
.topbar {
  height: var(--topbar-height);
  min-height: var(--topbar-height);
  background: var(--surface);
  border-bottom: var(--border-hairline-width) solid var(--border-hairline);
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  z-index: 1010;
}

.topbar-search {
  display: flex;
  align-items: center;
  position: relative;
  max-width: 380px;
  width: 100%;
}

.topbar-search input {
  height: var(--control-height-sm);
  padding-right: 32px;
  background-color: var(--fill-subtle);
  border-color: transparent;
}
.topbar-search input:focus {
  background-color: var(--surface);
  border-color: var(--blue-600);
}

.topbar-search .shortcut-badge {
  position: absolute;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border-hairline);
  border-radius: 2px;
  padding: 0 4px;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   4. Page Header (Gold Accent Flourish: 48px × 2px at left end)
   -------------------------------------------------------------------------- */
.page-header {
  margin-bottom: var(--space-4);
  position: relative;
  border-bottom: var(--border-hairline-width) solid var(--border-hairline);
  padding-bottom: var(--space-3);
}

.page-header::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 48px;
  height: 2px;
  background-color: var(--gold-500);
}

.page-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.page-header-title-box {
  position: relative;
  display: inline-block;
}

.page-title {
  font-family: var(--font-display);
  font-size: var(--font-size-title);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-meta);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
  list-style: none;
  padding: 0;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--blue-600);
  text-decoration: underline;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  padding: 0 var(--space-1);
  color: var(--border-input);
}

/* --------------------------------------------------------------------------
   5. Responsive Drawer & Sticky Tables (< 992px)
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .page {
    display: block;
  }

  .navbar-vertical {
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--sidebar-width) !important;
    max-width: var(--sidebar-width) !important;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.5) !important;
    z-index: 1050;
  }

  .navbar-vertical.show,
  .navbar-vertical .navbar-collapse.show {
    transform: translateX(0);
  }

  .topbar {
    padding: 0 var(--space-3);
  }

  .page-body {
    padding: var(--space-3) var(--space-3);
  }
}

/* Responsive Tables inside panels: first column sticky */
.table-responsive table th:first-child,
.table-responsive table td:first-child {
  position: sticky;
  left: 0;
  background-color: inherit;
  z-index: 2;
}



/* --- START pages.css --- */
/* ==========================================================================
   SOVEREIGN ROSTER — PAGES
   Specific styling for Control Room, Dashboard, Roster, Guards, Import, Settings, Auth
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Dashboard (KPI Strip & CSS Hours Chart)
   -------------------------------------------------------------------------- */
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

@media (max-width: 1200px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-tile-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.kpi-tile-link:hover .stat-tile {
  border-color: var(--blue-500);
  background-color: var(--blue-50);
}

/* CSS-only Bar Chart for Hours */
.chart-bars-wrap {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  height: 140px;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-hairline);
}

.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 4px;
}

.chart-bar {
  width: 100%;
  max-width: 36px;
  background-color: var(--blue-600);
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: background-color 0.15s ease;
}

.chart-bar:hover {
  background-color: var(--blue-800);
}

.chart-bar.is-today {
  background-color: var(--gold-600);
}

.chart-bar-val {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.chart-bar-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   2. Control Room
   -------------------------------------------------------------------------- */
.cr-quickfind {
  background: var(--surface);
  border: var(--border-hairline-width) solid var(--border-hairline);
  border-radius: var(--radius-panel);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.cr-sections-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

@media (max-width: 1100px) {
  .cr-sections-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .cr-sections-grid {
    grid-template-columns: 1fr;
  }
}

.cr-card {
  background: var(--surface);
  border: var(--border-hairline-width) solid var(--border-hairline);
  border-top: 3px solid var(--cat, var(--blue-600));
  border-radius: var(--radius-panel);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cr-card-body {
  padding: var(--space-4);
  flex: 1 1 auto;
}

.cr-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.cr-section-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.cr-total {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.cr-active-sub {
  font-size: var(--font-size-meta);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

/* Stacked horizontal bar of SIA state */
.cr-stacked-bar {
  display: flex;
  height: 8px;
  border-radius: 2px;
  overflow: hidden;
  background-color: var(--fill-subtle);
  margin-bottom: var(--space-2);
}

.cr-stacked-seg {
  height: 100%;
}
.cr-seg-valid { background-color: var(--status-success-text); }
.cr-seg-expiring { background-color: var(--gold-600); }
.cr-seg-expired { background-color: var(--status-danger-text); }
.cr-seg-missing { background-color: var(--border-input); }

.cr-legend {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.cr-legend-item {
  display: flex;
  align-items: center;
  gap: 3px;
}

.cr-legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 1px;
}

/* 3 Compact Links with counts */
.cr-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-hairline);
}

.cr-link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-meta);
  color: var(--text-secondary);
  text-decoration: none;
  padding: 2px 0;
}

.cr-link-row:hover {
  color: var(--blue-600);
}

.cr-link-count {
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cr-card-footer {
  padding: var(--space-2) var(--space-4);
  border-top: 1px solid var(--border-hairline);
  background-color: var(--fill-subtle);
}

.cr-open-btn {
  display: block;
  text-align: center;
  font-weight: 600;
  font-size: var(--font-size-meta);
  color: var(--blue-600);
  text-decoration: none;
}
.cr-open-btn:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   3. Guards List & Table
   -------------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border: var(--border-hairline-width) solid var(--border-hairline);
  border-radius: var(--radius-panel);
  margin-bottom: var(--space-3);
}

.filter-bar .form-control,
.filter-bar .form-select {
  width: auto;
  min-width: 130px;
}

.guard-initials {
  width: 32px;
  height: 32px;
  border-radius: 3px;
  background-color: var(--blue-100);
  color: var(--blue-800);
  font-weight: 600;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--space-2);
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   4. Guard Profile
   -------------------------------------------------------------------------- */
.profile-header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--surface);
  border: var(--border-hairline-width) solid var(--border-hairline);
  border-radius: var(--radius-panel);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.profile-initials-large {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  background: var(--blue-950);
  color: var(--gold-500);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
}

.profile-meta-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 var(--space-1);
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Compliance Panel (Two Equal Blocks) */
.compliance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

@media (max-width: 768px) {
  .compliance-grid {
    grid-template-columns: 1fr;
  }
}

.compliance-block {
  background: var(--surface);
  border: var(--border-hairline-width) solid var(--border-hairline);
  border-radius: var(--radius-panel);
  padding: var(--space-4);
}

.compliance-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.compliance-status-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: var(--space-2);
}

/* Profile Tabs without a framework */
.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-hairline);
  margin-bottom: var(--space-4);
  gap: var(--space-2);
}

.profile-tab {
  padding: var(--space-2) var(--space-4);
  font-weight: 600;
  font-size: var(--font-size-body);
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.profile-tab:hover {
  color: var(--blue-600);
}

.profile-tab.active {
  color: var(--blue-600);
  border-bottom-color: var(--blue-600);
}

/* --------------------------------------------------------------------------
   5. Form Section & Checklist Rail
   -------------------------------------------------------------------------- */
.form-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: var(--space-6);
  align-items: flex-start;
}

@media (max-width: 992px) {
  .form-layout {
    grid-template-columns: 1fr;
  }
  .form-rail {
    display: none;
  }
}

.form-rail {
  position: sticky;
  top: calc(var(--topbar-height) + var(--space-4));
  background: var(--surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-panel);
  padding: var(--space-3);
}

.rail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-2);
}

.rail-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-meta);
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-tag);
}

.rail-item.active,
.rail-item:hover {
  background-color: var(--fill-subtle);
  color: var(--blue-600);
}

.rail-item.complete {
  color: var(--status-success-text);
}

/* --------------------------------------------------------------------------
   6. Import (3-Step Indicator)
   -------------------------------------------------------------------------- */
.import-steps-bar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-panel);
}

.import-step-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-table);
  font-weight: 600;
  color: var(--text-muted);
}

.import-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--fill-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.import-step-item.active {
  color: var(--blue-600);
}

.import-step-item.active .import-step-num {
  background: var(--blue-600);
  color: #ffffff;
}

.import-step-item.complete {
  color: var(--status-success-text);
}

.import-step-item.complete .import-step-num {
  background: var(--status-success-bg);
  color: var(--status-success-text);
}

/* --------------------------------------------------------------------------
   7. Roster Grid
   -------------------------------------------------------------------------- */
.roster-wrap {
  overflow: auto;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-panel);
  background: var(--surface);
  max-height: calc(100vh - 270px);
  min-height: 320px;
}

table.roster {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 1100px;
  table-layout: fixed;
}

table.roster th,
table.roster td {
  border-right: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
  vertical-align: top;
  padding: 4px;
}

table.roster thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--fill-subtle);
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 8px 6px;
}

table.roster thead th small {
  display: block;
  color: var(--text-muted);
  font-weight: 500;
}

table.roster th.rowhead,
table.roster td.rowhead {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 200px;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--border-hairline);
}

table.roster thead th.rowhead {
  z-index: 5;
  background: var(--fill-subtle);
}

/* Today column marked with a thin gold top rule */
table.roster .is-today {
  background-color: var(--gold-100);
}

table.roster thead th.is-today {
  background-color: #fbf3d9;
  border-top: 2px solid var(--gold-600);
  color: #705411;
}

/* Compact shift blocks with 3px left border */
.shift-chip {
  --c: var(--blue-600);
  display: block;
  border-left: 3px solid var(--c);
  border-radius: var(--radius-tag);
  padding: 3px 5px;
  margin-bottom: 3px;
  font-size: 11px;
  line-height: 1.25;
  background: var(--fill-subtle);
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
}

.shift-chip:hover {
  background: var(--blue-50);
}

.shift-chip .t {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.shift-chip .who {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shift-chip.night {
  --c: #553bb8;
  background: #f4f2fa;
}

.shift-chip.open,
.shift-chip.unassigned {
  --c: var(--status-danger-text);
  background: var(--status-danger-bg);
}

.shift-chip.cancelled,
.shift-chip.no_show {
  --c: var(--text-muted);
  background: var(--fill-subtle);
  color: var(--text-muted);
  text-decoration: line-through;
}

/* --------------------------------------------------------------------------
   8. Settings Sub-Navigation
   -------------------------------------------------------------------------- */
.settings-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-6);
  align-items: flex-start;
}

@media (max-width: 768px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }
}

.settings-subnav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-panel);
  padding: var(--space-2);
}

.settings-nav-item {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-table);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-button);
  text-decoration: none;
}

.settings-nav-item:hover {
  background: var(--fill-subtle);
  color: var(--text-primary);
}

.settings-nav-item.active {
  background: var(--blue-50);
  color: var(--blue-600);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   9. Auth / Login / First-Run Setup (Two Column)
   -------------------------------------------------------------------------- */
.auth-shell,
.auth-split-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 440px) 1fr;
  background: var(--surface);
}

@media (max-width: 900px) {
  .auth-shell,
  .auth-split-shell {
    grid-template-columns: 1fr;
  }
  .auth-art,
  .auth-brand-pane {
    display: none;
  }
}

.auth-art,
.auth-brand-pane {
  background-color: var(--blue-950) !important;
  color: #ffffff;
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

/* Faint diagonal slash pattern (60° stripes, 6% opacity) */
.auth-art::before,
.auth-brand-pane::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    60deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.06) 1px,
    transparent 1px,
    transparent 16px
  );
  pointer-events: none;
}

.auth-art::after,
.auth-brand-pane::after {
  display: none !important; /* No glowing orbs */
}

.auth-art h2,
.auth-brand-pane h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: var(--space-2);
  line-height: 1.25;
}

.auth-art p,
.auth-brand-pane p {
  color: #a9b9d6;
  font-size: var(--font-size-body);
  max-width: 40ch;
}

.auth-points {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
  display: grid;
  gap: var(--space-2);
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: #c9d6ee;
  font-size: var(--font-size-table);
}

.auth-points i {
  color: var(--gold-500);
  font-size: 16px;
}

.auth-form,
.auth-form-pane {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background-color: var(--bg-page);
}

.auth-card,
.auth-form-box {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-panel);
  padding: var(--space-6);
  box-shadow: none;
}


/* --------------------------------------------------------------------------
   10. Print Stylesheet
   -------------------------------------------------------------------------- */
@media print {
  .navbar-vertical,
  .topbar,
  .d-print-none,
  .btn,
  .pagination,
  .table-toolbar,
  .skip-link {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 10pt;
  }

  .page-wrapper {
    margin: 0 !important;
    padding: 0 !important;
  }

  .panel,
  .card,
  .compliance-block {
    box-shadow: none !important;
    border: 1px solid #999999 !important;
    page-break-inside: avoid;
  }

  .roster-wrap {
    max-height: none !important;
    overflow: visible !important;
  }

  table.roster {
    min-width: 100% !important;
    font-size: 8pt;
  }
}


/* --- TABLER BRIDGE & UTILITIES --- */
/* ==========================================================================
   SOVEREIGN ROSTER — MAIN STYLESHEET MANIFEST
   Operations Dashboard Theme based on Design Tokens (4px Grid, Calm, Engineered)
   ========================================================================== */


/* --------------------------------------------------------------------------
   Tabler Bridge Variables (Keep Tabler aligned with design tokens)
   -------------------------------------------------------------------------- */
:root, [data-bs-theme="light"] {
  --tblr-primary: var(--blue-600);
  --tblr-primary-rgb: 29, 95, 224;
  --tblr-primary-fg: #ffffff;
  --tblr-body-bg: var(--bg-page);
  --tblr-body-color: var(--text-primary);
  --tblr-font-sans-serif: var(--font-body);
  --tblr-font-monospace: var(--font-mono);
  --tblr-border-radius: var(--radius-button);
  --tblr-border-radius-sm: var(--radius-tag);
  --tblr-border-radius-lg: var(--radius-panel);
  --tblr-card-border-color: var(--border-hairline);
  --tblr-border-color: var(--border-hairline);
  --tblr-link-color: var(--blue-600);
  --tblr-link-color-rgb: 29, 95, 224;
}

/* --------------------------------------------------------------------------
   Interactive Utilities (Map, Type-Ahead Picker, Timelines)
   -------------------------------------------------------------------------- */

/* Type-ahead picker for live selects */
.picker {
  position: relative;
}
.picker .picker-input {
  padding-right: 2rem;
}
.picker-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
}
.picker-list {
  position: absolute;
  z-index: 1060;
  left: 0;
  right: 0;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-panel);
  max-height: 280px;
  overflow: auto;
  box-shadow: var(--shadow-dropdown);
}
.picker-list li {
  padding: 6px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-hairline);
}
.picker-list li span {
  font-size: 11px;
  color: var(--text-muted);
}
.picker-list li:hover,
.picker-list li.on {
  background-color: var(--blue-50);
}
.picker-list li.none {
  color: var(--text-muted);
  cursor: default;
}

/* Map containers and pins */
.map-box {
  height: 380px;
  border-radius: var(--radius-panel);
  border: 1px solid var(--border-hairline);
  overflow: hidden;
  z-index: 0;
}
.map-box.tall {
  height: calc(100vh - 250px);
  min-height: 420px;
}
.pin {
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: grid;
  place-items: center;
  background: var(--blue-600);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.pin > i {
  transform: rotate(45deg);
  color: #ffffff;
  font-size: 0.9rem;
}
.pin.off { background: var(--status-danger-text); }
.pin.on { background: var(--status-success-text); }
.pin.stale { background: var(--text-muted); }
.pin.site { background: var(--blue-950); }

/* Document Rows & Timelines */
.doc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-hairline);
}
.doc-row:last-child {
  border-bottom: 0;
}
.file-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--border-hairline);
  background: var(--surface);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-tag);
}
.file-link:hover {
  border-color: var(--blue-600);
  color: var(--blue-600);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline li {
  position: relative;
  padding: 0 0 var(--space-3) var(--space-5);
}
.timeline li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-600);
}
.timeline li::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 14px;
  bottom: -2px;
  width: 2px;
  background: var(--border-hairline);
}
.timeline li:last-child::after {
  display: none;
}
.timeline .when {
  color: var(--text-muted);
  font-size: var(--font-size-meta);
}

.token-box {
  font-family: var(--font-mono);
  font-size: 11px;
  word-break: break-all;
  background: var(--fill-subtle);
  border-radius: var(--radius-button);
  padding: var(--space-2);
}
