/* ============================================================
   EasyGo SaaS POS — Premium Professional Theme
   Stripe / Toast / Linear quality. Clean, refined, trustworthy.
   ============================================================ */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --border: #e6eaf2;
  --border-strong: #d5dbe8;
  --text: #101828;
  --text-2: #344054;
  --muted: #667085;
  --muted-2: #98a2b3;
  --brand: #155eef;
  --brand-dark: #0e4fd1;
  --brand-soft: #eff4ff;
  --brand-border: #b2ccff;
  --green: #12805c;
  --green-soft: #e7f6ef;
  --green-border: #a9e2c6;
  --red: #d92d20;
  --red-soft: #fef1f0;
  --red-border: #f5c6c0;
  --amber: #b54708;
  --amber-soft: #fffaeb;
  --amber-border: #f7dfa8;
  --radius: 14px;
  --radius-s: 10px;
  --shadow-xs: 0 1px 2px rgba(16,24,40,.05);
  --shadow-s: 0 1px 3px rgba(16,24,40,.07), 0 1px 2px rgba(16,24,40,.05);
  --shadow-m: 0 4px 12px rgba(16,24,40,.08);
  --shadow-l: 0 12px 32px rgba(16,24,40,.12);
  --tap: 48px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Inter", "SF Pro Display", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
::placeholder { color: var(--muted-2); opacity: 1; }
::selection { background: #d3e1ff; }

/* ============ App shell ============ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 264px; flex: 0 0 264px; background: var(--surface);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 20;
}
.brand { padding: 22px 20px 18px; display: flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 13px; flex: 0 0 44px;
  background: linear-gradient(135deg, #2e7bff 0%, #155eef 60%, #0e4fd1 100%);
  display: grid; place-items: center; font-size: 22px; font-weight: 800; color: #fff;
  box-shadow: 0 4px 12px rgba(21,94,239,.32), inset 0 1px 0 rgba(255,255,255,.25);
}
.brand-name { font-weight: 750; font-size: 18px; letter-spacing: -.3px; color: var(--text); }
.brand-sub { font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 500; }

.nav { padding: 8px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.nav-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--muted-2); padding: 14px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius-s); color: var(--text-2); font-weight: 550; font-size: 14.5px;
  border: 1px solid transparent; transition: all .15s ease; position: relative;
}
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav a.active {
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 650;
  border-color: var(--brand-border);
}
.nav a.active::before {
  content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3.5px;
  border-radius: 0 4px 4px 0; background: var(--brand);
}
.nav .nav-ico { font-size: 19px; width: 26px; text-align: center; flex: 0 0 26px; }

.userbox { padding: 16px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }
.userbox .uname { font-weight: 650; font-size: 14px; }
.userbox .urole { font-size: 12px; color: var(--muted); text-transform: capitalize; }
.userbox a { font-size: 13px; color: var(--red); font-weight: 550; }

.main { flex: 1; min-width: 0; padding: 30px 34px 40px; max-width: 1320px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-size: 25px; font-weight: 750; letter-spacing: -.5px; }
.page-head p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.page-head .actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ============ Cards ============ */
.card, .panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-s); padding: 24px;
}
.card + .card, .panel + .panel { margin-top: 20px; }
.card h2, .panel h2 { margin: 0 0 16px; font-size: 17px; font-weight: 700; letter-spacing: -.2px; }
.card h3, .panel h3 { margin: 0 0 12px; font-size: 15px; font-weight: 650; }

/* ============ Stat cards ============ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-s); display: flex; gap: 15px; align-items: flex-start;
  transition: box-shadow .2s ease, transform .2s ease;
}
.stat:hover { box-shadow: var(--shadow-m); transform: translateY(-2px); }
.stat .ico {
  width: 46px; height: 46px; border-radius: 13px; flex: 0 0 46px;
  display: grid; place-items: center; font-size: 22px;
}
.stat .ico.blue { background: var(--brand-soft); border: 1px solid var(--brand-border); }
.stat .ico.green { background: var(--green-soft); border: 1px solid var(--green-border); }
.stat .ico.amber { background: var(--amber-soft); border: 1px solid var(--amber-border); }
.stat .ico.red { background: var(--red-soft); border: 1px solid var(--red-border); }
.stat .k { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.stat .v { font-size: 26px; font-weight: 750; margin-top: 4px; letter-spacing: -.6px; line-height: 1.2; }
.stat .v.blue { color: var(--brand); } .stat .v.green { color: var(--green); }
.stat .v.amber { color: var(--amber); } .stat .v.red { color: var(--red); }
.stat .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ============ Tables ============ */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-s); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; padding: 12px 16px; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px; color: var(--muted);
  border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap;
}
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background .12s ease; }
.tbl tbody tr:hover td { background: #fafcff; }
.tbl .num { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ============ Badges ============ */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 650; white-space: nowrap; border: 1px solid transparent;
}
.badge.green { background: var(--green-soft); color: var(--green); border-color: var(--green-border); }
.badge.blue { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand-border); }
.badge.amber { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-border); }
.badge.red { background: var(--red-soft); color: var(--red); border-color: var(--red-border); }
.badge.gray { background: #f2f4f7; color: #475467; border-color: #e4e7ec; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 22px; border-radius: 11px; border: 1px solid transparent;
  font-size: 15px; font-weight: 650; cursor: pointer; transition: all .16s ease;
  font-family: inherit; white-space: nowrap; letter-spacing: -.1px;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(180deg, #2e7bff, var(--brand)); color: #fff;
  box-shadow: 0 3px 8px rgba(21,94,239,.28), inset 0 1px 0 rgba(255,255,255,.22);
}
.btn-primary:hover { background: linear-gradient(180deg, #2e7bff, var(--brand-dark)); box-shadow: 0 5px 14px rgba(21,94,239,.35); }
.btn-green {
  background: linear-gradient(180deg, #17a365, #12805c); color: #fff;
  box-shadow: 0 3px 8px rgba(18,128,92,.28), inset 0 1px 0 rgba(255,255,255,.22);
}
.btn-green:hover { box-shadow: 0 5px 14px rgba(18,128,92,.35); }
.btn-neutral { background: var(--surface); border-color: var(--border-strong); color: var(--text-2); box-shadow: var(--shadow-xs); }
.btn-neutral:hover { border-color: var(--muted-2); background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--surface); border-color: var(--red-border); color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 13.5px; border-radius: 9px; }
.btn-block { width: 100%; }

/* ============ Forms ============ */
.frow { margin-bottom: 17px; }
.frow label, .lbl { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; color: var(--text-2); }
.frow input[type=text], .frow input[type=password], .frow input[type=number],
.frow input[type=date], .frow input[type=email], .frow input[type=tel],
.frow select, .frow textarea {
  width: 100%; min-height: var(--tap); padding: 0 15px; border: 1.5px solid var(--border-strong);
  border-radius: 11px; font-size: 15px; font-family: inherit; background: var(--surface); color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.frow textarea { padding: 12px 15px; min-height: 96px; resize: vertical; }
.frow input:focus, .frow select:focus, .frow textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(21,94,239,.12);
}
.frow .hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.frow-inline { display: flex; gap: 12px; } .frow-inline > * { flex: 1; }

/* Toggle switch */
.toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .track { width: 48px; height: 27px; border-radius: 999px; background: #d0d5dd; transition: background .2s ease; position: relative; flex: 0 0 48px; }
.toggle .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-s); transition: left .2s ease;
}
.toggle input:checked + .track { background: var(--brand); }
.toggle input:checked + .track::after { left: 24px; }

/* ============ POS screen ============ */
.pos-wrap { display: grid; grid-template-columns: 1fr 390px; gap: 20px; align-items: start; }
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.cat-tab {
  padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--border-strong);
  background: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--text-2);
  transition: all .15s ease; box-shadow: var(--shadow-xs);
}
.cat-tab:hover { border-color: var(--brand); color: var(--brand-dark); }
.cat-tab.active { background: var(--text); border-color: var(--text); color: #fff; box-shadow: var(--shadow-s); }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 13px; }
.prod-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 18px 14px; text-align: center; cursor: pointer; transition: all .16s ease;
  box-shadow: var(--shadow-xs);
}
.prod-card:hover { border-color: var(--brand-border); box-shadow: var(--shadow-m); transform: translateY(-3px); }
.prod-card:active { transform: translateY(-1px); }
.prod-card .pn { font-weight: 650; font-size: 14.5px; margin-bottom: 5px; letter-spacing: -.1px; }
.prod-card .pp { color: var(--brand-dark); font-weight: 750; font-size: 16px; font-variant-numeric: tabular-nums; }
.prod-card .pvar { font-size: 11.5px; color: var(--muted); margin-top: 5px; font-weight: 550; }

.cart {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-m); position: sticky; top: 24px; overflow: hidden;
}
.cart-head {
  padding: 17px 20px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 16px;
  background: var(--surface-2); display: flex; justify-content: space-between; align-items: center;
}
.cart-items { max-height: 360px; overflow-y: auto; padding: 6px 0; }
.citem { display: flex; align-items: center; gap: 10px; padding: 11px 20px; border-bottom: 1px dashed var(--border); }
.citem:last-child { border-bottom: none; }
.citem .cn { flex: 1; font-weight: 550; font-size: 14px; }
.citem .cn small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.citem .cp { font-weight: 700; font-variant-numeric: tabular-nums; }
.qty { display: flex; align-items: center; gap: 7px; }
.qty button {
  width: 32px; height: 32px; border-radius: 9px; border: 1.5px solid var(--border-strong);
  background: var(--surface); font-size: 16px; font-weight: 700; cursor: pointer; color: var(--text-2);
  display: grid; place-items: center; line-height: 1; transition: all .12s ease;
}
.qty button:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.qty span { min-width: 26px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-foot { padding: 18px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }
.cart-total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 750; margin-bottom: 15px; letter-spacing: -.3px; }
.cart-total .t-amt { color: var(--brand-dark); font-variant-numeric: tabular-nums; }

/* ============ Table map ============ */
.tmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 15px; }
.ttile {
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 22px 16px; text-align: center; cursor: pointer; transition: all .16s ease;
  box-shadow: var(--shadow-xs);
}
.ttile:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); }
.ttile .tn { font-size: 21px; font-weight: 750; letter-spacing: -.3px; }
.ttile .ts { font-size: 13px; color: var(--muted); margin-top: 7px; font-weight: 550; }
.ttile .tcap { font-size: 12px; color: var(--muted-2); margin-top: 3px; }
.ttile.free { border-color: var(--green-border); background: linear-gradient(180deg, #f4fcf7, var(--surface)); }
.ttile.occupied { border-color: var(--amber-border); background: linear-gradient(180deg, #fffdf4, var(--surface)); }

/* ============ Kitchen KDS ============ */
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.kcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-s); overflow: hidden; transition: box-shadow .2s ease;
}
.kcard:hover { box-shadow: var(--shadow-m); }
.kcard .kh {
  padding: 15px 18px; border-bottom: 1px solid var(--border); display: flex;
  justify-content: space-between; align-items: center; background: var(--surface-2);
}
.kcard .kh strong { font-size: 16px; letter-spacing: -.2px; }
.kcard .kb { padding: 14px 18px; }
.kcard .ki { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 14.5px; border-bottom: 1px dashed var(--border); }
.kcard .ki:last-child { border-bottom: none; }
.kcard .ki .qk { font-weight: 750; color: var(--brand-dark); flex: 0 0 44px; }
.kcard.urgent { border-color: var(--red-border); box-shadow: 0 0 0 3px rgba(217,45,32,.08); }
.kcard.urgent .kh { background: var(--red-soft); }
.kcard .timer { font-size: 12.5px; font-weight: 700; color: var(--amber); font-variant-numeric: tabular-nums; }

/* ============ Login ============ */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(1200px 600px at 20% -10%, #dbe7ff 0%, transparent 60%),
              radial-gradient(1000px 500px at 110% 110%, #d1e7ff 0%, transparent 55%),
              linear-gradient(135deg, #f5f7fb, #eef2f9);
}
.login-box {
  width: 100%; max-width: 410px; background: var(--surface); border-radius: 20px;
  box-shadow: var(--shadow-l); padding: 38px 34px; border: 1px solid var(--border);
}
.login-box .lbrand { text-align: center; margin-bottom: 24px; }
.login-box .lbrand .brand-mark { margin: 0 auto 14px; width: 56px; height: 56px; font-size: 28px; border-radius: 16px; }
.login-box h1 { font-size: 22px; text-align: center; margin: 0 0 6px; letter-spacing: -.4px; }
.login-box .lsub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 24px; }

/* ============ Flash / alerts ============ */
.flash { padding: 14px 18px; border-radius: 12px; margin-bottom: 20px; font-size: 14px; font-weight: 550; border: 1px solid transparent; display: flex; gap: 10px; align-items: flex-start; }
.flash-ok { background: var(--green-soft); color: var(--green); border-color: var(--green-border); }
.flash-err { background: var(--red-soft); color: var(--red); border-color: var(--red-border); }

/* ============ Modal ============ */
.modal-bg {
  position: fixed; inset: 0; background: rgba(16,24,40,.5); backdrop-filter: blur(3px);
  display: none; place-items: center; z-index: 100; padding: 20px;
}
.modal-bg.open {
  display: grid;
  animation: fadeIn .18s ease;
}
.modal {
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-l);
  width: 100%; max-width: 470px; padding: 28px; border: 1px solid var(--border);
  animation: popIn .22s cubic-bezier(.2,.9,.3,1.2); max-height: 92vh; overflow-y: auto;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-head h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.3px; }
.modal-x {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); font-size: 18px; cursor: pointer; color: var(--muted);
  display: grid; place-items: center;
}
.modal-x:hover { background: var(--red-soft); color: var(--red); border-color: var(--red-border); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(.96) translateY(8px); } }

/* Variant / modifier options in modal */
.opt-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; }
.opt {
  display: flex; align-items: center; gap: 12px; padding: 13px 15px;
  border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer;
  transition: all .14s ease; font-weight: 550; font-size: 14.5px;
}
.opt:hover { border-color: var(--brand-border); background: #fafcff; }
.opt.selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(21,94,239,.1); }
.opt .op { margin-left: auto; font-weight: 700; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.opt input { width: 18px; height: 18px; accent-color: var(--brand); }

/* ============ Settings rows ============ */
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.set-row:last-child { border-bottom: none; }
.set-row .sl { font-weight: 600; font-size: 14.5px; }
.set-row .sd { font-size: 13px; color: var(--muted); margin-top: 3px; max-width: 480px; }

/* ============ Print ============ */
@media print {
  .sidebar, .page-head .actions, .no-print, .modal-bg { display: none !important; }
  .main { padding: 0; max-width: none; }
  body { background: #fff; }
  .card, .panel, .tbl-wrap { box-shadow: none; }
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .pos-wrap { grid-template-columns: 1fr; }
  .cart { position: static; }
}
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { padding: 20px 16px 32px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .page-head h1 { font-size: 21px; }
}

/* ============ POS layout (matches actual HTML) ============ */
.pos-left { min-width: 0; }
.pos-right {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-m); overflow: hidden; display: flex; flex-direction: column;
  position: sticky; top: 24px; max-height: calc(100vh - 48px);
}
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.cat-tab {
  padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--border-strong);
  background: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--text-2);
  transition: all .15s ease; box-shadow: var(--shadow-xs); font-family: inherit;
}
.cat-tab:hover { border-color: var(--brand); color: var(--brand-dark); }
.cat-tab.active { background: var(--text); border-color: var(--text); color: #fff; }
.prod-search { margin-bottom: 14px; }
.prod-search input {
  width: 100%; min-height: 46px; padding: 0 16px 0 42px; border: 1.5px solid var(--border-strong);
  border-radius: 11px; font-size: 14.5px; font-family: inherit; background: var(--surface); color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 14px center;
}
.prod-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(21,94,239,.12); }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 13px; }
.prod-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 18px 14px; text-align: center; cursor: pointer; transition: all .16s ease;
  box-shadow: var(--shadow-xs);
}
.prod-card:hover { border-color: var(--brand-border); box-shadow: var(--shadow-m); transform: translateY(-3px); }
.prod-card:active { transform: translateY(-1px); }
.prod-card .pn { font-weight: 650; font-size: 14.5px; margin-bottom: 5px; }
.prod-card .pp { color: var(--brand-dark); font-weight: 750; font-size: 16px; font-variant-numeric: tabular-nums; }

/* Cart */
.cart-opts { padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.opt-row { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; }
.opt-row:last-child { margin-bottom: 0; }
.opt-row select, .opt-row input[type=text] {
  min-height: 42px; padding: 0 12px; border: 1.5px solid var(--border-strong); border-radius: 10px;
  font-size: 14px; font-family: inherit; background: var(--surface); color: var(--text);
}
.seg { display: flex; background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: 11px; overflow: hidden; }
.seg button {
  flex: 1; padding: 10px 6px; border: none; background: transparent; font-size: 13px; font-weight: 600;
  cursor: pointer; color: var(--muted); font-family: inherit; transition: all .14s;
}
.seg button.active { background: var(--brand); color: #fff; }
.cart-total { padding: 16px 18px; }
.trow { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--muted); padding: 3px 0; font-variant-numeric: tabular-nums; }
.trow span:first-child { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow span:last-child { flex-shrink: 0; }
.trow.grand { font-size: 19px; font-weight: 750; color: var(--text); padding-top: 10px; margin-top: 6px; border-top: 2px solid var(--border); }
.trow.grand span:last-child { color: var(--brand-dark); }
#payBtn { margin-top: 14px; }
#payBtn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* Cart lines (JS-generated) */
.cart-empty { text-align: center; color: var(--muted-2); padding: 30px 20px; font-size: 14px; }
.cart-line { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-bottom: 1px dashed var(--border); }
.cart-line:last-child { border-bottom: none; }
.cart-line .nm { flex: 1; font-weight: 550; font-size: 13.5px; min-width: 0; }
.cart-line .nm small { display: block; color: var(--muted); font-weight: 500; font-size: 11.5px; }
.cart-line .lt { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.qty-ctl { display: flex; align-items: center; gap: 6px; }
.qty-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid var(--border-strong);
  background: var(--surface); font-size: 15px; font-weight: 700; cursor: pointer; color: var(--text-2);
  display: grid; place-items: center; line-height: 1;
}
.qty-btn:hover { border-color: var(--brand); color: var(--brand); }
.qty-n { min-width: 24px; text-align: center; font-weight: 700; font-size: 14px; }

/* Variant modal rows (JS-generated) */
.var-group { margin-bottom: 18px; }
.var-gtitle { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 10px; }
.var-row, .mod-row {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 11px; cursor: pointer;
  transition: all .14s ease; font-weight: 550; font-size: 14px; margin-bottom: 8px; background: var(--surface);
}
.var-row:hover, .mod-row:hover { border-color: var(--brand-border); }
.var-row.sel, .mod-row.sel { border-color: var(--brand); background: var(--brand-soft); }
.var-row input, .mod-row input { width: 17px; height: 17px; accent-color: var(--brand); }
.var-row .vn, .mod-row .mn { flex: 1; }
.var-row .vp, .mod-row .mp { font-weight: 700; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.var-qty-row { display: flex; justify-content: space-between; align-items: center; margin: 16px 0; }
.var-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 750; margin-bottom: 16px; padding-top: 12px; border-top: 2px solid var(--border); }
.var-total span:last-child { color: var(--brand-dark); font-variant-numeric: tabular-nums; }

/* Payment modal */
.pay-methods { display: flex; gap: 10px; margin-bottom: 18px; }
.pay-m {
  flex: 1; padding: 15px; border-radius: 12px; border: 2px solid var(--border-strong);
  background: var(--surface); font-size: 16px; font-weight: 650; cursor: pointer;
  color: var(--text-2); font-family: inherit; transition: all .14s;
}
.pay-m.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.change-due { text-align: center; font-size: 17px; font-weight: 700; color: var(--green); margin: 12px 0; min-height: 26px; }
.change-due span { font-variant-numeric: tabular-nums; }

/* Receipt */
.receipt { font-family: "Courier New", monospace; font-size: 13.5px; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 10px; padding: 18px; }
.receipt h3 { font-family: inherit; text-align: center; margin: 0 0 8px; font-size: 17px; }
.receipt .rc { text-align: center; color: var(--muted); margin-bottom: 10px; font-family: inherit; font-size: 12.5px; }
.receipt hr { border: none; border-top: 1px dashed var(--border-strong); margin: 10px 0; }
.receipt .rl { display: flex; justify-content: space-between; padding: 2px 0; }
.receipt .rt { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; }
.receipt .tse { margin-top: 10px; font-size: 11px; color: var(--muted); word-break: break-all; }

/* ============ KDS (kitchen display) — matches kitchen.php ============ */
.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.kds-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-s); padding: 18px; border-left: 5px solid var(--brand);
  transition: box-shadow .2s, transform .2s;
}
.kds-card:hover { box-shadow: var(--shadow-m); }
.kds-card.st-open { border-left-color: var(--brand); }
.kds-card.st-preparing { border-left-color: var(--amber); }
.kds-card.st-ready { border-left-color: var(--green); }
.kds-card .kh { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.kds-card .kn { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.kds-card .kt {
  margin-left: auto; font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  background: var(--green-soft); color: var(--green); border: 1px solid var(--green-border);
  font-variant-numeric: tabular-nums;
}
.kds-card .kt.warn { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-border); }
.kds-card .kt.late {
  background: var(--red-soft); color: var(--red); border-color: var(--red-border);
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .65; } }
.kds-item { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14.5px; border-bottom: 1px dashed var(--border); }
.kds-item:last-child { border-bottom: none; }
.kds-item .qq { font-weight: 800; color: var(--brand-dark); margin-right: 8px; font-variant-numeric: tabular-nums; }
.kds-actions { margin-top: 12px; }
.kds-actions .btn { width: 100%; }

/* ============ Table cards — universal (all themes) ============ */
.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.table-card {
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  position: relative;
  overflow: hidden;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-s);
}
.table-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-m);
}
.table-card.free {
  border-color: var(--green);
  border-top: 4px solid var(--green);
}
.table-card.busy {
  border-color: var(--amber);
  border-top: 4px solid var(--amber);
}
.table-card .tn {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.table-card .ts, .table-card .to {
  color: var(--muted);
  font-size: 14px;
}
.table-card .badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.table-card .badge.b-free {
  background: var(--green-soft, #e7f6ef);
  color: var(--green, #12805c);
  border: 1px solid var(--green-border, #a9e2c6);
}
.table-card .badge.b-busy {
  background: var(--amber-soft, #fffaeb);
  color: var(--amber, #b54708);
  border: 1px solid var(--amber-border, #f7dfa8);
}

/* ============ Universal search bars — German's EasyGo design (all themes) ============ */
input[type="text"].search-large,
#prodSearchAll,
#custSearch,
.search-input {
  width: 100% !important;
  min-height: 56px !important;
  font-size: 17px !important;
  padding: 14px 20px !important;
  border-radius: 14px !important;
  border: 2px solid var(--border) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  box-sizing: border-box !important;
  transition: border-color .15s, box-shadow .15s;
}
input[type="text"].search-large:focus,
#prodSearchAll:focus,
#custSearch:focus,
.search-input:focus {
  outline: none !important;
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgba(255,45,85,.15) !important;
}
input[type="text"].search-large::placeholder,
#prodSearchAll::placeholder,
#custSearch::placeholder,
.search-input::placeholder {
  color: var(--muted) !important;
  opacity: 1;
}

/* ============ EasyGo-style table cards (all themes) ============ */
.table-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: 18px !important;
}
.table-card {
  border-radius: 16px !important;
  padding: 20px !important;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s !important;
  min-height: 170px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  background: linear-gradient(135deg, #0f2a1a 0%, #143d24 100%) !important;
  border: 2px solid #22c55e !important;
  box-shadow: 0 4px 20px rgba(34,197,94,.15) !important;
  color: #fff !important;
}
.table-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 30px rgba(34,197,94,.25) !important;
}
.table-card.busy {
  background: linear-gradient(135deg, #2a1a0f 0%, #3d2414 100%) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 4px 20px rgba(245,158,11,.15) !important;
}
.table-card .tn {
  font-size: 28px !important;
  font-weight: 800 !important;
  color: #fff !important;
  display: flex; align-items: center; gap: 10px;
}
.table-card .ts, .table-card .to {
  color: rgba(255,255,255,.75) !important;
  font-size: 14px !important;
}
.table-card .badge {
  display: inline-block !important;
  padding: 4px 14px !important;
  border-radius: 20px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}
.table-card .badge.b-free {
  background: #22c55e !important;
  color: #fff !important;
}
.table-card .badge.b-busy {
  background: #f59e0b !important;
  color: #fff !important;
}
.table-card .btn {
  color: #fff !important;
  border-color: rgba(255,255,255,.2) !important;
}

/* ============ Alerts — universal (all themes) ============ */
.alert {
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.alert-ok {
  background: var(--green-soft, #e7f6ef);
  border-color: var(--green-border, #a9e2c6);
  color: var(--green, #12805c);
}
.alert-err {
  background: var(--red-soft, #fef1f0);
  border-color: var(--red-border, #f5c6c0);
  color: var(--red, #d92d20);
}
