/* ───────────────────────────────────────────────────────
   FA Auto Parts — app.css
   Mobile-first, works on iPhone SE → 4K
─────────────────────────────────────────────────────── */

:root {
  --navy: #1a3a5c;
  --navy-dark: #122940;
  --orange: #f97316;
  --orange-light: #fff7ed;
  --green: #16a34a;
  --green-bg: #dcfce7;
  --red: #dc2626;
  --red-bg: #fee2e2;
  --amber: #d97706;
  --amber-bg: #fef3c7;
  --blue: #2563eb;
  --blue-bg: #dbeafe;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --sidebar-w: 240px;
  --topbar-h: 56px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); font-size: 15px; color: var(--gray-900); background: var(--gray-50); line-height: 1.5; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 15px; }

/* ── Auth layout ────────────────────────────────────────── */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, #1e4976 100%);
}
.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 36px 28px 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.auth-logo { text-align: center; margin-bottom: 12px; }
.auth-title { text-align: center; font-size: 22px; font-weight: 700; color: var(--navy); }
.auth-sub { text-align: center; color: var(--gray-400); font-size: 13px; margin-bottom: 24px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--gray-400); }
.auth-footer a { color: var(--orange); }

/* ── App shell ──────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--navy);
  z-index: 100;
  box-shadow: var(--shadow-md);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-weight: 700; font-size: 16px;
  text-decoration: none;
}
.brand svg { flex-shrink: 0; }
.nav-toggle {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 8px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: rgba(255,255,255,.8); border-radius: 2px;
  transition: .2s;
}
@media (min-width: 768px) { .nav-toggle { display: none; } }

/* ── Sidebar ─────────────────────────────────────────────── */
.layout {
  display: flex;
  padding-top: var(--topbar-h);
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  top: var(--topbar-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--navy-dark);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .25s ease;
  z-index: 90;
}
.sidebar.open { transform: translateX(0); }
@media (min-width: 768px) {
  .sidebar { transform: translateX(0); }
  .content { margin-left: var(--sidebar-w); }
}
.sidebar-inner { display: flex; flex-direction: column; min-height: 100%; padding-bottom: 20px; }
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 89;
}
.sidebar-overlay.active { display: block; }

.topbar-right {
  display: flex; align-items: center; gap: 14px;
  margin-right: 8px;
}
.topbar-clock {
  color: rgba(255,255,255,.65);
  font-size: 12px; font-family: 'Courier New', monospace;
  line-height: 1.3; text-align: right;
  white-space: nowrap;
}
.topbar-user {
  display: flex; flex-direction: column; align-items: flex-end;
  border-left: 1px solid rgba(255,255,255,.15); padding-left: 14px;
}
.topbar-username { color: #fff; font-size: 13px; font-weight: 600; line-height: 1.2; }
.topbar-role { color: rgba(255,255,255,.45); font-size: 11px; }
@media (max-width: 479px) { .topbar-clock { display: none; } }


  display: flex; align-items: center; gap: 12px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.nav-user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--orange);
  color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-user-name { color: #fff; font-weight: 600; font-size: 14px; }
.nav-user-role { color: var(--gray-400); font-size: 12px; }

.nav-links { list-style: none; padding: 10px 0; flex: 1; }
.nav-links li a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  color: rgba(255,255,255,.75);
  font-size: 14px;
  transition: background .15s, color .15s;
}
.nav-links li a svg {
  width: 18px; height: 18px;
  fill: currentColor; flex-shrink: 0; opacity: .7;
}
.nav-links li a:hover, .nav-links li a.active {
  background: rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
}
.nav-links li a.active svg { opacity: 1; color: var(--orange); fill: var(--orange); }
.nav-section {
  padding: 14px 16px 4px;
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  color: rgba(255,255,255,.3); text-transform: uppercase;
}
.nav-logout {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 12px 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: rgba(255,255,255,.5);
  font-size: 13px;
  transition: .15s;
}
.nav-logout svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.nav-logout:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.8); text-decoration: none; }

/* ── Main content ────────────────────────────────────────── */
.content { flex: 1; min-width: 0; }
.page-wrap { padding: 20px 16px 40px; max-width: 1280px; margin: 0 auto; }
@media (min-width: 640px) { .page-wrap { padding: 28px 24px 60px; } }
@media (min-width: 1024px) { .page-wrap { padding: 32px 32px 60px; } }

/* ── Page header ─────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-title { font-size: 22px; font-weight: 700; color: var(--gray-900); }
.page-sub { color: var(--gray-400); font-size: 14px; margin-top: 2px; }
.back-link {
  display: inline-flex; align-items: center;
  font-size: 13px; color: var(--gray-400);
  margin-bottom: 4px;
}
.back-link:hover { color: var(--navy); }
.filter-badge {
  display: inline-block;
  background: var(--orange-light); color: var(--orange);
  border-radius: 4px; font-size: 13px; font-weight: 600;
  padding: 1px 8px; margin-left: 8px; vertical-align: middle;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 9px 18px;
  border-radius: var(--radius);
  font-weight: 600; font-size: 14px;
  border: none; cursor: pointer;
  transition: filter .15s, opacity .15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-outline  { background: #fff; color: var(--navy); border: 1.5px solid var(--gray-200); }
.btn-danger   { background: var(--red); color: #fff; }
.btn-success  { background: var(--green); color: #fff; }
.btn-block    { width: 100%; margin-top: 8px; }
.btn-sm {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 6px;
  border: 1px solid var(--gray-200); background: #fff;
  font-size: 14px; cursor: pointer;
}
.btn-sm:hover { background: var(--gray-100); }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.req { color: var(--red); }
.form-control {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 15px; color: var(--gray-900);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,58,92,.12);
}
.form-select {
  width: 100%; padding: 9px 32px 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px; color: var(--gray-900);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ca3af' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
}
.form-select:focus { outline: none; border-color: var(--navy); }
textarea.form-control { resize: vertical; }
.input-eye { position: relative; }
.input-eye .form-control { padding-right: 44px; }
.eye-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; font-size: 16px; cursor: pointer; color: var(--gray-400);
}
.captcha-group .captcha-input { max-width: 120px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.checkbox-label input { width: 16px; height: 16px; accent-color: var(--navy); cursor: pointer; }

.form-card {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 20px 16px;
  box-shadow: var(--shadow);
  max-width: 760px;
}
@media (min-width: 640px) { .form-card { padding: 28px 24px; } }
.form-section { margin-bottom: 24px; }
.form-section-title { font-weight: 700; font-size: 15px; color: var(--navy); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--gray-100); }
.form-row-2 { display: grid; gap: 14px; }
.form-row-4 { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .form-row-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 640px) { .form-row-4 { grid-template-columns: repeat(4, 1fr); } }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 14px; margin-bottom: 16px;
  border-left: 4px solid;
}
.alert-error   { background: var(--red-bg);    border-color: var(--red);   color: #7f1d1d; }
.alert-success { background: var(--green-bg);  border-color: var(--green); color: #14532d; }
.alert-info    { background: var(--blue-bg);   border-color: var(--blue);  color: #1e3a8a; }
.alert-warning { background: var(--amber-bg);  border-color: var(--amber); color: #78350f; }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  white-space: nowrap;
}
.badge-out      { background: var(--red-bg);   color: var(--red); }
.badge-low      { background: var(--red-bg);   color: var(--red); }
.badge-warn     { background: var(--amber-bg); color: var(--amber); }
.badge-over     { background: var(--blue-bg);  color: var(--blue); }
.badge-ok       { background: var(--green-bg); color: var(--green); }
.badge-disabled { background: var(--gray-200); color: var(--gray-600); }
.badge-admin    { background: #ede9fe; color: #5b21b6; }
.badge-staff    { background: var(--blue-bg);  color: var(--blue); }

/* ── Stat cards ──────────────────────────────────────────── */
.stat-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 24px;
}
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 16px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow);
}
.stat-card-alert { border-left: 3px solid var(--red); }
.stat-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; fill: currentColor; }
.stat-icon-blue   { background: var(--blue-bg);  color: var(--blue); }
.stat-icon-orange { background: var(--orange-light); color: var(--orange); }
.stat-icon-green  { background: var(--green-bg); color: var(--green); }
.stat-icon-red    { background: var(--red-bg);   color: var(--red); }
.stat-value { font-size: 20px; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--gray-400); margin-top: 2px; }

/* ── Alert summary bar ───────────────────────────────────── */
.alert-summary {
  background: var(--amber-bg); border: 1px solid #fde68a;
  border-radius: var(--radius); padding: 12px 16px;
  margin-bottom: 20px;
}
.alert-summary-title { font-weight: 600; font-size: 13px; color: var(--amber); margin-bottom: 8px; }
.alert-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Chips / Filter tabs ─────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center;
  padding: 5px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  background: var(--gray-100); color: var(--gray-700);
  cursor: pointer; white-space: nowrap;
  border: 1.5px solid transparent;
  text-decoration: none;
}
.chip:hover { text-decoration: none; }
.chip-active { background: var(--navy); color: #fff !important; }
.chip-red { color: var(--red); }
.chip-red:hover, .chip-red.chip-active { background: var(--red); color: #fff; }
.chip-amber { color: var(--amber); }
.chip-amber:hover, .chip-amber.chip-active { background: var(--amber); color: #fff; }
.chip-blue { color: var(--blue); }
.chip-blue:hover, .chip-blue.chip-active { background: var(--blue); color: #fff; }

/* ── Dashboard panels ────────────────────────────────────── */
.dash-panels {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .dash-panels { grid-template-columns: repeat(2, 1fr); } }

.panel {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  font-weight: 700; font-size: 14px;
  background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
}
.panel-head-red    { background: var(--red-bg);   border-bottom-color: #fca5a5; color: var(--red); }
.panel-head-amber  { background: var(--amber-bg); border-bottom-color: #fde68a; color: var(--amber); }
.panel-head-blue   { background: var(--blue-bg);  border-bottom-color: #93c5fd; color: var(--blue); }
.panel-link { font-size: 12px; font-weight: 500; color: inherit; opacity: .7; }
.panel-body { padding: 4px 0; }
.panel-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 16px; gap: 8px;
  border-bottom: 1px solid var(--gray-100);
}
.panel-row:last-child { border-bottom: none; }
.panel-row-main { min-width: 0; }
.panel-row-meta { font-size: 13px; color: var(--gray-400); white-space: nowrap; flex-shrink: 0; }
.item-link { font-size: 14px; font-weight: 500; color: var(--navy); display: block; }
.item-link:hover { color: var(--orange); }
.item-model { font-size: 12px; color: var(--gray-400); }
.item-model-small { font-size: 12px; color: var(--gray-400); margin-top: 1px; }

/* ── Inventory table ─────────────────────────────────────── */
.search-bar {
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 14px;
}
.search-input-wrap { position: relative; flex: 1; }
.search-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; stroke: var(--gray-400); fill: none; stroke-width: 2;
}
.search-box { padding-left: 36px; padding-right: 32px; }
.search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); font-size: 12px; text-decoration: none;
}

.filter-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 18px;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-selects { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-selects .form-select { width: auto; min-width: 140px; font-size: 13px; padding: 7px 28px 7px 10px; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.inv-table {
  width: 100%; border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}
.inv-table thead th {
  background: var(--gray-50); color: var(--gray-600);
  font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
  padding: 10px 12px; text-align: left; white-space: nowrap;
  border-bottom: 1.5px solid var(--gray-200);
}
.inv-table thead th a { color: inherit; }
.inv-table tbody tr { border-bottom: 1px solid var(--gray-100); }
.inv-table tbody tr:last-child { border-bottom: none; }
.inv-table tbody tr:hover { background: var(--gray-50); }
.inv-table td { padding: 10px 12px; vertical-align: middle; }
.row-disabled { opacity: .5; }
.col-num { text-align: right; }
.col-actions { white-space: nowrap; text-align: right; }
.sku { font-family: 'Courier New', monospace; font-size: 12px; color: var(--gray-400); }

/* ── Qty adjust ──────────────────────────────────────────── */
.qty-adjust { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.adj-btn {
  width: 26px; height: 26px; border-radius: 6px;
  border: 1.5px solid var(--gray-200); background: var(--gray-50);
  font-size: 16px; line-height: 1; color: var(--gray-600);
  display: flex; align-items: center; justify-content: center;
}
.adj-btn:hover { background: var(--gray-200); }
.qty-val { font-weight: 700; font-size: 15px; min-width: 28px; text-align: center; }

/* Qty colour states */
.qty-out      { color: var(--red); }
.qty-below_min{ color: var(--red); }
.qty-near_min { color: var(--amber); }
.qty-overstock{ color: var(--blue); }
.qty-ok       { color: var(--green); }
.qty-low      { color: var(--red); }
.qty-warn     { color: var(--amber); }
.qty-over     { color: var(--blue); }

/* ── Item detail ─────────────────────────────────────────── */
.detail-grid {
  display: grid; gap: 16px;
}
@media (min-width: 640px) { .detail-grid { grid-template-columns: 200px 1fr; } }
.detail-card {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--gray-200); padding: 20px;
  box-shadow: var(--shadow);
}
.detail-header { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-400); margin-bottom: 8px; }
.detail-qty { font-size: 48px; font-weight: 800; line-height: 1; }
.detail-status { margin-top: 8px; }
.detail-minmax { margin-top: 12px; font-size: 13px; color: var(--gray-600); }

.kv-table { width: 100%; font-size: 14px; }
.kv-table th { width: 38%; padding: 7px 0; color: var(--gray-400); font-weight: 500; vertical-align: top; }
.kv-table td { padding: 7px 0; font-weight: 500; }
.kv-table tr + tr th, .kv-table tr + tr td { border-top: 1px solid var(--gray-100); }

.adjust-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.adjust-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; width: 100%; }

/* ── Upload page ─────────────────────────────────────────── */
.file-drop {
  border: 2px dashed var(--gray-200); border-radius: var(--radius);
  padding: 36px 20px; text-align: center;
  cursor: pointer; transition: border-color .2s, background .2s;
  color: var(--gray-400);
}
.file-drop svg { width: 48px; height: 48px; margin: 0 auto 12px; color: var(--gray-300); display: block; }
.file-drop p { font-size: 14px; margin: 4px 0; }
.file-drop.drag-over { border-color: var(--orange); background: var(--orange-light); }
.file-browse { color: var(--orange); cursor: pointer; font-weight: 600; text-decoration: underline; }
.file-hint { font-size: 12px !important; }
.file-name { margin-top: 10px; font-weight: 600; font-size: 14px; color: var(--navy); }

.mode-cards { display: grid; gap: 12px; }
@media (min-width: 560px) { .mode-cards { grid-template-columns: repeat(3, 1fr); } }
.mode-card {
  border: 2px solid var(--gray-200); border-radius: var(--radius);
  cursor: pointer; overflow: hidden; transition: border-color .2s;
  display: block;
}
.mode-card input { display: none; }
.mode-card.selected { border-color: var(--navy); }
.mode-card-body { padding: 14px; }
.mode-card-body strong { display: block; font-size: 14px; color: var(--navy); margin-bottom: 4px; }
.mode-card-body p { font-size: 12px; color: var(--gray-400); line-height: 1.4; }

.result-card {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--gray-200);
  padding: 20px; margin-bottom: 20px; max-width: 400px; box-shadow: var(--shadow);
}
.result-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--gray-100); }
.result-row:last-child { border-bottom: none; }
.result-label { font-size: 14px; }
.result-val { font-weight: 700; font-size: 20px; }
.result-green { color: var(--green); }
.result-blue  { color: var(--blue); }
.result-red   { color: var(--red); }

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; padding: 20px 0;
}
.pag-btn {
  padding: 8px 16px; border-radius: var(--radius);
  background: #fff; border: 1.5px solid var(--gray-200);
  font-size: 14px; font-weight: 600; color: var(--navy);
}
.pag-btn:hover { background: var(--gray-50); text-decoration: none; }
.pag-info { font-size: 14px; color: var(--gray-400); }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--gray-400);
}
.empty-state svg { width: 80px; height: 80px; margin: 0 auto 16px; }
.empty-state p { font-size: 16px; margin-bottom: 16px; }

/* ── Responsive column hiding ────────────────────────────── */
@media (max-width: 479px) { .hide-xs { display: none !important; } }
@media (max-width: 639px) { .hide-sm { display: none !important; } }

/* ── Mobile touch improvements ───────────────────────────── */
@media (max-width: 767px) {
  .inv-table thead th { font-size: 11px; padding: 8px 8px; }
  .inv-table td { padding: 9px 8px; }
  .page-title { font-size: 19px; }
  .stat-value { font-size: 17px; }
  .stat-card { padding: 12px; gap: 10px; }
  .stat-icon { width: 36px; height: 36px; border-radius: 8px; }
  .stat-icon svg { width: 18px; height: 18px; }
  .form-row-4 { grid-template-columns: repeat(2, 1fr); }
  .filter-row { flex-direction: column; }
  .filter-selects { width: 100%; }
  .filter-selects .form-select { flex: 1; }
}

/* ── Print utility ───────────────────────────────────────── */
@media print { .no-print { display: none !important; } }

/* ── iPhone safe area ────────────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .sidebar { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .page-wrap { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
}
