/* ============================================================
   MERIDIAN HEALTH — ADMIN PORTAL DESIGN SYSTEM
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

/* --- TOKENS --- */
:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --surface-dim: #faf9f5;
  --primary: #1a1a1a;
  --accent: #d4a373;
  --accent-dark: #b8935c;
  --green: #7cb342;
  --green-bg: rgba(124,179,66,0.12);
  --green-text: #5a8028;
  --danger: #c95c4a;
  --danger-dark: #a94838;
  --danger-bg: rgba(201,92,74,0.12);
  --border: #eae7de;
  --muted: #8a8578;
  --muted-light: #a19b8a;
  --muted-dark: #6b6659;
  --text: #1a1a1a;
  --text-secondary: #4a4a4a;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --font-body: 'Geist', -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', serif;
  --font-mono: 'Geist Mono', monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RESET --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* --- SHELL --- */
.shell { width: 1440px; margin: 0 auto; min-height: 100vh; display: flex; background: var(--bg); position: relative; }

/* --- SIDEBAR --- */
.sidebar {
  width: 248px; background: var(--surface);
  position: fixed; height: 100vh; top: 0;
  left: calc(50% - 720px);
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
  z-index: 30;
}
.brand { padding: 22px 22px 18px; display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #1a1a1a, #3d3d3d);
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  color: var(--bg); font-weight: 600; font-size: 15px; letter-spacing: -0.02em;
}
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }
.brand-sub { font-size: 11px; color: var(--muted); margin-top: 1px; font-family: var(--font-mono); }

.workspace {
  margin: 4px 14px 12px; padding: 10px 12px;
  background: var(--surface-dim); border: 1px solid var(--border); border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 10px;
}
.ws-avatar {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 11px;
}
.ws-info { flex: 1; min-width: 0; }
.ws-name { font-weight: 500; font-size: 12.5px; }
.ws-plan { font-size: 10.5px; color: var(--muted); font-family: var(--font-mono); }
.ws-chev { color: var(--muted); }

.nav-block { padding: 6px 14px 12px; }
.nav-heading {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted-light); padding: 8px 10px 6px; font-weight: 500; font-family: var(--font-mono);
}
.nav-link {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; border-radius: var(--radius-xs);
  color: var(--text-secondary); font-size: 13.5px; font-weight: 400;
  margin-bottom: 1px; cursor: pointer; transition: all 0.15s var(--ease);
  text-decoration: none;
}
.nav-link:hover { background: var(--surface-dim); color: var(--text); }
.nav-link.active { background: var(--primary); color: var(--bg); font-weight: 500; }
.nav-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.nav-count { margin-left: auto; font-size: 10.5px; color: var(--muted-light); font-family: var(--font-mono); }
.nav-link.active .nav-count { color: var(--accent); }

.side-foot { margin-top: auto; padding: 14px; border-top: 1px solid var(--border); }
.user-card { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: var(--radius-sm); }
.user-card:hover { background: var(--surface-dim); }
.u-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--muted) center/cover no-repeat;
  border: 2px solid var(--bg); position: relative; overflow: hidden;
}
.u-avatar .u-initials {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: white;
}
.u-name { font-weight: 500; font-size: 13px; }
.u-role { font-size: 11px; color: var(--muted); }
.u-status {
  width: 8px; height: 8px; background: var(--green);
  border-radius: 50%; margin-left: auto; box-shadow: 0 0 0 2px white;
}

/* --- MAIN --- */
.main { margin-left: 248px; flex: 1; min-height: 100vh; }

/* --- TOPBAR --- */
.topbar {
  height: 64px; padding: 0 36px;
  display: flex; align-items: center; gap: 20px;
  background: rgba(245,244,240,0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(234,231,222,0.6);
  position: sticky; top: 0; z-index: 20;
}
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.crumbs .now { color: var(--text); font-weight: 500; }
.crumbs svg { width: 14px; height: 14px; }

.top-search { margin-left: auto; position: relative; width: 340px; }
.top-search input {
  width: 100%; padding: 9px 14px 9px 38px;
  background: rgba(255,255,255,0.6); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 13px; color: var(--text);
  outline: none;
}
.top-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,163,115,0.15); }
.top-search input::placeholder { color: var(--muted-light); }
.top-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted-light); }
.kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 10.5px; color: var(--muted-light);
  padding: 2px 6px; background: var(--surface-dim); border: 1px solid var(--border); border-radius: 4px;
}
.icon-btn {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.6); border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; position: relative; transition: all 0.15s;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn svg { width: 16px; height: 16px; color: var(--text-secondary); }
.dot {
  position: absolute; top: 9px; right: 9px; width: 7px; height: 7px;
  background: var(--accent); border-radius: 50%; border: 2px solid var(--bg);
}

/* --- CONTENT --- */
.content { padding: 32px 36px 48px; }

/* --- HERO --- */
.hero { margin-bottom: 32px; }
.hero-eyebrow {
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted-light); margin-bottom: 12px;
}
.hero-title {
  font-family: var(--font-serif); font-size: 42px; font-weight: 400;
  letter-spacing: -0.01em; line-height: 1.1; margin-bottom: 10px;
}
.hero-title em { font-style: italic; color: var(--accent-dark); }
.hero-desc { color: var(--muted-dark); font-size: 15px; max-width: 640px; line-height: 1.55; }

.hero-row { display: flex; align-items: flex-end; gap: 40px; }
.hero-actions { margin-left: auto; display: flex; gap: 10px; flex-shrink: 0; }

.hero-meta {
  display: flex; align-items: center; gap: 24px;
  margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--border);
}
.hero-meta-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.hero-meta-item .lbl { color: var(--muted); font-family: var(--font-mono); font-size: 11px; }
.hero-meta-item .val { color: var(--text); font-weight: 500; }
.live-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 4px rgba(124,179,66,0.15); animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* --- BUTTONS --- */
.pill-btn {
  padding: 9px 16px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.6); border: 1px solid var(--border);
  font-family: inherit; font-size: 13px; font-weight: 500; color: var(--text);
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  transition: all 0.15s var(--ease);
}
.pill-btn:hover { background: var(--surface); border-color: #d5d0c5; }
.pill-btn svg { width: 14px; height: 14px; }
.pill-btn.dark { background: var(--primary); color: var(--bg); border-color: var(--primary); }
.pill-btn.dark:hover { background: #2a2a2a; }
.pill-btn.danger { background: var(--danger-bg); color: var(--danger-dark); border-color: transparent; }
.pill-btn.sm { padding: 6px 12px; font-size: 12px; border-radius: var(--radius-xs); }

/* --- RANGE PILLS --- */
.range-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 5px; background: rgba(255,255,255,0.5); border: 1px solid var(--border);
  border-radius: 12px; width: fit-content;
}
.range-pill {
  padding: 6px 14px; border-radius: var(--radius-xs); font-size: 12.5px; font-weight: 500;
  color: var(--muted-dark); cursor: pointer; border: none; background: transparent;
  font-family: inherit; transition: all 0.2s var(--ease);
}
.range-pill.on { background: var(--primary); color: var(--bg); }

/* --- KPI CARDS --- */
.kpi-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 20px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; position: relative; overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  animation: fadeSlideIn 0.4s var(--ease) both;
}
.kpi:nth-child(1) { animation-delay: 0s; }
.kpi:nth-child(2) { animation-delay: 0.05s; }
.kpi:nth-child(3) { animation-delay: 0.1s; }
.kpi:nth-child(4) { animation-delay: 0.15s; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi.feature {
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  color: var(--bg); border-color: var(--primary);
}
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.kpi-name {
  font-size: 12px; color: var(--muted); font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.kpi.feature .kpi-name { color: #a8a29b; }
.kpi-tag {
  font-size: 10.5px; padding: 3px 8px; border-radius: 100px;
  background: var(--surface-dim); color: var(--muted-dark);
  border: 1px solid var(--border); font-family: var(--font-mono);
}
.kpi.feature .kpi-tag { background: rgba(212,163,115,0.15); color: var(--accent); border-color: rgba(212,163,115,0.3); }
.kpi-num {
  font-family: var(--font-serif); font-size: 44px; font-weight: 400;
  letter-spacing: -0.02em; line-height: 1; margin-bottom: 6px;
}
.kpi-num small { font-size: 18px; color: var(--muted); margin-left: 2px; }
.kpi.feature .kpi-num small { color: #a8a29b; }
.kpi-sub { font-size: 13px; color: var(--muted-dark); display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.kpi.feature .kpi-sub { color: #c8c3b8; }
.delta-up { color: var(--green); font-weight: 500; font-family: var(--font-mono); font-size: 12px; }
.delta-down { color: var(--accent); font-weight: 500; font-family: var(--font-mono); font-size: 12px; }
.delta-good { color: var(--green); font-weight: 500; font-family: var(--font-mono); font-size: 12px; }
.delta-neutral { color: var(--muted); font-weight: 500; font-family: var(--font-mono); font-size: 12px; }
.kpi-spark { height: 40px; margin-top: 4px; }

/* --- PANELS --- */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  animation: fadeSlideIn 0.4s var(--ease) both;
}
.panel:hover { box-shadow: var(--shadow-card); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.panel-title { font-family: var(--font-serif); font-size: 22px; font-weight: 400; letter-spacing: -0.01em; margin-bottom: 4px; }
.panel-sub { font-size: 12.5px; color: var(--muted); }
.panel-actions { display: flex; gap: 6px; }

/* --- CHIPS --- */
.chip {
  padding: 5px 11px; border-radius: var(--radius-xs); font-size: 11.5px; font-weight: 500;
  background: transparent; border: 1px solid transparent; color: var(--muted-dark);
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.chip.on { background: var(--surface-dim); border-color: var(--border); color: var(--text); }
.chip:hover { background: var(--surface-dim); }

/* --- GRIDS --- */
.grid-2 { display: grid; grid-template-columns: 1.7fr 1fr; gap: 14px; margin-bottom: 20px; }
.grid-3 { display: grid; grid-template-columns: 1.2fr 1fr 1.1fr; gap: 14px; }

/* --- LEGEND --- */
.legend { display: flex; gap: 18px; margin-bottom: 14px; }
.leg { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted-dark); }
.leg-swatch { width: 10px; height: 10px; border-radius: 3px; }

/* --- DEPARTMENT LOAD --- */
.dept { display: flex; flex-direction: column; gap: 14px; }
.dept-item { display: flex; align-items: center; gap: 14px; }
.dept-lbl { font-size: 13px; font-weight: 500; width: 96px; color: var(--text); }
.dept-track { flex: 1; height: 6px; background: var(--surface-dim); border-radius: 100px; overflow: hidden; }
.dept-fill { height: 100%; background: linear-gradient(90deg, #1a1a1a, #4a4a4a); border-radius: 100px; transition: width 0.6s var(--ease); }
.dept-fill.warn { background: linear-gradient(90deg, var(--accent), #c98862); }
.dept-fill.crit { background: linear-gradient(90deg, var(--danger), var(--danger-dark)); }
.dept-num { font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; color: var(--text); width: 44px; text-align: right; }

/* --- SIGNALS --- */
.signal-list { display: flex; flex-direction: column; gap: 10px; }
.signal {
  padding: 14px; background: var(--surface-dim); border: 1px solid var(--border);
  border-radius: 12px; display: flex; gap: 12px;
  animation: fadeSlideIn 0.3s var(--ease) both;
}
.signal:nth-child(1) { animation-delay: 0.1s; }
.signal:nth-child(2) { animation-delay: 0.15s; }
.signal:nth-child(3) { animation-delay: 0.2s; }
.signal-badge {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.signal.crit .signal-badge { background: var(--danger-bg); color: var(--danger-dark); }
.signal.warn .signal-badge { background: rgba(212,163,115,0.15); color: var(--accent-dark); }
.signal.info .signal-badge { background: rgba(74,74,74,0.08); color: var(--text-secondary); }
.signal-badge svg { width: 15px; height: 15px; }
.signal-body { flex: 1; }
.signal-title { font-size: 13px; font-weight: 500; margin-bottom: 3px; letter-spacing: -0.01em; }
.signal-note { font-size: 12px; color: var(--muted-dark); line-height: 1.4; }
.signal-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted-light); margin-top: 6px; }

/* --- TABLES --- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; font-family: var(--font-mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-light);
  font-weight: 500; padding: 0 12px 12px 0; white-space: nowrap;
}
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { color: var(--text); }
.data-table td { padding: 12px 12px 12px 0; font-size: 13px; border-top: 1px solid var(--border); vertical-align: middle; }
.data-table tr.clickable { cursor: pointer; transition: background 0.1s; }
.data-table tr.clickable:hover { background: var(--surface-dim); }
.data-table .mono { font-family: var(--font-mono); font-size: 12px; }
.data-table .name-primary { font-weight: 500; }
.data-table .name-sub { color: var(--muted); font-size: 11.5px; margin-top: 2px; font-family: var(--font-mono); }

.trend-tbl { width: 100%; border-collapse: collapse; }
.trend-tbl th {
  text-align: left; font-family: var(--font-mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-light);
  font-weight: 500; padding: 0 0 12px;
}
.trend-tbl td { padding: 12px 0; font-size: 13px; border-top: 1px solid var(--border); }
.trend-name { font-weight: 500; }
.trend-desc { color: var(--muted); font-size: 11.5px; margin-top: 2px; font-family: var(--font-mono); }

/* --- STATUS PILLS --- */
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 100px; font-size: 11px;
  font-weight: 500; font-family: var(--font-mono); white-space: nowrap;
}
.status-pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.sp-good { background: var(--green-bg); color: var(--green-text); }
.sp-warn { background: rgba(212,163,115,0.15); color: #a17a4c; }
.sp-crit { background: var(--danger-bg); color: var(--danger-dark); }
.sp-info { background: rgba(74,74,74,0.08); color: var(--text-secondary); }
.sp-blue { background: rgba(59,130,246,0.1); color: #2563eb; }
.sp-purple { background: rgba(139,92,246,0.1); color: #7c3aed; }
.sp-gray { background: rgba(74,74,74,0.08); color: var(--muted); }

/* --- FILTER TOOLBAR --- */
.filter-bar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
  padding: 12px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; flex-wrap: wrap;
}
.filter-bar .dd-trigger {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--surface-dim); font-size: 13px; cursor: pointer;
  font-family: inherit; color: var(--text); min-width: 120px; position: relative;
}
.filter-bar .dd-trigger svg { width: 14px; height: 14px; color: var(--muted); margin-left: auto; }
.dd-menu {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 100;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xs);
  box-shadow: var(--shadow-lg); min-width: 160px; padding: 4px; max-height: 280px; overflow-y: auto;
}
.dd-menu-item {
  padding: 8px 12px; font-size: 13px; cursor: pointer; border-radius: 6px;
  transition: background 0.1s;
}
.dd-menu-item:hover { background: var(--surface-dim); }

/* --- STAT BAR --- */
.stat-bar {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 24px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 20px; animation: fadeSlideIn 0.3s var(--ease) both;
}
.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.1s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }
.stat-label { font-size: 11px; color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.stat-value { font-family: var(--font-serif); font-size: 28px; font-weight: 400; }

/* --- TABS --- */
.tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.tab-btn {
  padding: 10px 20px; font-size: 13px; font-weight: 500; color: var(--muted);
  background: none; border: none; border-bottom: 2px solid transparent;
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--text); border-bottom-color: var(--primary); }

/* --- DETAIL PANEL --- */
.detail-panel {
  margin-top: 16px; padding: 20px; background: var(--surface-dim);
  border: 1px solid var(--border); border-radius: 12px;
  animation: fadeSlideIn 0.3s var(--ease);
}
.detail-section { margin-bottom: 20px; }
.detail-section:last-child { margin-bottom: 0; }
.detail-section h4 {
  font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted-light); margin-bottom: 10px;
}
.detail-grid { display: grid; grid-template-columns: 120px 1fr; gap: 6px 16px; font-size: 13px; }
.detail-grid .label { color: var(--muted); }
.detail-grid .value { font-weight: 500; }

/* --- CARDS GRID --- */
.cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.int-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; cursor: pointer; transition: all 0.2s var(--ease);
  animation: fadeSlideIn 0.3s var(--ease) both;
}
.int-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.int-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.int-card-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-dim); border: 1px solid var(--border);
}
.int-card-icon svg { width: 18px; height: 18px; color: var(--text-secondary); }
.int-card-name { font-weight: 500; font-size: 14px; }
.int-card-protocol { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.int-card-stats { display: flex; gap: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.int-stat { font-size: 11px; color: var(--muted); }
.int-stat strong { display: block; font-size: 14px; color: var(--text); font-family: var(--font-mono); font-weight: 500; }

/* --- STATUS DOT --- */
.status-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.status-dot.active { background: var(--green); }
.status-dot.degraded { background: var(--accent); animation: pulse 2s infinite; }
.status-dot.failed { background: var(--danger); animation: pulse 1.5s infinite; }
.status-dot.testing { background: #3b82f6; }
.status-dot.configured { background: var(--muted); }

/* --- BREAK GLASS ROW --- */
.break-glass-row { background: rgba(201,92,74,0.04) !important; }
.break-glass-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 100px; font-size: 10px;
  background: var(--danger-bg); color: var(--danger-dark);
  font-family: var(--font-mono); font-weight: 500;
}

/* --- LOGIN --- */
.login-page {
  width: 100%; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f5f4f0 0%, #eae7de 100%);
  flex-direction: column; gap: 40px;
}
.login-brand { text-align: center; }
.login-brand .brand-mark {
  width: 56px; height: 56px; font-size: 24px; margin: 0 auto 16px;
  background: linear-gradient(135deg, #1a1a1a, #3d3d3d);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  color: var(--bg); font-weight: 600;
}
.login-brand h1 { font-family: var(--font-serif); font-size: 32px; font-weight: 400; margin-bottom: 6px; }
.login-brand p { color: var(--muted); font-size: 14px; }

.login-cards { display: grid; grid-template-columns: repeat(5,1fr); gap: 14px; max-width: 900px; }
.login-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 18px; text-align: center; cursor: pointer;
  transition: all 0.2s var(--ease);
}
.login-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.login-card .lc-avatar {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 12px;
  background: var(--muted) center/cover no-repeat; border: 2px solid var(--border);
}
.login-card .lc-name { font-weight: 500; font-size: 13px; margin-bottom: 4px; }
.login-card .lc-role { font-size: 11px; color: var(--accent-dark); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.login-card .lc-dept { font-size: 11px; color: var(--muted); }

.login-form {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; width: 380px;
}
.login-form .form-group { margin-bottom: 14px; }
.login-form label { display: block; font-size: 12px; color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.login-form input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); font-family: inherit; font-size: 14px;
  background: var(--surface-dim); outline: none;
}
.login-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,163,115,0.15); }
.login-form .pill-btn { width: 100%; justify-content: center; margin-top: 8px; }

/* --- FORM STYLES (modals) --- */
.modal-form .form-group { margin-bottom: 14px; }
.modal-form label { display: block; font-size: 12px; color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.modal-form input, .modal-form select, .modal-form textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); font-family: inherit; font-size: 13px;
  background: var(--surface-dim); outline: none;
}
.modal-form input:focus, .modal-form select:focus, .modal-form textarea:focus { border-color: var(--accent); }
.modal-form textarea { resize: vertical; min-height: 80px; }

/* --- EMPTY STATE --- */
.empty-state {
  text-align: center; padding: 48px 24px; color: var(--muted);
}
.empty-state svg { margin-bottom: 12px; color: var(--muted-light); }
.empty-state .es-title { font-family: var(--font-serif); font-size: 20px; color: var(--text); margin-bottom: 6px; }
.empty-state .es-desc { font-size: 13px; max-width: 320px; margin: 0 auto; }

/* --- FOOTER --- */
.page-foot {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between;
  font-size: 11.5px; color: var(--muted-light); font-family: var(--font-mono);
}

/* --- FILING DEADLINE --- */
.deadline-urgent { color: var(--danger); font-weight: 700; }
.deadline-warning { color: var(--danger); }

/* --- CASE CARD --- */
.case-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; margin-bottom: 12px; cursor: pointer; transition: all 0.2s var(--ease);
}
.case-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.case-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.case-card-title { font-weight: 500; font-size: 14px; flex: 1; }
.case-card-body { font-size: 13px; color: var(--muted-dark); margin-bottom: 12px; line-height: 1.5; }
.case-card-meta { display: flex; gap: 16px; font-size: 11px; color: var(--muted); font-family: var(--font-mono); }

/* --- PAGINATION --- */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border);
}
.page-btn {
  padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--surface); font-size: 12px; cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.page-btn:hover { background: var(--surface-dim); }
.page-btn.active { background: var(--primary); color: var(--bg); border-color: var(--primary); }

/* --- ANIMATIONS --- */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-light); }
