/* ─── Design tokens ─────────────────────────────────────────────────── */
:root {
  --bg: #f0f2f5;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --line: #e5e7eb;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --radius: 12px;
  --sidebar-w: 260px;
  --header-h: 70px;
}

/* ─── Reset & base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.auth-page-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 28%),
    linear-gradient(135deg, #eef4ff 0%, #f8fafc 52%, #eff6ff 100%);
}

.auth-shell,
.landing-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  padding: 28px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
}

.auth-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-subtitle {
  color: var(--muted);
}

.landing-hero {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: center;
}

.landing-copy,
.landing-panel {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.10);
}

.landing-copy {
  padding: 40px;
}

.landing-panel {
  padding: 26px;
}

.landing-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1d4ed8;
  margin-bottom: 14px;
}

.landing-title {
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  margin: 0 0 16px;
}

.landing-subtitle {
  font-size: 1rem;
  line-height: 1.7;
  color: #475569;
  max-width: 580px;
}

.landing-actions {
  margin-top: 24px;
}

.landing-points {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.landing-point {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: #334155;
}

.landing-point i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #dbeafe;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.landing-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.landing-metric-card {
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 18px;
  padding: 18px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.landing-metric-card-wide {
  grid-column: 1 / -1;
}

.landing-metric-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.landing-metric-card strong {
  font-size: 1.05rem;
  line-height: 1.4;
}

/* ─── App shell ──────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────────────────── */
.sidebar-panel {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: #0f172a;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-right: 1px solid #1e293b;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: transform 0.25s ease;
  z-index: 30;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid #1e293b;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.brand-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: #64748b;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 10px 8px;
}

.nav-section-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
  padding: 4px 10px 6px;
  margin: 0;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #94a3b8;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav .nav-link:hover {
  color: #f1f5f9;
  background: #1e293b;
}

.sidebar-nav .nav-link-active {
  color: #fff;
  background: var(--accent);
}

.sidebar-nav .nav-link-active:hover {
  background: var(--accent-hover);
}

.nav-icon {
  font-size: 1rem;
  flex-shrink: 0;
  opacity: 0.9;
}

.sidebar-foot {
  padding: 16px 14px;
  border-top: 1px solid #1e293b;
  margin-top: auto;
}

.sidebar-user-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #334155;
  color: #f1f5f9;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 0.825rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.72rem;
  color: #64748b;
}

.sidebar-logout-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  color: #64748b;
  text-decoration: none;
  margin-top: 10px;
  padding: 4px 2px;
  transition: color 0.15s;
}

.sidebar-logout-link:hover { color: #f87171; }

button.sidebar-logout-link {
  width: 100%;
  text-align: left;
}

/* ─── Desktop sidebar collapse ──────────────────────────────────────── */
@media (min-width: 992px) {
  .app-shell.is-sidebar-collapsed .sidebar-panel {
    width: 76px;
  }

  .app-shell.is-sidebar-collapsed .brand-block {
    justify-content: center;
    padding-left: 8px;
    padding-right: 8px;
  }

  .app-shell.is-sidebar-collapsed .brand-block > div,
  .app-shell.is-sidebar-collapsed .nav-section-label,
  .app-shell.is-sidebar-collapsed .sidebar-nav .nav-link span,
  .app-shell.is-sidebar-collapsed .sidebar-user-block > div,
  .app-shell.is-sidebar-collapsed .sidebar-logout-link {
    display: none;
  }

  .app-shell.is-sidebar-collapsed .sidebar-nav {
    padding-left: 6px;
    padding-right: 6px;
  }

  .app-shell.is-sidebar-collapsed .sidebar-nav .nav-link {
    justify-content: center;
    padding-left: 8px;
    padding-right: 8px;
  }

  .app-shell.is-sidebar-collapsed .sidebar-foot {
    padding-left: 8px;
    padding-right: 8px;
  }

  .app-shell.is-sidebar-collapsed .sidebar-user-block {
    justify-content: center;
  }
}

/* ─── Sidebar overlay (mobile) ───────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 25;
}

.sidebar-overlay.is-visible { display: block; }

/* ─── Main area ──────────────────────────────────────────────────────── */
.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ─── Header ─────────────────────────────────────────────────────────── */
.header-panel {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.sidebar-toggle-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.15s;
}
.sidebar-toggle-btn:hover { background: var(--bg); }

.breadcrumb {
  font-size: 0.72rem;
  --bs-breadcrumb-divider-color: #9ca3af;
  --bs-breadcrumb-item-active-color: var(--muted);
}

.breadcrumb-home a { color: var(--muted); text-decoration: none; }
.breadcrumb-home a:hover { color: var(--ink); }

.page-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
  margin: 0 6px;
}

.icon-action-btn {
  position: relative;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.icon-action-btn:hover { background: var(--bg); color: var(--ink); }

.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid var(--panel);
}

.header-user-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px 5px 5px;
  cursor: pointer;
  transition: background 0.15s;
}
.header-user-pill:hover { background: #e5e7eb; }

.header-dropdown-menu {
  min-width: 240px;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  padding: 8px;
}

.header-dropdown-menu .dropdown-header {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.header-dropdown-menu .dropdown-item {
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.85rem;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-name {
  font-size: 0.825rem;
  font-weight: 600;
  line-height: 1.2;
}

.user-role {
  font-size: 0.7rem;
  color: var(--muted);
}

.user-chevron {
  font-size: 0.72rem;
  color: var(--muted);
}

/* ─── Content area ───────────────────────────────────────────────────── */
.content-wrap {
  flex: 1;
  padding: 24px;
}

/* ─── Dashboard intro ────────────────────────────────────────────────── */
.dash-intro-text {
  font-size: 0.875rem;
  color: var(--muted);
}

.dash-date {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* ─── Stat cards ─────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 230px));
  justify-content: start;
  gap: 16px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px 12px;
  transition: box-shadow 0.2s;
}

.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-card-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stat-label {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 4px;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
  margin: 0 0 2px;
}

.stat-helper {
  font-size: 0.74rem;
  color: var(--muted);
  margin: 0;
}

.stat-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.icon-blue   { background: #dbeafe; color: #1d4ed8; }
.icon-purple { background: #ede9fe; color: #6d28d9; }
.icon-amber  { background: #fef3c7; color: #d97706; }
.icon-red    { background: #fee2e2; color: #dc2626; }

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.trend-up   { color: #16a34a; }
.trend-down { color: #dc2626; }

/* ─── Cards (chart, table) ───────────────────────────────────────────── */
.chart-card,
.table-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  transition: box-shadow 0.2s;
}

.chart-card:hover,
.table-card:hover { box-shadow: var(--shadow-md); }

.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--ink);
}

.card-subtitle {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

.chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
}

.btn-table-action {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
  flex-shrink: 0;
}
.btn-table-action:hover { color: var(--accent-hover); }

.inventory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inventory-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.inventory-form-card {
  max-width: 1080px;
}

.inventory-summary-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.inventory-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.inventory-summary-pill-label {
  opacity: 0.9;
}

.summary-instock {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.summary-low {
  background: #fffbeb;
  border-color: #fde68a;
}

.summary-out {
  background: #fef2f2;
  border-color: #fecaca;
}

.inventory-filter-bar {
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}

.inventory-search-bar {
  max-width: 560px;
}

.inventory-filter-toggle-row {
  display: flex;
  justify-content: flex-end;
}

.inventory-filter-bar.is-collapsed {
  display: none;
}

.inventory-bulk-bar {
  background: #f8fafc;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
}

.table-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: inherit;
}

.table-sort-indicator {
  color: #94a3b8;
  font-size: 0.9rem;
}

.table-sort-indicator.is-active {
  color: var(--accent);
}

.table-sort-link:hover {
  color: var(--accent);
}

.inventory-action-icon {
  /* display: inline-flex; */
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 5px 0px;
  color: #475569;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
}

.inventory-action-icon:hover {
  color: var(--accent);
}

.inventory-action-icon-danger {
  color: #b91c1c;
}

.inventory-action-icon-danger:hover {
  color: #991b1b;
}

.store-chart-wrap {
  position: relative;
  min-height: 320px;
}

.store-highlight-card {
  border: 1px solid #dbeafe;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border-radius: 12px;
  padding: 16px;
}

.store-highlight-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

.store-highlight-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.store-highlight-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.store-highlight-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}

.store-compare-box {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-compare-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
}

/* ─── Bar chart ──────────────────────────────────────────────────────── */
.movement-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: end;
  min-height: 180px;
  padding: 4px 0;
}

.movement-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.movement-bar-value {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
}

.movement-bar {
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  background: var(--accent);
  opacity: 0.85;
  min-height: 16px;
  animation: rise 0.5s ease both;
  transition: opacity 0.2s;
  cursor: default;
}

.movement-bar:hover { opacity: 1; }

.movement-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}

/* ─── Tables ─────────────────────────────────────────────────────────── */
.table thead th {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  border-bottom: 1px solid var(--line);
  padding: 8px 12px;
  background: #fafafa;
}

.table tbody td {
  font-size: 0.855rem;
  border-color: #f3f4f6;
  padding: 10px 12px;
  vertical-align: middle;
}

.table-hover tbody tr { transition: background 0.12s; }
.table-hover tbody tr:hover td { background-color: #f9fafb; }

/* ─── Badges and pills ───────────────────────────────────────────────── */
.sku-badge {
  font-family: "SF Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}

.stock-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

.stock-critical { background: #fee2e2; color: #b91c1c; }
.stock-low      { background: #fef3c7; color: #92400e; }
.stock-ok       { background: #dcfce7; color: #166534; }
.stock-store    { min-width: 36px; }
.stock-store-match { background: #e0f2fe; color: #075985; }
.stock-store-diff  { background: #ede9fe; color: #6d28d9; }

.stock-stack {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.stock-caption {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 10px;
  letter-spacing: 0.02em;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-placed::before   { background: #d97706; }
.status-received::before { background: #16a34a; }
.status-draft::before    { background: #94a3b8; }
.status-cancelled::before{ background: #dc2626; }

.status-placed   { color: #92400e; background: #fef3c7; }
.status-received { color: #166534; background: #dcfce7; }
.status-draft    { color: #475569; background: #f1f5f9; }
.status-cancelled{ color: #991b1b; background: #fee2e2; }

/* ─── WooCommerce Sync ───────────────────────────────────────────────── */
.sync-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
}

.sync-pill-error   { background: #fee2e2; color: #991b1b; }
.sync-pill-success { background: #dcfce7; color: #166534; }
.sync-pill-warning { background: #fef3c7; color: #92400e; }
.sync-pill-info    { background: #e0f2fe; color: #075985; }

.sync-discrepancy-table tbody tr {
  background: #fff8f8;
}

.sync-discrepancy-table tbody tr:hover {
  background: #fee2e2;
}

.sync-wc-stock {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 600;
  font-size: 0.82rem;
  min-width: 36px;
  text-align: center;
}

.sync-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  color: var(--text-muted);
}

.sync-empty-icon {
  font-size: 3rem;
  opacity: 0.3;
}

details > summary {
  list-style: none;
  user-select: none;
}

details > summary::-webkit-details-marker { display: none; }

/* ─── Purchase Order Detail ──────────────────────────────────────────── */
.po-detail-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}

.po-totals-table td {
  padding: 4px 8px;
  border: none;
}

.po-totals-table tr.border-top td {
  border-top: 1px solid var(--border) !important;
  padding-top: 8px;
}

/* ─── Animations ──────────────────────────────────────────────────────── */
@keyframes rise {
  from { opacity: 0; transform: scaleY(0.3); transform-origin: bottom; }
  to   { opacity: 0.85; transform: scaleY(1); transform-origin: bottom; }
}

/* ─── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1199px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
  .sidebar-panel {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
  }
  .sidebar-panel.is-open { transform: translateX(0); }
  .app-main { width: 100%; }
}

@media (max-width: 767px) {
  .stats-grid { grid-template-columns: 1fr; }
  .content-wrap { padding: 16px; }
  .header-panel { padding: 0 14px; }
  .landing-hero {
    grid-template-columns: 1fr;
  }
  .landing-copy,
  .landing-panel,
  .auth-card {
    padding: 22px;
  }
  .inventory-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .inventory-toolbar-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
