/* ==========================================================================
   RestaurantWise — Design System
   Tokens, layout, components. Light + dark themes via [data-theme].
   ========================================================================== */

:root {
  --brand-50: #eef7f3;
  --brand-100: #d6ece2;
  --brand-200: #aedcc8;
  --brand-300: #7cc4a6;
  --brand-400: #46a883;
  --brand-500: #1f8a63;
  --brand-600: #166e4f;
  --brand-700: #12573f;
  --brand-800: #0e4231;
  --brand-900: #092a20;

  --accent: #e8833a;
  --accent-soft: #fdf1e6;

  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --surface-3: #e6e9ee;
  --border: #dfe3e9;
  --border-strong: #c7cdd6;
  --text: #16202b;
  --text-muted: #5c6a7a;
  --text-faint: #8b97a6;

  --success: #1c8a4e;
  --success-soft: #e6f5ec;
  --warning: #b4740b;
  --warning-soft: #fdf3e2;
  --danger: #c02626;
  --danger-soft: #fdeaea;
  --info: #1b6ac4;
  --info-soft: #e8f1fd;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 32, 43, 0.06), 0 1px 3px rgba(16, 32, 43, 0.04);
  --shadow: 0 4px 12px rgba(16, 32, 43, 0.08);
  --shadow-lg: 0 18px 40px rgba(16, 32, 43, 0.16);

  --sidebar-w: 248px;
  --topbar-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

[data-theme='dark'] {
  --bg: #0e1319;
  --surface: #151c25;
  --surface-2: #1b242f;
  --surface-3: #232e3b;
  --border: #2a3543;
  --border-strong: #3a4757;
  --text: #e8edf3;
  --text-muted: #9aa8b8;
  --text-faint: #6f7d8d;

  --success-soft: #12331f;
  --warning-soft: #35260b;
  --danger-soft: #361518;
  --info-soft: #10243d;
  --accent-soft: #33220f;
  --brand-50: #10241c;
  --brand-100: #163328;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 44px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 10px; }
a { color: var(--brand-500); text-decoration: none; }
a:hover { text-decoration: underline; }
small { font-size: 12px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

:focus-visible { outline: 2px solid var(--brand-400); outline-offset: 2px; }

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

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}
.sidebar__brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.sidebar__brand .logo {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 800;
}
.sidebar__nav { flex: 1; overflow-y: auto; padding: 10px 8px 24px; }
.sidebar__group-label {
  padding: 14px 12px 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-weight: 500; font-size: 13.5px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item.is-active { background: var(--brand-50); color: var(--brand-600); font-weight: 600; }
[data-theme='dark'] .nav-item.is-active { color: var(--brand-300); }
.nav-item .icon { width: 18px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 18px; opacity: .85; }
.nav-item .badge { margin-left: auto; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.topbar__crumbs { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 13px; }
.topbar__crumbs strong { color: var(--text); font-weight: 600; }
.topbar__spacer { flex: 1; }
.topbar__actions { display: flex; align-items: center; gap: 8px; }

.content { padding: 20px; flex: 1; max-width: 1600px; width: 100%; }

.page-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head__text { flex: 1; min-width: 200px; }
.page-head__text p { color: var(--text-muted); margin: 2px 0 0; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
  font: inherit; font-weight: 500; font-size: 13.5px;
  cursor: pointer; white-space: nowrap; transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--primary { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.btn--primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger:hover { filter: brightness(0.94); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn--lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--icon { width: 36px; padding: 0; }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; }
.field .hint { font-size: 11.5px; color: var(--text-faint); margin-top: 4px; }
.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px;
}
.textarea { height: auto; min-height: 78px; padding: 8px 10px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-400); outline: none; box-shadow: 0 0 0 3px var(--brand-50); }
.input--error { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: 12px; margin-top: 4px; min-height: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 8px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--brand-500); }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 999px; transition: 0.15s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.15s; }
.switch input:checked + span { background: var(--brand-500); }
.switch input:checked + span::before { transform: translateX(18px); }

/* ---------- Cards / panels ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card__head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.card__head h3 { flex: 1; }
.card__body { padding: 16px; }
.card__body--flush { padding: 0; }

.grid { display: grid; gap: 14px; }
.grid--stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat__label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.stat__value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat__meta { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.stat__meta.up { color: var(--success); }
.stat__meta.down { color: var(--danger); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; padding: 10px 14px; background: var(--surface-2);
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .actions { text-align: right; white-space: nowrap; }

.pagination { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.pagination .spacer { flex: 1; }

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; background: var(--surface-3); color: var(--text-muted);
  white-space: nowrap;
}
.badge--success { background: var(--success-soft); color: var(--success); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--brand { background: var(--brand-50); color: var(--brand-600); }
[data-theme='dark'] .badge--brand { color: var(--brand-300); }

/* ---------- Toasts ---------- */
.toast-stack { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast {
  min-width: 260px; max-width: 380px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand-500);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-size: 13.5px;
  animation: toast-in 0.18s ease-out;
}
.toast--success { border-left-color: var(--success); }
.toast--error { border-left-color: var(--danger); }
.toast--warning { border-left-color: var(--warning); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(12, 20, 28, 0.55);
  display: grid; place-items: center; padding: 20px; z-index: 150;
}
.modal {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column;
  border: 1px solid var(--border);
}
.modal--wide { max-width: 860px; }
.modal--narrow { max-width: 420px; }
.modal__head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.modal__head h3 { flex: 1; font-size: 16px; }
.modal__body { padding: 20px; overflow-y: auto; }
.modal__foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- States ---------- */
.empty { text-align: center; padding: 44px 20px; color: var(--text-muted); }
.empty__icon { margin-bottom: 10px; opacity: 0.55; display: flex; justify-content: center; }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.empty p { margin-bottom: 14px; }

.spinner {
  width: 18px; height: 18px; border: 2px solid var(--border-strong);
  border-top-color: var(--brand-500); border-radius: 50%;
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: flex; align-items: center; gap: 10px; padding: 40px; justify-content: center; color: var(--text-muted); }

.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 6px; height: 14px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 14px; border: 1px solid transparent; }
.alert--error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert--success { background: var(--success-soft); color: var(--success); }
.alert--warning { background: var(--warning-soft); color: var(--warning); }
.alert--info { background: var(--info-soft); color: var(--info); }

/* ---------- Tabs / segmented ---------- */
.segmented { display: inline-flex; background: var(--surface-2); border-radius: var(--radius-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented button {
  border: 0; background: transparent; padding: 6px 12px; border-radius: 4px;
  font: inherit; font-size: 13px; color: var(--text-muted); cursor: pointer;
}
.segmented button.is-active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; }
.toolbar .spacer { flex: 1; }

/* ---------- POS ---------- */
.pos-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
.pos-catalog { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.pos-categories { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.pos-cat {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.pos-cat.is-active { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pos-product {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; cursor: pointer; text-align: left; min-height: 92px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  transition: border-color 0.12s, transform 0.08s;
}
.pos-product:hover { border-color: var(--brand-400); }
.pos-product:active { transform: scale(0.985); }
.pos-product__name { font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.pos-product__price { color: var(--brand-600); font-weight: 700; font-variant-numeric: tabular-nums; }
[data-theme='dark'] .pos-product__price { color: var(--brand-300); }

.pos-cart { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; position: sticky; top: calc(var(--topbar-h) + 12px); max-height: calc(100vh - var(--topbar-h) - 32px); }
.pos-cart__head { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.pos-cart__items { flex: 1; overflow-y: auto; padding: 8px; min-height: 120px; }
.cart-item { display: flex; gap: 8px; padding: 8px; border-radius: var(--radius-sm); align-items: flex-start; }
.cart-item:hover { background: var(--surface-2); }
.cart-item__main { flex: 1; min-width: 0; }
.cart-item__name { font-weight: 600; font-size: 13px; }
.cart-item__meta { font-size: 11.5px; color: var(--text-muted); }
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.qty-control button { width: 26px; height: 26px; border: 0; background: var(--surface); cursor: pointer; font-size: 14px; color: var(--text); }
.qty-control button:hover { background: var(--surface-2); }
.qty-control span { min-width: 26px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.pos-cart__totals { padding: 10px 14px; border-top: 1px solid var(--border); font-size: 13px; }
.totals-row { display: flex; justify-content: space-between; padding: 3px 0; color: var(--text-muted); }
.totals-row--grand { font-size: 17px; font-weight: 700; color: var(--text); border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 8px; }
.totals-row span:last-child { font-variant-numeric: tabular-nums; }
.pos-cart__actions { padding: 10px 14px 14px; display: grid; gap: 8px; }

/* ---------- Kitchen / KDS ---------- */
.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.kds-ticket { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); border-top: 4px solid var(--warning); display: flex; flex-direction: column; }
.kds-ticket--new { border-top-color: var(--info); }
.kds-ticket--preparing { border-top-color: var(--warning); }
.kds-ticket--ready { border-top-color: var(--success); }
.kds-ticket.is-late { box-shadow: 0 0 0 2px var(--danger-soft); }
.kds-ticket__head { padding: 10px 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kds-ticket__num { font-weight: 700; font-size: 15px; }
.kds-ticket__meta { font-size: 11.5px; color: var(--text-muted); }
.kds-ticket__items { padding: 10px 12px; flex: 1; }
.kds-item { display: flex; gap: 8px; padding: 4px 0; font-size: 13.5px; }
.kds-item__qty { font-weight: 700; color: var(--brand-600); min-width: 22px; }
.kds-item__mods { font-size: 11.5px; color: var(--text-muted); padding-left: 30px; }
.kds-ticket__foot { padding: 10px 12px; border-top: 1px solid var(--border); display: flex; gap: 6px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 600; }
.timer.warn { color: var(--warning); }
.timer.late { color: var(--danger); }

/* ---------- Floor plan ---------- */
.floor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.table-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-align: center;
  background: var(--surface); cursor: pointer;
}
.table-card__name { font-weight: 700; font-size: 16px; }
.table-card__meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.table-card--available { border-color: var(--border-strong); }
.table-card--occupied { background: var(--danger-soft); border-color: var(--danger); }
.table-card--reserved { background: var(--warning-soft); border-color: var(--warning); }
.table-card--cleaning { background: var(--info-soft); border-color: var(--info); }

/* ---------- Login / public pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside {
  background: linear-gradient(150deg, var(--brand-700), var(--brand-900) 70%);
  color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 18px;
}
.auth-aside h1 { font-size: 34px; line-height: 1.15; }
.auth-aside p { color: rgba(255, 255, 255, 0.78); font-size: 15px; max-width: 420px; }
.auth-aside ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.auth-aside li { display: flex; gap: 10px; align-items: flex-start; color: rgba(255, 255, 255, 0.9); font-size: 14px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 20px; background: var(--bg); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 24px; margin-bottom: 4px; }
.auth-card .sub { color: var(--text-muted); margin-bottom: 22px; }

.public-nav { height: 64px; display: flex; align-items: center; gap: 16px; padding: 0 22px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.public-nav .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.public-nav .logo { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; display: grid; place-items: center; font-weight: 800; }
.public-wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 80px; }

.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.menu-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.menu-card__name { font-weight: 600; }
.menu-card__desc { font-size: 12.5px; color: var(--text-muted); flex: 1; }
.menu-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.menu-card__price { font-weight: 700; color: var(--brand-600); }

.cart-panel { position: sticky; top: 90px; }

.steps { display: flex; gap: 8px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.step__dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 12px; font-weight: 700; }
.step.is-done .step__dot, .step.is-active .step__dot { background: var(--brand-500); color: #fff; }
.step.is-active { color: var(--text); font-weight: 600; }

/* ---------- Charts ---------- */
.chart-box { position: relative; height: 260px; }
.chart-box--sm { height: 200px; }

/* ---------- Utilities ---------- */
.row { display: flex; gap: 10px; align-items: center; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.tiny { font-size: 11.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.numeric { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.full { width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Responsive ---------- */
.sidebar-toggle { display: none; }

@media (max-width: 1080px) {
  .pos-layout { grid-template-columns: 1fr; }
  .pos-cart { position: static; max-height: none; }
}

@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-100%); transition: transform 0.2s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open { transform: none; }
  .sidebar-toggle { display: inline-flex; }
  .content { padding: 14px; }
  .topbar { padding: 0 14px; }
  .grid--stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .stat__value { font-size: 20px; }
  .modal { max-width: 100%; }
}

@media print {
  .sidebar, .topbar, .page-head__actions, .toolbar, .pagination, .btn { display: none !important; }
  .content { padding: 0; }
  .card { border: 0; box-shadow: none; }
  body { background: #fff; color: #000; }
}
