/* ================================================================
   Green Land Laundry — Premium SaaS Design System
   Clean white light theme — inspired by Linear, Vercel, Notion
   ================================================================ */

/* 1. Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;450;500;600;700;800&family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=JetBrains+Mono:wght@400;500&display=swap');

/* 2. Design Tokens */
:root {
  /* Base */
  --white:       #ffffff;
  --bg:          #f8f9fb;
  --bg-subtle:   #f0f2f5;
  --surface:     #ffffff;
  --surface-raised: #ffffff;

  /* Borders */
  --border:      #e4e7ec;
  --border-strong: #d0d5dd;
  --border-focus: #047857;

  /* Brand — Emerald */
  --brand-50:   #ecfdf5;
  --brand-100:  #d1fae5;
  --brand-200:  #a7f3d0;
  --brand-400:  #34d399;
  --brand-500:  #10b981;
  --brand-600:  #059669;
  --brand-700:  #047857;
  --brand-800:  #065f46;
  --brand-900:  #064e3b;

  /* Text */
  --text-primary:   #101828;
  --text-secondary: #475467;
  --text-tertiary:  #667085;
  --text-disabled:  #98a2b3;
  --text-inverse:   #ffffff;
  --text-brand:     #047857;

  /* Status */
  --amber-50:   #fffbeb; --amber-400: #fbbf24; --amber-600: #d97706; --amber-700: #b45309;
  --red-50:     #fef2f2; --red-400:   #f87171; --red-500:   #ef4444; --red-700:   #b91c1c;
  --blue-50:    #eff6ff; --blue-400:  #60a5fa; --blue-600:  #2563eb; --blue-700:  #1d4ed8;
  --purple-50:  #f5f3ff; --purple-400:#a78bfa; --purple-600:#7c3aed;

  /* Shadows */
  --shadow-xs:   0 1px 2px rgba(16,24,40,.04);
  --shadow-sm:   0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
  --shadow-md:   0 4px 8px -2px rgba(16,24,40,.08), 0 2px 4px -2px rgba(16,24,40,.04);
  --shadow-lg:   0 12px 16px -4px rgba(16,24,40,.08), 0 4px 6px -2px rgba(16,24,40,.03);
  --shadow-xl:   0 20px 24px -4px rgba(16,24,40,.08), 0 8px 8px -4px rgba(16,24,40,.03);
  --shadow-focus: 0 0 0 3px rgba(4,120,87,.12);

  /* Radii */
  --radius-sm:  6px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full: 9999px;

  /* Spacing */
  --sidebar-w: 240px;
  --topbar-h:  57px;

  /* Transitions */
  --ease-out:   cubic-bezier(0,.5,.5,1);
  --ease-spring:cubic-bezier(.22,.68,0,1.2);
}

/* 3. Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; height: 100%; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }
table { border-collapse: collapse; }
::selection { background: var(--brand-100); color: var(--brand-800); }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-disabled); }

/* Focus */
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; border-radius: var(--radius-sm); }

/* 4. Typography */
.font-brand { font-family: 'Bricolage Grotesque', sans-serif; }
.font-mono  { font-family: 'JetBrains Mono', monospace; }

h1, h2, h3, h4 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; color: var(--text-primary); }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }
h4 { font-size: .9375rem; }

.text-xs   { font-size: 11px; }
.text-sm   { font-size: 12px; }
.text-base { font-size: 14px; }
.text-lg   { font-size: 16px; }
.text-xl   { font-size: 18px; }
.text-2xl  { font-size: 22px; }
.text-3xl  { font-size: 28px; }
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }
.text-brand     { color: var(--brand-600); }
.font-medium    { font-weight: 500; }
.font-semibold  { font-weight: 600; }
.font-bold      { font-weight: 700; }
.uppercase      { text-transform: uppercase; letter-spacing: .06em; }
.truncate       { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* 5. Layout */
.page-layout { display: flex; min-height: 100vh; }
.page-main   { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-height: 100vh; transition: margin-left .25s var(--ease-out); }
.page-content { flex: 1; padding: 28px 32px; }

/* 6. Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform .25s var(--ease-out);
}

.sidebar-brand {
  height: var(--topbar-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.brand-mark {
  width: 32px; height: 32px;
  background: var(--brand-600);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.brand-text { font-family: 'Bricolage Grotesque', sans-serif; font-size: 15px; font-weight: 700; color: var(--text-primary); }
.brand-sub  { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }

.sidebar-nav { flex: 1; padding: 10px 8px; overflow-y: auto; }

.nav-section {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-disabled);
  padding: 0 8px;
  margin: 16px 0 4px;
  display: block;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 450;
  cursor: pointer;
  transition: all .12s;
  border: 1px solid transparent;
  text-decoration: none;
  margin-bottom: 1px;
}
.nav-item:hover  { background: var(--bg-subtle); color: var(--text-primary); }
.nav-item.active { background: var(--brand-50); color: var(--brand-700); font-weight: 600; border-color: var(--brand-100); }
.nav-item .ico   { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }
.nav-badge       { margin-left: auto; background: var(--brand-100); color: var(--brand-700); font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: var(--radius-full); }

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 12px 8px;
}
.user-card {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--radius-md);
  background: var(--bg-subtle);
  margin-bottom: 4px;
}
.avatar {
  width: 30px; height: 30px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px; flex-shrink: 0;
  background: var(--brand-600); color: var(--white);
}
.avatar.admin  { background: var(--blue-600); }
.avatar.dev    { background: var(--purple-600); }
.user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
.user-role { font-size: 11px; color: var(--text-tertiary); text-transform: capitalize; }
.sign-out-btn {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--radius-md);
  background: none; border: none; cursor: pointer;
  font-size: 12.5px; font-weight: 500; color: var(--text-tertiary);
  transition: all .12s;
}
.sign-out-btn:hover { background: #fef2f2; color: var(--red-500); }

/* 7. Topbar */
.topbar {
  height: var(--topbar-h);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-title { font-family: 'Bricolage Grotesque', sans-serif; font-size: 15px; font-weight: 700; }
.topbar-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-tertiary); }
.topbar-breadcrumb span { color: var(--text-primary); font-weight: 500; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* 8. Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 8px 14px;
  font-size: 13.5px; font-weight: 500; font-family: 'Inter', sans-serif;
  border-radius: var(--radius-md); border: none; cursor: pointer;
  white-space: nowrap; user-select: none;
  transition: all .14s var(--ease-out);
  line-height: 1;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }

.btn-primary   { background: var(--brand-600); color: var(--white); box-shadow: 0 1px 2px rgba(4,120,87,.2); }
.btn-primary:hover { background: var(--brand-700); box-shadow: var(--shadow-sm); }

.btn-secondary { background: var(--white); color: var(--text-primary); border: 1px solid var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { background: var(--bg-subtle); border-color: var(--border-strong); }

.btn-ghost    { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-subtle); color: var(--text-primary); }

.btn-danger   { background: var(--red-50); color: var(--red-700); border: 1px solid #fecdd3; }
.btn-danger:hover { background: #fee2e2; }

.btn-brand-soft { background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); }
.btn-brand-soft:hover { background: var(--brand-100); }

.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: var(--radius-sm); gap: 5px; }
.btn-lg { padding: 11px 20px; font-size: 14.5px; border-radius: var(--radius-lg); }
.btn-icon { padding: 7px; width: 34px; height: 34px; }
.btn-icon-sm { padding: 5px; width: 28px; height: 28px; font-size: 13px; }
.btn-loading { pointer-events: none; }

/* 9. Form Controls */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12.5px; font-weight: 500; color: var(--text-secondary); }
.form-label-required::after { content: ' *'; color: var(--red-500); }

.form-input, .form-select, .form-textarea {
  width: 100%; padding: 8px 12px;
  font-size: 13.5px; font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color .14s, box-shadow .14s;
  line-height: 1.5;
}
.form-input::placeholder,
.form-select option:first-child,
.form-textarea::placeholder { color: var(--text-disabled); }
.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--brand-500); box-shadow: var(--shadow-focus); }
.form-input:disabled,
.form-select:disabled { background: var(--bg-subtle); color: var(--text-tertiary); cursor: not-allowed; }
.form-textarea { resize: vertical; min-height: 76px; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23667085' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 32px;
  cursor: pointer;
}

.form-grid { display: grid; gap: 14px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.form-check { display: flex; align-items: center; gap: 9px; }
.form-check-input { width: 16px; height: 16px; accent-color: var(--brand-600); cursor: pointer; }
.form-check-label { font-size: 13.5px; color: var(--text-secondary); cursor: pointer; }

.input-group { position: relative; }
.input-group-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); font-size: 14px; pointer-events: none; }
.input-group .form-input { padding-left: 34px; }

/* 10. Cards */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-title { font-family: 'Bricolage Grotesque', sans-serif; font-size: 14.5px; font-weight: 700; color: var(--text-primary); }
.card-body  { padding: 20px; }
.card-footer { padding: 12px 20px; background: var(--bg-subtle); border-top: 1px solid var(--border); border-radius: 0 0 var(--radius-xl) var(--radius-xl); }

/* 11. Stat Cards */
.stat-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 18px 20px;
  transition: all .18s var(--ease-out); cursor: default;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-icon  { width: 36px; height: 36px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-size: 17px; margin-bottom: 12px; }
.stat-value { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 12.5px; color: var(--text-tertiary); margin-top: 5px; }
.stat-delta { font-size: 12px; font-weight: 600; margin-top: 3px; }
.stat-delta.up   { color: var(--brand-600); }
.stat-delta.down { color: var(--red-500); }

/* 12. Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 11.5px; font-weight: 600; line-height: 1.4;
  border: 1px solid transparent;
}
.badge-emerald { background: var(--brand-50);  color: var(--brand-700); border-color: var(--brand-100); }
.badge-amber   { background: var(--amber-50);  color: var(--amber-700); border-color: #fde68a; }
.badge-red     { background: var(--red-50);    color: var(--red-700);   border-color: #fecdd3; }
.badge-blue    { background: var(--blue-50);   color: var(--blue-700);  border-color: #bfdbfe; }
.badge-purple  { background: var(--purple-50); color: var(--purple-600);border-color: #ddd6fe; }
.badge-gray    { background: var(--bg-subtle); color: var(--text-secondary); border-color: var(--border); }

/* 13. Table */
.table-wrap { overflow-x: auto; border-radius: var(--radius-xl); border: 1px solid var(--border); background: var(--white); box-shadow: var(--shadow-sm); }
.data-table { width: 100%; }
.data-table thead th {
  padding: 10px 16px; text-align: left;
  font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-tertiary); background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tbody td { padding: 12px 16px; font-size: 13.5px; color: var(--text-secondary); border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background .1s; }
.data-table tbody tr:hover td { background: var(--bg); }
.td-primary { font-weight: 500; color: var(--text-primary) !important; }
.td-mono    { font-family: 'JetBrains Mono', monospace; font-size: 12.5px !important; color: var(--brand-700) !important; font-weight: 500; }
.td-muted   { color: var(--text-tertiary) !important; font-size: 12.5px !important; }

/* 14. Pagination */
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--border); }
.pg-info { font-size: 12.5px; color: var(--text-tertiary); }
.pg-btns { display: flex; gap: 4px; }

/* 15. Filter Bar */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filter-bar .form-input { flex: 1; min-width: 220px; }

/* 16. Page header */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.page-header-left h1 { font-size: 1.625rem; }
.page-header-sub { font-size: 13px; color: var(--text-tertiary); margin-top: 3px; }

/* 17. Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; margin-bottom: 24px; }

/* 18. POS */
.pos-layout { display: grid; grid-template-columns: 1fr 296px; gap: 20px; align-items: flex-start; }
.pos-grid   { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 12px; max-height: calc(100vh - 240px); overflow-y: auto; padding-right: 4px; }

.pos-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius-xl); padding: 12px;
  cursor: pointer; transition: all .18s var(--ease-spring);
  position: relative; overflow: hidden;
}
.pos-card:hover { border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-50), var(--shadow-md); transform: translateY(-2px); }
.pos-card:active { transform: scale(.96); }
.pos-card-img {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-subtle); display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 10px; position: relative;
}
.pos-card-overlay {
  position: absolute; inset: 0; border-radius: var(--radius-lg);
  background: rgba(4,120,87,.75); display: flex; align-items: center; justify-content: center;
  color: white; font-size: 20px; font-weight: 700; opacity: 0; transition: opacity .15s;
}
.pos-card:hover .pos-card-overlay { opacity: 1; }
.pos-qty-pill {
  position: absolute; top: 8px; right: 8px; width: 22px; height: 22px;
  background: var(--brand-600); color: white; font-size: 11px; font-weight: 700;
  border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(4,120,87,.4);
}
.pos-card-name  { font-size: 12px; font-weight: 600; color: var(--text-primary); line-height: 1.3; margin-bottom: 5px; }
.pos-card-price { font-family: 'Bricolage Grotesque', sans-serif; font-size: 14px; font-weight: 700; color: var(--brand-700); }
.pos-card-vat   { font-size: 10.5px; color: var(--text-tertiary); margin-top: 1px; }
.pos-card-tag   { position: absolute; top: 8px; left: 8px; background: rgba(255,255,255,.9); color: var(--brand-700); font-size: 9.5px; font-weight: 700; padding: 2px 6px; border-radius: 20px; }

/* Cart */
.cart-wrap { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; position: sticky; top: calc(var(--topbar-h) + 16px); max-height: calc(100vh - var(--topbar-h) - 48px); }
.cart-header { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cart-body   { flex: 1; overflow-y: auto; padding: 0 14px; }
.cart-footer { border-top: 1px solid var(--border); flex-shrink: 0; }

.cart-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cart-item:last-child { border-bottom: none; }
.cart-item-icon { width: 30px; height: 30px; background: var(--bg-subtle); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.cart-empty { padding: 36px 16px; text-align: center; color: var(--text-tertiary); font-size: 13px; }
.cart-empty-icon { font-size: 32px; opacity: .35; margin-bottom: 8px; }

.qty-ctrl { display: flex; align-items: center; gap: 6px; }
.qty-btn {
  width: 24px; height: 24px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--white);
  color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 13px; transition: all .12s;
}
.qty-btn:hover { background: var(--bg-subtle); border-color: var(--border-strong); }
.qty-btn.add   { background: var(--brand-600); border-color: var(--brand-600); color: white; }
.qty-btn.add:hover { background: var(--brand-700); }

/* Totals */
.totals-box { background: var(--bg-subtle); border-radius: var(--radius-md); padding: 12px 14px; }
.total-row  { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 13px; color: var(--text-secondary); }
.total-row.final { padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--border-strong); font-family: 'Bricolage Grotesque', sans-serif; font-size: 16px; font-weight: 800; color: var(--brand-700); }

/* PM toggle */
.pm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pm-btn {
  padding: 7px 8px; border-radius: var(--radius-md);
  border: 1.5px solid var(--border); background: var(--white);
  color: var(--text-secondary); font-size: 12px; font-weight: 500;
  cursor: pointer; text-align: center; transition: all .14s;
}
.pm-btn:hover   { border-color: var(--brand-300); background: var(--brand-50); color: var(--brand-700); }
.pm-btn.active  { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); font-weight: 600; }

/* 19. Cat tabs */
.cat-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 4px; }
.cat-tabs::-webkit-scrollbar { height: 0; }
.cat-tab {
  padding: 5px 12px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--white);
  color: var(--text-secondary); font-size: 12.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: all .13s;
}
.cat-tab:hover  { border-color: var(--brand-300); color: var(--brand-600); background: var(--brand-50); }
.cat-tab.active { background: var(--brand-600); border-color: var(--brand-600); color: white; font-weight: 600; }

/* 20. Order timeline */
.order-timeline { display: flex; align-items: flex-start; overflow-x: auto; padding: 4px 0 8px; }
.tl-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; min-width: 72px; }
.tl-dot  { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; position: relative; z-index: 1; border: 2px solid var(--border-strong); background: var(--white); color: var(--text-tertiary); transition: all .2s; }
.tl-dot.done    { background: var(--brand-600); border-color: var(--brand-600); color: white; }
.tl-dot.current { background: var(--brand-50); border-color: var(--brand-500); color: var(--brand-700); box-shadow: 0 0 0 4px var(--brand-50); }
.tl-label { font-size: 10.5px; font-weight: 500; color: var(--text-tertiary); text-align: center; text-transform: capitalize; }
.tl-line  { flex: 1; height: 2px; background: var(--border); margin-top: 13px; }
.tl-line.done { background: var(--brand-400); }

/* 21. Info grid (order detail) */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.info-block { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
.info-block-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-tertiary); margin-bottom: 12px; }
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.info-row:last-child { border-bottom: none; }
.info-key { color: var(--text-tertiary); font-size: 12.5px; }
.info-val { font-weight: 500; color: var(--text-primary); text-align: right; }

/* 22. Toggle switch */
.toggle-wrap { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.toggle-input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute; inset: 0; border-radius: 24px; cursor: pointer;
  background: var(--border-strong); transition: background .2s;
}
.toggle-track::after {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform .22s var(--ease-spring);
}
.toggle-input:checked + .toggle-track { background: var(--brand-600); }
.toggle-input:checked + .toggle-track::after { transform: translateX(18px); }

/* 23. Developer surface */
.dev-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.flag-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); gap: 16px; }
.flag-row:last-child { border-bottom: none; }
.api-expand { padding: 20px; border-top: 1px solid var(--border); display: none; background: var(--bg); border-radius: 0 0 var(--radius-xl) var(--radius-xl); }

/* 24. Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius-lg); display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.alert-warning { background: var(--amber-50); border: 1px solid #fde68a; }
.alert-error   { background: var(--red-50);   border: 1px solid #fecdd3; }
.alert-success { background: var(--brand-50); border: 1px solid var(--brand-100); }
.alert-info    { background: var(--blue-50);  border: 1px solid #bfdbfe; }
.alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-text { font-size: 13px; line-height: 1.5; }

/* 25. Empty state */
.empty-state { text-align: center; padding: 56px 20px; }
.empty-icon  { font-size: 36px; opacity: .28; margin-bottom: 12px; }
.empty-text  { font-size: 13.5px; color: var(--text-tertiary); }
.empty-action { margin-top: 16px; }

/* 26. Loading spinner */
.spinner { display: inline-block; width: 15px; height: 15px; border: 2px solid var(--border-strong); border-top-color: var(--brand-600); border-radius: 50%; animation: spin .65s linear infinite; }

/* 27. Overlay */
.overlay { display: none; position: fixed; inset: 0; background: rgba(16,24,40,.4); z-index: 150; backdrop-filter: blur(3px); }
.overlay.open { display: block; }

/* 28. Freeze stripe */
.freeze-stripe { height: 3px; position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  background: repeating-linear-gradient(-45deg, var(--amber-400), var(--amber-400) 6px, var(--amber-50) 6px, var(--amber-50) 12px); }

/* 29. Animations */
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes fadeUp   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn    { from { opacity: 0; transform: scale(.93) translateY(6px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes shimmer  { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.anim-up   { animation: fadeUp  .36s var(--ease-spring) both; }
.anim-in   { animation: fadeIn  .25s ease both; }
.anim-pop  { animation: popIn   .28s var(--ease-spring) both; }
.stagger-children > * { animation: fadeUp .36s var(--ease-spring) both; }
.stagger-children > *:nth-child(1) { animation-delay: .04s; }
.stagger-children > *:nth-child(2) { animation-delay: .08s; }
.stagger-children > *:nth-child(3) { animation-delay: .12s; }
.stagger-children > *:nth-child(4) { animation-delay: .16s; }
.stagger-children > *:nth-child(5) { animation-delay: .20s; }
.stagger-children > *:nth-child(6) { animation-delay: .24s; }
.stagger-children > *:nth-child(7) { animation-delay: .28s; }
.stagger-children > *:nth-child(8) { animation-delay: .32s; }

.shimmer {
  background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--bg) 50%, var(--bg-subtle) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: var(--radius-md);
}

/* 30. Utilities */
.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.gap-2  { gap: 6px; }
.gap-3  { gap: 10px; }
.gap-4  { gap: 14px; }
.ml-auto { margin-left: auto; }
.mt-3  { margin-top: 10px; }
.mt-4  { margin-top: 14px; }
.mt-6  { margin-top: 20px; }
.mb-4  { margin-bottom: 14px; }
.mb-6  { margin-bottom: 20px; }
.w-full { width: 100%; }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.grid      { display: grid; }
.grid-2    { grid-template-columns: 1fr 1fr; }
.grid-3    { grid-template-columns: 1fr 1fr 1fr; }
.grid-4    { grid-template-columns: repeat(4,1fr); }

/* 31. Responsive */
.mobile-bar { display: none; height: var(--topbar-h); background: var(--white); border-bottom: 1px solid var(--border); padding: 0 16px; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 100; }

@media (max-width: 1024px) {
  :root { --sidebar-w: 240px; }
  .sidebar     { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-xl); }
  .page-main   { margin-left: 0 !important; }
  .mobile-bar  { display: flex; }
  .topbar      { display: none !important; }
  .page-content { padding: 20px 16px; }
  .pos-layout  { grid-template-columns: 1fr; }
  .info-grid   { grid-template-columns: 1fr; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-grid  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
  .filter-bar .form-input { min-width: 0; }
}

/* 32. Bar chart (analytics) */
.bar-track { height: 5px; background: var(--bg-subtle); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.bar-fill  { height: 100%; background: linear-gradient(90deg, var(--brand-400), var(--brand-600)); border-radius: 3px; transition: width .5s var(--ease-out); }

/* 33. Status indicator dot */
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-dot.online  { background: var(--brand-500); }
.status-dot.offline { background: var(--text-disabled); }
.status-dot.warn    { background: var(--amber-400); }
