@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap');

/* ── Taimoor Lace POS — Design System ── */
:root {
  --navy: #1A1C2E;
  --navy-light: #252840;
  --gold: #C5A059;
  --gold-dark: #A8864A;
  --gold-soft: rgba(197, 160, 89, 0.15);
  --primary: var(--navy);
  --primary-hover: var(--navy-light);
  --primary-glow: rgba(26, 28, 46, 0.22);
  --accent: var(--gold);
  --accent-dark: var(--gold-dark);
  --accent-glow: rgba(197, 160, 89, 0.35);
  --blue: #1E3A8A;
  --blue-dark: #172554;
  --blue-light: #2563EB;
  --blue-soft: #EEF2FF;
  --blue-glow: rgba(30, 58, 138, 0.2);
  --white: #FFFFFF;
  --surface: #F4F6FA;
  --surface-2: #EEF2F7;
  --text: #0F172A;
  --muted: #64748B;
  --border: #E2E8F0;
  --success: #059669;
  --success-bg: #ECFDF5;
  --warning: #D97706;
  --warning-bg: #FFFBEB;
  --danger: #DC2626;
  --danger-bg: #FEF2F2;
  --sidebar-w: 220px;
  --topbar-h: 72px;
  --cart-w: 380px;
  --r: 16px;
  --r-lg: 20px;
  --r-xl: 28px;
  --pill: 999px;
  --shadow-sm: 0 1px 3px rgba(15, 40, 100, 0.05);
  --shadow: 0 2px 8px rgba(15, 40, 100, 0.06), 0 16px 40px rgba(15, 40, 100, 0.08);
  --shadow-lg: 0 8px 32px rgba(15, 40, 100, 0.12);
  --ease: 180ms cubic-bezier(0.22, 1, 0.36, 1);
  --font: 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: #F8F9FA;
  line-height: 1.5;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 1rem; }
button { cursor: pointer; border: none; background: none; }

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

.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  height: 100dvh;
  background: var(--navy);
  border-right: none;
  display: flex; flex-direction: column;
  z-index: 40;
  transition: transform var(--ease);
}

.brand {
  padding: 2rem 1.5rem 1.75rem;
  border-bottom: none;
}

.brand h1 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #FFF;
  line-height: 1.1;
}

.brand span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.nav {
  flex: 1;
  padding: 0.5rem 0.875rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
  font-size: 0.9375rem;
  min-height: 44px;
  border-left: none;
  margin-bottom: 0;
  transition: background var(--ease), color var(--ease);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #FFF;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.09);
  color: var(--gold);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 1;
  color: currentColor;
}

.nav-item.active svg {
  color: var(--gold);
}

.sidebar-user-form {
  margin-top: auto;
  width: 100%;
}

.sidebar-user-form .sidebar-user {
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  transition: background var(--ease);
}

.sidebar-user:hover { background: rgba(255, 255, 255, 0.04); }

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4A5568, #2D3748);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-info strong { display: block; color: #FFF; font-size: 0.875rem; font-weight: 600; line-height: 1.3; }
.sidebar-user-info span { font-size: 0.75rem; color: rgba(255, 255, 255, 0.42); }

.sidebar-user > svg {
  flex-shrink: 0;
  opacity: 0.55;
  color: #FFF;
}

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: #F8F9FA;
}

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.75rem;
  box-shadow: var(--shadow-sm);
}

.topbar h1 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.menu-btn {
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--r);
  align-items: center; justify-content: center;
  color: var(--text);
}
.menu-btn:hover { background: var(--surface); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 0.875rem; }

.clock { font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.user-chip {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0.875rem 0.375rem 0.375rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  font-size: 0.875rem; font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8125rem; font-weight: 700;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.content { flex: 1; padding: 1.75rem; }

.overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 35;
}
.overlay.open { display: block; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.6875rem 1.25rem;
  border-radius: 12px;
  font-weight: 600; font-size: 0.9375rem;
  min-height: 46px;
  border: none;
  transition: background var(--ease), box-shadow var(--ease), transform 80ms ease-out, border-color var(--ease), color var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; }

.btn-blue {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-blue:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-outline {
  background: var(--white);
  color: var(--primary);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover {
  background: var(--surface);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost { color: var(--muted); padding: 0.5rem; min-width: 44px; min-height: 44px; border-radius: var(--r); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }

.modal-head [data-close] {
  font-size: 1.625rem;
  line-height: 1;
  font-weight: 400;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem;
}

.btn-sm { padding: 0.4375rem 0.875rem; font-size: 0.8125rem; min-height: 38px; border-radius: 10px; }
.btn-lg { padding: 0.9375rem 1.625rem; font-size: 1.0625rem; min-height: 54px; border-radius: 999px; }
.btn-block { width: 100%; }

/* ── Cards ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.card-head h2 { margin: 0; font-size: 1.0625rem; font-weight: 700; color: var(--navy); }
.card-body { padding: 1.5rem; }

/* ── Stats ── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--ease), transform var(--ease);
}
.stat:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.stat-label { font-size: 0.8125rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.5rem; }
.stat-value { font-size: 1.875rem; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat-delta { font-size: 0.8125rem; font-weight: 500; margin-top: 0.375rem; }
.stat-delta.up { color: var(--success); }
.stat-delta.down { color: var(--danger); }

/* ── Page header ── */
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.75rem; flex-wrap: wrap; gap: 1rem;
}
.page-head h1 { margin: 0; font-size: 1.625rem; font-weight: 700; color: var(--navy); letter-spacing: -0.02em; }

/* ── Filters ── */
.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }

.chip {
  padding: 0.5625rem 1.125rem;
  border: 1.5px solid var(--border);
  border-radius: var(--pill);
  background: var(--white);
  color: var(--muted);
  font-size: 0.875rem; font-weight: 600;
  min-height: 44px;
  box-shadow: var(--shadow-sm);
  transition: background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease);
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* ── Forms ── */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.375rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  background: var(--white);
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hint { font-size: 0.8125rem; color: var(--muted); margin-top: 0.25rem; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
thead th {
  text-align: left; padding: 0.875rem 1rem;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); background: var(--surface);
  border-bottom: 1px solid var(--border);
}
tbody td { padding: 0.875rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:hover { background: var(--surface); }
tbody tr:last-child td { border-bottom: none; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: var(--pill);
  font-size: 0.75rem; font-weight: 600;
}
.badge-ok { background: var(--success-bg); color: var(--success); }
.badge-warn { background: var(--warning-bg); color: var(--warning); }
.badge-low { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: var(--surface); color: var(--muted); }

/* ── Modals ── */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  z-index: 50;
  display: none; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-bg.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  width: 100%; max-width: 480px;
  max-height: 90dvh; overflow-y: auto;
  animation: popIn 200ms ease-out;
}
.modal.wide { max-width: 640px; }

@keyframes popIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 { margin: 0; font-size: 1.125rem; font-weight: 700; color: var(--navy); }
.modal-body { padding: 1.5rem; }
.modal-foot {
  display: flex; gap: 0.75rem; justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* ── Checkout flow ── */
.checkout-sub { margin: 0.25rem 0 0; font-size: 0.875rem; }

.checkout-steps {
  display: flex;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.checkout-step {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  transition: background var(--ease), color var(--ease);
}

.checkout-step span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.checkout-step.on {
  background: var(--gold-soft);
  color: var(--accent-dark);
}

.checkout-step.on span {
  background: var(--primary);
  color: #FFF;
}

.checkout-step.done {
  color: var(--success);
}

.checkout-step.done span {
  background: var(--success);
  color: #FFF;
}

.checkout-panel.hidden { display: none; }

.checkout-preview-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.checkout-preview-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #FFF;
}

.checkout-preview-item:last-child { border-bottom: none; }

.checkout-preview-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.checkout-preview-info { flex: 1; min-width: 0; }
.checkout-preview-info strong { display: block; font-size: 0.875rem; font-weight: 600; }
.checkout-preview-info span { font-size: 0.75rem; color: var(--muted); }

.checkout-preview-amt {
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.checkout-preview-totals {
  background: var(--surface);
  border-radius: 12px;
  padding: 1rem 1.125rem;
}

.checkout-preview-totals .sum-row { margin-bottom: 0.375rem; }
.checkout-preview-totals .sum-total {
  font-size: 1.125rem !important;
  margin-top: 0.5rem;
  padding-top: 0.625rem !important;
  border-top: 1px solid var(--border) !important;
}

.checkout-pay-due,
.checkout-change-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.125rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.checkout-pay-due {
  background: var(--primary);
  color: #FFF;
}

.checkout-pay-due span { font-size: 0.875rem; opacity: 0.85; }
.checkout-pay-due strong { font-size: 1.375rem; font-weight: 800; }

.checkout-change-box {
  background: var(--surface);
  border: 1px solid var(--border);
}

.checkout-change-box span { font-size: 0.875rem; color: var(--muted); }
.checkout-change-box strong { font-size: 1.125rem; font-weight: 700; color: var(--navy); }

.checkout-cash-field { margin-bottom: 1rem; }

.checkout-cash-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.checkout-cash-row input {
  flex: 1;
  min-width: 0;
}

.checkout-exact-btn {
  flex-shrink: 0;
  white-space: nowrap;
  min-height: 48px;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.label-opt { font-weight: 400; color: var(--muted); font-size: 0.8125rem; }
.checkout-hint { margin: 0.5rem 0 0; text-align: center; }

.checkout-success {
  text-align: center;
  margin-bottom: 1.25rem;
}

.checkout-success-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkout-success h3 { margin: 0 0 0.25rem; font-size: 1.125rem; color: var(--navy); }

.checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 1.25rem;
}

.btn-whatsapp {
  background: #25D366;
  color: #FFF;
  border: none;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:hover { background: #1ebe57; }

.checkout-foot { justify-content: space-between; }
.checkout-foot .btn-checkout { margin-left: auto; }

.checkout-foot-complete {
  justify-content: center;
}

.checkout-foot-complete .btn-checkout {
  margin-left: 0;
  min-width: min(100%, 280px);
}

[hidden] { display: none !important; }

.receipt-print { margin-top: 0; }

.receipt { max-width: 320px; margin: 0 auto; font-family: 'Courier New', monospace; font-size: 0.8125rem; line-height: 1.6; color: var(--text); }
.receipt-head { text-align: center; margin-bottom: 1rem; }
.receipt-head h3 { margin: 0 0 0.25rem; font-size: 1rem; color: var(--navy); }
.receipt-shop { font-size: 0.9375rem; font-weight: 700; color: var(--navy); margin-bottom: 0.25rem; }
.receipt-meta { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.125rem; }
.receipt-line { display: flex; justify-content: space-between; gap: 0.75rem; }
.receipt-total { font-weight: 700; margin-top: 0.25rem; padding-top: 0.375rem; border-top: 1px dashed var(--border); }
.receipt-divider { border-top: 1px dashed var(--border); margin: 0.75rem 0; }
.receipt-items { width: 100%; border-collapse: collapse; }
.receipt-item-row td { vertical-align: top; padding: 0.375rem 0; }
.receipt-item-name { width: 100%; padding-right: 0.75rem; word-break: break-word; }
.receipt-item-name small { display: block; font-size: 0.6875rem; color: var(--muted); margin-top: 0.125rem; }
.receipt-item-amt { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.receipt-thanks { text-align: center; margin: 0.5rem 0 0; font-size: 0.75rem; color: var(--muted); }

/* ── Login ── */
.login-page {
  min-height: 100dvh;
  display: flex;
  background: var(--surface);
}

.login-brand-panel {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: var(--sidebar-w);
  flex-shrink: 0;
  padding: 3rem 2rem;
  background: var(--navy);
  color: #FFF;
}

.login-brand-panel h1 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.login-brand-panel > span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.login-brand-panel p {
  margin: 2rem 0 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
}

.login-panel-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-box {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  width: 100%; max-width: 440px;
  padding: 2.75rem 2.25rem;
}

.login-brand { text-align: center; margin-bottom: 2rem; }
.login-brand h1 { margin: 0 0 0.375rem; font-size: 1.875rem; font-weight: 800; color: var(--navy); letter-spacing: 0.08em; }
.login-brand p { margin: 0; color: var(--muted); font-size: 0.875rem; }
.login-brand .gold { color: var(--gold); font-weight: 600; letter-spacing: 0.15em; font-size: 0.6875rem; text-transform: uppercase; }

@media (min-width: 768px) {
  .login-brand-panel { display: flex; }
  .login-brand { display: none; }
}

.pin-row { display: flex; gap: 0.75rem; justify-content: center; margin: 1.5rem 0; }
.pin-row input {
  width: 56px; height: 56px;
  text-align: center; font-size: 1.25rem; font-weight: 700;
  border: 2px solid var(--border); border-radius: var(--r);
  outline: none;
}
.pin-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); }

/* ── POS ── */
.pos-page {
  padding: 1.25rem 0 1.25rem 1.25rem !important;
  padding-right: var(--cart-w) !important;
  display: flex; flex-direction: column;
  height: calc(100dvh - var(--topbar-h));
  overflow: hidden;
}

.steps { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.step {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5625rem 1.125rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--pill);
  font-size: 0.875rem; font-weight: 600; color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.step-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
}
.step.active { border-color: var(--primary); color: var(--primary); box-shadow: 0 4px 14px var(--primary-glow); }
.step.active .step-num { background: var(--primary); color: var(--white); }
.step.done { color: var(--success); border-color: var(--success-bg); background: var(--success-bg); }
.step.done .step-num { background: var(--success); color: var(--white); }
.step-arrow { color: var(--border); user-select: none; }

.search-hero { position: relative; margin-bottom: 1rem; z-index: 20; }
.search-box {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--r-xl);
  padding: 0.875rem 1.125rem;
  box-shadow: var(--shadow);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.search-box:focus-within { border-color: var(--primary); box-shadow: var(--shadow), 0 0 0 4px var(--primary-glow); }
.search-box svg { width: 24px; height: 24px; color: var(--primary); flex-shrink: 0; }
.search-box input {
  flex: 1; border: none; outline: none;
  font-size: 1.125rem; font-weight: 500;
  background: transparent; min-height: 44px;
}
.search-scan {
  width: 48px; height: 48px;
  background: var(--primary); color: var(--white);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px var(--primary-glow);
  transition: background var(--ease), transform 80ms ease-out;
}
.search-scan:hover { background: var(--primary-hover); }
.search-scan:active { transform: scale(0.97); }
.search-clear {
  display: none; width: 36px; height: 36px;
  border-radius: 50%; background: var(--surface); color: var(--muted);
  align-items: center; justify-content: center;
}
.search-clear.show { display: flex; }

.search-drop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  max-height: 360px; overflow-y: auto;
  display: none;
}
.search-drop.open { display: block; }
.search-hit {
  display: flex; align-items: center; gap: 0.875rem;
  width: 100%; padding: 0.875rem 1rem;
  text-align: left; border-bottom: 1px solid var(--border);
  min-height: 64px;
  transition: background var(--ease);
}
.search-hit:last-child { border-bottom: none; }
.search-hit:hover, .search-hit.on { background: var(--gold-soft); }

.pos-layout { flex: 1; min-height: 0; overflow: hidden; }
.pos-panel { display: flex; flex-direction: column; overflow: hidden; height: 100%; border-radius: var(--r-xl); box-shadow: var(--shadow); }

.breadcrumb { display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; font-size: 0.875rem; margin-bottom: 0.5rem; }
.breadcrumb button { color: var(--primary); font-weight: 600; padding: 0.25rem 0; min-height: 44px; }
.breadcrumb .cur { color: var(--text); font-weight: 600; }
.breadcrumb span { color: var(--muted); }

.level-label {
  font-size: 0.8125rem; font-weight: 700;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: 0.75rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 1.125rem;
  overflow-y: auto; flex: 1; min-height: 0;
  padding: 0.5rem 0.25rem 1rem;
  align-content: start; align-items: start;
}

.tile {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.125rem;
  text-align: left;
  width: 100%; height: auto; align-self: start;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease), transform var(--ease), border-color var(--ease);
}
.tile:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: rgba(30, 58, 138, 0.2); }
.tile:active { transform: scale(0.98); }

.tile-img {
  width: 100%; height: 96px;
  border-radius: var(--r);
  margin-bottom: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-img.ph { display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }

.tile-name { font-weight: 700; font-size: 0.9375rem; margin-bottom: 0.25rem; line-height: 1.3; }
.tile-meta { font-size: 0.8125rem; color: var(--muted); }
.tile-price { font-weight: 700; color: var(--accent-dark); margin-top: 0.375rem; font-size: 0.9375rem; }

.var-tile {
  display: flex; flex-direction: column; align-items: center;
  padding: 1.25rem; text-align: center; gap: 0.625rem;
}
.var-swatch {
  width: 72px; height: 72px; border-radius: 50%;
  border: 2px solid var(--border); overflow: hidden;
}
.var-swatch img { width: 100%; height: 100%; object-fit: cover; }

.sku-list { display: flex; flex-direction: column; gap: 0.75rem; flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 0.5rem; }
.sku-row {
  display: flex; align-items: center; gap: 1rem;
  width: 100%; padding: 1.125rem 1.375rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: box-shadow var(--ease), transform var(--ease);
}
.sku-row:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.sku-row img, .sku-thumb { width: 56px; height: 56px; border-radius: var(--r); object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.sku-info { flex: 1; min-width: 0; }
.sku-title { font-weight: 700; font-size: 0.9375rem; }
.sku-meta { font-size: 0.8125rem; color: var(--muted); }
.sku-price { font-weight: 700; color: var(--accent-dark); white-space: nowrap; }
.sku-add {
  background: var(--primary); color: var(--white);
  padding: 0.5625rem 1.125rem;
  border-radius: 12px; font-weight: 600; font-size: 0.875rem;
  min-height: 44px; box-shadow: 0 4px 12px var(--primary-glow);
}
.sku-add:hover { background: var(--primary-hover); }

/* ── Cart (fixed) ── */
.cart-panel {
  position: fixed; top: var(--topbar-h); right: 0;
  width: var(--cart-w);
  height: calc(100dvh - var(--topbar-h));
  background: var(--white);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 40px rgba(15, 40, 100, 0.08);
  display: flex; flex-direction: column;
  z-index: 25;
}

.cart-head {
  padding: 1rem 1.375rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cart-head-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.cart-icon-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFF;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}

.cart-icon-btn svg {
  display: block;
  flex-shrink: 0;
}

.cart-icon-btn-held {
  position: relative;
  color: var(--gold-dark);
  border-color: rgba(197, 160, 89, 0.45);
  background: rgba(197, 160, 89, 0.08);
}

.cart-icon-btn-held:hover {
  color: var(--gold-dark);
  border-color: var(--gold);
  background: rgba(197, 160, 89, 0.14);
}

.cart-icon-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--gold);
  color: #FFF;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
  border: 2px solid #FFF;
  pointer-events: none;
}

.cart-icon-badge.is-empty {
  background: #94A3B8;
}

.cart-icon-btn-danger:hover {
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.35);
  background: var(--danger-bg);
}

.cart-head h2 { margin: 0; font-size: 1rem; font-weight: 700; }

.cart-items { overflow-y: visible; padding: 0; }

.cart-items-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.cart-rich .cart-items-scroll .cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  min-height: 160px;
}

.cart-checkout-block {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: #FFF;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
}

.cart-line {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1.375rem;
  border-bottom: 1px solid var(--border);
}
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-name { font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-line-meta { font-size: 0.75rem; color: var(--muted); }

.qty { display: flex; align-items: center; gap: 0.375rem; }
.qty-btn {
  width: 34px; height: 34px;
  border: 1.5px solid var(--border); border-radius: var(--r);
  background: var(--white); color: var(--primary); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.qty-btn:hover { background: var(--gold-soft); border-color: var(--primary); }
.qty-val { font-size: 0.875rem; font-weight: 600; min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.cart-line-price { font-weight: 700; font-size: 0.875rem; min-width: 64px; text-align: right; }

.cart-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--muted); padding: 2rem; text-align: center;
}
.cart-empty svg { width: 48px; height: 48px; opacity: 0.3; margin-bottom: 0.75rem; }

.cart-sum {
  padding: 1.125rem 1.375rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.sum-row { display: flex; justify-content: space-between; font-size: 0.875rem; color: var(--muted); margin-bottom: 0.375rem; }
.sum-row.total { font-size: 1.1875rem; font-weight: 700; color: var(--navy); margin-top: 0.5rem; padding-top: 0.625rem; border-top: 1px solid var(--border); }

.cart-foot { padding: 1rem 1.375rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.5rem; }
.cart-foot-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }

/* ── Wizard ── */
.wizard-bar {
  display: flex; gap: 0.25rem; padding: 0.75rem 1.5rem;
  background: var(--surface); border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.wiz-step {
  display: flex; align-items: center; gap: 0.375rem;
  padding: 0.375rem 0.75rem; border-radius: var(--pill);
  font-size: 0.75rem; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.wiz-step.on { background: var(--gold-soft); color: var(--accent-dark); }
.wiz-step.done { color: var(--success); }
.wiz-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; font-size: 0.6875rem;
}
.wiz-step.on .wiz-num { background: var(--primary); color: var(--white); }
.wiz-step.done .wiz-num { background: var(--success); color: var(--white); }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.cat-btn {
  padding: 1rem; border: 2px solid var(--border); border-radius: var(--r-lg);
  background: var(--white); font-weight: 600; min-height: 56px;
  transition: border-color var(--ease), background var(--ease);
}
.cat-btn:hover { border-color: var(--primary); }
.cat-btn.on { border-color: var(--primary); background: var(--gold-soft); color: var(--primary); }

.color-picks { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.review { padding: 1.25rem; }
.review-row { display: flex; justify-content: space-between; padding: 0.625rem 0; border-bottom: 1px solid var(--border); }
.review-row:last-child { border-bottom: none; }
.review-row span { color: var(--muted); }

/* ── Catalog tree ── */
.catalog-block {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  margin-bottom: 1rem;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.catalog-head {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1.125rem 1.5rem;
  cursor: pointer; min-height: 60px;
  border-bottom: 1px solid var(--border);
}
.catalog-head h3 { flex: 1; margin: 0; font-size: 1rem; font-weight: 700; }
.catalog-body { display: none; padding: 0.5rem 1.5rem 1rem; }
.catalog-block.open .catalog-body { display: block; }
.thumb { width: 40px; height: 40px; border-radius: var(--r); object-fit: cover; border: 1px solid var(--border); }

/* ── Utilities ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

.settings-status {
  min-height: 1.25rem;
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.settings-status-ok { color: var(--success); }
.settings-status-error { color: var(--danger); }

.muted { color: var(--muted); }
.center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.wrap { flex-wrap: wrap; }
.items-center { align-items: center; }

.bar-chart { display: flex; flex-direction: column; gap: 0.75rem; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 48px; align-items: center; gap: 0.75rem; font-size: 0.875rem; }
.bar-track { height: 24px; background: var(--surface); border-radius: var(--pill); overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--accent-dark)); border-radius: var(--pill); transition: width 400ms ease-out; }

.empty { text-align: center; padding: 3rem 1.5rem; color: var(--muted); }
.empty svg { width: 56px; height: 56px; opacity: 0.25; margin-bottom: 1rem; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  :root { --cart-w: 340px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --cart-w: 300px; }
  .menu-btn { display: flex; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .content { padding: 1rem; }
  .pos-page { padding: 0.75rem 0 0.75rem 0.75rem !important; padding-right: var(--cart-w) !important; }
  .clock { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .step-arrow { display: none; }
}

@media (max-width: 480px) {
  :root { --cart-w: min(42vw, 280px); }
  .stats { grid-template-columns: 1fr 1fr; }
  .cart-foot-row { grid-template-columns: 1fr; }
}

@media print {
  .sidebar, .topbar, .cart-panel, .pos-workspace, .btn { display: none !important; }
  .main { margin-left: 0 !important; }
  .pos-page { padding-right: 0 !important; }
}

/* ══════════════════════════════════════════
   POS — LACES-style layout (reference UI)
   ══════════════════════════════════════════ */
.pos-shell {
  --cart-w: 360px;
  background: #F8F9FA;
  overflow: hidden;
}

.pos-shell .app {
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
}

.pos-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--cart-w);
  flex: 1;
  margin-left: var(--sidebar-w);
  height: 100dvh;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.pos-shell .cart-panel {
  position: relative;
  top: auto;
  right: auto;
  width: auto;
  min-width: 0;
  height: 100dvh;
  z-index: 1;
}

.pos-shell .cart-head {
  padding: 0.625rem 1rem;
  min-height: 0;
}

body.pos-fullscreen.pos-shell .sidebar,
body.pos-fullscreen.pos-shell .overlay {
  display: none !important;
}

body.pos-fullscreen.pos-shell .pos-workspace {
  margin-left: 0;
  grid-template-columns: minmax(0, 1fr) var(--cart-w);
}

body.pos-fullscreen.pos-shell .pos-main {
  margin-left: 0;
}

body.pos-fullscreen.pos-shell .menu-btn-light {
  display: none !important;
}

/* Main POS column */
.pos-main {
  flex: 1;
  margin-left: 0;
  margin-right: 0;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  min-width: 0;
  background: #F8F9FA;
  overflow: hidden;
}

/* Header */
.pos-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  background: #FFF;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.pos-header-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (min-width: 769px) {
  .pos-header-title { display: none; }
}

.menu-btn-light {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.menu-btn-light:hover { background: var(--surface); }

.pos-search-wrap {
  flex: 1;
  max-width: none;
  min-width: 0;
  position: relative;
}

.pos-search-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.pos-calc-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #FFF;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}

.pos-calc-btn:hover {
  color: var(--gold-dark);
  border-color: var(--gold);
  background: rgba(197, 160, 89, 0.08);
}

.pos-calc-btn svg { display: block; flex-shrink: 0; }

.pos-search-row .pos-search-bar {
  flex: 1;
  min-width: 0;
}

.pos-shell .pos-search-wrap.search-hero {
  margin-bottom: 0;
}

.pos-search-bar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: #FFF;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  min-height: 46px;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

.pos-search-bar:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.14);
  background: #FFF;
}

.pos-search-bar .pos-search-icon { width: 20px; height: 20px; color: var(--gold-dark); flex-shrink: 0; }

.pos-search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  min-width: 0;
  min-height: 32px;
}

.pos-search-bar input::placeholder { color: #94A3B8; font-weight: 400; }

.pos-search-clear {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

.pos-search-clear:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.search-kbd {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
  background: #F8F9FA;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.45rem;
  font-family: inherit;
  flex-shrink: 0;
}

.pos-shell .search-drop {
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  border-radius: 14px;
  border: 1px solid rgba(26, 28, 46, 0.1);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
  max-height: min(420px, 52vh);
  overflow: hidden;
  display: none;
  background: #FFF;
}

.pos-shell .search-drop.open {
  display: block;
  overflow-y: auto;
}

.search-drop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--border);
  background: #FAFBFC;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  position: sticky;
  top: 0;
  z-index: 1;
}

.search-drop-hint {
  font-weight: 500;
  color: #94A3B8;
}

.search-drop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 1.75rem 1rem;
  text-align: center;
}

.search-drop-empty svg {
  width: 40px;
  height: 40px;
  color: #CBD5E1;
  margin-bottom: 0.25rem;
}

.search-drop-empty strong {
  font-size: 0.9375rem;
  color: var(--navy);
}

.search-drop-empty span {
  font-size: 0.8125rem;
  color: var(--muted);
}

.search-drop-more {
  padding: 0.625rem 0.875rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  background: #FAFBFC;
  position: sticky;
  bottom: 0;
}

.pos-shell .search-hit {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0.875rem;
  text-align: left;
  border: none;
  border-bottom: 1px solid var(--border);
  min-height: 72px;
  background: #FFF;
  cursor: pointer;
  transition: background var(--ease);
}

.pos-shell .search-hit:last-of-type { border-bottom: none; }

.pos-shell .search-hit:hover,
.pos-shell .search-hit.on {
  background: rgba(197, 160, 89, 0.1);
}

.search-hit-swatch {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

.search-hit-body {
  min-width: 0;
}

.search-hit-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-hit-meta {
  margin-top: 0.125rem;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-hit-side {
  text-align: right;
  flex-shrink: 0;
}

.search-hit-price {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.search-hit-price small {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
}

.search-hit-stock {
  margin-top: 0.125rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
}

.pos-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
  height: 36px;
}

.sync-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 36px;
  padding: 0 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.sync-label {
  display: block;
  line-height: 1;
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
}

.sync-online {
  color: #166534;
  background: rgba(22, 101, 52, 0.08);
  border-color: rgba(22, 101, 52, 0.15);
}

.sync-online .sync-dot { background: #22c55e; }

.sync-offline {
  color: #991b1b;
  background: rgba(153, 27, 27, 0.08);
  border-color: rgba(153, 27, 27, 0.15);
}

.sync-offline .sync-dot { background: #ef4444; }

.sync-pending {
  color: #92400e;
  background: rgba(146, 64, 14, 0.08);
  border-color: rgba(197, 160, 89, 0.35);
}

.sync-pending .sync-dot { background: var(--gold); }

.sync-syncing {
  color: #1e40af;
  background: rgba(30, 64, 175, 0.08);
  border-color: rgba(30, 64, 175, 0.15);
}

.sync-syncing .sync-dot { background: #3b82f6; animation: sync-pulse 1s ease infinite; }

@keyframes sync-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.icon-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted);
  transition: background var(--ease), color var(--ease);
}
.icon-btn:hover { background: #F8F9FA; color: var(--text); }
.icon-btn svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.icon-btn .hidden { display: none; }

/* Product area */
.pos-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.75rem 1.25rem 0;
  overflow: hidden;
}

.pos-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.chips-pos { margin: 0; flex: 1; }

.chips-pos .chip {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #FFF;
  box-shadow: none;
}

.chips-pos .chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #FFF;
  box-shadow: 0 2px 8px rgba(26, 28, 46, 0.2);
}

.btn-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #FFF;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.pos-toolbar-right { display: flex; gap: 0.5rem; }

/* Product cards — reference style */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
  gap: 0.875rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
  align-items: stretch;
  padding-bottom: 0.75rem;
}

.prod-card {
  background: #FFF;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.875rem;
  text-align: left;
  width: 100%;
  height: 100%;
  align-self: stretch;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  transition: box-shadow var(--ease), transform var(--ease);
  cursor: pointer;
}

.prod-card:hover {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08), 0 12px 32px rgba(15, 23, 42, 0.06);
  transform: translateY(-2px);
}

.prod-card-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  background: #F1F3F5;
  margin-bottom: 0.75rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.prod-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, transparent 40%, rgba(0,0,0,0.04));
  border-radius: 10px;
}

.prod-card-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prod-card-price {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}

.prod-card-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.375rem;
}

/* Footer bar */
.pos-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: #F8F9FA;
}

.btn-scan-footer {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #FFF;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.pos-pagination {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.page-btns { display: flex; gap: 0.375rem; }

.page-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFF;
  font-size: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-btn:not(:disabled):hover { background: #F8F9FA; }

/* Rich cart panel */
.cart-rich {
  width: auto;
  background: #FFF;
  border-left: 1px solid var(--border);
  box-shadow: none;
  top: auto;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cart-rich .cart-head {
  flex-shrink: 0;
  padding: 0.625rem 1rem;
}

.cart-rich .cart-head h2 {
  font-size: 0.9375rem;
  font-weight: 700;
}

.cart-rich .customer-box {
  margin: 0.625rem 1rem 0.5rem;
  padding: 0.75rem 0.875rem;
}

.cart-rich .cart-custom-add {
  margin: 0 1rem 0.625rem;
}

.cart-rich .cart-item-rich {
  padding: 0.75rem 1rem;
}

.cart-rich .cart-sum-rich {
  padding: 0.875rem 1rem 0.75rem;
}

.cart-rich .cart-foot-rich {
  padding: 0.75rem 1rem 1rem;
}

.link-danger {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--danger);
  background: none;
  border: none;
  padding: 0;
}
.link-danger:hover { text-decoration: underline; }

.customer-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin: 1rem 1.5rem 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #FAFBFC;
  cursor: pointer;
}

.customer-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFF;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
}
.customer-icon svg { width: 18px; height: 18px; }

.customer-info { flex: 1; min-width: 0; }
.customer-info strong { display: block; font-size: 0.875rem; font-weight: 600; }
.customer-info span { font-size: 0.75rem; color: var(--muted); }

.cart-custom-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 1.5rem 0.75rem;
  padding: 0.625rem 1rem;
  border: 1px dashed rgba(197, 160, 89, 0.55);
  border-radius: 10px;
  background: rgba(197, 160, 89, 0.06);
  color: var(--gold-dark);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--ease), border-color var(--ease);
}

.cart-custom-add:hover {
  background: rgba(197, 160, 89, 0.12);
  border-color: var(--gold);
}

.cart-custom-add svg { flex-shrink: 0; opacity: 0.9; }

.cart-custom-badge {
  display: inline-block;
  margin-left: 0.375rem;
  padding: 0.125rem 0.375rem;
  border-radius: 999px;
  background: rgba(197, 160, 89, 0.15);
  color: var(--gold-dark);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}

.cart-item-thumb-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.checkout-preview-thumb-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  font-size: 1rem;
  font-weight: 700;
}

.cart-rich .cart-empty svg { width: 40px; height: 40px; }

/* Cart line items */
.cart-item-swipe {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.cart-item-swipe-delete {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: 92px;
  margin-left: auto;
  padding: 0 0.75rem;
  border: none;
  background: var(--danger);
  color: #FFF;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
}

.cart-item-swipe-delete svg { flex-shrink: 0; opacity: 0.95; }

.cart-item-swipe-content {
  position: relative;
  z-index: 1;
  background: #FFF;
  transition: transform 0.22s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}

.cart-item-swipe-content.is-swiping {
  transition: none;
  cursor: grabbing;
}

.cart-item-swipe-content.is-removing {
  transition: transform 0.22s ease-in;
}

.cart-item-swipe-content:active:not(.is-swiping) {
  background: #FAFBFC;
}

.cart-item-rich {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.cart-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.cart-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.cart-item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  padding-right: 0.25rem;
}

.cart-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cart-item-sku {
  font-size: 0.75rem;
  color: var(--muted);
  min-width: 0;
}

.cart-item-remove {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 1.375rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: -0.25rem -0.25rem 0 0;
}
.cart-item-remove:hover { background: var(--danger-bg); color: var(--danger); }

.cart-item-unit-price {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.125rem;
}

.qty-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: #FFF;
}

.qty-pill button {
  width: 34px;
  height: 34px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-pill button:hover { background: #F8F9FA; }

.qty-pill span {
  min-width: 44px;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 0.4375rem 0.25rem;
}

.cart-item-line-total {
  font-size: 0.9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cart-sum-rich {
  background: #FAFBFC;
  padding: 1rem 1.5rem 0.875rem;
  border-top: none;
}

.link-gold {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gold-dark);
  background: none;
  border: none;
  padding: 0;
}
.link-gold:hover { text-decoration: underline; }

.sum-row-discount { align-items: center; }

.cart-discount-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-width: 72px;
  min-height: 36px;
  padding: 0.375rem 0.75rem;
  border: 1px solid rgba(197, 160, 89, 0.45);
  border-radius: 8px;
  background: rgba(197, 160, 89, 0.08);
  color: var(--gold-dark);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.cart-discount-btn:hover {
  background: rgba(197, 160, 89, 0.14);
  border-color: rgba(197, 160, 89, 0.65);
}

.cart-discount-btn:active {
  transform: scale(0.97);
  background: rgba(197, 160, 89, 0.18);
}

.cart-discount-btn.has-discount {
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(22, 163, 74, 0.08);
  color: var(--success);
}

.sum-total {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  margin-top: 0.375rem;
  padding-top: 0.625rem !important;
  border-top: 1px solid var(--border) !important;
}

.sum-total span:last-child { font-size: 1.25rem; }

.cart-foot-rich {
  padding: 0.75rem 1.5rem 1.25rem;
  gap: 0.5rem;
  border-top: none;
}

.btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.9375rem 1.25rem;
  background: var(--gold);
  color: #FFF;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  min-height: 52px;
  box-shadow: 0 4px 16px rgba(197, 160, 89, 0.35);
  transition: background var(--ease), transform 80ms ease-out;
}
.btn-checkout:hover { background: var(--gold-dark); }
.btn-checkout:active { transform: scale(0.98); }

.btn-hold {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: #FFF;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  min-height: 48px;
}
.btn-hold:hover { background: #F8F9FA; }

.btn-checkout kbd, .btn-hold kbd {
  font-size: 0.6875rem;
  font-weight: 600;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  font-family: inherit;
}
.btn-hold kbd {
  background: #F8F9FA;
  border-color: var(--border);
  color: var(--muted);
}

.pay-due-box { text-align: center; margin-bottom: 1rem; }
.pay-due-amt { font-size: 1.75rem; font-weight: 800; color: var(--navy); }

@media (max-width: 1024px) {
  .pos-shell { --cart-w: 320px; }
}

@media (max-width: 768px) {
  .pos-shell { --cart-w: 280px; }
  .pos-workspace {
    margin-left: 0;
    height: 100dvh;
    grid-template-columns: minmax(0, 1fr) var(--cart-w);
  }
  .pos-main { height: 100dvh; }
  .menu-btn-light { display: flex; }
  .pos-header-title { display: none; }
  .pos-header { padding: 0.5rem 0.75rem; gap: 0.5rem; }
  .search-kbd { display: none; }
  .pos-body { padding: 0.625rem 0.75rem 0; }
  .prod-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 120px), 1fr)); gap: 0.625rem; }
}

@media (max-width: 480px) {
  .pos-shell { --cart-w: 240px; }
}

.customer-pick-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  max-height: 220px;
  overflow-y: auto;
}

.customer-pick-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #FFF;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.customer-pick-row:hover { border-color: var(--gold); }

.held-pick-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
}

.held-pick-empty {
  margin: 0;
  padding: 1rem 0.25rem;
  text-align: center;
  line-height: 1.5;
}

.held-pick-row {
  display: flex;
  align-items: stretch;
  gap: 0.375rem;
}

.held-pick-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #FFF;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color var(--ease), background var(--ease);
}

.held-pick-main:hover {
  border-color: var(--gold);
  background: rgba(197, 160, 89, 0.06);
}

.held-pick-main strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.held-pick-main span {
  font-size: 0.75rem;
  color: var(--muted);
}

.held-pick-discard {
  width: 40px;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #FFF;
  color: var(--muted);
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.held-pick-discard:hover {
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.35);
  background: var(--danger-bg);
}

.custom-item-suggestions {
  margin: -0.25rem 0 0.75rem;
}

.custom-item-suggestions-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.custom-item-suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.custom-suggest-chip {
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #FAFBFC;
  color: var(--text);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease), color var(--ease);
}

.custom-suggest-chip:hover {
  border-color: var(--gold);
  background: rgba(197, 160, 89, 0.08);
  color: var(--gold-dark);
}

.custom-suggest-chip.active {
  border-color: var(--gold);
  background: rgba(197, 160, 89, 0.14);
  color: var(--gold-dark);
}

.calc-modal { max-width: 320px; }

.calc-body { padding-top: 0.25rem; }

.calc-display-wrap {
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #FAFBFC;
}

.calc-display {
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  line-height: 1.2;
  color: var(--text);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.calc-display::-webkit-scrollbar { display: none; }

.calc-keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.calc-key {
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #FFF;
  color: var(--text);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease);
}

.calc-key:hover { background: #F8F9FA; }

.calc-key:active { transform: scale(0.98); }

.calc-key.calc-fn {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: rgba(220, 38, 38, 0.15);
}

.calc-key.calc-op {
  color: var(--gold-dark);
  background: rgba(197, 160, 89, 0.1);
  border-color: rgba(197, 160, 89, 0.35);
}

.calc-key.calc-eq {
  background: var(--navy);
  border-color: var(--navy);
  color: #FFF;
  font-size: 1.25rem;
}

.calc-key.calc-eq:hover { background: var(--navy-light); }

.calc-key.calc-zero { grid-column: span 2; }

.btn-filter.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(197, 160, 89, 0.08);
}

/* ── Sales history ── */
.page-sub { margin: 0.25rem 0 0; font-size: 0.875rem; }

.sales-stats { margin-bottom: 1.25rem; }

.sales-filter-toolbar {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.sales-filter-trigger {
  position: relative;
  border: 1px solid var(--border);
  background: var(--white);
}

.sales-filter-trigger.is-active {
  border-color: var(--gold);
  color: var(--gold-dark);
  background: rgba(197, 160, 89, 0.08);
}

.sales-filter-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.sales-filter-clear {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--muted);
  text-decoration: none;
}

.sales-filter-clear:hover {
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.25);
  background: var(--danger-bg);
}

.sales-filters-body .field:last-child { margin-bottom: 0; }

.sales-period-chips { margin-bottom: 0; }

.sales-custom-dates {
  display: none;
  margin-bottom: 1rem;
}
.sales-custom-dates.is-open { display: block; }

.sales-table td { vertical-align: middle; }

.sales-date { display: block; font-weight: 600; }
.sales-time { display: block; font-size: 0.8125rem; }

.sales-customer { display: block; font-weight: 600; }
.sales-phone { display: block; font-size: 0.8125rem; }

.sales-row { cursor: pointer; transition: background var(--ease); }
.sales-row:hover { background: rgba(197, 160, 89, 0.06); }

.sales-empty { text-align: center; padding: 2.5rem 1rem !important; }

.sales-pagination,
.list-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--border);
}

.sales-page-info,
.list-page-info { font-size: 0.8125rem; color: var(--muted); }

.catalog-pagination {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--white);
}

a.page-btn { text-decoration: none; }
.page-btn.disabled { opacity: 0.4; pointer-events: none; }

.page-btn-num {
  width: auto;
  min-width: 32px;
  padding: 0 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.page-btn-num.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #FFF;
}

.table-empty { text-align: center; padding: 2rem 1rem !important; }

@media (max-width: 560px) {
  .list-pagination { flex-direction: column; align-items: stretch; }
  .list-pagination .page-btns { justify-content: center; flex-wrap: wrap; }
}

.modal-wide { max-width: 640px; }

.sale-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.25rem;
}

.sale-detail-meta dt {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.125rem;
}

.sale-detail-meta dd {
  margin: 0;
  font-weight: 600;
  color: var(--navy);
}

.sale-detail-totals {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  align-items: flex-end;
}

.sale-detail-totals-row {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  width: min(100%, 280px);
  font-size: 0.875rem;
}

.sale-detail-totals-row.total {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--navy);
  padding-top: 0.375rem;
  border-top: 1px dashed var(--border);
}

.sale-detail-status {
  margin-bottom: 1rem;
}

.sale-detail-totals-row.refund {
  color: var(--danger);
}

.sale-refund-note {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: var(--warning-bg);
  border-radius: 8px;
  font-size: 0.875rem;
}

.sale-refund-qty input {
  width: 4.5rem;
  padding: 0.375rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}

.sale-detail-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.sale-refund-controls {
  flex: 1 1 220px;
}

.sale-refund-controls input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.sale-refund-actions {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}

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

.btn-danger:hover {
  filter: brightness(0.95);
}

@media (max-width: 560px) {
  .sale-detail-meta { grid-template-columns: 1fr; }

  .sale-detail-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .sale-refund-actions {
    flex-direction: column;
  }
}

/* ── Reports ── */
body[data-page="reports"] .content {
  background: #F5F5F5;
}

.reports-page {
  width: 100%;
}

.reports-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.reports-title {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}

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

.reports-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.reports-range-form {
  position: relative;
}

.reports-range-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  min-height: 44px;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.reports-range-btn:hover {
  border-color: var(--gold);
}

.reports-range-btn .chev { opacity: 0.5; }

.reports-range-pop {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.reports-range-pop label {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.reports-range-pop input[type="date"] {
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  background: var(--gold);
  color: #FFF;
  border: none;
  border-radius: var(--r);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  transition: background var(--ease);
}

.btn-gold:hover { background: var(--gold-dark); }

.btn-primary {
  background: var(--navy);
  color: #FFF;
  border: none;
}

.btn-primary:hover { background: #1a2744; }

.reports-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  width: 100%;
}

.report-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.375rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.report-card-wide { grid-column: auto; }

.report-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.report-card-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}

.report-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-tip {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.report-period-tag {
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 500;
}

.report-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gold-dark);
  text-decoration: none;
}

.report-link:hover { text-decoration: underline; }

.category-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.category-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 1rem;
}

.category-bar-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
}

.category-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.category-bar-track {
  height: 8px;
  background: #EEF1F5;
  border-radius: 999px;
  overflow: hidden;
}

.category-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  border-radius: 999px;
  min-width: 4px;
  transition: width 400ms ease-out;
}

.category-bar-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 88px;
  font-size: 0.8125rem;
}

.category-pct {
  font-weight: 700;
  color: var(--navy);
}

.category-amt {
  color: var(--muted);
}

.report-stat-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.report-stat-tile {
  padding: 0.875rem 1rem;
  background: #FAFBFC;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.report-stat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.375rem;
}

.report-stat-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.report-stat-value-row strong {
  font-size: 1.0625rem;
  color: var(--navy);
}

.report-stat-delta {
  font-size: 0.75rem;
  font-weight: 700;
}

.report-stat-delta.up { color: #16A34A; }
.report-stat-delta.down { color: #DC2626; }

.report-stat-compare {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  color: var(--muted);
}

.sku-table-wrap {
  overflow-x: auto;
  margin: 0 -0.25rem;
}

.sku-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.sku-table th {
  text-align: left;
  padding: 0.5rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.sku-table td {
  padding: 0.75rem 0.625rem;
  border-bottom: 1px solid #F1F3F6;
  vertical-align: middle;
}

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

.sku-cell {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
  color: var(--navy);
}

.sku-swatch {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

.sku-share-cell {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 120px;
}

.sku-share-bar {
  flex: 1;
  height: 6px;
  background: #EEF1F5;
  border-radius: 999px;
  overflow: hidden;
}

.sku-share-bar span {
  display: block;
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
}

.overview-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-grid {
  stroke: #EEF1F5;
  stroke-width: 1;
}

.chart-axis {
  fill: var(--muted);
  font-size: 11px;
}

.chart-empty {
  fill: var(--muted);
  font-size: 13px;
}

.channel-chart {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.5rem 0;
  width: 100%;
}

.donut {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.donut-hole {
  position: absolute;
  inset: 28%;
  background: var(--white);
  border-radius: 50%;
}

.channel-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  flex: 1;
}

.channel-legend li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
}

.channel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.channel-name {
  color: var(--text);
  font-weight: 500;
}

.channel-pct {
  font-weight: 700;
  color: var(--navy);
}

@media (max-width: 1100px) {
  .reports-grid { grid-template-columns: 1fr; }
  .report-card-wide { grid-column: auto; }
  .report-stat-tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .category-bar-row {
    grid-template-columns: 1fr;
    gap: 0.375rem;
  }

  .category-bar-meta {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }

  .report-stat-tiles { grid-template-columns: 1fr; }

  .channel-chart {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Public storefront ── */
.storefront {
  --store-serif: 'Cormorant Garamond', Georgia, serif;
  --store-sans: 'DM Sans', system-ui, sans-serif;
  --store-gold: #B8860B;
  --store-gold-soft: #F5EFE3;
  --store-ink: #141414;
  --store-muted: #6B7280;
  --store-border: #E8E4DE;
  font-family: var(--store-sans);
  color: var(--store-ink);
  background: #FFF;
}

.store-promo {
  background: var(--store-ink);
  color: var(--store-gold);
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.625rem 1rem;
}

.store-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--store-border);
}

.store-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
}

.store-brand { display: flex; align-items: center; text-decoration: none; }

.store-logo {
  display: block;
  max-height: 60px;
  width: auto;
}

.store-logo-footer { max-height: 38px; margin-bottom: 0.5rem; }

.store-nav {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.store-nav a {
  color: var(--store-ink);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 0.125rem;
}

.store-nav a:hover,
.store-nav a.active { color: var(--store-gold); }

.store-nav a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.25rem;
  height: 2px;
  background: var(--store-gold);
  border-radius: 1px;
}

.store-utilities {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.store-icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--store-ink);
  cursor: pointer;
  position: relative;
  transition: background 200ms ease;
}

.store-icon-btn:hover { background: #F5F5F4; }

.store-cart-count {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--store-gold);
  color: #FFF;
  font-size: 0.625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2rem;
}

.store-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--store-border);
  margin-bottom: 2rem;
}

.store-hero-copy h1 {
  margin: 0 0 0.75rem;
  font-family: var(--store-serif);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--store-ink);
  letter-spacing: -0.02em;
}

.store-hero-copy p {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--store-muted);
  max-width: 36ch;
  line-height: 1.6;
}

.store-hero-media {
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--store-gold-soft);
}

.store-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.store-catalog {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}

.store-filters {
  position: sticky;
  top: 88px;
  background: #FFF;
  border: 1px solid var(--store-border);
  border-radius: 4px;
  padding: 1.25rem;
}

.store-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--store-border);
}

.store-filters-head h2 {
  margin: 0;
  font-family: var(--store-serif);
  font-size: 1.375rem;
  font-weight: 700;
}

.store-clear-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--store-muted);
  text-decoration: none;
}

.store-clear-link:hover { color: var(--store-gold); }

.store-filter-group {
  border-bottom: 1px solid var(--store-border);
  padding: 0.875rem 0;
}

.store-filter-group:last-of-type { border-bottom: none; }

.store-filter-group summary {
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--store-ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.store-filter-group summary::-webkit-details-marker { display: none; }

.store-filter-group summary::after {
  content: '▾';
  color: var(--store-muted);
  font-size: 0.875rem;
}

.store-filter-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.store-check {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--store-ink);
}

.store-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--store-gold);
}

.store-check em {
  margin-left: auto;
  font-style: normal;
  color: var(--store-muted);
  font-size: 0.8125rem;
}

.store-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.store-color-swatch {
  cursor: pointer;
  position: relative;
}

.store-color-swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.store-color-swatch span {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #FFF;
  box-shadow: 0 0 0 1px var(--store-border);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.store-color-swatch input:checked + span {
  box-shadow: 0 0 0 2px var(--store-gold);
  transform: scale(1.08);
}

.store-apply-btn {
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--store-ink);
  background: var(--store-ink);
  color: #FFF;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 200ms ease;
}

.store-apply-btn:hover {
  background: #2a2a2a;
}

.store-results { min-width: 0; }

.store-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--store-border);
}

.store-showing {
  margin: 0;
  font-size: 0.875rem;
  color: var(--store-muted);
}

.store-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.store-sort-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--store-muted);
}

.store-sort-label select {
  border: 1px solid var(--store-border);
  border-radius: 4px;
  padding: 0.4375rem 0.625rem;
  font: inherit;
  background: #FFF;
  color: var(--store-ink);
}

.store-view-toggle {
  display: flex;
  border: 1px solid var(--store-border);
  border-radius: 4px;
  overflow: hidden;
}

.store-view-toggle button {
  width: 36px;
  height: 36px;
  border: none;
  background: #FFF;
  color: var(--store-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-view-toggle button.active {
  background: var(--store-gold-soft);
  color: var(--store-gold);
}

.store-search-bar {
  display: none;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.store-search-bar.is-open { display: flex; }

.store-search-bar input {
  flex: 1;
  padding: 0.6875rem 0.875rem;
  border: 1px solid var(--store-border);
  border-radius: 4px;
  font: inherit;
}

.store-search-bar button {
  padding: 0.6875rem 1rem;
  border: none;
  background: var(--store-ink);
  color: #FFF;
  border-radius: 4px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 1.25rem;
}

.store-grid.is-list {
  grid-template-columns: 1fr;
  gap: 0;
}

.store-grid.is-list .store-product {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--store-border);
}

.store-grid.is-list .store-product:hover {
  transform: none;
}

.store-grid.is-list .store-product-media {
  flex: 0 0 120px;
  width: 120px;
  height: 120px;
  aspect-ratio: 1 / 1;
  min-height: 0;
  margin-bottom: 0;
}

.store-grid.is-list .store-product-body {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 0.375rem 1.25rem;
  min-width: 0;
}

.store-grid.is-list .store-product-body h3 {
  flex: 1 1 100%;
  margin: 0;
  font-size: 1rem;
}

.store-grid.is-list .store-product-price {
  margin: 0;
  flex: 0 0 auto;
}

.store-grid.is-list .store-product-foot {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.store-grid.is-list .store-product-width {
  flex: 0 0 auto;
}

.store-grid.is-list .store-stock-badge {
  flex: 0 0 auto;
  margin-left: auto;
}

.store-product {
  display: flex;
  flex-direction: column;
  transition: transform 220ms ease;
}

.store-product:hover { transform: translateY(-3px); }

.store-product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #F5F5F4;
  border-radius: 2px;
  margin-bottom: 0.875rem;
}

.store-product-media img,
.store-product-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.store-wishlist {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--store-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: color 200ms ease, transform 200ms ease;
}

.store-wishlist:hover,
.store-wishlist.active {
  color: #DC2626;
}

.store-wishlist.active svg { fill: #DC2626; stroke: #DC2626; }

.store-product-body h3 {
  margin: 0 0 0.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--store-ink);
}

.store-product-price {
  margin: 0 0 0.625rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--store-gold);
}

.store-product-price span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--store-muted);
}

.store-product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.store-product-width {
  font-size: 0.8125rem;
  color: var(--store-muted);
}

.store-stock-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.store-stock-badge.in {
  background: #DCFCE7;
  color: #166534;
}

.store-stock-badge.out {
  background: #FEE2E2;
  color: #991B1B;
}

.store-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--store-border);
}

.store-page-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--store-border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--store-ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.store-page-btn:hover:not(.disabled) {
  border-color: var(--store-gold);
  color: var(--store-gold);
}

.store-page-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.store-page-info {
  font-size: 0.8125rem;
  color: var(--store-muted);
}

.store-empty {
  text-align: center;
  padding: 4rem 1rem;
  border: 1px dashed var(--store-border);
  border-radius: 4px;
}

.store-empty p {
  margin: 0 0 1rem;
  color: var(--store-muted);
}

.store-trust {
  border-top: 1px solid var(--store-border);
  background: #FAFAF9;
  padding: 2rem 1.5rem;
  margin-top: 2rem;
}

.store-trust-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.store-trust-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.store-trust-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--store-gold-soft);
  color: var(--store-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.store-trust-item strong {
  display: block;
  font-size: 0.9375rem;
  margin-bottom: 0.125rem;
}

.store-trust-item span {
  font-size: 0.8125rem;
  color: var(--store-muted);
}

.store-footer {
  background: var(--store-ink);
  color: rgba(255, 255, 255, 0.75);
}

.store-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.store-footer-brand p {
  margin: 0;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.5);
  max-width: 32ch;
}

.store-footer-contact h3 {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--store-gold);
}

.store-footer-contact p { margin: 0 0 0.375rem; }

.store-footer-contact a {
  color: #FFF;
  text-decoration: none;
  font-weight: 600;
}

.store-footer-bar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.875rem 1.5rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 1024px) {
  .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-catalog { grid-template-columns: 220px 1fr; }
  .store-trust-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .store-header-inner {
    grid-template-columns: 1fr auto;
    gap: 1rem;
  }

  .store-nav { display: none; }

  .store-hero {
    grid-template-columns: 1fr;
    padding-top: 1.5rem;
  }

  .store-hero-media { order: -1; max-height: 240px; }

  .store-catalog {
    grid-template-columns: 1fr;
  }

  .store-filters {
    position: static;
  }
}

@media (max-width: 560px) {
  .store-main,
  .store-header-inner { padding-inline: 1rem; }

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

  .store-grid.is-list .store-product {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 1rem;
    align-items: start;
  }

  .store-grid.is-list .store-product-media {
    grid-row: 1 / 3;
    width: 96px;
    height: 96px;
  }

  .store-grid.is-list .store-product-foot {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: flex-start;
    margin-top: 0.25rem;
  }

  .store-grid.is-list .store-stock-badge {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
    align-self: start;
    margin-top: 0.125rem;
  }

  .store-trust-inner,
  .store-footer-inner {
    grid-template-columns: 1fr;
  }

  .store-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Product detail */
.store-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--store-muted);
  padding: 1.5rem 0 1rem;
}

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

.store-breadcrumb a:hover { color: var(--store-gold); }

.store-breadcrumb span[aria-current="page"] {
  color: var(--store-ink);
  font-weight: 500;
}

.store-product-link {
  text-decoration: none;
  color: inherit;
}

.store-product-detail {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: start;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--store-border);
}

.store-product-gallery {
  position: relative;
  background: #F5F5F4;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.store-product-hero-img,
.store-product-hero-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.store-wishlist-lg {
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
}

.store-product-info h1 {
  margin: 0.5rem 0 0.25rem;
  font-family: var(--store-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--store-ink);
}

.store-product-category-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--store-gold);
}

.store-product-color-name {
  margin: 0 0 1rem;
  font-size: 1.0625rem;
  color: var(--store-muted);
}

.store-product-price-lg {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--store-gold);
}

.store-product-price-lg span {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--store-muted);
}

.store-stock-badge-lg {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
}

.store-product-colors {
  margin-bottom: 1.5rem;
}

.store-product-colors-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--store-ink);
  margin-bottom: 0.625rem;
}

.store-product-color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.store-color-option {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #FFF;
  box-shadow: 0 0 0 1px var(--store-border);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.store-color-option:hover { transform: scale(1.06); }

.store-color-option.active {
  box-shadow: 0 0 0 2px var(--store-gold);
}

.store-product-skus-table-wrap {
  margin-bottom: 1.5rem;
}

.store-product-skus-table-wrap h2 {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--store-ink);
}

.store-product-skus-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.store-product-skus-table th {
  text-align: left;
  padding: 0.625rem 0.75rem;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--store-muted);
  border-bottom: 1px solid var(--store-border);
  background: #FAFAF9;
}

.store-product-skus-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #F1F3F6;
  vertical-align: middle;
}

.store-sku-price-cell {
  font-weight: 700;
  color: var(--store-gold);
  white-space: nowrap;
}

.store-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.store-apply-btn-inline {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0;
  padding-inline: 1.5rem;
}

.store-outline-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--store-border);
  border-radius: 4px;
  color: var(--store-ink);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: border-color 200ms ease;
}

.store-outline-btn:hover { border-color: var(--store-gold); color: var(--store-gold); }

.store-product-notes {
  padding-top: 1.25rem;
  border-top: 1px solid var(--store-border);
}

.store-product-notes p {
  margin: 0 0 0.375rem;
  font-size: 0.875rem;
  color: var(--store-muted);
}

.store-product-notes .muted { font-size: 0.8125rem; }

.store-related {
  padding: 2.5rem 0 1rem;
}

.store-related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.store-related-head h2 {
  margin: 0;
  font-family: var(--store-serif);
  font-size: 1.75rem;
  font-weight: 700;
}

.store-related-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1024px) {
  .store-product-detail { grid-template-columns: 1fr; gap: 1.5rem; }
  .store-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .store-related-grid { grid-template-columns: 1fr; }
  .store-product-skus-table-wrap { overflow-x: auto; }
}

/* ── Dashboard ── */
body[data-page="dashboard"] .content {
  background: #F5F5F5;
}

.dashboard-page {
  width: 100%;
}

.dashboard-head {
  margin-bottom: 1.5rem;
}

.dashboard-title {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}

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

.dash-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dash-stat-card {
  background: var(--white);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  padding: 1rem 1.125rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.dash-stat-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.dash-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
}

.dash-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-stat-link {
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  transition: background 200ms ease;
}

.dash-stat-link:hover {
  background: #F4F5F7;
  color: var(--navy);
}

.dash-stat-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}

.dash-stat-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.375rem;
}

.dash-stat-value {
  display: block;
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.dash-stat-delta {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.dash-stat-delta.up { color: #16A34A; }
.dash-stat-delta.down { color: #DC2626; }
.dash-stat-delta.warn { color: #DC2626; }

.dash-sparkline {
  width: 88px;
  height: 36px;
  flex-shrink: 0;
}

.dash-grid-main {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dash-grid-bottom {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1rem;
}

.dash-card {
  background: var(--white);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  padding: 1.25rem 1.375rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dash-card-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}

.dash-period-tag,
.dash-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.dash-link {
  color: var(--gold-dark);
}

.dash-link:hover {
  text-decoration: underline;
}

.dash-chart-wrap {
  margin: 0 -0.25rem;
}

.dash-chart {
  width: 100%;
  height: auto;
  display: block;
}

.dash-chart-grid {
  stroke: #EEF1F5;
  stroke-width: 1;
}

.dash-chart-axis {
  fill: var(--muted);
  font-size: 11px;
}

.dash-overview-totals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.dash-overview-tile {
  padding: 0.75rem 0.875rem;
  background: #FAFBFC;
  border-radius: 12px;
  border: 1px solid #F1F3F6;
}

.dash-overview-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.dash-overview-tile strong {
  display: block;
  font-size: 1.0625rem;
  color: var(--navy);
}

.dash-overview-tile .dash-stat-delta {
  margin-top: 0.25rem;
}

.dash-stock-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dash-stock-row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #F1F3F6;
}

.dash-stock-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dash-stock-swatch {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.dash-stock-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.dash-stock-sku {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.dash-stock-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-stock-qty {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

.dash-stock-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.3125rem 0.625rem;
  border-radius: var(--pill);
  white-space: nowrap;
}

.dash-stock-badge.low {
  background: #FEE2E2;
  color: #DC2626;
}

.dash-stock-badge.out {
  background: #FECACA;
  color: #991B1B;
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.5rem;
  justify-content: flex-start;
}

.dash-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--navy);
  font-size: 0.8125rem;
  font-weight: 600;
  min-width: 88px;
  transition: transform 200ms ease;
}

.dash-action:hover {
  transform: translateY(-2px);
}

.dash-action-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-top-table-wrap {
  overflow-x: auto;
}

.dash-top-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.dash-top-table th {
  text-align: left;
  padding: 0.5rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.dash-top-table td {
  padding: 0.75rem 0.625rem;
  border-bottom: 1px solid #F1F3F6;
  vertical-align: middle;
}

.dash-top-table tbody tr:last-child td {
  border-bottom: none;
}

.dash-product-cell {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
  color: var(--navy);
}

.dash-product-cell .dash-stock-swatch {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.dash-empty {
  padding: 1.5rem 0;
  text-align: center;
}

@media (max-width: 1100px) {
  .dash-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-grid-main,
  .dash-grid-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dash-stat-grid {
    grid-template-columns: 1fr;
  }

  .dash-overview-totals {
    grid-template-columns: 1fr;
  }

  .dash-stock-row {
    grid-template-columns: 32px 1fr;
    grid-template-rows: auto auto;
  }

  .dash-stock-qty,
  .dash-stock-badge {
    grid-column: 2;
  }

  .dash-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}
