/* =========================================================
   Servora RMS — Restaurant Management Frontend
   Original design • warm terracotta + cream palette
   ========================================================= */

:root {
  --bg:           #f4f4f4;
  --surface:      #ffffff;
  --surface-2:    #f8f8f8;
  --sidebar:      #18161300;
  --sidebar-bg:   #000000;
  --sidebar-bg-2: #221e19;
  --sidebar-fg:   #d9d2c5;
  --sidebar-mute: #8a8275;
  --sidebar-hi:   #ffffff;
  --line:         #e8e8e8;
  --line-2:       #e2dccf;
  --text:         #1f1c18;
  --text-2:       #5b554c;
  --text-3:       #948d7f;

  --primary:      #e74c3c;
  --primary-2:    #c0392b;
  --primary-soft: #fbeae3;
  --gold:         #b88a3a;
  --gold-soft:    #f6ecd6;
  --green:        #3f8a5a;
  --green-soft:   #e2efe6;
  --red:          #c0392b;
  --red-soft:     #fbe5e1;
  --blue:         #355a8a;
  --blue-soft:    #e5ecf5;

  --radius:       12px;
  --radius-sm:    8px;
  --shadow-sm:    0 1px 2px rgba(31,28,24,.04), 0 1px 1px rgba(31,28,24,.02);
  --shadow:       0 4px 14px rgba(31,28,24,.06), 0 1px 2px rgba(31,28,24,.04);
  --shadow-lg:    0 20px 50px rgba(31,28,24,.15);
  --font:         'Inter', system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono:         'JetBrains Mono', ui-monospace, "SFMono-Regular", Menlo, monospace;
}

[data-theme="dark"] {
  --bg:           #0f0d0b;
  --surface:      #1a1714;
  --surface-2:    #221e1a;
  --line:         #2a251f;
  --line-2:       #342e26;
  --text:         #f4efe5;
  --text-2:       #b6ad9e;
  --text-3:       #807868;
  --primary-soft: #3a2018;
  --gold-soft:    #3a2d15;
  --green-soft:   #1a2e22;
  --red-soft:     #3a1c18;
  --blue-soft:    #1c2533;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.45;
}

.mono {  font-variant-numeric: tabular-nums; }

/* ============ LAYOUT ============ */
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}
.app.sidebar-collapsed { grid-template-columns: 72px 1fr; }

/* ============ SIDEBAR ============ */
.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
  padding: 18px 14px 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid #0e0c0a;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #2a251e; border-radius: 4px; }

.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 14px;
  border-bottom: 1px solid #2a251e;
}
.brand-mark {
  width: 60px;
  border-radius: 10px;
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -.02em;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.18);
}
.brand-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--sidebar-hi);
  letter-spacing: -.01em;
}
.brand-sub {
  font-size: 11px;
  color: var(--sidebar-mute);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar-collapsed .brand-text,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .nav-section-title,
.sidebar-collapsed .sidebar-foot-text { display: none; }
.sidebar-collapsed .nav-item { justify-content: center; padding-left: 0; padding-right: 0; }

.nav-section-title {
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sidebar-mute);
  padding: 8px 10px 6px;
  font-weight: 600;
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  color: var(--sidebar-fg);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
  position: relative;
  white-space: nowrap;
}
.nav-item .bi { font-size: 16px; width: 18px; text-align: center; opacity: .85; }
.nav-item:hover { background: #25201a; color: var(--sidebar-hi); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(184,84,60,.22), rgba(184,84,60,.06));
  color: #fff;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -14px; top: 8px; bottom: 8px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.nav-item .pill {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #2a251e;
  display: flex; align-items: center; gap: 10px;
  color: var(--sidebar-mute);
  font-size: 12px;
}
.sidebar-foot .dot { width: 8px; height: 8px; border-radius: 50%; background: #3f8a5a; box-shadow: 0 0 0 3px rgba(63,138,90,.18); }

/* ============ MAIN / TOPBAR ============ */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface-2);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 12px 24px;
  display: flex; align-items: center; gap: 14px;
}
.topbar .tb-title { font-weight: 600; font-size: 16px; color: var(--text); }
.topbar .tb-crumb { font-size: 12px; color: var(--text-3); }
.topbar .tb-search {
  flex: 1; max-width: 420px; margin: 0 8px;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text-2);
}
.topbar .tb-search input {
  border: 0; background: transparent; outline: none; flex: 1;
  font-size: 13px; color: var(--text);
}
.topbar .tb-search kbd {
  font-family: var(--font);
  font-size: 10.5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-3);
  padding: 2px 6px;
  border-radius: 5px;
}
.tb-icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-2);
  cursor: pointer;
  position: relative;
  transition: background .15s, color .15s;
}
.tb-icon-btn:hover { background: var(--surface-2); color: var(--text); }
.tb-icon-btn .badge-dot {
  position: absolute; top: 6px; right: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--surface);
}
.tb-user {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 4px 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.tb-user .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #c0533a, #e0805a);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 12px;
}
.tb-user .name { font-weight: 600; font-size: 13px; }
.tb-user .role { font-size: 11px; color: var(--text-3); }

.mobile-toggle { display: none; }

/* ============ CONTENT ============ */
.content { padding: 24px; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 20px;
}
.page-head h1 { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.page-head p  { color: var(--text-2); margin: 4px 0 0; font-size: 13px; }
.page-actions { display: flex; gap: 8px; align-items: center; }

/* ============ CARDS / SURFACE ============ */
.card-s {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-s.no-border { border: 0; }
.card-s .card-s-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-s .card-s-head h3 { font-size: 14px; font-weight: 600; margin: 0; }
.card-s .card-s-head .sub { font-size: 12px; color: var(--text-3); }
.card-s .card-s-body { padding: 18px; }

/* ============ STAT CARDS ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
@media (max-width: 1280px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

.stat {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.stat .stat-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 16px;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 12px;
}
.stat.v-gold .stat-icon { background: var(--gold-soft); color: var(--gold); }
.stat.v-green .stat-icon { background: var(--green-soft); color: var(--green); }
.stat.v-blue .stat-icon { background: var(--blue-soft); color: var(--blue); }
.stat.v-red .stat-icon { background: var(--red-soft); color: var(--red); }
.stat.v-mute .stat-icon { background: var(--surface-2); color: var(--text-2); }
.stat .stat-label { font-size: 12px; color: var(--text-2); letter-spacing: .02em; }
.stat .stat-value { font-size: 22px; font-weight: 700; margin-top: 2px; letter-spacing: -.01em; }
.stat .stat-trend { font-size: 11.5px; margin-top: 6px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.stat .stat-trend.up { color: var(--green); }
.stat .stat-trend.down { color: var(--red); }

/* ============ TABLES ============ */
.t-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.t-table th, .t-table td {
  padding: 12px 14px;
  font-size: 13px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
.t-table th {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  background: var(--surface-2);
}
.t-table tbody tr:hover td { background: var(--surface-2); }
.t-table tbody tr:last-child td { border-bottom: 0; }
.t-table .num {  font-variant-numeric: tabular-nums; }
.t-table tfoot td {
  background: var(--surface-2);
  font-weight: 700;
  border-top: 1px solid var(--line-2);
  border-bottom: 0;
}

/* ============ BADGES / CHIPS ============ */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--line);
}
.chip .ind { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.success { background: var(--green-soft); color: var(--green); border-color: transparent; }
.chip.warn    { background: var(--gold-soft);  color: var(--gold);  border-color: transparent; }
.chip.danger  { background: var(--red-soft);   color: var(--red);   border-color: transparent; }
.chip.info    { background: var(--blue-soft);  color: var(--blue);  border-color: transparent; }
.chip.primary { background: var(--primary-soft); color: var(--primary); border-color: transparent; }

/* ============ BUTTONS ============ */
.btn-s {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 600; font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, transform .05s, border-color .15s;
}
.btn-s:hover,
.btn-s:focus {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}
.btn-s:active { transform: translateY(1px); }
.btn-s.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-s.primary:hover,
.btn-s.primary:focus { background: var(--primary-2); color: #fff; }
.btn-s.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-s.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-s.danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-s.success { background: var(--green); color: #fff; border-color: var(--green); }
.btn-s.dark { background: #1b1814; color: #fff; border-color: #1b1814; }
.btn-s:disabled,
.btn-s.disabled {
  opacity: .58;
  cursor: not-allowed;
}
.btn-s.sm { padding: 6px 10px; font-size: 12.5px; border-radius: 7px; }
.btn-s.lg { padding: 12px 18px; font-size: 14px; }
.btn-s.block { width: 100%; justify-content: center; }
.icon-btn {
  width: 30px; height: 30px;
  display: inline-grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text-2);
  border-radius: 7px;
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { color: var(--red); border-color: var(--red); }

/* ============ FORMS ============ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 11.5px; color: var(--text-3); }
.input-s, .select-s, .textarea-s {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  font-family: inherit; font-size: 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input-s:focus, .select-s:focus, .textarea-s:focus {
  border-color: var(--primary);
}
.textarea-s { min-height: 76px; resize: vertical; }
.field-row { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.field-row-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.field-row .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .field-row, .field-row-3 { grid-template-columns: 1fr; } }

.switch {
  --w: 38px; --h: 22px;
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
}
.switch input { display: none; }
.switch .track {
  width: var(--w); height: var(--h);
  background: var(--line-2); border-radius: 999px;
  position: relative; transition: background .15s;
}
.switch .track::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: calc(var(--h) - 4px); height: calc(var(--h) - 4px);
  background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
  transition: transform .15s;
}
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(calc(var(--w) - var(--h))); }

/* ============ DASHBOARD ============ */
.dash-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }

.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 200px; padding: 12px 0 6px; }
.bar-chart .bar {
  flex: 1; background: linear-gradient(180deg, var(--primary), #d77056);
  border-radius: 6px 6px 2px 2px;
  position: relative;
  transition: transform .2s ease;
  min-width: 0;
  cursor: pointer;
}
.bar-chart .bar.alt { background: linear-gradient(180deg, var(--gold), #d6a85a); }
.bar-chart .bar:hover { transform: translateY(-2px); }
.bar-chart .bar .v {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: var(--text-2); white-space: nowrap;
}
.bar-chart-x { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0 0; }
.bar-chart-x span { flex: 1; text-align: center; font-size: 11px; color: var(--text-3); }

.donut { width: 160px; height: 160px; position: relative; margin: 0 auto; }
.donut svg { transform: rotate(-90deg); }
.donut .center {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center;
}
.donut .center .lbl { font-size: 11px; color: var(--text-3); }
.donut .center .val { font-size: 18px; font-weight: 700; }
.legend { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.legend .li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; }

.popular-food {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.popular-food:last-child { border-bottom: 0; }
.popular-food .ph { width: 44px; height: 44px; border-radius: 8px; }
.popular-food .meta { flex: 1; min-width: 0; }
.popular-food .meta .n { font-weight: 600; font-size: 13.5px; }
.popular-food .meta .s { font-size: 11.5px; color: var(--text-3); }
.popular-food .qty { font-weight: 700; color: var(--primary);  }
.dashboard-popular-stat {
  font-size: 18px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-sales-chart .bar .v {
  display: none;
}
.dashboard-status-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dashboard-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.dashboard-lower-grid {
  align-items: start;
}
.dashboard-recent-table th,
.dashboard-recent-table td {
  padding: 10px 12px;
}
.dashboard-food-ph {
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
}
.dashboard-compact-empty {
  padding: 30px 12px;
}
.dashboard-actions-card {
  margin-top: 16px;
}

.quick-actions { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.quick-actions .qa {
  padding: 14px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.quick-actions .qa:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.quick-actions .qa .bi { font-size: 18px; display: block; margin-bottom: 6px; }
.quick-actions .qa .l { font-size: 12px; font-weight: 600; }
@media (max-width: 720px) { .quick-actions { grid-template-columns: repeat(2,1fr); } }

/* ============ POS ============ */
.pos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 16px;
  height: calc(100vh - 130px);
  min-height: 600px;
}
@media (max-width: 1200px) { .pos { grid-template-columns: 1fr; height: auto; } }

.pos-left { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.pos-right { display: flex; flex-direction: column; gap: 12px; min-height: 0; }

.tabs {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  gap: 2px;
}
.tabs .tab {
  padding: 7px 14px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-2);
}
.tabs .tab.active { background: var(--primary); color: #fff; }
.tabs .tab:not(.active):hover { background: var(--surface-2); color: var(--text); }

.cat-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.cat-chips::-webkit-scrollbar { height: 4px; }
.cat-chips .cat {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s;
}
.cat-chips .cat:hover { color: var(--text); }
.cat-chips .cat.active {
  background: var(--text); color: #fff; border-color: var(--text);
}
.cat-chips .cat .count {
  font-size: 11px;
  background: rgba(255,255,255,.18);
  padding: 1px 6px; border-radius: 6px;
}
.cat-chips .cat:not(.active) .count {
  background: var(--surface-2); color: var(--text-3);
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
  flex: 1;
  min-height: 240px;
}
.food-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  transition: all .15s;
  position: relative;
  display: flex; flex-direction: column;
  align-self: start;
  min-height: 178px;
}
.food-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.food-card .img-ph {
  aspect-ratio: 4/3;
  border-radius: 8px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}
.food-card .img-ph .tag {
  position: absolute; top: 6px; left: 6px;
  font-size: 10px; font-weight: 600;
  background: rgba(0,0,0,.7); color: #fff;
  padding: 2px 7px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: .05em;
}
.food-card .img-ph .var-badge {
  position: absolute; top: 6px; right: 6px;
  font-size: 9.5px; font-weight: 700;
  background: var(--gold); color: #fff;
  padding: 2px 6px; border-radius: 4px;
  text-transform: uppercase;
}
.food-card .n { font-weight: 600; font-size: 13.5px; line-height: 1.2; }
.food-card .p {
  margin-top: 4px;
  
  color: var(--primary);
  font-weight: 700;
  font-size: 13.5px;
}
.food-card .cat-tag {
  font-size: 10.5px; color: var(--text-3);
  margin-top: 2px; text-transform: uppercase; letter-spacing: .04em;
}

/* Photo placeholders — soft food-tone gradients with diagonal stripe */
.ph-stripe {
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,.18) 0 10px, transparent 10px 20px),
    var(--ph-c, linear-gradient(135deg, #d8a373, #b66e3d));
}
.ph-1 { --ph-c: linear-gradient(135deg, #e0a877, #b8693a); }
.ph-2 { --ph-c: linear-gradient(135deg, #c9b079, #8a7438); }
.ph-3 { --ph-c: linear-gradient(135deg, #a6b886, #5d7a3c); }
.ph-4 { --ph-c: linear-gradient(135deg, #d28c8c, #93423f); }
.ph-5 { --ph-c: linear-gradient(135deg, #c8a1c0, #7d4b76); }
.ph-6 { --ph-c: linear-gradient(135deg, #8eb6c5, #3d6478); }
.ph-7 { --ph-c: linear-gradient(135deg, #d8c69e, #9a7f48); }
.ph-8 { --ph-c: linear-gradient(135deg, #c79085, #82473b); }

/* ============ CART ============ */
.cart {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  height: 100%;
  overflow: hidden;
}
.cart-head { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cart-head h3 { font-size: 14px; font-weight: 700; margin: 0; }
.cart-head .meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.cart-body {
  flex: 1; overflow-y: auto;
  padding: 6px 8px;
}
.cart-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 18px;
  color: var(--text-3);
}
.cart-empty .bi { font-size: 36px; opacity: .35; margin-bottom: 8px; }

.cart-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 12px 14px 4px;
  border-bottom: 1px dashed var(--line);
}
.cart-meta-grid .field { gap: 4px; }
.cart-meta-grid .field label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
.cart-meta-grid .input-s, .cart-meta-grid .select-s { padding: 7px 10px; font-size: 12.5px; }
.cart-meta-grid .full { grid-column: 1 / -1; }

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 8px;
  padding: 10px 12px;
  border-bottom: 1px dashed var(--line);
}
.cart-item:last-child { border-bottom: 0; }
.cart-item .n { font-weight: 600; font-size: 13px; }
.cart-item .var { font-size: 11px; color: var(--text-3); }
.cart-item .right { text-align: right; }
.cart-item .row2 {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}
.qty-stepper {
  display: inline-flex; align-items: center;
  background: var(--surface-2);
  border-radius: 7px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.qty-stepper button {
  width: 26px; height: 26px;
  border: 0; background: transparent; cursor: pointer;
  color: var(--text-2); font-size: 14px;
}
.qty-stepper button:hover { background: var(--surface); color: var(--primary); }
.qty-stepper .q { min-width: 22px; text-align: center; font-weight: 700; font-size: 13px;  }
.cart-item .ln-tot {  font-weight: 700; color: var(--text); }

.cart-foot {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.tot-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 0;
  font-size: 12.5px;
  color: var(--text-2);
}
.tot-row .v {  }
.tot-row.inline-input { padding: 0; }
.tot-row.inline-input .v { display: flex; align-items: center; gap: 6px; }
.tot-row.inline-input input {
  width: 70px; padding: 4px 7px; text-align: right;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface);
   font-size: 12px; color: var(--text);
}
.grand {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0 4px;
  border-top: 1px dashed var(--line-2);
  margin-top: 6px;
  font-weight: 700;
  font-size: 17px;
}
.grand .v {  color: var(--primary); }
.cart-cta { display: grid; grid-template-columns: auto 1fr 1fr; gap: 8px; margin-top: 10px; }
@media (max-width: 1200px) { .cart-cta { grid-template-columns: 1fr 1fr 1fr; } }

/* ============ ONGOING CARDS ============ */
.ongoing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.ongoing-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
}
.ongoing-card .o-head { display: flex; align-items: center; justify-content: space-between; }
.ongoing-card .o-table {
  font-weight: 700; font-size: 16px; letter-spacing: -.01em;
}
.ongoing-card .o-table .sub { font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.ongoing-card .o-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px;
  font-size: 12px;
}
.ongoing-card .o-meta .l { color: var(--text-3); }
.ongoing-card .o-amt {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.ongoing-card .o-amt .v { font-weight: 700;  font-size: 16px; color: var(--primary); }
.ongoing-card .o-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ============ MODALS (Bootstrap overrides) ============ */
.modal-dialog {
  max-height: calc(100vh - (var(--bs-modal-margin) * 2));
  max-height: calc(100dvh - (var(--bs-modal-margin) * 2));
}
.modal-content {
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - (var(--bs-modal-margin) * 2));
  max-height: calc(100dvh - (var(--bs-modal-margin) * 2));
  overflow: hidden;
}
.modal-content > form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
  margin: 0;
  overflow: hidden;
}
.modal-header {
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
  flex: 0 0 auto;
}
.modal-title { font-size: 15px; font-weight: 700; }
.modal-body {
  padding: 18px 20px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.modal-footer {
  border-top: 1px solid var(--line);
  padding: 12px 18px;
  gap: 8px;
  flex: 0 0 auto;
  background: var(--surface);
}

/* ============ RECEIPT / KOT / INVOICE ============ */
.receipt {
  background: #fff;
  color: #181613;
  
  padding: 18px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  width: 320px;
  margin: 0 auto;
  border: 1px dashed #ccc;
}
.receipt h4 {
  text-align: center; margin: 0 0 4px;
  font-size: 16px; font-weight: 700;
  font-family: var(--font);
  letter-spacing: -.01em;
}
.receipt .center { text-align: center; }
.receipt .hr { border-top: 1px dashed #555; margin: 8px 0; }
.receipt .row-r { display: flex; justify-content: space-between; gap: 8px; }
.receipt .row-r .l { color: #555; }
.receipt table { width: 100%; border-collapse: collapse; margin: 4px 0; }
.receipt table th, .receipt table td {
  padding: 3px 0; font-size: 11.5px; text-align: left;
}
.receipt table th {
  border-bottom: 1px dashed #888;
  color: #444; text-transform: uppercase;
  font-weight: 600;
  font-size: 10.5px;
}
.receipt table td.num, .receipt table th.num { text-align: right; }
.receipt .grand-r {
  font-weight: 700; font-size: 14px;
  display: flex; justify-content: space-between;
  border-top: 2px solid #333; padding-top: 6px; margin-top: 6px;
}
.receipt .thanks { text-align: center; margin-top: 10px; font-style: italic; }
.kot { width: 280px; }
.kot h4 { text-transform: uppercase; }
.kot .stamp {
  display: inline-block;
  border: 2px solid #c0533a; color: #c0533a;
  padding: 2px 8px; border-radius: 6px;
  font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .1em;
  margin: 0 auto;
}

/* ============ POS Calculator Pad ============ */
.calc-pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.calc-pad button {
  padding: 10px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-weight: 600; font-size: 14px;
  cursor: pointer;
  
  transition: all .1s;
}
.calc-pad button:hover { background: var(--surface-2); }
.calc-pad button.op { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.calc-pad button.op:hover { background: var(--primary); color: #fff; }

/* ============ ROLES & PERMISSIONS ============ */
.perm-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(6, auto);
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  font-size: 12.5px;
}
.perm-grid .h, .perm-grid .c {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.perm-grid .h {
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  background: var(--surface-2);
  text-align: center;
}
.perm-grid .h.l { text-align: left; }
.perm-grid .c { display: flex; align-items: center; justify-content: center; }
.perm-grid .c.l { justify-content: flex-start; font-weight: 600; }
.perm-grid .row:nth-child(even) .c { background: var(--surface-2); }

.checkbox-s {
  --sz: 18px;
  width: var(--sz); height: var(--sz);
  border: 1.5px solid var(--line-2);
  border-radius: 5px;
  cursor: pointer;
  display: grid; place-items: center;
  background: var(--surface);
  transition: all .15s;
}
.checkbox-s:hover { border-color: var(--primary); }
.checkbox-s.checked {
  background: var(--primary); border-color: var(--primary);
  color: #fff;
}
.checkbox-s.checked::after {
  content: ""; width: 9px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

/* ============ EMPTY STATE ============ */
.empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-3);
}
.empty .bi { font-size: 42px; margin-bottom: 10px; opacity: .4; }
.empty h4 { font-size: 15px; color: var(--text-2); margin: 0 0 4px; }
.empty p { font-size: 13px; margin: 0; }

/* ============ MISC ============ */
.sep { height: 1px; background: var(--line); margin: 16px 0; }
.muted { color: var(--text-3); }
.row-flex { display: flex; align-items: center; gap: 10px; }
.row-flex.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

.hidden { display: none !important; }

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; width: 260px;
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 100;
  }
  .app.sidebar-open .sidebar { transform: translateX(0); }
  .mobile-toggle { display: grid; }
  .topbar .tb-title { display: none; }
  .topbar .tb-search { max-width: none; }
}

@media (max-width: 600px) {
  .topbar { padding: 10px 14px; }
  .content { padding: 16px; }
  .topbar .tb-search kbd, .topbar .tb-search input::placeholder { display: none; }
}

/* ============ PRINT ============ */
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .modal-header, .modal-footer, .no-print { display: none !important; }
  .modal, .modal-dialog, .modal-content {
    position: static !important;
    box-shadow: none !important;
    border: 0 !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    transform: none !important;
    display: block !important;
    opacity: 1 !important;
    overflow: visible !important;
  }
  .modal-content > form {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .modal-body { padding: 0 !important; overflow: visible !important; }
  .receipt { width: 100% !important; max-width: 320px; margin: 0 auto; border: 0; }
  .content {
    padding: 0 !important;
  }
  .report-print-area {
    color: #000;
  }
  .report-print-head {
    margin-bottom: 10px;
    border-bottom: 1px solid #000;
    padding-bottom: 8px;
  }
  .report-print-head p,
  .report-print-brand,
  .report-print-brand span {
    color: #333 !important;
  }
  .report-stats {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }
  .report-stats .stat {
    box-shadow: none !important;
    border-color: #999 !important;
    break-inside: avoid;
  }
  .report-table-card {
    border: 0 !important;
    box-shadow: none !important;
  }
  .report-table th,
  .report-table td {
    color: #000 !important;
    background: #fff !important;
    border-bottom-color: #bbb !important;
    padding: 6px 5px !important;
    font-size: 11px !important;
  }
  .modal-backdrop { display: none !important; }
}

/* ============ LARAVEL ADMIN BASE ============ */
.brand,
.page-head h1,
.brand-mark {
  letter-spacing: 0;
}

.nav-item.disabled {
  opacity: .48;
  cursor: not-allowed;
  pointer-events: none;
}

.sidebar-backdrop {
  display: none;
  border: 0;
  background: rgba(15,13,11,.42);
  position: fixed;
  inset: 0;
  z-index: 90;
}

.quick-actions.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.quick-actions .qa {
  color: inherit;
}

.quick-actions button.qa {
  appearance: none;
}

.quick-actions .qa:disabled {
  opacity: .72;
  cursor: not-allowed;
}

.input-s.is-invalid {
  border-color: var(--red);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 460px);
  background:
    radial-gradient(circle at 20% 20%, rgba(184,84,60,.12), transparent 28%),
    var(--bg);
}

.auth-panel {
  padding: clamp(28px, 5vw, 72px);
  background: 
    linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
    url('/images/auth-bg.jpg') center/cover no-repeat;
  color: var(--sidebar-fg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
}

.auth-brand {
  border-bottom: 1px solid #2a251e;
  padding-left: 0;
}

.auth-copy {
  max-width: 620px;
}

.auth-copy h1 {
  color: #fff;
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  margin: 18px 0 14px;
  letter-spacing: 0;
}

.auth-copy p {
  color: var(--sidebar-fg);
  font-size: 16px;
  max-width: 520px;
  margin: 0;
}

.auth-card {
  align-self: center;
  justify-self: center;
  width: min(100% - 32px, 420px);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
}

.checkline input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

@media (max-width: 960px) {
  .app.sidebar-open .sidebar-backdrop { display: block; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-panel {
    min-height: auto;
    gap: 48px;
  }
  .auth-card {
    margin: 32px 0;
  }
}

@media (max-width: 600px) {
  .auth-copy h1 { font-size: 30px; }
  .auth-panel { padding: 24px; }
  .quick-actions.two-col { grid-template-columns: 1fr; }
}

/* ============ ROLES INDEX ============ */
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.role-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.role-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.role-card-head .role-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.01em;
}
.role-card-head .role-meta {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}
.role-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.role-form-top {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 16px;
  margin-bottom: 18px;
}
@media (max-width: 640px) {
  .role-form-top { grid-template-columns: 1fr; }
}

.perm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.switch .switch-label {
  color: var(--text-2);
}

.perm-check {
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  margin: 0;
}
.perm-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.perm-check input:checked + .checkbox-s {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.perm-check input:checked + .checkbox-s::after {
  content: ""; width: 9px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.perm-na {
  color: var(--text-3);
  
  font-size: 14px;
  user-select: none;
}

.perm-grid .h {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.perm-grid .h.l { align-items: flex-start; }

/* ============ ADMIN USERS ============ */
.user-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}
.user-filter-card {
  color: inherit;
  text-decoration: none;
}
.user-filter-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(184,84,60,.12);
}
.user-list-card {
  overflow: hidden;
}
.user-list-head {
  align-items: center;
}
.user-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.user-search {
  min-width: min(320px, 100%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text-2);
}
.user-search input {
  border: 0;
  background: transparent;
  outline: none;
  min-width: 0;
  width: 240px;
  color: var(--text);
  font-size: 13px;
}
.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid var(--line);
}
.user-avatar.fallback,
.user-image-preview {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #d97056);
  color: #fff;
  font-weight: 700;
}
.pagination-wrap {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}
.pagination-wrap nav {
  margin: 0;
}
.user-form-grid {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  align-items: start;
}
.user-image-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.user-image-preview {
  width: 132px;
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1px solid var(--line);
  background-size: cover;
  background-position: center;
  font-size: 32px;
}
.user-image-preview.has-image span {
  display: none;
}
.user-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.user-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 2px;
}
.btn-s:disabled {
  opacity: .56;
  cursor: not-allowed;
}
@media (max-width: 900px) {
  .user-stats { grid-template-columns: 1fr; }
  .user-list-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .user-filters {
    width: 100%;
    justify-content: flex-start;
  }
  .user-search,
  .user-search input {
    width: 100%;
  }
}
@media (max-width: 720px) {
  .user-form-grid { grid-template-columns: 1fr; }
  .user-image-preview {
    width: 96px;
    font-size: 24px;
  }
}

/* ============ SETTINGS ============ */
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.brand-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.settings-upload {
  width: 100%;
  aspect-ratio: 3 / 1;
  border-radius: 8px;
  border: 1px dashed var(--line-2);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 700;
  color: var(--text-3);
  background: var(--surface-2);
}
.settings-upload.dark {
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
}
.settings-upload.light {
  background: #fff;
}
.settings-upload.favicon {
  width: 88px;
  aspect-ratio: 1;
  background: var(--primary-soft);
  color: var(--primary);
}
.settings-upload img {
  max-height: 100px;
  max-width: 100%;
  object-fit: cover;
}
.brand-logo-mark {
  padding: 5px;
}
.brand-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (max-width: 900px) {
  .brand-upload-grid { grid-template-columns: 1fr; }
  .settings-upload { max-width: 360px; }
}

/* ============ REUSABLE IMAGE UPLOAD ============ */
.image-upload-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.image-upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.image-upload-drop {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  border: 1.5px dashed var(--line-2, #d8d2c5);
  border-radius: 12px;
  background: var(--surface-2, #faf7f1);
  color: var(--text-3, #7a6f5e);
  padding: 18px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.image-upload-drop:hover {
  border-color: var(--primary, #b8543c);
  color: var(--primary, #b8543c);
  background: var(--primary-soft, #fdeee9);
}
.image-upload-drop:focus-within {
  outline: none;
  border-color: var(--primary, #b8543c);
  box-shadow: 0 0 0 3px rgba(184, 84, 60, .18);
}
.image-upload-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
}
.image-upload-input:disabled { cursor: not-allowed; }

.image-upload-preview {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: transparent;
}
.image-upload-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.image-upload-placeholder {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
  padding: 6px 10px;
}
.image-upload-placeholder i {
  font-size: 28px;
  line-height: 1;
}
.image-upload-cta {
  font-weight: 600;
  font-size: 13px;
  color: inherit;
}
.image-upload-help {
  font-size: 11.5px;
  color: var(--text-3, #7a6f5e);
}

.image-upload-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(31, 28, 24, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}
.image-upload-overlay i { font-size: 22px; }

.image-upload[data-image-upload-state="existing"] .image-upload-placeholder,
.image-upload[data-image-upload-state="selected"] .image-upload-placeholder {
  display: none;
}
.image-upload[data-image-upload-state="existing"] .image-upload-drop:hover .image-upload-overlay,
.image-upload[data-image-upload-state="selected"] .image-upload-drop:hover .image-upload-overlay {
  opacity: 1;
}

.image-upload.is-dragging .image-upload-drop {
  border-style: solid;
  border-color: var(--primary, #b8543c);
  background: var(--primary-soft, #fdeee9);
  color: var(--primary, #b8543c);
}
.image-upload.is-invalid .image-upload-drop,
.image-upload.has-error .image-upload-drop {
  border-color: #c0392b;
  background: rgba(192, 57, 43, .06);
  color: #a93222;
}

.image-upload-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
}
.image-upload-filename {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1 1 auto;
}
.image-upload-clear {
  border: 0;
  background: transparent;
  color: #c0392b;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
}
.image-upload-clear:hover { background: rgba(192, 57, 43, .08); }

/* Size variants */
.image-upload-wide .image-upload-drop {
  aspect-ratio: 3 / 1;
  min-height: 120px;
}
.image-upload-square .image-upload-drop {
  aspect-ratio: 1 / 1;
  max-width: 220px;
  min-height: 160px;
}
.image-upload-favicon .image-upload-drop {
  width: 120px;
  aspect-ratio: 1 / 1;
  padding: 10px;
  min-height: 0;
}
.image-upload-favicon .image-upload-placeholder i { font-size: 22px; }
.image-upload-favicon .image-upload-cta { font-size: 11px; }
.image-upload-favicon .image-upload-help { display: none; }

@media (max-width: 720px) {
  .image-upload-square .image-upload-drop { max-width: 100%; }
}

/* ============ PAYMENT METHODS ============ */
.compact-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}
.method-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}
.method-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  flex: 0 0 auto;
}
@media (max-width: 900px) {
  .compact-stats { grid-template-columns: 1fr; }
}

/* ============ FLOOR & TABLE SETUP ============ */
.floor-icon {
  background: var(--blue-soft);
  color: var(--blue);
}
.table-icon {
  background: var(--gold-soft);
  color: var(--gold);
}
.kitchen-icon {
  background: var(--red-soft);
  color: var(--red);
}
.variant-icon {
  background: var(--blue-soft);
  color: var(--blue);
}
.category-icon {
  background: var(--gold-soft);
  color: var(--gold);
}
.food-thumb {
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
}
.food-thumb i {
  font-size: 18px;
}
.food-preview {
  background: linear-gradient(135deg, var(--primary), #d36c52);
  color: #fff;
  font-size: 28px;
}
.food-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.food-variant-list {
  margin-top: 12px;
}

/* ============ POS ============ */
[v-cloak] { display: none !important; }

.pos-app .tabs {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  gap: 2px;
}
.pos-app .tabs .tab {
  padding: 7px 14px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pos-app .tabs .tab.active { background: var(--primary); color: #fff; }
.pos-app .tabs .tab:not(.active):hover { background: var(--surface-2); color: var(--text); }

.pos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 18px;
  height: calc(100vh - 200px);
  min-height: 600px;
}
@media (max-width: 1200px) {
  .pos { grid-template-columns: 1fr; height: auto; gap: 14px; }
}
.pos-left, .pos-right { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.pos-search {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pos-search .input-s { border: 0; padding: 6px 0; background: transparent; flex: 1; }

.cat-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.cat-chips::-webkit-scrollbar { height: 4px; }
.cat-chips .cat {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s;
}
.cat-chips .cat:hover { color: var(--text); }
.cat-chips .cat.active { background: var(--text); color: #fff; border-color: var(--text); }
.cat-chips .cat .count {
  font-size: 11px;
  background: rgba(255,255,255,.18);
  padding: 1px 6px;
  border-radius: 6px;
}
.cat-chips .cat:not(.active) .count { background: var(--surface-2); color: var(--text-3); }
[data-theme="dark"] .cat-chips .cat.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
[data-theme="dark"] .cat-chips .cat.active .count {
  background: rgba(255,255,255,.18);
  color: #fff;
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
  flex: 1;
  min-height: 240px;
}
.food-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  transition: all .15s;
  position: relative;
  display: flex; flex-direction: column;
  align-self: start;
  height: 100%;
  min-height: 178px;
}
.food-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.food-card .img-ph {
  aspect-ratio: 4/3;
  border-radius: 8px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}
.food-card .img-ph .var-badge {
  position: absolute; top: 6px; right: 6px;
  font-size: 9.5px; font-weight: 700;
  background: var(--gold); color: #fff;
  padding: 2px 6px; border-radius: 4px;
  text-transform: uppercase;
}
.food-card .n {
  font-weight: 600; font-size: 13.5px; line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}
.food-card .p {
  margin-top: auto;
  padding-top: 4px;
  
  color: var(--primary);
  font-weight: 700;
  font-size: 13.5px;
}
.food-card .p .from-tag { font-size: 11px; font-weight: 400; }
.food-card .cat-tag {
  font-size: 10.5px; color: var(--text-3);
  margin-top: 2px; text-transform: uppercase; letter-spacing: .04em;
}

.ph-stripe {
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,.18) 0 10px, transparent 10px 20px),
    var(--ph-c, linear-gradient(135deg, #d8a373, #b66e3d));
  background-size: auto, cover;
}
.ph-1 { --ph-c: linear-gradient(135deg, #e0a877, #b8693a); }
.ph-2 { --ph-c: linear-gradient(135deg, #c9b079, #8a7438); }
.ph-3 { --ph-c: linear-gradient(135deg, #a6b886, #5d7a3c); }
.ph-4 { --ph-c: linear-gradient(135deg, #d28c8c, #93423f); }
.ph-5 { --ph-c: linear-gradient(135deg, #c8a1c0, #7d4b76); }
.ph-6 { --ph-c: linear-gradient(135deg, #8eb6c5, #3d6478); }
.ph-7 { --ph-c: linear-gradient(135deg, #d8c69e, #9a7f48); }
.ph-8 { --ph-c: linear-gradient(135deg, #c79085, #82473b); }

.pos-empty { padding: 40px 18px; }

/* Cart */
.cart {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  height: 100%;
  overflow: hidden;
}
.cart-head { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cart-head h3 { font-size: 14px; font-weight: 700; margin: 0; }
.cart-head .meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.cart-body { flex: 1; overflow-y: auto; padding: 6px 8px; }
.cart-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  padding: 40px 18px; color: var(--text-3);
}
.cart-empty .bi { font-size: 36px; opacity: .35; margin-bottom: 8px; }

.cart-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 12px 14px 4px;
  border-bottom: 1px dashed var(--line);
}
.cart-meta-grid .field { gap: 4px; display: flex; flex-direction: column; }
.cart-meta-grid .field label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.cart-meta-grid .input-s { padding: 7px 10px; font-size: 12.5px; }
.cart-meta-grid .full { grid-column: 1 / -1; }

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 8px;
  padding: 10px 12px;
  border-bottom: 1px dashed var(--line);
}
.cart-item:last-child { border-bottom: 0; }
.cart-item .n { font-weight: 600; font-size: 13px; }
.cart-item .var { font-size: 11px; color: var(--text-3); }
.cart-item .right { text-align: right; }
.cart-item .row2 {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}
.qty-stepper {
  display: inline-flex; align-items: center;
  background: var(--surface-2);
  border-radius: 7px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.qty-stepper button {
  width: 26px; height: 26px;
  border: 0; background: transparent; cursor: pointer;
  color: var(--text-2); font-size: 14px;
}
.qty-stepper button:hover { background: var(--surface); color: var(--primary); }
.qty-stepper .q { min-width: 22px; text-align: center; font-weight: 700; font-size: 13px;  }
.cart-item .ln-tot {  font-weight: 700; color: var(--text); }

.cart-foot {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.cart-foot .totals {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tot-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
  font-size: 12.5px;
  color: var(--text-2);
}
.tot-row .lbl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  white-space: nowrap;
}
.tot-row .v {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  
}
.tot-row .v.mono,
.tot-row .v .amt {
  
}
.tot-row .v .amt {
  min-width: 78px;
  text-align: right;
  color: var(--text);
  font-weight: 600;
}
.tot-row .tot-input {
  width: 86px;
  padding: 5px 8px;
  text-align: right;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  
  font-size: 12px;
  color: var(--text);
}
.tot-row .tot-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0,0,0,.04);
}
.tot-row .type-select {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 11px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.tot-row .vat-input {
  width: 56px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  
  font-size: 12px;
  text-align: right;
  background: var(--surface);
  color: var(--text);
}
.tot-row .vat-input:focus,
.tot-row .type-select:focus {
  outline: none;
  border-color: var(--primary);
}
/* Legacy `.tot-row.inline-input` kept neutral so older usages still align */
.tot-row.inline-input { padding: 2px 0; }
.tot-row.inline-input .v { display: flex; align-items: center; gap: 6px; }
.grand {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px;
  border-radius: 10px;
  margin-top: 8px;
  background: linear-gradient(135deg, rgba(0,0,0,.03), rgba(0,0,0,.01));
  border: 1px dashed var(--line-2);
  font-weight: 700;
  font-size: 17px;
}
.grand .v {  color: var(--primary); font-size: 19px; }
.cart-cta {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
@media (max-width: 1200px) { .cart-cta { grid-template-columns: 1fr 1fr 1fr; } }
.btn-s.dark {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.btn-s.dark:hover { background: var(--text-2); border-color: var(--text-2); }
[data-theme="dark"] .btn-s.dark {
  background: #2a251f;
  border-color: #3a332a;
  color: var(--text);
}
[data-theme="dark"] .btn-s.dark:hover,
[data-theme="dark"] .btn-s.dark:focus {
  background: #342e26;
  border-color: #4a4035;
  color: #fff;
}

.pos-tab-pending {
  padding: 56px 24px;
}

/* Variant picker modal */
.variant-pick-list { display: flex; flex-direction: column; gap: 8px; }
.variant-pick-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
  transition: all .12s;
}
.variant-pick-row:hover { border-color: var(--primary); }
.variant-pick-row.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.variant-pick-check {
  color: var(--primary);
  font-size: 18px;
  opacity: 0;
}
.variant-pick-row.selected .variant-pick-check { opacity: 1; }
.variant-pick-info { display: flex; flex-direction: column; }

/* Ongoing cards */
.ongoing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.ongoing-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}
.ongoing-card .o-head {
  display: flex; align-items: center; justify-content: space-between;
}
.ongoing-card .o-table {
  font-weight: 700;
  font-size: 16px;
}
.ongoing-card .o-table .sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  margin-top: 2px;
}
.ongoing-card .o-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  font-size: 12.5px;
  color: var(--text-2);
}
.ongoing-card .o-meta .l {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-3);
}
.ongoing-card .o-amt {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  font-weight: 700;
}
.ongoing-card .o-amt .v {
  
  font-size: 16px;
  color: var(--primary);
}

.ongoing-card .o-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.food-variant-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.4fr) minmax(120px, 1fr) minmax(100px, 0.8fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
@media (max-width: 768px) {
  .food-variant-row {
    grid-template-columns: 1fr 1fr;
  }
}
.waiter-avatar,
.waiter-preview {
  background: linear-gradient(135deg, var(--green), #6aa77c);
}
.setup-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.setup-filter-select {
  width: auto;
  min-width: 150px;
}
.setup-filter-search {
  width: min(260px, 100%);
}
.order-filters {
  max-width: 980px;
}
.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.order-detail-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.order-detail-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  margin-top: 18px;
}
.order-payment-line,
.order-totals > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.order-totals > div:first-child { padding-top: 0; }
.order-totals .grand {
  font-weight: 700;
  color: var(--primary);
  border-top: 2px solid var(--line-2);
  margin-top: 4px;
  padding-top: 10px;
}
.report-filter-card {
  margin-bottom: 16px;
}
.report-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 760px;
}
.report-actions .report-tab.active,
.report-actions .report-tab.active:hover,
.report-actions .report-tab.active:focus {
  background: var(--text);
  border-color: var(--text);
  color: var(--surface);
  box-shadow: 0 0 0 3px rgba(31, 28, 24, .08);
}
.payment-report-methods {
  margin-bottom: 16px;
}
.payment-report-method-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.payment-method-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.payment-method-tab {
  min-height: 42px;
}
.payment-method-tab.active,
.payment-method-tab.active:hover,
.payment-method-tab.active:focus {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 3px rgba(184, 84, 60, .12);
}
.payment-method-tab .chip {
  padding: 2px 7px;
}
.payment-report-empty {
  padding: 28px 18px 10px;
}
.payment-report-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}
[data-payment-report-table].is-loading {
  opacity: .72;
}
.payment-report-row-message {
  padding: 34px 18px !important;
  color: var(--text-3);
  text-align: center !important;
}
.payment-report-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.report-filters {
  width: 100%;
  max-width: none;
  justify-content: flex-start;
}
.report-filters .field {
  min-width: 180px;
  margin: 0;
}
.report-filter-actions {
  display: flex;
  align-items: end;
  gap: 8px;
  align-self: end;
}
.report-print-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.report-print-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
}
.report-print-head p {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
}
.report-print-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  color: var(--text-2);
}
.report-print-brand span {
  font-size: 12px;
  color: var(--text-3);
}
.report-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.food-report-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.report-table-card {
  margin-top: 16px;
}
.table-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
}
.table-status-stat {
  color: inherit;
  text-decoration: none;
}
.table-status-stat.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(184,84,60,.12);
}
.table-status-stat .stat-icon.success {
  background: var(--green-soft);
  color: var(--green);
}
.table-status-stat .stat-icon.warn {
  background: var(--gold-soft);
  color: var(--gold);
}
.table-status-stat .stat-icon.info {
  background: var(--blue-soft);
  color: var(--blue);
}
.table-status-stat .stat-icon.danger {
  background: var(--red-soft);
  color: var(--red);
}
@media (max-width: 1280px) {
  .table-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .table-stats { grid-template-columns: 1fr; }
  .setup-filters {
    width: 100%;
    justify-content: flex-start;
  }
  .setup-filter-select {
    width: 100%;
  }
  .setup-filter-search {
    width: 100%;
  }
  .order-detail-grid,
  .order-detail-footer {
    grid-template-columns: 1fr;
  }
  .report-filters .field,
  .report-filter-actions {
    width: 100%;
  }
  .report-filter-actions {
    align-self: stretch;
  }
  .report-filter-actions .btn-s {
    flex: 1;
  }
  .report-actions {
    justify-content: flex-start;
    max-width: none;
  }
  .report-actions .btn-s {
    flex: 1 1 auto;
    justify-content: center;
  }
  .payment-method-tab {
    flex: 1 1 180px;
    justify-content: center;
  }
  .payment-report-stats {
    grid-template-columns: 1fr;
  }
  .report-print-head {
    flex-direction: column;
  }
  .report-print-brand {
    align-items: flex-start;
  }
  .report-stats {
    grid-template-columns: 1fr;
  }
  .food-report-stats {
    grid-template-columns: 1fr;
  }
}

/* ============ VARIANTS ============ */
.variant-value-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 520px;
}
.variant-values-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.variant-values-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.variant-value-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.variant-switch {
  min-height: 38px;
}
.variant-value-status {
  min-width: 0;
}
@media (max-width: 720px) {
  .variant-values-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .variant-value-row {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   STEP 31 — UI POLISH & RESPONSIVE REFINEMENTS
   ========================================================= */

/* All horizontally-laid tables wrapped in .card-s-body.p-0 scroll on overflow.
   Keeps table layout intact instead of squashing columns on mobile. */
.card-s-body.p-0 {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.card-s-body.p-0 .t-table {
  min-width: 640px;
}

/* Page header stacks on narrow viewports so action buttons get their own row. */
@media (max-width: 720px) {
  .page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .page-head .page-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .page-head .page-actions .btn-s {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* Modals: tighten gutters on phones so dialogs do not crowd the edges. */
@media (max-width: 600px) {
  .modal-dialog {
    --bs-modal-margin: 12px;
    margin: 12px;
  }
  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .modal-footer {
    flex-wrap: wrap;
  }
  .modal-footer .btn-s {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* POS: on mobile, drop the fixed grid height so the food grid and cart
   both scroll naturally with the page instead of fighting each other. */
@media (max-width: 1200px) {
  .pos {
    height: auto;
    min-height: 0;
  }
  .food-grid {
    max-height: none;
    overflow: visible;
  }
  .cart {
    height: auto;
  }
  .cart-body {
    max-height: 360px;
  }
}

/* On narrower widths reduce totals input footprint so the row never collapses. */
@media (max-width: 1400px) {
  .tot-row .tot-input { width: 78px; }
  .tot-row .v .amt { min-width: 70px; }
}

/* On the smallest screens make the cart CTA stack vertically. */
@media (max-width: 480px) {
  .cart-cta {
    grid-template-columns: 1fr !important;
  }
  .cart-cta .btn-s {
    width: 100%;
    justify-content: center;
  }
  .tot-row .tot-input { width: 72px; }
  .tot-row .v .amt { min-width: 64px; }
  .grand { font-size: 16px; padding: 10px; }
  .grand .v { font-size: 18px; }
}

/* Topbar spacing on mid screens — keep theme + bell visible, hide the
   collapse button (sidebar is hidden behind a drawer below 960px anyway). */
@media (max-width: 960px) {
  .topbar [data-sidebar-collapse] {
    display: none !important;
  }
  .topbar .tb-crumb {
    display: none;
  }
}

/* Sidebar backdrop is part of the .app shell — only render under mobile. */
.sidebar-backdrop {
  cursor: pointer;
}

/* Empty + loading skeletons */
.skeleton {
  background: linear-gradient(90deg,
    var(--surface-2) 0%,
    var(--line) 50%,
    var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: rms-skeleton 1.2s ease-in-out infinite;
  border-radius: 6px;
  display: block;
}
.skeleton.line { height: 12px; margin-bottom: 8px; }
.skeleton.line.short { width: 40%; }
.skeleton.line.long { width: 90%; }
.skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px dashed var(--line);
}
.skeleton-row .skeleton.block {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
}
.skeleton-row .skeleton-text { flex: 1; }
@keyframes rms-skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Inline loader (button busy state) */
.btn-s.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn-s.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  color: #fff;
  animation: rms-spin .7s linear infinite;
}
.btn-s.is-loading:not(.primary):not(.danger):not(.dark):not(.success)::after {
  color: var(--primary);
}
@keyframes rms-spin {
  to { transform: rotate(360deg); }
}

/* Consistent empty-state alignment inside card bodies that pad to 0 */
.card-s-body.p-0 .empty {
  padding: 48px 20px;
}

/* Bootstrap-Icons spin helper for inline loading affordances */
.bi-spin { animation: rms-spin 1s linear infinite; display: inline-block; }

/* Tighter chip line-height when used inside compact toolbars */
.row-flex .chip,
.user-filters .chip { line-height: 1.2; }

/* Print refinements */
@media print {
  @page {
    margin: 8mm;
  }
  html, body {
    background: #fff !important;
    color: #000 !important;
  }
  .sidebar-backdrop,
  .topbar .tb-search,
  .topbar .tb-icon-btn,
  .topbar .tb-user,
  .page-actions,
  .pagination-wrap { display: none !important; }
  .receipt {
    border: 0 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
  .receipt table { page-break-inside: auto; }
  .receipt table tr { page-break-inside: avoid; page-break-after: auto; }
  .kot { width: 280px !important; }
}











.pagination {
    gap: 6px;
}

.pagination .page-link {
    border: none;
    border-radius: var(--radius-sm);
    padding: 7px 13px;
    font-weight: 500;
    background: var(--surface);
    color: var(--text-2);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(6px);
    transition: all 0.25s ease;
}

.pagination .page-link:hover {
    background: var(--surface-2);
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: var(--shadow);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.4;
    pointer-events: none;
    box-shadow: none;
}

.pagination .page-link:active {
    transform: scale(0.95);
}

.pagination-wrap .text-muted {
    font-size: 13px;
    color: var(--text-3) !important;
}

.notiflix-confirm-buttons a{
  text-decoration: none;
}




.dropdown-menu{
    border:none!important;
    border-radius:14px;
    padding:8px 0;
    min-width:240px;
    background:#fff;
    box-shadow:0 10px 25px rgba(0,0,0,0.08);
    margin-top:-10px;
    transform:translateY(10px);
    opacity:0;
    transition:all .2s ease;
}

/* ONLY animate when Bootstrap adds .show */
.dropdown-menu.show{
    transform:translateY(0);
    opacity:1;
}

.dropdown-item{
    padding:10px 16px;
    font-size:14px;
    border-radius:8px;
    margin:2px 6px;
    transition:all .2s ease;
}

.dropdown-item:hover{
    background:rgba(0,0,0,0.05);
}

.tb-user i.bi-chevron-down{
    transition:transform .2s ease;
}

/* IMPORTANT: target correct parent */
.dropdown.show .bi-chevron-down{
    transform:rotate(180deg);
}
