/* ============================================================
   WatchVerge — Cobalt Edge Theme  v1.0
   All Bootstrap overrides and component styles reference
   these CSS variables. Never use raw hex outside this file.
   ============================================================ */

:root {
  /* Core palette */
  --wt-space:       #020817;
  --wt-abyss:       #0A1628;
  --wt-depth:       #0F2040;
  --wt-cobalt:      #1E40AF;
  --wt-blue:        #2563EB;
  --wt-ice:         #38BDF8;
  --wt-frost:       #E0F2FE;
  --wt-off-white:   #F0F8FF;
  --wt-white:       #FFFFFF;
  --wt-slate:       #64748B;
  --wt-slate-light: #94A3B8;
  --wt-border-light:#DBEAFE;

  /* Semantic states */
  --wt-success:     #059669;
  --wt-danger:      #DC2626;
  --wt-warning:     #D97706;

  /* State backgrounds */
  --wt-success-bg:  #D1FAE5;
  --wt-danger-bg:   #FEE2E2;
  --wt-warning-bg:  #FEF3C7;

  /* Bootstrap overrides */
  --bs-primary:         #1E40AF;
  --bs-primary-rgb:     30, 64, 175;
  --bs-link-color:      #1E40AF;
  --bs-link-hover-color:#2563EB;
  --bs-body-bg:         #F0F8FF;
  --bs-body-color:      #020817;
  --bs-success:         #059669;
  --bs-danger:          #DC2626;
  --bs-warning:         #D97706;
  --bs-border-color:    #DBEAFE;

  /* Layout */
  --wt-sidebar-width: 232px;
  --wt-topbar-height: 56px;
}

/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  min-height: 100%;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--wt-space);
  background-color: var(--wt-off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; }
a:hover { text-decoration: underline; }

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Selection */
::selection { background: var(--wt-cobalt); color: var(--wt-white); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--wt-space);
  margin: 0;
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--wt-cobalt);
}

h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--wt-space);
}

.kpi-number {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

body,
.body-text { font-size: 0.875rem; font-weight: 400; }

.table td,
.table th { font-size: 0.8125rem; }

.nav-label { font-size: 0.8125rem; font-weight: 600; }

.btn { font-size: 0.8125rem; font-weight: 700; }

.badge { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; }

.caption { font-size: 0.6875rem; font-weight: 400; color: var(--wt-slate); }

.mono,
.table td.numeric { font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: 0.8125rem; }

/* ============================================================
   LAYOUT SHELL
   ============================================================ */
.wt-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--wt-topbar-height);
  background: var(--wt-space);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  z-index: 1040;
  border-bottom: 1px solid rgba(56,189,248,0.15);
  box-shadow: 0 2px 8px rgba(2,8,23,0.45);
}

.wt-topbar .brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  margin-right: 1rem;
}

.wt-topbar .brand-text-watch {
  color: var(--wt-off-white);
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: 1rem;
}
.wt-topbar .brand-text-track {
  color: var(--wt-ice);
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: 1rem;
}

.wt-topbar .brand-tagline {
  font-size: 0.5625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(56,189,248,0.5);
  font-weight: 400;
  line-height: 1;
}

.wt-topbar .topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.wt-topbar .bell-btn {
  background: none;
  border: none;
  color: var(--wt-ice);
  font-size: 1.1rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s ease;
  position: relative;
}
.wt-topbar .bell-btn:hover { background: rgba(56,189,248,0.1); }

.wt-topbar .user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--wt-off-white);
  font-size: 0.8125rem;
  background: rgba(56,189,248,0.05);
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  border-radius: 999px;
  border: 1px solid rgba(56,189,248,0.1);
}

.wt-topbar .user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wt-cobalt), var(--wt-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.6875rem;
  color: white;
}

.wt-role-badge {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wt-ice);
  opacity: 0.85;
}

.wt-topbar .logout-link {
  color: var(--wt-slate-light);
  transition: color 0.15s ease;
}
.wt-topbar .logout-link:hover { color: var(--wt-ice); }

/* ── Sidebar ────────────────────────────── */
.wt-sidebar {
  position: fixed;
  top: var(--wt-topbar-height);
  left: 0;
  bottom: 0;
  width: var(--wt-sidebar-width);
  background: var(--wt-abyss);
  overflow-y: auto;
  z-index: 1030;
  transition: width 0.2s ease, transform 0.2s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(56,189,248,0.15) transparent;
}

.wt-sidebar::-webkit-scrollbar { width: 4px; }
.wt-sidebar::-webkit-scrollbar-thumb { background: rgba(56,189,248,0.15); border-radius: 4px; }

.wt-sidebar nav { padding-bottom: 1.5rem; }

.wt-sidebar .nav-section-label {
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wt-slate);
  padding: 1rem 1rem 0.25rem;
}

.wt-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1rem;
  color: rgba(240,248,255,0.7);
  font-size: 0.8125rem;
  font-weight: 600;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

.wt-sidebar .nav-link:hover {
  color: var(--wt-off-white);
  background: rgba(56,189,248,0.05);
  text-decoration: none;
}

.wt-sidebar .nav-link.active {
  color: var(--wt-ice);
  background: linear-gradient(90deg, rgba(56,189,248,0.12) 0%, rgba(56,189,248,0.02) 100%);
  border-left-color: var(--wt-ice);
}

.wt-sidebar .nav-link i {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.wt-sidebar .nav-link .badge-mini {
  margin-left: auto;
  background: var(--wt-danger);
  color: white;
  font-size: 0.625rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-weight: 700;
}

/* ── Main content ───────────────────────── */
.wt-main {
  margin-left: var(--wt-sidebar-width);
  margin-top: var(--wt-topbar-height);
  flex: 1;
  min-height: calc(100vh - var(--wt-topbar-height));
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--wt-off-white);
}

/* ============================================================
   CARDS
   ============================================================ */
.wt-card {
  background: var(--wt-white);
  border: 1px solid var(--wt-border-light);
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(2,8,23,0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wt-card-hover:hover {
  box-shadow: 0 6px 18px rgba(2,8,23,0.10);
  transform: translateY(-1px);
}

.wt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--wt-border-light);
}

.wt-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--wt-space);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* KPI Summary Cards */
.kpi-card {
  background: var(--wt-white);
  border: 1px solid var(--wt-border-light);
  border-radius: 10px;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.kpi-card:hover {
  box-shadow: 0 6px 18px rgba(2,8,23,0.10);
  transform: translateY(-1px);
}

.kpi-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: var(--wt-cobalt);
}

.kpi-card.kpi-success::after { background: var(--wt-success); }
.kpi-card.kpi-warning::after { background: var(--wt-warning); }
.kpi-card.kpi-danger::after  { background: var(--wt-danger); }
.kpi-card.kpi-ice::after     { background: var(--wt-ice); }

.kpi-card .kpi-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wt-slate);
  margin-bottom: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.kpi-card .kpi-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--wt-space);
  line-height: 1.2;
}

.kpi-card .kpi-sub {
  font-size: 0.6875rem;
  color: var(--wt-slate);
  margin-top: 0.25rem;
}

.kpi-card .kpi-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  color: var(--wt-border-light);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  border-radius: 6px;
  transition: all 0.15s ease;
}

.btn-primary {
  background-color: var(--wt-cobalt);
  border-color: var(--wt-cobalt);
  color: var(--wt-white);
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--wt-blue);
  border-color: var(--wt-blue);
  color: var(--wt-white);
  box-shadow: 0 2px 6px rgba(30,64,175,0.25);
}

.btn-outline-primary {
  border-color: var(--wt-cobalt);
  color: var(--wt-cobalt);
}

.btn-outline-primary:hover {
  background-color: var(--wt-cobalt);
  color: var(--wt-white);
}

.btn-outline-secondary {
  border-color: var(--wt-border-light);
  color: var(--wt-slate);
}
.btn-outline-secondary:hover {
  background-color: var(--wt-frost);
  border-color: var(--wt-cobalt);
  color: var(--wt-cobalt);
}

.btn-ice {
  background-color: var(--wt-ice);
  color: var(--wt-space);
  border: none;
  font-weight: 700;
}
.btn-ice:hover { background: #0EA5E9; color: var(--wt-space); }

.btn-submit-lg {
  min-height: 52px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: 100%;
  background: var(--wt-cobalt);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-submit-lg:hover {
  background: var(--wt-blue);
  box-shadow: 0 4px 12px rgba(30,64,175,0.30);
  transform: translateY(-1px);
}

.btn-submit-lg:active { transform: translateY(0); }

.btn-submit-lg:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ============================================================
   TABLES
   ============================================================ */
.wt-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 0.8125rem;
}

.wt-table thead th {
  background: var(--wt-depth);
  color: var(--wt-off-white);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.625rem 0.875rem;
  border: none;
  white-space: nowrap;
  position: sticky;
  top: 0;
}

.wt-table tbody tr {
  border-bottom: 1px solid var(--wt-border-light);
  transition: background 0.1s;
}

.wt-table tbody tr:nth-child(even) { background: rgba(240,248,255,0.45); }
.wt-table tbody tr:hover { background: var(--wt-frost); }

.wt-table td {
  padding: 0.55rem 0.875rem;
  color: var(--wt-space);
  text-align: center;
  vertical-align: middle;
}

.wt-table td.numeric {
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
}

.wt-table .caption,
.wt-table td.caption { color: var(--wt-slate); }

/* ============================================================
   STATUS BADGES
   ============================================================ */
.badge-matched      { background: var(--wt-success-bg); color: var(--wt-success); }
.badge-discrepancy  { background: var(--wt-danger-bg);  color: var(--wt-danger); }
.badge-variance     { background: var(--wt-warning-bg); color: var(--wt-warning); }
.badge-unconfirmed  { background: var(--wt-frost);      color: var(--wt-cobalt); }
.badge-not-in-client{ background: var(--wt-danger-bg);  color: var(--wt-danger); }
.badge-info         { background: var(--wt-frost);      color: var(--wt-cobalt); }

.comparison-row-matched     { box-shadow: inset 3px 0 0 var(--wt-success); }
.comparison-row-discrepancy { box-shadow: inset 3px 0 0 var(--wt-danger); }
.comparison-row-variance    { box-shadow: inset 3px 0 0 var(--wt-warning); }
.comparison-row-unconfirmed { box-shadow: inset 3px 0 0 var(--wt-slate); }

/* ============================================================
   FORMS
   ============================================================ */
.form-control, .form-select {
  background: var(--wt-white);
  border: 1px solid var(--wt-border-light);
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--wt-space);
  padding: 0.5rem 0.75rem;
  min-height: 42px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--wt-cobalt);
  box-shadow: 0 0 0 3px rgba(30,64,175,0.15);
  outline: none;
}

.form-control:disabled, .form-control[readonly] {
  background: var(--wt-frost);
  color: var(--wt-slate);
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--wt-space);
  margin-bottom: 0.3rem;
}

.form-text { font-size: 0.75rem; color: var(--wt-slate); }

.form-control-lg-touch {
  min-height: 52px;
  font-size: 1rem;
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.form-check-input:checked {
  background-color: var(--wt-cobalt);
  border-color: var(--wt-cobalt);
}

/* ============================================================
   ALERTS / FLASH
   ============================================================ */
.alert {
  border-radius: 8px;
  font-size: 0.875rem;
  border: 1px solid transparent;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-success { background: var(--wt-success-bg); border-color: var(--wt-success); color: #065F46; }
.alert-danger  { background: var(--wt-danger-bg);  border-color: var(--wt-danger);  color: #7F1D1D; }
.alert-warning { background: var(--wt-warning-bg); border-color: var(--wt-warning); color: #78350F; }
.alert-info    { background: var(--wt-frost);     border-color: var(--wt-ice);    color: var(--wt-cobalt); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination .page-link {
  color: var(--wt-cobalt);
  border-color: var(--wt-border-light);
  font-weight: 600;
}
.pagination .page-item.active .page-link {
  background: var(--wt-cobalt);
  border-color: var(--wt-cobalt);
  color: var(--wt-white);
}
.pagination .page-link:hover { background: var(--wt-frost); }

/* ============================================================
   BARCODE SCANNER
   ============================================================ */
.scanner-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--wt-space);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: 0 8px 24px rgba(2,8,23,0.40);
}

.scanner-container video,
.scanner-container canvas { width: 100%; height: 100%; object-fit: cover; }

.scanner-frame {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.scanner-frame::before {
  content: '';
  width: 70%;
  height: 38%;
  border: 2px solid var(--wt-ice);
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(2,8,23,0.5);
}

.scanner-line {
  position: absolute;
  left: 18%;
  right: 18%;
  height: 2px;
  background: var(--wt-ice);
  animation: scan 2s linear infinite;
  box-shadow: 0 0 12px var(--wt-ice);
}

@keyframes scan {
  0%   { top: 33%; }
  50%  { top: 60%; }
  100% { top: 33%; }
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--wt-space);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(30,64,175,0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(56,189,248,0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(56,189,248,0.06) 0%, transparent 60%);
  position: relative;
}

.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56,189,248,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: rgba(10,22,40,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(56,189,248,0.18);
  border-radius: 14px;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(2,8,23,0.55);
}

.login-card .login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-card .form-control {
  background: rgba(15,32,64,0.7);
  border-color: rgba(56,189,248,0.2);
  color: var(--wt-off-white);
}

.login-card .form-control::placeholder { color: var(--wt-slate); }
.login-card .form-control:focus {
  background: rgba(15,32,64,0.9);
  border-color: var(--wt-ice);
  color: var(--wt-off-white);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.18);
}

.login-card .form-label { color: rgba(240,248,255,0.75); }

/* ============================================================
   BRANCH STAFF TABLET INTERFACE
   ============================================================ */
.tablet-shell {
  min-height: 100vh;
  background: var(--wt-space);
  display: flex;
  flex-direction: column;
  position: relative;
}

.tablet-topbar {
  background: linear-gradient(180deg, var(--wt-abyss) 0%, var(--wt-depth) 100%);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(56,189,248,0.15);
  gap: 1rem;
  flex-wrap: wrap;
}

.tablet-daily-total {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--wt-space);
  background: var(--wt-ice);
  padding: 0.3rem 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(56,189,248,0.25);
}

.tablet-content {
  flex: 1;
  padding: 1.25rem;
  padding-bottom: 6rem; /* leave room for fixed bottom nav */
}

.tablet-sale-item {
  background: rgba(15,32,64,0.65);
  border: 1px solid rgba(56,189,248,0.12);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  transition: background 0.15s ease, transform 0.15s ease;
}

.tablet-sale-item:hover {
  background: rgba(15,32,64,0.9);
  transform: translateX(2px);
}

.tablet-sale-item .item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(30,64,175,0.4), rgba(56,189,248,0.18));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--wt-ice);
}

.tablet-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10,22,40,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(56,189,248,0.15);
  display: flex;
  z-index: 1050;
}

.tablet-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 0.5rem;
  color: rgba(240,248,255,0.5);
  text-decoration: none;
  font-size: 0.6875rem;
  font-weight: 600;
  transition: color 0.15s;
}

.tablet-nav a.active,
.tablet-nav a:hover {
  color: var(--wt-ice);
  text-decoration: none;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.page-header h1 { margin: 0; }

/* ============================================================
   ERROR PAGES
   ============================================================ */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--wt-topbar-height) - 3rem);
}

.error-card {
  background: var(--wt-white);
  border: 1px solid var(--wt-border-light);
  border-radius: 12px;
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 6px 24px rgba(2,8,23,0.08);
}

.error-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--wt-cobalt), var(--wt-ice));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.error-title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.error-message {
  color: var(--wt-slate);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--wt-slate);
}

.empty-state .empty-icon {
  font-size: 3rem;
  color: var(--wt-border-light);
  margin-bottom: 0.75rem;
  display: block;
}

.empty-state .empty-title {
  color: var(--wt-space);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.empty-state .empty-message {
  color: var(--wt-slate);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ============================================================
   FILTER PILLS / TAB NAV
   ============================================================ */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--wt-border-light);
  background: var(--wt-white);
  color: var(--wt-slate);
  text-decoration: none;
  transition: all 0.15s;
}

.filter-pill:hover {
  background: var(--wt-frost);
  border-color: var(--wt-ice);
  color: var(--wt-cobalt);
  text-decoration: none;
}

.filter-pill.active {
  background: var(--wt-cobalt);
  border-color: var(--wt-cobalt);
  color: var(--wt-white);
}

/* ============================================================
   MISC
   ============================================================ */
.section-divider {
  height: 1px;
  background: var(--wt-ice);
  opacity: 0.3;
  margin: 1rem 0;
}

.dot-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--wt-success);
  border-radius: 50%;
  position: relative;
  margin-right: 0.4rem;
}
.dot-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--wt-success);
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(2.6); opacity: 0; }
}

.progress-thin {
  height: 6px;
  background: var(--wt-border-light);
  border-radius: 999px;
  overflow: hidden;
}
.progress-thin > div {
  height: 100%;
  background: linear-gradient(90deg, var(--wt-cobalt), var(--wt-ice));
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--wt-frost) 25%, var(--wt-border-light) 50%, var(--wt-frost) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Print styles */
.print-report-header {
  display: none;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  .wt-topbar, .wt-sidebar, .tablet-nav, .page-header .btn, .no-print,
  .btn, button, input[type="file"], .sidebar-backdrop, .flash-stack,
  script, .pagination {
    display: none !important;
  }

  html, body {
    background: white !important;
    color: #111827 !important;
    font-size: 9pt;
  }

  .wt-main {
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
  }

  .print-report-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 8px;
    margin-bottom: 10px;
    border-bottom: 2px solid #111827;
    color: #111827;
  }

  .print-brand {
    font-size: 8pt;
    letter-spacing: 0.12em;
    font-weight: 900;
    color: #1E40AF;
  }

  .print-report-header h1 {
    margin: 2px 0 3px;
    font-size: 18pt;
    line-height: 1.15;
    color: #111827;
  }

  .print-context,
  .print-meta {
    font-size: 8pt;
    color: #475569;
    line-height: 1.35;
  }

  .print-meta {
    min-width: 190px;
    text-align: right;
  }

  .page-header { margin-bottom: 0.75rem; }
  .page-header h1 { display: none; }

  .wt-card {
    box-shadow: none !important;
    border: 1px solid #CBD5E1 !important;
    page-break-inside: avoid;
    background: white !important;
    color: #111827 !important;
    margin-bottom: 8px !important;
    padding: 8px !important;
  }

  .wt-card-header {
    padding-bottom: 5px;
    margin-bottom: 6px;
    border-bottom: 1px solid #CBD5E1;
  }

  .wt-card-title,
  .form-label,
  .body-text,
  .caption,
  .text-slate {
    color: #111827 !important;
  }

  .kpi-card {
    box-shadow: none !important;
    border: 1px solid #CBD5E1 !important;
    background: white !important;
    padding: 8px !important;
    page-break-inside: avoid;
  }

  .kpi-card .kpi-label,
  .kpi-card .kpi-sub {
    color: #475569 !important;
  }

  .kpi-card .kpi-value {
    color: #111827 !important;
    font-size: 16pt !important;
  }

  .wt-table {
    width: 100% !important;
    font-size: 7.5pt !important;
    border-collapse: collapse !important;
  }

  .wt-table thead {
    display: table-header-group;
  }

  .wt-table tr {
    page-break-inside: avoid;
  }

  .wt-table thead th {
    background: #111827 !important;
    color: #fff !important;
    border: 1px solid #111827 !important;
    padding: 4px 5px !important;
    letter-spacing: 0 !important;
  }

  .wt-table td {
    color: #111827 !important;
    border: 1px solid #CBD5E1 !important;
    padding: 3px 5px !important;
  }

  .badge {
    border: 1px solid #CBD5E1 !important;
    background: white !important;
    color: #111827 !important;
  }

  .form-control,
  .form-select {
    border: 0 !important;
    background: transparent !important;
    color: #111827 !important;
    padding: 0 !important;
    min-height: 0 !important;
  }

  a { color: #111827; text-decoration: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Sidebar backdrop for mobile/tablet overlay */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 23, 0.55);
  z-index: 1029;
  cursor: pointer;
}
.sidebar-backdrop.show { display: block; }

@media (max-width: 991.98px) {
  .wt-sidebar {
    width: 60px;
    overflow: visible;
  }
  .wt-sidebar .nav-label,
  .wt-sidebar .nav-section-label,
  .wt-topbar .brand-tagline { display: none; }
  .wt-main { margin-left: 60px; }

  /* Expanded state on tablet */
  .wt-sidebar.open {
    width: var(--wt-sidebar-width);
    box-shadow: 4px 0 24px rgba(2,8,23,0.5);
  }
  .wt-sidebar.open .nav-label,
  .wt-sidebar.open .nav-section-label { display: block; }
}

@media (max-width: 575.98px) {
  .wt-sidebar {
    width: var(--wt-sidebar-width);
    transform: translateX(-100%);
    overflow-y: auto;
  }
  .wt-sidebar.open {
    transform: translateX(0);
    width: var(--wt-sidebar-width);
    box-shadow: 4px 0 24px rgba(2,8,23,0.5);
  }
  .wt-sidebar .nav-label,
  .wt-sidebar .nav-section-label { display: block; }
  .wt-main { margin-left: 0; padding: 1rem; }
  .wt-topbar .user-chip { font-size: 0.75rem; padding: 0.2rem 0.6rem 0.2rem 0.2rem; }
  .wt-topbar .user-chip > div:nth-child(2) { display: none; }
  h1 { font-size: 1.4rem; }
  .kpi-card .kpi-value { font-size: 1.25rem; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-ice    { color: var(--wt-ice)    !important; }
.text-cobalt { color: var(--wt-cobalt) !important; }
.text-slate  { color: var(--wt-slate)  !important; }
.text-mono   { font-family: 'JetBrains Mono', monospace !important; }

.bg-abyss { background-color: var(--wt-abyss) !important; }
.bg-depth { background-color: var(--wt-depth) !important; }
.bg-frost { background-color: var(--wt-frost) !important; }

.border-cobalt { border-color: var(--wt-cobalt) !important; }
.border-ice    { border-color: var(--wt-ice)    !important; }

.rounded-wt { border-radius: 8px; }
.shadow-wt  { box-shadow: 0 2px 8px rgba(2,8,23,0.08); }

.cursor-pointer { cursor: pointer; }
