/* =====================================================================
   Laundry Pro — back-office design system (RTL first, light + dark)
   ===================================================================== */
:root {
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;

  --brand-50: #eef4ff;
  --brand-100: #dbe7ff;
  --brand-200: #bcd2ff;
  --brand-500: #3b6cf6;
  --brand-600: #2952e3;
  --brand-700: #1f3fb8;
  --aqua-500: #06b6d4;
  --aqua-100: #cffafe;

  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --surface-3: #eef2f8;
  --border: #e3e8f1;
  --border-strong: #cfd7e4;
  --text: #0f1b33;
  --text-2: #4a5873;
  --muted: #8491a8;

  --success: #16a34a;
  --success-bg: #e8f8ee;
  --warning: #d97706;
  --warning-bg: #fef4e2;
  --danger: #dc2626;
  --danger-bg: #fdecec;
  --info: #0891b2;
  --info-bg: #e3f6fa;
  --violet: #7c3aed;
  --violet-bg: #f1eafe;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 6px 16px -6px rgba(16, 24, 40, .08);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .22);
  --ring: 0 0 0 3px rgba(59, 108, 246, .22);
  --sidebar-w: 268px;
}

:root[data-theme="dark"] {
  --bg: #0b1120;
  --surface: #121a2c;
  --surface-2: #162036;
  --surface-3: #1c2740;
  --border: #243150;
  --border-strong: #31406a;
  --text: #e8edf7;
  --text-2: #b3bfd6;
  --muted: #7d8aa6;
  --brand-50: #172447;
  --brand-100: #1d2e5c;
  --brand-200: #2a4280;
  --success-bg: #0f2e1d;
  --warning-bg: #33230a;
  --danger-bg: #3a1414;
  --info-bg: #0b2c35;
  --violet-bg: #251a45;
  --aqua-100: #0b2c35;
  --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 20px -8px rgba(0, 0, 0, .5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --surface: #121a2c; --surface-2: #162036; --surface-3: #1c2740;
    --border: #243150; --border-strong: #31406a; --text: #e8edf7; --text-2: #b3bfd6; --muted: #7d8aa6;
    --brand-50: #172447; --brand-100: #1d2e5c; --brand-200: #2a4280;
    --success-bg: #0f2e1d; --warning-bg: #33230a; --danger-bg: #3a1414; --info-bg: #0b2c35; --violet-bg: #251a45; --aqua-100: #0b2c35;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 20px -8px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
[x-cloak] { display: none !important; }
.num, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.ltr { direction: ltr; unicode-bidi: embed; }

/* ------------------------------------------------------------------ icons */
.icon { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }
.icon-xl { width: 28px; height: 28px; }

/* ------------------------------------------------------------------ layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset-block: 0; inset-inline-start: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-inline-end: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 40;
  transition: transform .25s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 14px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand-500), var(--aqua-500));
  box-shadow: 0 8px 18px -6px rgba(59, 108, 246, .55);
}
.brand-name { font-weight: 800; font-size: 16px; }
.brand-sub { font-size: 12px; color: var(--muted); }
.sidebar-search { padding: 4px 16px 10px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 4px 12px 20px; }
.nav-label { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 16px 12px 6px; letter-spacing: .02em; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; margin-block: 2px;
  border-radius: 10px; color: var(--text-2); font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--surface-3); color: var(--text); }
.nav-link.active { background: var(--brand-50); color: var(--brand-600); font-weight: 700; }
.nav-link.active .icon { color: var(--brand-600); }
.nav-link .icon { color: var(--muted); }
.nav-link .pill { margin-inline-start: auto; }
.sidebar-foot { padding: 14px 16px; border-top: 1px solid var(--border); }

.main { flex: 1; min-width: 0; margin-inline-start: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-title { font-size: 18px; font-weight: 800; }
.topbar-crumbs { font-size: 12.5px; color: var(--muted); }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; position: relative;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { color: var(--brand-600); border-color: var(--brand-200); }
.icon-btn .dot { position: absolute; top: 7px; inset-inline-end: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid var(--surface); }
.clock { text-align: center; line-height: 1.2; font-size: 12px; color: var(--text-2); padding-inline: 8px; }
.clock b { display: block; font-size: 14px; color: var(--text); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.avatar { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #6366f1, #06b6d4); font-size: 13px; }
.content { padding: 24px 28px 40px; flex: 1; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
.page-head h1 { font-size: 22px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { margin-inline-start: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.footer { padding: 16px 28px; color: var(--muted); font-size: 12.5px; display: flex; justify-content: space-between; border-top: 1px solid var(--border); }
.menu-toggle { display: none; }
.backdrop { display: none; }

@media (max-width: 1080px) {
  .sidebar { transform: translateX(100%); box-shadow: var(--shadow-lg); }
  [dir="ltr"] .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main { margin-inline-start: 0; }
  .menu-toggle { display: grid; }
  .backdrop.open { display: block; position: fixed; inset: 0; background: rgba(8, 15, 30, .45); z-index: 35; }
  .topbar, .content { padding-inline: 16px; }
  .clock, .hide-md { display: none !important; }
}

/* ------------------------------------------------------------------ cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card-head .actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.stat {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px; padding: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.stat-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.stat-label { color: var(--text-2); font-size: 13px; }
.stat-value { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.stat-hint { font-size: 12px; color: var(--muted); }
.stat.accent::after { content: ""; position: absolute; inset-inline-end: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: currentColor; opacity: .06; }

.tone-brand { color: var(--brand-600); } .bg-brand { background: var(--brand-50); color: var(--brand-600); }
.tone-success { color: var(--success); } .bg-success { background: var(--success-bg); color: var(--success); }
.tone-warning { color: var(--warning); } .bg-warning { background: var(--warning-bg); color: var(--warning); }
.tone-danger { color: var(--danger); } .bg-danger { background: var(--danger-bg); color: var(--danger); }
.tone-info { color: var(--info); } .bg-info { background: var(--info-bg); color: var(--info); }
.tone-violet { color: var(--violet); } .bg-violet { background: var(--violet-bg); color: var(--violet); }
.tone-muted { color: var(--muted); }

/* ------------------------------------------------------------------ grid & utils */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-full { grid-column: 1 / -1; }
@media (max-width: 1280px) { .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1080px) { .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: minmax(0, 1fr); } .span-2, .span-3 { grid-column: auto; } }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 6px; }
.between { justify-content: space-between; }
.end { margin-inline-start: auto; }
.grow { flex: 1; min-width: 0; }
.gap-4 { gap: 4px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-8 { margin-bottom: 8px; }
.p-0 { padding: 0 !important; }
.text-sm { font-size: 13px; } .text-xs { font-size: 12px; } .text-lg { font-size: 16px; } .text-xl { font-size: 20px; } .text-2xl { font-size: 26px; }
.bold { font-weight: 700; } .extrabold { font-weight: 800; }
.muted { color: var(--muted); } .text-2 { color: var(--text-2); }
.center { text-align: center; } .start { text-align: start; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  font: inherit; font-weight: 600; font-size: 14px; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer; transition: all .15s; text-decoration: none;
  background: var(--surface); color: var(--text); border-color: var(--border-strong);
}
.btn:hover { border-color: var(--brand-500); color: var(--brand-600); }
.btn:focus-visible { outline: 0; box-shadow: var(--ring); }
.btn:disabled, .btn.disabled { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--brand-600); border-color: var(--brand-600); color: #fff; box-shadow: 0 6px 14px -6px rgba(41, 82, 227, .6); }
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(.94); color: #fff; border-color: var(--success); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.94); color: #fff; border-color: var(--danger); }
.btn-soft { background: var(--brand-50); border-color: transparent; color: var(--brand-600); }
.btn-soft:hover { background: var(--brand-100); }
.btn-soft-danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.btn-soft-danger:hover { color: var(--danger); border-color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn-whatsapp { background: #25d366; border-color: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1ebe5a; color: #fff; border-color: #1ebe5a; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn-xs { height: 28px; padding: 0 9px; font-size: 12px; border-radius: 7px; gap: 5px; }
.btn-lg { height: 50px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.btn-icon { width: 34px; padding: 0; height: 34px; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }
kbd { font-family: inherit; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: rgba(0, 0, 0, .12); }
.btn-primary kbd, .btn-success kbd, .btn-danger kbd { background: rgba(255, 255, 255, .22); }

/* ------------------------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.label .req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 12px;
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238491a8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-inline-end: 34px; }
[dir="rtl"] .select { background-position: left 12px center; }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--brand-500); box-shadow: var(--ring); }
.input-sm { height: 34px; font-size: 13px; }
.input-lg { height: 52px; font-size: 18px; }
.input-group { display: flex; }
.input-group .input { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-group .btn { border-start-start-radius: 0; border-end-start-radius: 0; height: 42px; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 12px; color: var(--muted); pointer-events: none; }
.input-icon .input { padding-inline-start: 38px; }
.error { color: var(--danger); font-size: 12.5px; }
.help { color: var(--muted); font-size: 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--brand-600); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 40px; height: 22px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background .2s; flex-shrink: 0; }
.switch .track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: var(--shadow-sm); }
.switch input:checked + .track { background: var(--brand-600); }
.switch input:checked + .track::after { transform: translateX(-18px); }
[dir="ltr"] .switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: var(--ring); }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
input[type="color"].input { padding: 4px; width: 56px; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th { text-align: start; font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot td { font-weight: 800; background: var(--surface-2); padding: 12px 14px; border-top: 1px solid var(--border); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.table-compact td { padding: 8px 12px; }
.row-danger td { background: color-mix(in srgb, var(--danger-bg) 70%, transparent); }

/* ------------------------------------------------------------------ badges */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-badge { --c: #64748b; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.pill { font-size: 11px; font-weight: 800; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; background: var(--danger); color: #fff; }
.pill-soft { background: var(--brand-50); color: var(--brand-600); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 600; font-size: 13px; color: var(--text-2); cursor: pointer; }
.chip.active, .chip:hover { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.swatch { width: 26px; height: 26px; border-radius: 8px; display: inline-block; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); }

/* ------------------------------------------------------------------ alerts & toasts */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; font-weight: 500; margin-bottom: 16px; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-danger { background: var(--danger-bg); color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: var(--warning); }
.alert-info { background: var(--info-bg); color: var(--info); }
.toasts { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.toast { display: flex; gap: 10px; align-items: center; padding: 13px 16px; border-radius: 12px; background: #0f1b33; color: #fff; box-shadow: var(--shadow-lg); font-weight: 500; animation: toast-in .25s ease; }
.toast.success .icon { color: #4ade80; } .toast.error .icon { color: #f87171; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ------------------------------------------------------------------ modal */
dialog.modal { border: 0; padding: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
dialog.modal.lg { width: min(820px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(8, 15, 30, .55); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 17px; }
.modal-head .close { margin-inline-start: auto; }
.modal-body { padding: 22px; overflow-y: auto; max-height: calc(100vh - 220px); }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }

/* ------------------------------------------------------------------ dropdown */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; }
.dropdown-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px; color: var(--text-2); background: none; border: 0; font: inherit; cursor: pointer; text-align: start; }
.dropdown-item:hover { background: var(--surface-3); color: var(--text); }

/* ------------------------------------------------------------------ tabs */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-3); width: fit-content; flex-wrap: wrap; }
.tab { padding: 7px 16px; border-radius: 9px; font-weight: 600; color: var(--text-2); font-size: 13.5px; cursor: pointer; border: 0; background: none; font-family: inherit; }
.tab.active { background: var(--surface); color: var(--brand-600); box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------------ misc */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .icon { width: 44px; height: 44px; color: var(--border-strong); margin-bottom: 10px; }
.progress { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-500), var(--aqua-500)); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding-inline-start: 26px; padding-bottom: 16px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 6px; top: 8px; bottom: -8px; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; inset-inline-start: 0; top: 5px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); }
.quick-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.quick-link { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; text-align: center; transition: all .15s; }
.quick-link:hover { border-color: var(--brand-200); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--brand-600); }
.quick-link .qi { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 90px; align-items: center; gap: 12px; padding: 8px 0; }
.bar { height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--brand-500), var(--aqua-500)); min-width: 6px; }
.pagination { display: flex; gap: 6px; justify-content: center; padding: 16px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 36px; height: 36px; display: grid; place-items: center; padding: 0 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 13px; }
.pagination .active { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.pagination .disabled { opacity: .45; }
.tree { list-style: none; margin: 0; padding: 0; }
.tree .tree { padding-inline-start: 22px; border-inline-start: 1px dashed var(--border-strong); margin-inline-start: 10px; }
.tree-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; }
.tree-row:hover { background: var(--surface-2); }
.section-title { font-size: 13px; font-weight: 800; color: var(--muted); margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }

/* ------------------------------------------------------------------ POS */
.pos-shell { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 16px; align-items: start; }
@media (max-width: 1180px) { .pos-shell { grid-template-columns: minmax(0, 1fr); } }
.pos-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; }
.pos-bar .meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--text-2); font-size: 13px; }
.pos-bar .meta b { color: var(--text); }
.shift-flag { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 99px; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.service-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 16px 10px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; transition: all .15s; font: inherit; color: var(--text); user-select: none;
}
.service-tile:hover { border-color: var(--brand-500); box-shadow: 0 8px 20px -10px rgba(59, 108, 246, .45); transform: translateY(-2px); }
.service-tile:active { transform: scale(.97); }
.service-tile .thumb { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-50), var(--aqua-100)); color: var(--brand-600); overflow: hidden; }
.service-tile .thumb img { width: 100%; height: 100%; object-fit: cover; }
.service-tile .name { font-weight: 600; font-size: 13.5px; line-height: 1.35; min-height: 36px; display: flex; align-items: center; }
.service-tile .price { font-weight: 800; color: var(--brand-600); }
.service-tile .qty-badge { position: absolute; top: 8px; inset-inline-end: 8px; }
.quick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-btn { padding: 8px 14px; border-radius: 10px; border: 1px dashed var(--brand-200); background: var(--brand-50); color: var(--brand-700); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; }
.quick-btn:hover { background: var(--brand-600); color: #fff; border-style: solid; }
.cart { position: sticky; top: 84px; display: flex; flex-direction: column; max-height: calc(100vh - 100px); }
.cart-lines { overflow-y: auto; flex: 1; min-height: 140px; }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden; }
.qty button { width: 28px; height: 30px; border: 0; background: var(--surface-2); cursor: pointer; font-size: 16px; color: var(--text-2); }
.qty button:hover { background: var(--brand-50); color: var(--brand-600); }
.qty input { width: 48px; height: 30px; border: 0; text-align: center; font: inherit; font-weight: 700; background: var(--surface); color: var(--text); }
.totals { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.totals .line { display: flex; justify-content: space-between; }
.grand { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; margin: 0 16px; border-radius: 14px; background: linear-gradient(135deg, var(--brand-600), #4f46e5); color: #fff; }
.grand .v { font-size: 26px; font-weight: 800; }
.pay-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; }
.shortcuts { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; padding: 10px; color: var(--muted); font-size: 12.5px; }
.shortcuts kbd { background: var(--text); color: var(--surface); margin-inline-end: 4px; }
.sub-card { border-radius: 12px; padding: 10px 12px; background: linear-gradient(135deg, var(--violet-bg), var(--brand-50)); border: 1px solid color-mix(in srgb, var(--violet) 25%, transparent); }

/* ------------------------------------------------------------------ scan station */
.scan-hero { padding: 26px; border-radius: 22px; color: #fff; background: radial-gradient(circle at 15% 20%, rgba(6, 182, 212, .55), transparent 45%), linear-gradient(135deg, #1e3a8a, #312e81); }
.scan-input { height: 64px; font-size: 22px; border-radius: 16px; text-align: center; letter-spacing: .08em; border: 0; }
.status-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.status-opt { --c: #64748b; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; border: 2px solid color-mix(in srgb, var(--c) 35%, transparent); background: color-mix(in srgb, var(--c) 10%, var(--surface)); color: var(--c); }
.status-opt.active { background: var(--c); color: #fff; border-color: var(--c); }
.piece-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.piece-card.hit { border-color: var(--brand-500); box-shadow: var(--ring); }
.flash-ok { animation: flash .8s ease; }
@keyframes flash { 0% { background: var(--success-bg); } 100% { background: var(--surface); } }

/* ------------------------------------------------------------------ auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(circle at 80% 10%, rgba(6, 182, 212, .6), transparent 40%), radial-gradient(circle at 10% 90%, rgba(99, 102, 241, .6), transparent 45%), linear-gradient(135deg, #1e3a8a, #0f172a); }
.auth-form { display: grid; place-items: center; padding: 32px; background: var(--surface); }
.bubble { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

@media print {
  .sidebar, .topbar, .footer, .no-print, .toasts { display: none !important; }
  .main { margin: 0 !important; }
  .content { padding: 0 !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ddd; }
}
