@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ═══════════════════════════════════════════════════
   IMS — Design System Tokens
   ═══════════════════════════════════════════════════ */
:root {
  /* ── Brand Palette ── */
  --ink-950:   #07090f;
  --ink-900:   #0d1117;
  --ink-800:   #161c28;
  --ink-700:   #1e2636;
  --ink-600:   #2a3448;
  --ink-500:   #3d4f68;
  --ink-400:   #5c7291;
  --ink-300:   #8a9dba;
  --ink-200:   #b8c6d8;
  --ink-100:   #dde5ef;
  --ink-50:    #f0f4f8;

  --gold-600:  #b45309;
  --gold-500:  #d97706;
  --gold-400:  #f59e0b;
  --gold-300:  #fbbf24;
  --gold-200:  #fcd34d;
  --gold-100:  #fef3c7;
  --gold-50:   #fffbeb;

  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-100: #d1fae5;
  --emerald-50:  #ecfdf5;

  --rose-600:  #e11d48;
  --rose-500:  #f43f5e;
  --rose-100:  #ffe4e6;
  --rose-50:   #fff1f2;

  --sky-600:   #0284c7;
  --sky-500:   #0ea5e9;
  --sky-100:   #e0f2fe;
  --sky-50:    #f0f9ff;

  /* ── Semantic ── */
  --bg-base:     #f5f7fb;
  --bg-card:     #ffffff;
  --bg-surface:  #fafbfd;
  --bg-hover:    #f1f4f9;

  --text-primary:   #0d1117;
  --text-secondary: #3d4f68;
  --text-muted:     #8a9dba;
  --text-inverse:   #ffffff;

  --border-faint:  rgba(30, 38, 54, 0.06);
  --border-light:  rgba(30, 38, 54, 0.10);
  --border-medium: rgba(30, 38, 54, 0.16);
  --border-strong: rgba(30, 38, 54, 0.26);

  /* ── Shadows ── */
  --shadow-xs: 0 1px 2px rgba(7, 9, 15, 0.04);
  --shadow-sm: 0 2px 8px rgba(7, 9, 15, 0.06), 0 1px 2px rgba(7, 9, 15, 0.04);
  --shadow-md: 0 8px 24px rgba(7, 9, 15, 0.09), 0 2px 6px rgba(7, 9, 15, 0.05);
  --shadow-lg: 0 18px 48px rgba(7, 9, 15, 0.13), 0 4px 12px rgba(7, 9, 15, 0.07);

  /* ── Radii ── */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   22px;
  --r-pill: 999px;

  /* ── Typography ── */
  --font-ui:   'Sora', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* ── Motion ── */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast:  130ms;
  --dur-base:  210ms;
  --dur-slow:  320ms;
}

/* ═══════════════════════════════════════════════════
   Reset & Base
   ═══════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
  background: var(--bg-base);
  color: var(--text-primary);
  letter-spacing: -0.006em;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: var(--r-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ═══════════════════════════════════════════════════
   Layout Shell
   ═══════════════════════════════════════════════════ */
.app-shell {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════
   Sidebar
   ═══════════════════════════════════════════════════ */
.sidebar {
  width: 256px;
  background: var(--ink-900);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
}

/* Subtle depth gradient on sidebar */
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 200% 60% at 50% 0%, rgba(245, 158, 11, 0.07) 0%, transparent 60%),
    linear-gradient(180deg, var(--ink-800) 0%, var(--ink-900) 100%);
  pointer-events: none;
}

.sidebar-logo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 28px 22px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  flex-shrink: 0;
}

.logo-icon svg { color: var(--ink-900); }

.logo-text {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.04em;
}

.logo-accent { color: var(--gold-400); }

.sidebar-section-label {
  position: relative;
  padding: 20px 22px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-500);
}

.sidebar-nav {
  position: relative;
  flex: 1;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  color: var(--ink-300);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: color var(--dur-fast), background var(--dur-fast);
  white-space: nowrap;
  overflow: hidden;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--dur-fast);
}

.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item:hover svg { opacity: 1; }

.nav-item.active {
  color: #ffffff;
  background: rgba(245, 158, 11, 0.12);
}

.nav-item.active svg { opacity: 1; color: var(--gold-400); }

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: var(--gold-400);
  border-radius: 0 var(--r-pill) var(--r-pill) 0;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.nav-badge {
  margin-left: auto;
  padding: 2px 7px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-300);
  border-radius: var(--r-pill);
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.sidebar-divider {
  position: relative;
  margin: 10px 12px;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-footer {
  position: relative;
  padding: 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--dur-fast);
}

.sidebar-user:hover { background: rgba(255, 255, 255, 0.05); }

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--ink-600), var(--ink-500));
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-200);
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }

.user-name {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-100);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  display: block;
  font-size: 11px;
  color: var(--ink-400);
}

/* ═══════════════════════════════════════════════════
   Main Content
   ═══════════════════════════════════════════════════ */
.main-content {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-base);
  padding: 36px 40px;
}

.content-container {
  max-width: 1240px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════
   Header
   ═══════════════════════════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.breadcrumb-sep { opacity: 0.4; }

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.page-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════
   Metrics Grid
   ═══════════════════════════════════════════════════ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  padding: 22px 22px 20px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base), border-color var(--dur-base);
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-medium);
}

.metric-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--border-faint);
}

.metric-card.accent-gold::after   { background: linear-gradient(90deg, var(--gold-400), var(--gold-600)); }
.metric-card.accent-green::after  { background: linear-gradient(90deg, var(--emerald-500), var(--emerald-600)); }
.metric-card.accent-blue::after   { background: linear-gradient(90deg, var(--sky-500), var(--sky-600)); }
.metric-card.accent-rose::after   { background: linear-gradient(90deg, var(--rose-500), var(--rose-600)); }

.metric-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.metric-icon.gold   { background: var(--gold-50);    color: var(--gold-600); }
.metric-icon.green  { background: var(--emerald-50); color: var(--emerald-600); }
.metric-icon.blue   { background: var(--sky-50);     color: var(--sky-600); }
.metric-icon.rose   { background: var(--rose-50);    color: var(--rose-600); }
.metric-icon svg    { width: 18px; height: 18px; }

.metric-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.metric-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.metric-unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}

.metric-change {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 600;
}

.metric-change.positive { color: var(--emerald-600); }
.metric-change.negative { color: var(--rose-600); }
.metric-change svg { width: 12px; height: 12px; }

/* ═══════════════════════════════════════════════════
   Data Card / Table Container
   ═══════════════════════════════════════════════════ */
.data-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--dur-slow) var(--ease-out);
}

.data-card:hover { box-shadow: var(--shadow-md); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  background: linear-gradient(180deg, #fbfcfe, #f7f9fc);
  border-bottom: 1px solid var(--border-faint);
}

.card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.item-count {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-base);
  border: 1px solid var(--border-light);
  border-radius: var(--r-pill);
}

/* ═══════════════════════════════════════════════════
   Table
   ═══════════════════════════════════════════════════ */
.modern-table {
  width: 100%;
  border-collapse: collapse;
}

.modern-table thead th {
  padding: 11px 20px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: left;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  user-select: none;
  cursor: default;
}

.modern-table thead th.sortable { cursor: pointer; }
.modern-table thead th.sortable:hover { color: var(--text-secondary); }
.modern-table thead th.align-right { text-align: right; }
.modern-table thead th.align-center { text-align: center; }

.modern-table tbody td {
  padding: 14px 20px;
  font-size: 13.5px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-faint);
  vertical-align: middle;
  transition: background var(--dur-fast);
}

.modern-table tbody td.align-right { text-align: right; }
.modern-table tbody td.align-center { text-align: center; }

.modern-table tbody tr { transition: background var(--dur-fast); }
.modern-table tbody tr:hover td { background: var(--bg-hover); }
.modern-table tbody tr:last-child td { border-bottom: none; }

/* ── Table Cell Atoms ── */
.product-name {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sku-text, .sku-id {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.price-text {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════
   Badges & Status
   ═══════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-success  { color: var(--emerald-600); background: var(--emerald-50); border: 1px solid rgba(5, 150, 105, 0.15); }
.badge-warning  { color: var(--gold-600);    background: var(--gold-50);    border: 1px solid rgba(217, 119, 6, 0.15); }
.badge-danger   { color: var(--rose-600);    background: var(--rose-50);    border: 1px solid rgba(225, 29, 72, 0.15); }
.badge-neutral  { color: var(--text-secondary); background: var(--bg-hover); border: 1px solid var(--border-light); }

.badge-success .badge-dot  { background: var(--emerald-500); }
.badge-warning .badge-dot  { background: var(--gold-400); }
.badge-danger  .badge-dot  { background: var(--rose-500); }

.positive { color: var(--emerald-600); font-weight: 600; }
.negative { color: var(--rose-600);    font-weight: 600; }

/* ═══════════════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 18px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-900);
  background: linear-gradient(180deg, var(--gold-300), var(--gold-400));
  border: 1px solid rgba(180, 83, 9, 0.2);
  border-radius: var(--r-md);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.30), 0 1px 2px rgba(0,0,0,0.06);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast), filter var(--dur-fast);
  letter-spacing: -0.01em;
}

.btn-primary svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35), 0 2px 6px rgba(0,0,0,0.08);
  filter: brightness(1.04);
}

.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: -0.01em;
  transition: color var(--dur-fast), background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast) var(--ease-out);
}

.btn-ghost svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.icon-btn {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  border: 1px solid transparent;
  cursor: pointer;
  transition: color var(--dur-fast), background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast) var(--ease-out);
}

.icon-btn svg { width: 14px; height: 14px; }

.icon-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.icon-btn.edit-btn:hover   { color: var(--gold-600);    background: var(--gold-50);    border-color: rgba(217, 119, 6, 0.2); }
.icon-btn.delete-btn:hover { color: var(--rose-600);    background: var(--rose-50);    border-color: rgba(225, 29, 72, 0.2); }

.actions-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* ═══════════════════════════════════════════════════
   Search Input
   ═══════════════════════════════════════════════════ */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
}

#skuSearch {
  all: unset;
  display: block;
  width: 240px;
  height: 40px;
  padding: 0 14px 0 36px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-base), box-shadow var(--dur-base);
}

#skuSearch::placeholder { color: var(--text-muted); }
#skuSearch:hover  { border-color: var(--border-strong); }
#skuSearch:focus  { border-color: var(--gold-400); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14); }

/* ═══════════════════════════════════════════════════
   Rack ID Pill
   ═══════════════════════════════════════════════════ */
.rack-id-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--sky-600);
  background: var(--sky-50);
  border: 1px solid rgba(14, 165, 233, 0.18);
}

/* ═══════════════════════════════════════════════════
   Progress Bar
   ═══════════════════════════════════════════════════ */
.fill-rate-wrap {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.progress-track {
  width: 68px;
  height: 4px;
  background: var(--border-faint);
  border-radius: var(--r-pill);
  overflow: hidden;
  flex-shrink: 0;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  transition: width var(--dur-slow) var(--ease-out);
}

.progress-fill.bar-green { background: linear-gradient(90deg, var(--emerald-500), var(--emerald-600)); }
.progress-fill.bar-amber { background: linear-gradient(90deg, var(--gold-300), var(--gold-500)); }
.progress-fill.bar-red   { background: linear-gradient(90deg, var(--rose-500), var(--rose-600)); }

.fill-pct {
  min-width: 30px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: right;
}

/* ═══════════════════════════════════════════════════
   Empty State
   ═══════════════════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 56px 20px;
  text-align: center;
}

.empty-state svg { width: 36px; height: 36px; color: var(--ink-200); margin-bottom: 4px; }
.empty-state p   { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.empty-state span { font-size: 13px; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  body { overflow: auto; }

  .app-shell {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .sidebar::before { display: none; }

  .sidebar-logo { padding: 14px 18px; }

  .sidebar-section-label { display: none; }

  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 6px 12px;
    gap: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar-nav::-webkit-scrollbar { display: none; }

  .nav-item {
    padding: 8px 14px;
    flex-shrink: 0;
    border-radius: var(--r-pill);
    font-size: 12.5px;
  }

  .nav-item.active::before { display: none; }

  .nav-badge { display: none; }

  .sidebar-divider,
  .sidebar-footer { display: none; }

  .main-content { padding: 20px 16px; }

  .main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .header-actions { width: 100%; flex-wrap: wrap; }
  .search-container { flex: 1; width: 100%; }
  #skuSearch { width: 100%; }

  .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .metric-card  { padding: 16px 16px 14px; }
  .metric-value { font-size: 24px; }

  .data-card { overflow-x: auto; }
  .modern-table { min-width: 720px; }
}

@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .page-title   { font-size: 22px; }
  .header-actions { flex-direction: column; }
  .btn-primary  { width: 100%; justify-content: center; }
}