/* =====================================================================
   Baqala POS - design system
   Same tokens as the Qualorax console: navy sidebar, teal accent,
   Inter, 12px cards, uppercase table headers, soft shadows.
   ===================================================================== */

@font-face {
  font-family: "Inter Variable";
  src: url("../fonts/inter-latin.woff2") format("woff2-variations"), url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy-900: #081527;
  --navy-800: #0B1F3A;
  --navy-700: #132C4F;
  --teal-600: #0F9E92;
  --teal-500: #1EBEB0;
  --teal-50: #F0FDFA;
  --teal-ring: rgba(30, 190, 176, 0.28);

  --ink: #0F172A;
  --ink-2: #334155;
  --ink-soft: #64748B;
  --ink-faint: #94A3B8;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --canvas: #F4F6F9;

  --green: #15803D; --green-bg: #F0FDF4; --green-ring: #BBF7D0;
  --amber: #B45309; --amber-bg: #FFFBEB; --amber-ring: #FDE68A;
  --red: #B91C1C;   --red-bg: #FEF2F2;   --red-ring: #FECACA;
  --blue: #1D4ED8;  --blue-bg: #EFF6FF;  --blue-ring: #BFDBFE;

  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 12px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.04);
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --sidebar-w: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Inter Variable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01", "tnum";
}
::selection { background: rgba(30, 190, 176, 0.22); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { letter-spacing: -0.015em; margin: 0; }
a { color: var(--teal-600); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
strong { font-weight: 600; }
.ic { flex-shrink: 0; vertical-align: middle; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

/* ---------- Shell -------------------------------------------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%);
  display: flex; flex-direction: column; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 18px 18px 16px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(30,190,176,0.14); color: var(--teal-500); box-shadow: inset 0 0 0 1px rgba(30,190,176,0.3); flex-shrink: 0;
}
.brand-name { font-weight: 600; font-size: 14px; color: #fff; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 12px; color: rgba(226,232,240,0.55); }
.nav { flex: 1; overflow-y: auto; padding: 10px 10px 14px; scrollbar-color: rgba(255,255,255,0.14) transparent; }
.nav-group { font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(226,232,240,0.38); padding: 14px 10px 6px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; margin-bottom: 2px;
  border-radius: 7px; color: rgba(226,232,240,0.72); font-size: 13.5px; font-weight: 450;
  transition: background-color .12s var(--ease), color .12s var(--ease);
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; }
.nav-item.is-active { background: rgba(30,190,176,0.14); color: #fff; font-weight: 600; }
.nav-item.is-active .ic { color: var(--teal-500); }
.nav-item.is-active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--teal-500); }
.nav-item .count { margin-left: auto; font-size: 11px; font-weight: 600; background: rgba(239,68,68,0.18); color: #FCA5A5; border-radius: 999px; padding: 0 7px; }
.sidebar-foot { padding: 12px 18px 16px; border-top: 1px solid rgba(255,255,255,0.07); font-size: 11.5px; color: rgba(226,232,240,0.45); line-height: 1.5; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 32px; background: rgba(255,255,255,0.92); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--line);
}
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-soft); min-width: 0; }
.crumbs a { color: var(--ink-soft); }
.crumbs .current { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs .ic { color: var(--ink-faint); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--navy-800); color: #fff; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.who { display: flex; flex-direction: column; line-height: 1.2; }
.who b { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.who span { font-size: 11.5px; color: var(--ink-soft); text-transform: capitalize; }
.content { flex: 1; min-width: 0; padding: 28px 32px 56px; }
.menu-toggle { display: none; }
.scrim { display: none; }

/* ---------- Page header --------------------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.page-sub { color: var(--ink-soft); font-size: 13.5px; margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Buttons ------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; user-select: none;
  padding: 8px 14px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500; line-height: 1.25; cursor: pointer;
  border: 1px solid transparent; text-decoration: none !important;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), filter .15s var(--ease), transform .08s var(--ease);
}
.btn:active:not(:disabled) { transform: translateY(0.5px); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-primary { background: var(--navy-800); color: #fff; border-color: var(--navy-800); box-shadow: 0 1px 2px rgba(11,31,58,.18), inset 0 1px 0 rgba(255,255,255,.07); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.18) saturate(1.05); box-shadow: 0 2px 6px rgba(11,31,58,.22); }
.btn-teal { background: var(--teal-500); color: #fff; border-color: var(--teal-600); box-shadow: 0 1px 2px rgba(15,158,146,.25); }
.btn-teal:hover:not(:disabled) { background: var(--teal-600); }
.btn-secondary { background: var(--surface); color: var(--ink-2); border-color: var(--line); box-shadow: var(--shadow-xs); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); border-color: var(--line-strong); }
.btn-danger { background: var(--surface); color: var(--red); border-color: var(--red-ring); }
.btn-danger:hover:not(:disabled) { background: var(--red-bg); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover:not(:disabled) { background: #EEF2F6; color: var(--ink); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { padding: 12px 18px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }
.icon-btn { width: 30px; height: 30px; padding: 0; border: 1px solid transparent; background: transparent; border-radius: 7px; cursor: pointer; color: var(--ink-soft); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: #EEF2F6; color: var(--ink); }
.icon-btn.is-danger:hover { background: var(--red-bg); color: var(--red); }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--teal-600); font-weight: 500; }
.link-btn:hover { text-decoration: underline; }
form.inline { display: inline; }

/* ---------- Forms --------------------------------------------------- */
.field { margin-bottom: 14px; }
.field label, .label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.hint { font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; margin-top: 5px; }
.input, .select, .textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: 13.5px; line-height: 1.4;
  background: var(--surface); box-shadow: var(--shadow-xs); min-height: 36px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.input::placeholder { color: var(--ink-faint); }
.input:hover:not(:focus), .select:hover:not(:focus) { border-color: #B6C2D1; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--teal-500); box-shadow: 0 0 0 3px var(--teal-ring); }
.select {
  appearance: none; padding-right: 34px; cursor: pointer;
  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='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.input-lg { min-height: 46px; font-size: 16px; padding: 10px 14px; border-radius: 10px; }
.input-group { position: relative; }
.input-group .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); pointer-events: none; }
.input-group .input { padding-left: 34px; }
.input-group.lg .ic { left: 14px; }
.input-group.lg .input { padding-left: 42px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--teal-600); }
.grid { display: grid; gap: 14px; }
.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)); }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filters .input, .filters .select { width: auto; min-width: 160px; }
.filters .grow { flex: 1; min-width: 220px; }

/* ---------- Cards & stats ------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.stack > * + * { margin-top: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { padding: 16px 18px; }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }
.stat-label .chip-ic { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; background: var(--teal-50); color: var(--teal-600); }
.stat-value { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; margin-top: 10px; }
.stat-foot { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cols-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Tables -------------------------------------------------- */
.table-wrap { overflow: auto; max-width: 100%; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th {
  position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--ink-soft); font-size: 11px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; text-align: left; white-space: nowrap; padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #F8FAFC; }
.table th:first-child, .table td:first-child { padding-left: 18px; }
.table th:last-child, .table td:last-child { padding-right: 18px; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; width: 1%; }
.table .muted, .muted { color: var(--ink-soft); }
.table .strong { font-weight: 600; }
.table .id { font-weight: 600; color: var(--navy-800); white-space: nowrap; }
.table tfoot td { background: var(--surface-2); font-weight: 600; border-top: 1px solid var(--line); }
.table-compact td { padding: 7px 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.empty { padding: 36px 20px; text-align: center; color: var(--ink-soft); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.pager-info { margin-right: auto; color: var(--ink-soft); font-size: 12.5px; }

/* ---------- Badges, banners ---------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; border-radius: 999px; padding: 2px 9px; white-space: nowrap; border: 1px solid; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-green { background: var(--green-bg); color: var(--green); border-color: var(--green-ring); }
.badge-amber { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-ring); }
.badge-red { background: var(--red-bg); color: var(--red); border-color: var(--red-ring); }
.badge-blue { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-ring); }
.badge-teal { background: var(--teal-50); color: #0F766E; border-color: #99F6E4; }
.badge-gray { background: #F1F5F9; color: #475569; border-color: var(--line); }
.cat-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 7px; vertical-align: 0; }
.banner { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid; font-size: 13.5px; margin-bottom: 14px; animation: slide-down .2s var(--ease); }
.banner-success { background: var(--green-bg); color: var(--green); border-color: var(--green-ring); }
.banner-error { background: var(--red-bg); color: var(--red); border-color: var(--red-ring); }
.banner-warning { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-ring); }
.banner-info { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-ring); }
.banner .close { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .6; padding: 0; }
@keyframes slide-down { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; }
.toast { background: var(--navy-800); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: pop-in .2s var(--ease); max-width: 360px; }
.toast.is-error { background: #7F1D1D; }

/* ---------- Modal --------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(15,23,42,.5); animation: fade-in .16s var(--ease); }
.modal.is-open { display: flex; }
.modal-panel { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); animation: pop-in .2s var(--ease); }
.modal-panel.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; font-weight: 600; }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 14px 14px; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- Auth ---------------------------------------------------- */
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1fr) minmax(480px, 1.1fr); background: #fff; }
.auth-aside { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 48px 64px 96px; color: #fff; background: linear-gradient(160deg, var(--navy-800) 0%, var(--navy-900) 100%); }
.auth-aside::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); pointer-events: none; }
.auth-aside::after { content: ""; position: absolute; width: 520px; height: 520px; right: -180px; bottom: -200px; background: radial-gradient(circle, rgba(30,190,176,.22) 0%, transparent 65%); pointer-events: none; }
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside h1 { font-size: 34px; line-height: 1.15; letter-spacing: -0.025em; font-weight: 650; margin: 28px 0 14px; max-width: 480px; }
.auth-aside .lead { font-size: 15.5px; line-height: 1.6; color: rgba(226,232,240,.72); margin: 0 0 32px; max-width: 460px; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.auth-points li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: rgba(226,232,240,.9); }
.auth-points .pic { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.06); color: var(--teal-500); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.auth-mark { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(30,190,176,.14); color: var(--teal-500); box-shadow: inset 0 0 0 1px rgba(30,190,176,.3); }
.auth-foot { position: absolute !important; left: 64px; bottom: 44px; font-size: 12.5px; color: rgba(226,232,240,.45); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: #fff; }
.auth-card { width: 100%; max-width: 400px; animation: pop-in .35s var(--ease); }
.auth-title { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; margin: 0 0 6px; }
.auth-sub { color: var(--ink-soft); font-size: 14px; margin: 0 0 24px; line-height: 1.55; }

/* ---------- POS ----------------------------------------------------- */
body.is-pos .content { padding: 0; }
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 420px; height: calc(100vh - 60px); }
.pos-left { display: flex; flex-direction: column; min-width: 0; padding: 18px 20px 0; overflow: hidden; }
.pos-scan { display: flex; gap: 8px; align-items: stretch; position: relative; }
.pos-scan .input-group { flex: 1; }
.pos-results { position: absolute; top: 52px; left: 0; right: 0; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 360px; overflow: auto; display: none; }
.pos-results.is-open { display: block; }
.pos-result { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.pos-result:last-child { border-bottom: 0; }
.pos-result:hover, .pos-result.is-active { background: var(--teal-50); }
.pos-result .r-name { font-weight: 500; }
.pos-result .r-meta { font-size: 12px; color: var(--ink-soft); }
.pos-result .r-price { margin-left: auto; font-weight: 600; white-space: nowrap; }
.cat-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 14px 0 10px; flex-shrink: 0; }
.cat-tab { flex-shrink: 0; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.cat-tab:hover { border-color: var(--line-strong); }
.cat-tab.is-active { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.cat-tab .cat-dot { margin: 0; }
.tiles { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; padding-bottom: 20px; }
.tile { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 104px; position: relative; transition: border-color .12s var(--ease), box-shadow .12s var(--ease), transform .08s var(--ease); }
.tile:hover { border-color: var(--teal-500); box-shadow: 0 0 0 3px var(--teal-ring); }
.tile:active { transform: scale(.98); }
.tile .t-bar { position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; }
.tile .t-name { font-weight: 550; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .t-price { margin-top: auto; font-weight: 650; font-size: 15px; }
.tile .t-stock { font-size: 11.5px; color: var(--ink-soft); }
.tile .t-stock.low { color: var(--red); font-weight: 500; }

.pos-right { background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.cart-head h3 { font-size: 15px; font-weight: 600; }
.cart-customer { padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cart-items { flex: 1; overflow-y: auto; }
.cart-empty { padding: 48px 24px; text-align: center; color: var(--ink-soft); }
.cart-empty .ic { color: var(--ink-faint); margin-bottom: 10px; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.cart-line.flash { animation: line-flash .6s var(--ease); }
@keyframes line-flash { from { background: var(--teal-50); } to { background: #fff; } }
.cl-name { font-weight: 500; font-size: 13.5px; line-height: 1.3; }
.cl-total { font-weight: 600; text-align: right; white-space: nowrap; }
.cl-meta { font-size: 12px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.cl-controls { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.qty-box { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.qty-box button { width: 28px; height: 28px; border: 0; background: var(--surface-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); }
.qty-box button:hover { background: #EEF2F6; }
.qty-box input { width: 52px; height: 28px; border: 0; text-align: center; font-weight: 600; font-size: 13px; -moz-appearance: textfield; }
.qty-box input::-webkit-inner-spin-button { -webkit-appearance: none; }
.price-edit { width: 74px; height: 26px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 6px; font-size: 12px; text-align: right; }
.cart-summary { border-top: 1px solid var(--line); padding: 14px 18px; background: var(--surface-2); }
.sum-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); padding: 3px 0; }
.sum-row.total { font-size: 22px; font-weight: 700; color: var(--ink); padding-top: 10px; margin-top: 6px; border-top: 1px dashed var(--line-strong); letter-spacing: -0.02em; }
.disc-row { display: flex; gap: 6px; align-items: center; margin: 8px 0 2px; }
.disc-row .input { min-height: 32px; padding: 5px 9px; }
.disc-row .select { min-height: 32px; padding: 5px 30px 5px 9px; width: 86px; }
.cart-actions { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; margin-top: 12px; }
.pay-btn { font-size: 16px; font-weight: 600; padding: 13px 16px; border-radius: 10px; }
.kbd { font-size: 10.5px; font-weight: 600; border: 1px solid rgba(255,255,255,.35); border-radius: 4px; padding: 0 4px; opacity: .8; }
.btn-secondary .kbd { border-color: var(--line-strong); color: var(--ink-soft); }

.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.pay-method { border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 8px; background: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 500; font-size: 13.5px; color: var(--ink-2); }
.pay-method:hover { border-color: var(--line-strong); }
.pay-method.is-active { border-color: var(--teal-500); background: var(--teal-50); color: #0F766E; box-shadow: 0 0 0 3px var(--teal-ring); }
.pay-total { text-align: center; padding: 6px 0 16px; }
.pay-total .lbl { font-size: 12.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.pay-total .amt { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; }
.quick-cash { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.quick-cash button { flex: 1; min-width: 56px; }
.change-box { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--green-bg); border: 1px solid var(--green-ring); color: var(--green); display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.change-box.is-short { background: var(--red-bg); border-color: var(--red-ring); color: var(--red); }
.change-box .amt { font-size: 22px; }
.cust-results { border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; max-height: 180px; overflow: auto; display: none; }
.cust-results.is-open { display: block; }
.cust-results div { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 13px; display: flex; justify-content: space-between; }
.cust-results div:hover { background: var(--teal-50); }

.scanner-box { width: 100%; border-radius: 12px; overflow: hidden; background: #000; min-height: 240px; }
.scanner-box video { width: 100% !important; display: block; }

/* ---------- Charts -------------------------------------------------- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding: 10px 0 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bar { width: 100%; max-width: 34px; border-radius: 5px 5px 2px 2px; background: var(--teal-500); min-height: 2px; position: relative; }
.bar.is-today { background: var(--navy-800); }
.bar-col:hover .bar { filter: brightness(1.1); }
.bar-tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--navy-800); color: #fff; font-size: 11.5px; padding: 3px 7px; border-radius: 5px; white-space: nowrap; display: none; z-index: 2; }
.bar-col:hover .bar-tip { display: block; }
.bar-lbl { font-size: 11px; color: var(--ink-faint); white-space: nowrap; }
.meter { height: 6px; background: #EEF2F6; border-radius: 999px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--teal-500); border-radius: 999px; }

/* ---------- Misc ---------------------------------------------------- */
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; font-weight: 500; }
.text-right { text-align: right; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-amber { color: var(--amber); }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mb-0 { margin-bottom: 0; } .mb-16 { margin-bottom: 16px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hidden { display: none !important; }
.swatch-input { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; cursor: pointer; }
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 28px; text-align: center; background: var(--surface-2); }
.label-preview { display: flex; flex-wrap: wrap; gap: 10px; }

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

/* ---------- Responsive ---------------------------------------------- */
@media (max-width: 1180px) {
  .pos { grid-template-columns: minmax(0, 1fr) 360px; }
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s var(--ease); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 35; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px 48px; }
  .who { display: none; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-even { grid-template-columns: 1fr; }
  .pos { grid-template-columns: 1fr; height: auto; }
  .pos-left { padding: 14px 16px 0; }
  .tiles { max-height: 46vh; }
  .pos-right { border-left: 0; border-top: 1px solid var(--line); }
  .cart-items { max-height: none; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page-title { font-size: 19px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar .new-sale-label { display: none; }
}

@media print {
  .sidebar, .topbar, .page-actions, .filters, .no-print, .pager { display: none !important; }
  .content { padding: 0; }
  .card { box-shadow: none; }
  body { background: #fff; }
}
/* POS: product tiles aur category buttons band; sirf scan / search se items add honge */
.cat-tabs, .tiles { display: none !important; }
