:root {
  --ink: #1c1917;
  --muted: #6f675f;
  --line: rgba(28, 25, 23, 0.08);
  --paper: #ffffff;
  --card: #ffffff;
  --sidebar: #171512;
  --accent: #e25b2a;
  --accent-dark: #c44718;
  --green: #1f8a5b;
  --blue: #2f6fdb;
  --red: #c93c3c;
  --amber: #b86e12;
  --shadow: 0 12px 32px rgba(28, 25, 23, 0.06);
  --radius: 18px;
  --font: Manrope, "Segoe UI", "Nirmala UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  letter-spacing: -0.011em;
}
button, input, select, textarea { font-family: inherit; }
a { color: var(--accent-dark); }

.app-shell { display: flex; min-height: 100vh; align-items: stretch; }
.app-sidebar {
  width: 280px;
  background: var(--sidebar);
  color: #d8d2cb;
  display: flex;
  flex-direction: column;
  --bs-offcanvas-width: 280px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 22px 18px 12px;
}
.brand-mark, .avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-weight: 800;
  flex: none;
}
.brand strong { display: block; color: white; font-size: 15px; line-height: 1.2; }
.brand small, .user-meta small { color: #a39c95; display: block; font-size: 12px; }
.side-scroll { overflow: auto; padding-bottom: 24px; flex: 1; }
.nav-label {
  margin: 18px 22px 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8d867e;
  font-weight: 800;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #d4cdc6;
  text-decoration: none;
  font-weight: 650;
  font-size: 14.5px;
}
.side-link i { width: 22px; font-size: 17px; color: #b7aea6; }
.side-link:hover { background: rgba(255,255,255,.05); color: white; }
.side-link.is-active { background: #2c221c; color: #ffe4d6; }
.side-link.is-active i { color: #ff8a55; }
.side-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.page-heading { min-width: 0; }
.page-heading h1 { font-size: 22px; margin: 0; font-weight: 800; letter-spacing: -0.03em; }
.page-heading p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: white;
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  box-shadow: var(--shadow);
}
.user-meta { text-align: left; }
.user-meta strong { display: block; font-size: 13px; }
.avatar.soft { width: 36px; height: 36px; border-radius: 50%; font-size: 13px; }
.app-content { padding: 22px; }
.icon-btn, .btn-ghost, .btn-accent, .btn-ink {
  border-radius: 12px;
  font-weight: 750;
}
.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}
.btn-accent {
  background: var(--accent);
  color: white;
  border: 0;
  padding: 10px 16px;
}
.btn-accent:hover, .btn-accent:focus { background: var(--accent-dark); color: white; }
.btn-ink { background: var(--ink); color: white; border: 0; padding: 10px 16px; }
.btn-ink:hover { background: #000; color: white; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 9px 14px;
}
.btn-ghost:hover { background: white; color: var(--ink); }
.row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; white-space: normal; }
.row-actions .bi { margin-right: 4px; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel-head, .panel-body { padding: 16px 18px; }
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.panel-head h2, .panel h2 { margin: 0; font-size: 16px; font-weight: 800; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.stat-grid, .card-grid { display: grid; gap: 14px; }
.stat-grid { grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; }
.stat-grid.dash-stats { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.stat, .mini-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.stat { display: flex; gap: 12px; align-items: center; }
.stat p, .mini-card p { margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.stat strong { display: block; font-size: 24px; letter-spacing: -0.04em; margin-top: 2px; }
.stat small { color: var(--muted); }
.stat-icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; font-size: 20px; flex: none;
}
.tone-orange { background: #fff1ea; color: var(--accent); }
.tone-green { background: #e9f8f1; color: var(--green); }
.tone-blue { background: #eaf1ff; color: var(--blue); }
.tone-amber { background: #fff6e8; color: var(--amber); }
.tone-red { background: #ffefef; color: var(--red); }
.split { display: grid; grid-template-columns: 1.4fr .8fr; gap: 16px; }
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.table { margin: 0; }
.table thead th {
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
  border-bottom-color: var(--line);
  white-space: nowrap;
}
.table td { vertical-align: middle; border-color: var(--line); }
.table tbody tr:hover { background: #fff8f4; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
}
.pill-green { background: #e7f7ef; color: #157a4b; }
.pill-blue { background: #e8f0ff; color: #245fc4; }
.pill-amber { background: #fff4df; color: #9a5b08; }
.pill-red { background: #ffecec; color: #b42323; }
.pill-slate { background: #f1eeea; color: #5e574f; }
.empty-state { text-align: center; padding: 42px 16px; color: var(--muted); }
.empty-state i { font-size: 36px; color: #c9bfb6; display: block; margin-bottom: 8px; }
.empty-state h3 { color: var(--ink); font-size: 18px; margin-bottom: 4px; }
.form-control, .form-select {
  border-radius: 12px;
  border-color: rgba(28,25,23,.12);
  min-height: 44px;
}
.form-control:focus, .form-select:focus {
  border-color: #f0b79a;
  box-shadow: 0 0 0 4px rgba(226, 91, 42, .12);
}
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters .form-control[type="date"] { width: 180px; max-width: 100%; flex: 0 0 auto; }
.board-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.board-toolbar .filters { margin: 0; }
.print-only { display: none !important; }
.chip-rail { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
  padding: 2px;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip-nav {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
}
.chip-nav:hover { border-color: #f0c2ae; color: var(--accent-dark); }
.chip {
  border: 1px solid var(--line);
  background: #f7f7f7;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 750;
  font-size: 13px;
  white-space: nowrap;
  color: var(--ink);
  flex: none;
}
.chip.is-on { background: var(--accent); color: white; border-color: var(--accent); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.product-tile {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px 12px 10px;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  box-shadow: 0 1px 0 rgba(28, 25, 23, .04);
}
.product-tile:hover { border-color: #f0c2ae; transform: translateY(-1px); }
.product-tile .meta b { color: var(--accent-dark); font-size: 15px; }
.product-tile.is-out { opacity: .55; }
.product-tile .cat { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.product-tile .name { font-weight: 800; line-height: 1.25; }
.product-tile .meta { margin-top: auto; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.product-tile .qty-dot {
  position: absolute; top: 8px; right: 8px;
  background: var(--accent); color: white; border-radius: 999px;
  min-width: 22px; height: 22px; display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.pos-layout, .kitchen-layout { display: grid; gap: 14px; min-height: calc(100vh - 130px); }
.page-pos { overflow: hidden; height: 100vh; }
.page-pos .app-shell, .page-pos .app-main { height: 100vh; overflow: hidden; }
.page-pos .app-content { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; padding: 12px 14px; }
.page-pos #posApp { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.page-pos .app-sidebar { display: none !important; }
.page-pos .app-main, .page-pos .app-content { background: #f6f3ef; }
.page-pos .pos-layout {
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 14px;
}
.pos-dock {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.qs-sale { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.qs-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.qs-head h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.qs-bar-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qs-bar-copy em { font-style: normal; font-size: 13px; font-weight: 800; color: #b6f3cf; letter-spacing: 0; text-transform: none; }
.book-page { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .8fr); gap: 16px; align-items: start; }
.book-find { position: relative; }
.book-find .book-search { padding-left: 38px; }
.book-find i { position: absolute; left: 12px; top: 11px; color: var(--muted); }
.book-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); max-height: 280px; overflow: auto;
}
.book-menu button, .book-empty { display: block; width: 100%; text-align: left; border: 0; background: #fff; padding: 10px 12px; }
.book-menu button strong, .book-menu button small, .book-line small, .book-line em { display: block; }
.book-menu button small, .book-line small, .book-line em { color: var(--muted); font-size: 12px; font-style: normal; }
.book-menu button:hover, .book-menu button:focus { background: #fff7f2; }
.book-lines { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.book-hold { border: 1px dashed #e4ddd6; border-radius: 14px; padding: 22px 14px; text-align: center; color: #8a8178; }
.book-line { display: grid; grid-template-columns: minmax(0, 1fr) 110px 36px; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: #fff; }
table .book-line { display: table-row; border: 0; border-radius: 0; padding: 0; background: transparent; gap: 0; }
.challan-sheet .line-qty { width: 96px; min-height: 40px; margin-left: auto; text-align: right; }
.challan-sheet .line-qty.is-over { border-color: #b42318; color: #b42318; }
.challan-sheet .book-hold td { text-align: center; color: #8a8178; padding: 22px 14px; }
.challan-sheet .book-remove { width: 36px; height: 36px; }
.book-line strong { display: block; }
.book-remove { border: 0; background: transparent; color: #c93c3c; font-size: 22px; line-height: 1; }
.book-incoming { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.book-card { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #fff; }
@media (max-width: 991.98px) { .book-page { grid-template-columns: 1fr; } }
.order-pick {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 8px;
}
.order-pick strong, .order-pick em, .order-pick span { display: block; }
.order-pick em { font-style: normal; color: #8a8178; font-size: 13px; margin-top: 2px; }
.order-pick span { color: #2a2623; font-size: 13px; margin-top: 6px; }
.order-pick:hover, .order-pick:focus { border-color: #f0b08a; background: #fff7f2; }
.qs-head p, .qs-note { margin: 2px 0 0; color: #8a8178; font-size: 13px; }
.qs-note { margin: 8px 0 10px; }
.qs-toolbar { display: flex; align-items: center; gap: 8px; margin-top: 12px; min-width: 0; }
.qs-pills { display: flex; gap: 6px; flex: none; }
.qs-pills .chip { border-radius: 8px; padding: 7px 12px; background: #fff; font-size: 13px; }
.qs-pills .chip.is-on { background: #e4573d; border-color: #e4573d; color: #fff; }
.qs-cat { width: 170px; flex: none; background: #fff; border-radius: 10px; }
.qs-search { flex: 1; min-width: 140px; margin: 0; }
.qs-search input { background: #fff; border-radius: 10px; }
.qs-sale .product-grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
  padding: 4px 2px 12px;
}
.qs-sale .product-tile {
  background: #fff;
  border: 1px solid #efe8e2;
  border-radius: 14px;
  min-height: 168px;
  padding: 14px 14px 12px;
  box-shadow: 0 1px 2px rgba(28, 25, 23, .04);
  align-items: flex-start;
  gap: 2px;
}
.qs-sale .product-tile:hover { border-color: #f0c2ae; transform: translateY(-1px); }
.qs-icon {
  width: 64px; height: 54px; margin: 0 auto 8px;
  display: grid; place-items: center;
  color: #c4b8ae; font-size: 28px;
}
.qs-sale .product-tile .name { font-size: 15px; font-weight: 800; }
.qs-sale .product-tile .cat { font-size: 12px; font-weight: 650; letter-spacing: 0; text-transform: none; color: #9a918a; }
.qs-sale .product-tile .price { margin-top: 6px; font-weight: 800; color: #2a2623; }
.qs-sale .product-tile .stock { font-size: 11px; color: #b0a79f; }
.qs-adjust {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(140px, 200px) 1fr;
  gap: 16px;
  align-items: end;
  padding: 10px 0 8px;
  border-top: 1px solid #eadfd6;
}
.qs-adjust .form-label { margin-bottom: 4px; color: #8a8178; font-size: 12px; }
.qs-discount { display: flex; gap: 8px; align-items: center; width: 100%; }
.qs-discount .type-toggle { flex: none; }
.qs-discount .type-toggle button { min-width: 78px; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.qs-discount .form-control {
  flex: 1;
  width: auto;
  min-width: 140px;
  max-width: none;
  height: 48px;
  background: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.03em;
}
.qs-vat-set {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.qs-vat-set strong { font-size: 22px; letter-spacing: -.03em; }
.qs-vat-set span { color: #8a8178; font-size: 12px; font-weight: 700; }
.qs-fig { color: #8a8178; }
.qs-fig b { color: #2a2623; }
.qs-count { justify-self: end; display: flex; gap: 16px; color: #8a8178; font-size: 13px; padding-bottom: 8px; }
.qs-count strong { color: #2a2623; font-size: 16px; margin-left: 4px; }
.qs-bars { display: grid; grid-template-columns: 1fr 1.15fr .8fr; gap: 10px; }
.qs-bar {
  border-radius: 8px;
  min-height: 64px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #fff;
}
.qs-bar span { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.qs-bar strong { font-size: 26px; letter-spacing: -.03em; white-space: nowrap; }
.qs-bar-sub { background: #1e3358; }
.qs-bar-grand { background: #161616; }
.qs-bar-grand strong { font-size: 30px; }
.qs-bar-due { background: #fff; color: #c93c3c; border: 1px solid #f0d0d0; }
.qs-bar-due strong { color: #c93c3c; }
.qs-cart {
  background: #fff;
  border: 1px solid #eadfd6;
  border-radius: 16px;
  overflow: hidden;
}
.qs-cart-head, .qs-customer, .qs-pay { padding: 14px 14px 0; flex: none; }
.qs-cart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.qs-cart-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.qs-cart-head p { margin: 2px 0 0; color: #8a8178; font-size: 12px; }
.table-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; background: #fff4ee; color: #c44718; border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 12px; font-weight: 800; }
.table-chip button { border: 0; background: transparent; color: #c44718; font-size: 16px; line-height: 1; padding: 0 6px; }
.table-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.table-pick button { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px; }
.table-pick button strong { display: block; }
.table-pick button span { color: var(--muted); font-size: 12px; }
.table-pick button.is-busy { background: #fff7f2; border-color: #f0b08a; }
.table-pick button.is-on { outline: 2px solid var(--ink); }
.qs-customer { padding-top: 12px; }
.qs-customer .form-label, .qs-pay-label { color: #8a8178; font-size: 13px; font-weight: 700; }
.qs-pay-label { margin-bottom: 8px; }
.qs-cart .cart-scroll { flex: 1; }
.cart-empty { color: #b0a79f; padding: 28px 8px; text-align: center; }
.qs-pay { padding: 12px 14px 14px; border-top: 1px solid #f0e8e2; display: flex; flex-direction: column; gap: 8px; }
.qs-pay-head { display: flex; justify-content: space-between; align-items: center; color: #8a8178; font-size: 13px; font-weight: 700; }
.pay-line { display: grid; grid-template-columns: minmax(0, 1fr) 96px 28px; gap: 6px; margin-bottom: 6px; }
.pay-line .pay-ref { grid-column: 1 / 3; }
.pay-line .form-select, .pay-line .form-control { font-size: 13px; min-height: 36px; }
.pay-remove { border: 0; background: transparent; color: #c93c3c; font-size: 20px; line-height: 1; padding: 0; }
.qs-collect { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.qs-paid { display: flex; flex-direction: column; gap: 2px; color: #8a8178; font-size: 13px; }
.qs-paid b { color: #2a2623; }
.qs-change, .qs-change b { color: #1f8a5b; }
.qs-due-num { text-align: right; }
.qs-due-num span { display: block; color: #c93c3c; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.qs-due-num strong { color: #c93c3c; font-size: 28px; letter-spacing: -.03em; }
.qs-pay-btn {
  background: #e14b43;
  color: #fff;
  border: 0;
  min-height: 48px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 16px;
}
.qs-pay-btn:hover, .qs-pay-btn:focus { background: #c93b34; color: #fff; }
.qs-clear { color: #8a8178; text-decoration: none; padding: 0; font-size: 13px; }
.qs-clear:hover { color: #c93c3c; }
.pos-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.pos-col .panel-head { padding: 12px 14px; flex: none; }
.pos-col-pad { padding: 12px 14px 0; flex: none; }
.quick-body { display: flex; flex: 1; min-height: 0; min-width: 0; }
.cat-rail {
  width: 156px;
  flex: none;
  overflow: auto;
  border-right: 1px solid var(--line);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fafafa;
  scrollbar-width: thin;
}
.cat-rail .chip {
  width: 100%;
  text-align: left;
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
}
.cat-rail .chip.is-on { background: var(--accent); color: #fff; border-color: var(--accent); }
.quick-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 12px 12px 0; }
.quick-main .scan-box { margin-bottom: 10px; }
.quick-main .product-grid { padding: 0 0 12px; }
.btn-charge {
  background: #1f8a5b;
  color: #fff;
  border: 0;
  min-height: 52px;
  font-size: 16px;
  border-radius: 12px;
  font-weight: 800;
}
.btn-charge:hover, .btn-charge:focus { background: #18764e; color: #fff; }
.pay-pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pay-pill { border-radius: 12px; min-height: 42px; }
.pay-pill.is-on { background: #1f8a5b; border-color: #1f8a5b; }
.kitchen-layout { grid-template-columns: 230px minmax(0, 1fr) 340px; }
.pos-catalog, .pos-cart, .table-col, .menu-col, .order-col {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 0;
}
.menu-col, .table-col { padding: 14px; overflow: auto; }
.pos-catalog .product-grid { flex: 1; min-height: 0; overflow: auto; align-content: start; padding: 12px 14px 14px; }
.pos-invoice .cart-scroll, .pay-scroll { flex: 1; min-height: 0; overflow: auto; }
.pay-scroll { padding: 12px 14px; }
.invoice-foot, .cart-foot { border-top: 1px solid var(--line); padding: 12px 14px; background: #fff; flex: none; }
.qty-pills { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.qty-pills div { background: #f7f7f7; border-radius: 12px; padding: 8px 10px; }
.qty-pills span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.qty-pills strong { font-size: 20px; letter-spacing: -.03em; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 18px; font-weight: 800; padding: 3px 0; }
.sum-row b, .sum-row strong { font-size: 22px; letter-spacing: -.03em; white-space: nowrap; }
.sum-sub, .sum-sub b { color: #171512; }
.sum-off { color: #1f8a5b; font-size: 16px; }
.sum-off b { font-size: 18px; }
.sum-vat { color: #b86e12; }
.sum-grand { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.sum-grand, .sum-grand strong { color: #1f8a5b; }
.sum-grand strong { font-size: 34px; }
.sum-due, .sum-due strong { color: #c93c3c; }
.sum-due strong { font-size: 28px; }
.type-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.type-toggle button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 800;
}
.type-toggle button.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.vat-row { display: grid; grid-template-columns: 1fr 88px auto; gap: 8px; align-items: center; }
.vat-check { display: flex; align-items: center; gap: 8px; font-weight: 800; margin: 0; }
.pay-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-pill {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 13px;
}
.pay-pill.is-on { background: #171512; color: #fff; border-color: #171512; }
.collect-box {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: #171512;
  color: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 10px;
}
.collect-box span { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #c8c1ba; }
.collect-box strong { font-size: 28px; letter-spacing: -.04em; color: #ffb088; }
.collect-hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.pos-cart, .order-col { display: flex; flex-direction: column; overflow: hidden; }
.cart-scroll { flex: 1; overflow: auto; padding: 12px 14px; }
.customer-box { position: relative; }
.pos-pay .customer-menu { position: static; margin-top: 6px; box-shadow: none; }
.customer-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow: auto;
}
.customer-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  padding: 8px 12px;
}
.customer-menu button:hover, .customer-menu button:focus { background: #f6f6f6; }
.customer-menu small { display: block; color: var(--muted); font-weight: 650; }
.kbd {
  display: inline-block;
  margin-left: 6px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 6px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1.6;
  font-weight: 800;
}
.cart-line, .exist-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: white; }
.stepper button { width: 32px; height: 32px; border: 0; background: transparent; font-weight: 800; }
.stepper input { width: 42px; border: 0; text-align: center; font-weight: 800; }
.bill-total { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0; }
.bill-total strong { font-size: 30px; letter-spacing: -.04em; }
.scan-box { position: relative; margin-bottom: 10px; }
.scan-box i { position: absolute; left: 14px; top: 13px; color: var(--muted); }
.scan-box input { padding-left: 40px; }
.table-card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: white;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 8px;
}
.table-card.is-busy { border-color: #f0b08a; background: #fff7f2; }
.table-card.is-on {
  border-color: #171512;
  background: #171512;
  color: #fff;
}
.table-card.is-on span { color: rgba(255, 255, 255, .72); }
.table-card strong { display: block; }
.table-card span { color: var(--muted); font-size: 12px; }
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ticket {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.ticket.is-late { border-color: #f0b4b4; }
.ticket-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.ticket ul { margin: 10px 0; padding-left: 18px; }
.col-head { font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.mobile-cart-bar {
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 40;
  background: var(--ink);
  color: white;
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 12px 30px rgba(0,0,0,.2);
}
.report-head { margin-bottom: 16px; }
.report-head h2 { margin: 0 0 4px; font-size: 22px; }
.report-head p { margin: 0; color: var(--muted); }
.pl-table td:first-child { font-weight: 700; }
.slip-preview {
  width: 280px;
  margin: 0 auto;
  background: white;
  color: black;
  border: 1px dashed #d9d0c8;
  padding: 14px;
  font-family: "Segoe UI", "Nirmala UI", sans-serif;
  font-size: 12px;
}
.slip-preview.slim { width: 210px; }
.slip-preview h3 { font-size: 16px; text-align: center; margin: 0; }
.slip-preview p { margin: 0; text-align: center; }
.slip-preview .slip-credit { margin-top: 4px; color: var(--muted); font-size: 11px; }
.reset-panel { border: 1px solid #f0c7bc; }
.reset-panel .panel-head h2 { color: #9f1d1d; }
.modal-content { border-radius: 18px; border: 0; }
.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #f4efe9;
  padding: 24px;
  overflow: hidden;
}
.auth-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.auth-glow span {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  animation: auth-drift 16s ease-in-out infinite;
}
.auth-glow span:nth-child(1) {
  width: 520px;
  height: 520px;
  left: -140px;
  top: -160px;
  background: radial-gradient(circle, rgba(226,91,42,.42), rgba(226,91,42,0) 68%);
}
.auth-glow span:nth-child(2) {
  width: 460px;
  height: 460px;
  right: -120px;
  bottom: -180px;
  background: radial-gradient(circle, rgba(226,140,70,.38), rgba(226,140,70,0) 70%);
  animation-duration: 20s;
  animation-delay: -7s;
}
.auth-glow span:nth-child(3) {
  width: 280px;
  height: 280px;
  left: 42%;
  top: 18%;
  background: radial-gradient(circle, rgba(47,111,219,.16), rgba(47,111,219,0) 70%);
  animation-duration: 14s;
  animation-delay: -4s;
}
@keyframes auth-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  40% { transform: translate3d(48px, 36px, 0) scale(1.08); }
  70% { transform: translate3d(-28px, 18px, 0) scale(.94); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-glow span { animation: none; }
}
.auth-card {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: white;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(28,25,23,.08);
}
.auth-aside {
  background: #171512;
  color: white;
  padding: 42px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 560px;
}
.auth-aside h2 { font-size: 40px; letter-spacing: -.04em; line-height: 1.05; margin: 18px 0 10px; }
.auth-aside p { color: #d5cdc5; }
.auth-form { padding: 42px 36px; }
.auth-form h1 { font-weight: 800; letter-spacing: -.03em; }
.cred-table { width: 100%; font-size: 14px; }
.cred-table td { padding: 6px 0; }
#toast-container { top: 18px; right: 18px; }
#toast-container > .toast {
  position: relative !important;
  display: block;
  width: 360px !important;
  max-width: calc(100vw - 28px);
  margin: 0 0 12px !important;
  padding: 15px 42px 18px 64px !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: #fff !important;
  background-image: none !important;
  color: #171512 !important;
  opacity: 1 !important;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(23, 21, 18, 0.16) !important;
}
#toast-container > .toast-success,
#toast-container > .toast-error,
#toast-container > .toast-warning,
#toast-container > .toast-info {
  background-color: #fff !important;
  background-image: none !important;
}
#toast-container > .toast::before,
#toast-container > .toast::after {
  content: "";
  position: absolute;
}
#toast-container > .toast::before {
  left: 14px;
  top: 50%;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  border-radius: 12px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
}
#toast-container > .toast::after {
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}
#toast-container > .toast-success::before {
  background-color: #e7f6ee;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f8a5b' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 9.2 17 19 7'/%3E%3C/svg%3E");
}
#toast-container > .toast-success::after { background: #1f8a5b; }
#toast-container > .toast-error::before {
  background-color: #ffefef;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c93c3c' stroke-width='2.8' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E");
}
#toast-container > .toast-error::after { background: #c93c3c; }
#toast-container > .toast-warning::before {
  background-color: #fff6df;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b8860b' stroke-width='2.8' stroke-linecap='round'%3E%3Cpath d='M12 8v5M12 16.5h.01'/%3E%3C/svg%3E");
}
#toast-container > .toast-warning::after { background: #e0a106; }
#toast-container > .toast-info::before {
  background-color: #eaf1ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f6fed' stroke-width='2.8' stroke-linecap='round'%3E%3Cpath d='M12 11v6M12 7.5h.01'/%3E%3C/svg%3E");
}
#toast-container > .toast-info::after { background: #2f6fed; }
#toast-container .toast-message,
#toast-container .toast-title {
  color: #171512;
  font-weight: 650;
  line-height: 1.35;
}
#toast-container .toast-message { font-size: 14.5px; }
#toast-container .toast-close-button {
  position: absolute;
  right: 12px;
  top: 10px;
  float: none;
  color: #8a8178;
  text-shadow: none;
  font-weight: 500;
  font-size: 18px;
  opacity: .8;
}
#toast-container .toast-close-button:hover { color: #171512; opacity: 1; }
#toast-container .toast-progress {
  position: absolute !important;
  left: 0 !important;
  right: 0;
  top: auto !important;
  bottom: 0 !important;
  height: 3px !important;
  margin: 0;
  opacity: 1;
}
#toast-container > .toast-success .toast-progress { background: #1f8a5b; }
#toast-container > .toast-error .toast-progress { background: #c93c3c; }
#toast-container > .toast-warning .toast-progress { background: #e0a106; }
#toast-container > .toast-info .toast-progress { background: #2f6fed; }
.swal2-popup { border-radius: 18px !important; font-family: var(--font); }
.swal2-confirm { background: var(--accent) !important; border-radius: 10px !important; }
.swal2-cancel { border-radius: 10px !important; }

@media (min-width: 992px) {
  .app-sidebar.offcanvas-lg {
    position: sticky;
    top: 0;
    transform: none !important;
    visibility: visible !important;
    height: 100vh !important;
    width: 280px !important;
    flex: 0 0 280px;
    background: var(--sidebar) !important;
    border: 0;
  }
  .mobile-cart-bar, .mobile-only { display: none !important; }
}
@media (max-width: 1199px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .kitchen-layout { grid-template-columns: 200px minmax(0,1fr) 300px; }
}
@media (max-width: 991.98px) {
  .page-pos { overflow: auto; }
  .page-pos .app-shell, .page-pos .app-main { height: auto; overflow: visible; }
  .page-pos .app-content { display: block; overflow: visible; }
  .app-content { padding: 16px 14px 92px; }
  .pos-layout, .kitchen-layout, .split, .split-2, .auth-card { grid-template-columns: 1fr; }
  .page-pos { overflow: auto; height: auto; }
  .page-pos .app-shell, .page-pos .app-main { height: auto; overflow: visible; }
  .page-pos .app-content { display: block; overflow: visible; }
  .pos-dock {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: min(88vh, 720px);
    z-index: 1045;
    display: flex;
    flex-direction: column;
    overflow: auto;
    background: #fff;
    border-radius: 22px 22px 0 0;
    transform: translateY(110%);
    transition: transform .2s ease;
    box-shadow: 0 -12px 40px rgba(0,0,0,.12);
  }
  .pos-dock.is-open { transform: none; }
  .pos-invoice, .pos-pay { min-height: 320px; border: 0; box-shadow: none; border-radius: 0; }
  .qs-toolbar { flex-wrap: wrap; }
  .qs-search { flex: 1 1 180px; }
  .qs-adjust, .qs-bars { grid-template-columns: 1fr; }
  .qs-count { justify-self: start; }
  .qs-sale .product-grid { min-height: 420px; }
  .quick-body { flex-direction: column; }
  .cat-rail { width: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .cat-rail .chip { width: auto; }
  .auth-aside { min-height: 0; }
  .order-col {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: min(86vh, 680px);
    z-index: 1045;
    border-radius: 22px 22px 0 0;
    transform: translateY(110%);
    transition: transform .2s ease;
  }
  .order-col.is-open { transform: none; }
  .kitchen-layout:not(.is-ordering) .menu-col,
  .kitchen-layout:not(.is-ordering) .order-col { display: none; }
  .kitchen-layout.is-ordering .table-col { display: none; }
  .kanban { grid-template-columns: 1fr; }
  .page-heading h1 { font-size: 18px; }
  .user-meta { display: none; }
}
.auth-credit { margin: 22px 0 0; color: #8a8178; font-size: 12px; letter-spacing: .02em; }
.sub-note { margin: 0 0 16px; padding: 10px 14px; border-radius: 12px; background: #fff6e8; color: #8a4b08; border: 1px solid #f0d7b0; }
.sheet-table { border-collapse: collapse; }
.sheet-table th, .sheet-table td { border-bottom: 1px solid #ece7e1; vertical-align: middle; }
.sheet-table thead th { background: #171512; color: #fff; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.sheet-table tfoot th { background: #f7f4ef; }
.sheet-table .is-short { color: #b42318; font-weight: 700; }
.sheet-table .is-met { color: #067647; font-weight: 700; }
#demandFormModal .modal-dialog { max-width: 760px; }
#demandFormModal .book-lines { max-height: 280px; overflow: auto; }
#demandModal .modal-dialog { max-width: 920px; }
#demandModal .modal-header { align-items: center; gap: 12px; }
#demandModal .modal-title { font-weight: 800; }
#demandModal .modal-body { background: #f7f4ef; padding: 16px; }
.demand-doc { background: #fff; border: 1px solid #ece7e1; border-radius: 16px; padding: 16px 16px 8px; }
.demand-doc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.demand-doc-top h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.demand-kicker { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.demand-code { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.demand-code svg { max-width: 240px; height: 58px; }
.demand-scan { position: relative; }
.demand-scan i { position: absolute; left: 12px; top: 12px; color: var(--muted); pointer-events: none; }
.demand-scan input { width: 240px; max-width: 100%; padding-left: 36px; }
tr.is-found td { background: #fff1ea; }
.demand-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.demand-meta div { background: #f7f4ef; border-radius: 12px; padding: 10px 12px; }
.demand-meta span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.demand-meta strong { display: block; margin-top: 3px; }
.demand-note { margin: 0 0 14px; color: #8a4b08; }
.demand-grid { width: 100%; border-collapse: collapse; }
.demand-grid th, .demand-grid td { border: 1px solid #e4ddd4; padding: 8px 10px; vertical-align: middle; }
.demand-grid thead th { background: #171512; color: #fff; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; border-color: #171512; }
.demand-grid tfoot th { background: #f7f4ef; font-size: 13px; }
.demand-grid .idx { width: 42px; text-align: center; color: #8a8178; }
.demand-grid thead .idx, .demand-grid tfoot .idx { color: inherit; }
.demand-grid .sku { color: #8a8178; font-size: 12px; margin-top: 2px; }
.demand-grid .empty { text-align: center; color: #8a8178; padding: 22px 10px; }
.demand-grid .st { text-align: center; white-space: nowrap; font-weight: 700; }
.demand-grid .is-short { color: #b42318; font-weight: 700; }
.demand-grid .is-partial { color: #9a5b00; font-weight: 700; }
.demand-grid .is-met { color: #067647; font-weight: 700; }
.demand-print { background: #fff; }
.demand-print .print-wrap { max-width: 900px; margin: 0 auto; padding: 32px 28px 48px; }
.demand-print .letterhead { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; border-bottom: 2px solid #171512; padding-bottom: 12px; margin-bottom: 18px; }
.demand-print .letterhead h1 { margin: 0; font-size: 26px; letter-spacing: -0.03em; }
.demand-print .letterhead p { margin: 4px 0 0; color: #6f675f; }
.demand-print .letterhead .doc-kind { text-align: right; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.demand-print .demand-doc { border: 0; border-radius: 0; padding: 0; }
.demand-print .signs { display: flex; justify-content: space-between; gap: 24px; margin-top: 48px; }
.demand-print .signs div { width: 30%; border-top: 1px solid #222; padding-top: 6px; font-size: 12px; }
.demand-print .print-foot { margin-top: 18px; color: #8a8178; font-size: 12px; }
@media (max-width: 640px) { .demand-meta { grid-template-columns: 1fr; } }
.line-note:empty { display: none; }
.line-note { display: block; color: #8a4b08; }

@media print {
  .no-print, .app-sidebar, .app-topbar, .mobile-cart-bar { display: none !important; }
  .print-only { display: block !important; }
  body, .app-shell, .app-main, .app-content { background: white !important; padding: 0 !important; display: block !important; }
  .panel, .stat, .mini-card { box-shadow: none; }
  .sheet-table thead th, .sheet-table tfoot th, .demand-grid thead th, .demand-grid tfoot th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .demand-print .print-wrap { padding: 0; }
  .app-content { padding: 0 !important; }
  a { color: black; text-decoration: none; }
}
