/* ═══════════════════════════════════════════════════════════════
   AwardScout Design System v2
   Deep sidebar layout · Linear-meets-gov-intel aesthetic
   Tokens → Base → Layout → Components → Utilities
   ═══════════════════════════════════════════════════════════════ */

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  /* Sidebar */
  --sidebar-width:    224px;
  --sidebar-bg:       #0f172a;
  --sidebar-border:   rgba(255,255,255,0.06);

  /* Backgrounds */
  --bg:               #f8fafc;
  --bg-dark:          #0f172a;
  --surface:          #ffffff;
  --surface-2:        #f1f5f9;
  --surface-3:        #e2e8f0;

  /* Borders */
  --border:           #e2e8f0;
  --border-dark:      #cbd5e1;

  /* Accent — Indigo/Violet (modern SaaS) */
  --accent:           #6366f1;
  --accent-hover:     #4f46e5;
  --accent-muted:     rgba(99,102,241,0.08);
  --accent-border:    rgba(99,102,241,0.25);
  --accent-text:      #6366f1;

  /* Status */
  --success:          #10b981;
  --success-bg:       rgba(16,185,129,0.09);
  --success-border:   rgba(16,185,129,0.25);
  --warning:          #f59e0b;
  --warning-bg:       rgba(245,158,11,0.09);
  --warning-border:   rgba(245,158,11,0.25);
  --danger:           #ef4444;
  --danger-bg:        rgba(239,68,68,0.09);
  --danger-border:    rgba(239,68,68,0.25);
  --info:             #0ea5e9;
  --info-bg:          rgba(14,165,233,0.09);
  --info-border:      rgba(14,165,233,0.25);

  /* Text (light bg) */
  --text:             #0f172a;
  --text-secondary:   #475569;
  --text-muted:       #94a3b8;
  --text-dim:         #cbd5e1;

  /* Sidebar text */
  --sidebar-text:       rgba(255,255,255,0.55);
  --sidebar-text-hover: rgba(255,255,255,0.85);
  --sidebar-text-active: #ffffff;

  /* Typography */
  --font:      "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --text-xs:   11px;
  --text-sm:   12px;
  --text-base: 13px;
  --text-md:   14px;
  --text-lg:   16px;
  --text-xl:   18px;
  --text-2xl:  22px;
  --text-3xl:  28px;

  /* Radius */
  --radius-sm:  4px;
  --radius:     6px;
  --radius-md:  8px;
  --radius-lg:  10px;
  --radius-xl:  20px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15,23,42,0.06);
  --shadow-sm: 0 1px 4px rgba(15,23,42,0.08), 0 0 0 1px rgba(15,23,42,0.04);
  --shadow:    0 4px 16px rgba(15,23,42,0.10), 0 0 0 1px rgba(15,23,42,0.05);
  --shadow-lg: 0 10px 40px rgba(15,23,42,0.14);

  /* Transitions */
  --t:      150ms ease;
  --t-slow: 250ms ease;

  /* Spacing */
  --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;
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-base);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
}

a {
  color: var(--accent-text);
  text-decoration: none;
  transition: color var(--t);
}
a:hover { color: var(--accent-hover); }

/* ════════════════════════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--sidebar-border);
  margin-bottom: 8px;
  flex-shrink: 0;
}

.sidebar-logo-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99,102,241,0.4);
}

.sidebar-logo-text {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.4px;
}
.sidebar-logo-text span { color: var(--accent); }

/* Section labels */
.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.25);
  text-transform: uppercase;
  letter-spacing: 0.9px;
  padding: 10px 18px 4px;
}

/* Nav */
.sidebar-nav {
  padding: 4px 10px;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--sidebar-text);
  font-size: var(--text-md);
  font-weight: 500;
  transition: color var(--t), background var(--t);
  margin-bottom: 2px;
  position: relative;
  text-decoration: none;
}

.sidebar-link:hover {
  color: var(--sidebar-text-hover);
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

.sidebar-link.active {
  color: var(--sidebar-text-active);
  background: rgba(99,102,241,0.18);
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  margin-left: -10px;
}

.sidebar-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--t);
}
.sidebar-link.active .sidebar-icon,
.sidebar-link:hover .sidebar-icon { opacity: 1; }

.sidebar-link-text { flex: 1; }

/* Footer */
.sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
  margin-top: auto;
}

.sidebar-plan-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  margin-bottom: 4px;
}

.plan-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  flex-shrink: 0;
}

.sidebar-version {
  font-size: 10px;
  color: rgba(255,255,255,0.2);
}

/* ════════════════════════════════════════════════════════════════
   MAIN WRAPPER + TOPBAR
   ════════════════════════════════════════════════════════════════ */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.topbar-left { display: flex; align-items: center; gap: var(--space-3); }
.topbar-right { display: flex; align-items: center; gap: var(--space-3); }

.topbar-page-name {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
}

.topbar-data-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  padding: 3px 10px;
  border-radius: var(--radius-xl);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.topbar-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* ── Page content ─────────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: var(--space-6) var(--space-8);
  max-width: 1400px;
  width: 100%;
}

/* ════════════════════════════════════════════════════════════════
   PAGE HEADER
   ════════════════════════════════════════════════════════════════ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  gap: var(--space-4);
}

.page-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.page-subtitle {
  font-size: var(--text-md);
  color: var(--text-muted);
  margin-top: var(--space-1);
  font-weight: 400;
}

/* ════════════════════════════════════════════════════════════════
   CARDS
   ════════════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t);
}

.card-flush {
  padding: 0;
  overflow: hidden;
}

.card-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-4);
}

.card-title-sm {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: var(--space-4) var(--space-5) 0;
  margin-bottom: var(--space-3);
}

/* Accent left-border info card */
.card-accent {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-left: 3px solid var(--info);
  border-radius: var(--radius-md);
  padding: 11px var(--space-5);
  margin-bottom: var(--space-4);
  font-size: var(--text-base);
  color: var(--text-secondary);
}

/* ════════════════════════════════════════════════════════════════
   STAT CARDS
   ════════════════════════════════════════════════════════════════ */
.stats-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  flex: 1;
  min-width: 140px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 700;
}

.stat-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text);
  margin-top: 5px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.stat-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 3px;
}

/* ════════════════════════════════════════════════════════════════
   GRID LAYOUTS
   ════════════════════════════════════════════════════════════════ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-4);
}

/* ════════════════════════════════════════════════════════════════
   FORMS
   ════════════════════════════════════════════════════════════════ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type=text],
input[type=number],
input[type=date],
input[type=email],
select,
textarea {
  background: var(--surface);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  color: var(--text);
  padding: 8px 11px;
  font-size: var(--text-base);
  font-family: var(--font);
  width: 100%;
  transition: border-color var(--t), box-shadow var(--t);
  appearance: none;
  -webkit-appearance: none;
}

input::placeholder, textarea::placeholder { color: var(--text-dim); }

input:hover, select:hover, textarea:hover {
  border-color: #94a3b8;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394a3b8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}

textarea {
  resize: vertical;
  min-height: 72px;
}

input[type=date]::-webkit-calendar-picker-indicator {
  filter: none;
  cursor: pointer;
  opacity: 0.5;
}

/* ════════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--t);
  font-family: var(--font);
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: 0.1px;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 1px 3px rgba(99,102,241,0.3);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(99,102,241,0.4);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-secondary);
  border-color: var(--border-dark);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: #94a3b8;
  text-decoration: none;
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-pipeline {
  background: var(--accent-muted);
  color: var(--accent);
  border-color: var(--accent-border);
  font-size: var(--text-xs);
  padding: 4px 10px;
  border-radius: var(--radius);
}
.btn-pipeline:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.btn-sm  { padding: 6px 12px; font-size: var(--text-xs); }
.btn-xs  { padding: 3px 8px;  font-size: var(--text-xs); }

/* ════════════════════════════════════════════════════════════════
   TABLES
   ════════════════════════════════════════════════════════════════ */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
}

thead tr {
  background: var(--surface-2);
}

th {
  text-align: left;
  padding: 10px var(--space-4);
  color: var(--text-muted);
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
}

td {
  padding: 11px var(--space-4);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}

tbody tr:last-child td { border-bottom: none; }

tbody tr {
  transition: background var(--t);
}

tbody tr:hover td {
  background: rgba(99,102,241,0.04);
}

.table-striped tbody tr:nth-child(even) td {
  background: rgba(15,23,42,0.018);
}
.table-striped tbody tr:nth-child(even):hover td {
  background: rgba(99,102,241,0.04);
}

td.td-muted    { color: var(--text-secondary); }
td.td-truncate { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
td.td-mono     { font-family: var(--font-mono); font-size: var(--text-xs); }

/* ════════════════════════════════════════════════════════════════
   BADGES
   ════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: var(--radius-xl);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
}

.badge-blue   { background: rgba(37,99,235,0.09);  color: #2563eb; border-color: rgba(37,99,235,0.2); }
.badge-indigo { background: var(--accent-muted);   color: var(--accent); border-color: var(--accent-border); }
.badge-green  { background: var(--success-bg);     color: #059669; border-color: var(--success-border); }
.badge-yellow { background: var(--warning-bg);     color: #d97706; border-color: var(--warning-border); }
.badge-red    { background: var(--danger-bg);      color: #dc2626; border-color: var(--danger-border); }
.badge-gray   { background: rgba(100,116,139,0.09); color: var(--text-secondary); border-color: rgba(100,116,139,0.2); }
.badge-purple { background: rgba(168,85,247,0.09); color: #9333ea; border-color: rgba(168,85,247,0.2); }

/* Pipeline status badges */
.badge-tracking  { background: rgba(100,116,139,0.09); color: var(--text-secondary); border-color: rgba(100,116,139,0.2); }
.badge-pursuing  { background: var(--info-bg);          color: #0284c7; border-color: var(--info-border); }
.badge-submitted { background: var(--warning-bg);       color: #d97706; border-color: var(--warning-border); }
.badge-awarded   { background: var(--success-bg);       color: #059669; border-color: var(--success-border); }
.badge-lost      { background: var(--danger-bg);        color: #dc2626; border-color: var(--danger-border); }
.badge-pass      { background: rgba(100,116,139,0.06);  color: var(--text-muted); border-color: transparent; }

/* ════════════════════════════════════════════════════════════════
   ALERTS
   ════════════════════════════════════════════════════════════════ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: 11px var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  font-size: var(--text-base);
  border: 1px solid;
}

.alert-error   { background: var(--danger-bg);  border-color: var(--danger-border);  color: #b91c1c; }
.alert-info    { background: var(--info-bg);    border-color: var(--info-border);    color: #0369a1; }
.alert-success { background: var(--success-bg); border-color: var(--success-border); color: #047857; }
.alert-warning { background: var(--warning-bg); border-color: var(--warning-border); color: #b45309; }
.alert-icon    { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ════════════════════════════════════════════════════════════════
   CHIPS
   ════════════════════════════════════════════════════════════════ */
.chip-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.chip {
  background: var(--surface-2);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-xl);
  padding: 4px 13px;
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t);
  color: var(--text-secondary);
  font-family: var(--font);
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-muted);
  text-decoration: none;
}

/* ════════════════════════════════════════════════════════════════
   PIPELINE STATUS TABS
   ════════════════════════════════════════════════════════════════ */
.status-tabs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

/* ════════════════════════════════════════════════════════════════
   DISCLOSURE / DETAILS
   ════════════════════════════════════════════════════════════════ */
details.card { cursor: default; }

details.card summary {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-md);
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  padding: var(--space-1) 0;
  transition: color var(--t);
  user-select: none;
}

details.card summary::-webkit-details-marker { display: none; }

details.card summary::before {
  content: '▶';
  font-size: 9px;
  color: var(--text-muted);
  transition: transform var(--t);
}

details.card[open] summary::before { transform: rotate(90deg); }

details.card summary:hover { color: var(--text); }

details.card[open] summary {
  color: var(--text);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

/* ════════════════════════════════════════════════════════════════
   PAGINATION
   ════════════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin-top: var(--space-5);
  justify-content: flex-end;
}

/* ════════════════════════════════════════════════════════════════
   MONEY / AWARD ID
   ════════════════════════════════════════════════════════════════ */
.money-large {
  color: #059669;
  font-weight: 700;
  font-size: var(--text-base);
  font-variant-numeric: tabular-nums;
}

.award-id {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  background: var(--accent-muted);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  display: inline-block;
  border: 1px solid var(--accent-border);
}

/* ════════════════════════════════════════════════════════════════
   SECTION DIVIDER
   ════════════════════════════════════════════════════════════════ */
.section-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ════════════════════════════════════════════════════════════════
   EMPTY STATE
   ════════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: var(--space-3);
  opacity: 0.35;
}

.empty-state-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.empty-state-sub {
  font-size: var(--text-base);
  color: var(--text-muted);
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ════════════════════════════════════════════════════════════════
   SKELETON LOADER
   ════════════════════════════════════════════════════════════════ */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite linear;
}

/* ════════════════════════════════════════════════════════════════
   EXPIRY URGENCY (incumbent page)
   ════════════════════════════════════════════════════════════════ */
.expiry-urgent { color: var(--danger);  font-weight: 700; }
.expiry-soon   { color: var(--warning); font-weight: 600; }
.expiry-ok     { color: var(--success); }

/* ════════════════════════════════════════════════════════════════
   UTILITIES
   ════════════════════════════════════════════════════════════════ */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.flex  { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.text-muted      { color: var(--text-muted); }
.text-secondary  { color: var(--text-secondary); }
.text-success    { color: var(--success); }
.text-danger     { color: var(--danger); }
.text-center     { text-align: center; }
.font-mono       { font-family: var(--font-mono); }
.font-bold       { font-weight: 700; }
.font-semibold   { font-weight: 600; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-full   { width: 100%; }
.sr-only  { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  :root { --sidebar-width: 200px; }
  .main-content { padding: var(--space-5) var(--space-6); }
}

@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--t-slow);
    width: 220px;
  }

  .main-wrapper { margin-left: 0; }

  .main-content { padding: var(--space-4); }

  .form-grid { grid-template-columns: 1fr 1fr; }

  .stats-row { gap: var(--space-2); }
  .stat-value { font-size: var(--text-xl); }
  th, td { padding: 8px var(--space-3); }
}

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

/* ════════════════════════════════════════════════════════════════
   PRINT STYLES
   ════════════════════════════════════════════════════════════════ */
@media print {
  .sidebar, .topbar, .btn-pipeline, .pagination { display: none !important; }
  .main-wrapper { margin-left: 0; }
  .main-content { padding: 0; }
  body { background: white; color: black; }
  .card { box-shadow: none; border: 1px solid #e2e8f0; page-break-inside: avoid; }
  td, th { color: black; }
}
