/* ==========================================================================
   EasyGo POS — dark "night service" UI
   Deep navy surfaces, tomato-red accent, blue->violet for the one secondary
   action. System fonts only (works offline). Touch-friendly 48px+ targets,
   visible focus rings, reduced-motion support. Receipts stay black on white
   (that's what the thermal printer outputs) and look like paper on the dark
   page. All class names from the previous stylesheet are kept.
   ========================================================================== */

:root {
  /* surfaces */
  --bg: #050f22;
  --bg-2: #081a3a;
  --panel: #0c2048;
  --panel-alt: #10285a;
  --border: #1d3461;
  --border-strong: #2b4a85;
  /* text (names kept from the old sheet: --text-dark is now the light text) */
  --text-dark: #f1f5ff;
  --text-muted: #9db0d8;
  --text-soft: #c9d6f5;
  /* brand */
  --accent: #ff3d56;
  --accent-dark: #e11d48;
  --accent-grad: linear-gradient(135deg, #ff5267 0%, #e5134f 100%);
  --accent-glow: 0 10px 32px -8px rgba(255, 45, 85, .6);
  --on-accent: #ffffff;
  --selected: rgba(255, 61, 86, .14);
  --gold: #f5a524;
  /* status */
  --danger: #ff4d64;
  --success: #3ddc97;
  --success-bg: rgba(61, 220, 151, .12);
  --warn-bg: rgba(245, 165, 36, .12);
  --warn-border: rgba(245, 165, 36, .55);
  --warn-text: #ffd58a;
  /* controls */
  --neutral-btn: rgba(255, 255, 255, .07);
  --neutral-btn-hover: rgba(255, 255, 255, .13);
  --input-bg: #081a3b;
  /* chrome */
  --topbar-bg: #07142d;
  --topbar-text: #f1f5ff;
  --topbar-muted: #d3ddf4;
  --topbar-hover: rgba(255, 255, 255, .08);
  --topbar-h: 88px;
  /* shape & depth */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, .03) inset;
  --shadow-md: 0 18px 50px rgba(0, 0, 0, .55);
  --ring: 0 0 0 3px rgba(255, 82, 103, .45);
  --control-h: 48px;
  --field-h: 54px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, "Courier New", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-dark);
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(40, 84, 170, .22), transparent 70%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 55%, #030a18 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
/* the red sweep in the top-right corner */
body::before {
  content: "";
  position: absolute; z-index: 0; pointer-events: none;
  top: var(--topbar-h); right: 0; width: min(620px, 60vw); height: 170px;
  background: radial-gradient(130% 120% at 100% 0%, rgba(235, 38, 82, .5) 0%, rgba(235, 38, 82, .16) 38%, transparent 66%);
  -webkit-mask: radial-gradient(120% 140% at 100% 0%, #000 40%, transparent 75%);
  mask: radial-gradient(120% 140% at 100% 0%, #000 40%, transparent 75%);
}

a { color: #ff7d8f; }
a:hover { color: #ffa3b0; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  height: var(--topbar-h);
  padding: 0 28px;
  background: linear-gradient(180deg, rgba(9, 24, 52, .96), rgba(6, 18, 40, .96));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  color: var(--topbar-text);
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark {
  width: 52px; height: 52px; border-radius: 15px; flex: none;
  display: grid; place-items: center;
  background: var(--accent-grad);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 22px -6px rgba(255, 45, 85, .55);
}
.brand-mark .icon { width: 28px; height: 28px; stroke-width: 2; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.app-title { font-size: 24px; font-weight: 700; letter-spacing: .2px; color: var(--topbar-text); white-space: nowrap; }
.app-title em { font-style: normal; color: var(--accent); }
.app-subtitle { font-size: 14px; color: var(--text-muted); white-space: nowrap; }

.topnav { display: flex; align-items: center; align-self: stretch; gap: 6px; flex: 1; min-width: 0; padding-left: 4px; }
.topnav a {
  position: relative;
  display: inline-flex; align-items: center; gap: 9px;
  min-height: var(--control-h);
  padding: 0 16px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--topbar-muted);
  font-size: 15.5px; font-weight: 500;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.topnav a:hover { background: var(--topbar-hover); color: #fff; }
.topnav a.active {
  background: var(--accent-grad); color: #fff; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 8px 24px -8px rgba(255, 45, 85, .7);
}
/* red line under the current page, sitting on the bar's bottom edge */
.topnav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -20px; height: 3px;
  background: var(--accent-grad); border-radius: 3px 3px 0 0;
}

.topbar-right { display: flex; align-items: center; gap: 10px; font-size: 15px; margin-left: auto; padding-left: 14px; border-left: 1px solid var(--border); }
.staff-name { display: inline-flex; align-items: center; gap: 8px; color: var(--topbar-muted); padding: 0 6px; white-space: nowrap; font-weight: 500; }
.lang-btn, .logout-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 0 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border-strong);
  color: var(--topbar-text);
  text-decoration: none; font-weight: 600;
  transition: background-color .15s ease, border-color .15s ease;
}
.lang-btn:hover, .logout-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.logout-btn:hover { background: var(--accent-dark); border-color: var(--accent); }

@media (max-width: 1560px) {
  .topbar { gap: 14px; padding: 0 20px; }
  .topnav a { padding: 0 12px; font-size: 15px; gap: 7px; }
  .staff-name span { display: none; }
}
/* narrower: nav drops onto its own scrolling row */
@media (max-width: 1340px) {
  :root { --topbar-h: auto; }
  .topbar { height: auto; flex-wrap: wrap; gap: 10px 14px; padding: 12px 16px; }
  .topnav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a.active::after { display: none; }
  .topbar-right { border-left: 0; padding-left: 0; }
  body::before { top: 120px; }
}
@media (max-width: 520px) {
  .app-subtitle { display: none; }
  .lang-btn, .logout-btn { padding: 0 12px; }
}

/* ---------- messages ---------- */
.flash {
  position: relative; z-index: 1;
  margin: 18px auto 0; max-width: 1408px; width: calc(100% - 40px);
  padding: 14px 18px;
  background: var(--success-bg);
  border: 1px solid rgba(61, 220, 151, .45);
  border-left: 5px solid var(--success);
  border-radius: var(--radius-sm);
  color: var(--success);
  font-weight: 600;
}
.warning {
  color: var(--warn-text); background: var(--warn-bg);
  border: 1px solid var(--warn-border); border-left: 5px solid var(--gold);
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14.5px; margin-bottom: 14px;
}

/* ---------- layout ---------- */
.page { position: relative; z-index: 1; padding: 28px 28px 56px; max-width: 1464px; margin: 0 auto; }

.panel {
  background: linear-gradient(180deg, rgba(18, 42, 88, .72) 0%, rgba(11, 30, 66, .78) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}

/* page heading: red icon tile, title, one-line subtitle */
.page-head { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.page-icon {
  width: 64px; height: 64px; border-radius: 18px; flex: none;
  display: grid; place-items: center; color: #fff;
  background: var(--accent-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 12px 30px -8px rgba(255, 45, 85, .55);
}
.page-icon .icon { width: 32px; height: 32px; stroke-width: 2; }
h1 { font-size: 38px; line-height: 1.1; margin: 0; font-weight: 700; letter-spacing: -.5px; }
.page-sub { margin: 4px 0 0; font-size: 19px; color: var(--text-muted); }
.page-bar { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.page-bar .actions-row { padding-top: 6px; }
.page > h1 { margin-bottom: 20px; }

h2 { font-size: 13px; margin: 0 0 14px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
h2.panel-title {
  display: flex; align-items: center; gap: 16px;
  margin: 0 0 20px; font-size: 19px; letter-spacing: .03em; color: var(--text-soft);
}
.tile {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  display: grid; place-items: center; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
.tile .icon { width: 24px; height: 24px; }
.tile-rose   { background: linear-gradient(145deg, #8c2048, #6a1736); color: #ff9db3; box-shadow: none; }
.tile-indigo { background: linear-gradient(145deg, #4c66ff, #6a4cff); }
.tile-green  { background: linear-gradient(145deg, #19c37d, #0c9a5e); }
.tile-violet { background: linear-gradient(145deg, #6d6bff, #8a4dff); }
.tile-amber  { background: linear-gradient(145deg, #f5a524, #d97706); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (min-width: 981px) { .grid-2 > div:last-child { position: sticky; top: calc(var(--topbar-h) + 20px); } }
@media (max-width: 980px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.grid-2 > div > form > .panel:last-child { margin-bottom: 22px; }
/* takeaway (Abholung): no customer details needed -> customer column hidden */
.grid-2.takeaway { grid-template-columns: minmax(0, 1fr); }
.grid-2.takeaway > div:last-child { display: none; }

/* ---------- forms ---------- */
label { display: block; font-size: 15px; font-weight: 600; color: var(--text-dark); margin-bottom: 8px; }

input[type=text], input[type=number], input[type=password], input[type=tel],
input[type=email], input[type=date], input[type=time], textarea, select {
  width: 100%;
  min-height: var(--field-h);
  padding: 10px 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  font: inherit; font-size: 16px;
  color: var(--text-dark);
  background: var(--input-bg);
  margin-bottom: 14px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
select option { background: #0b1d42; color: var(--text-dark); }
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: .8; }
input:hover, select:hover, textarea:hover { border-color: #3d5fa3; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: #0a2046; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 22px; height: 22px; cursor: pointer; flex: none; }

.check-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin: 0 0 16px; background: var(--input-bg); border: 1.5px solid var(--border-strong); border-radius: var(--radius); cursor: pointer; font-weight: 600; }
.check-row input { margin: 0; width: 22px; }
.hint { margin: 10px 0 0; }

.field-row { display: flex; gap: 14px; }
.field-row > div { flex: 1; }
@media (max-width: 520px) { .field-row { flex-direction: column; gap: 0; } }

/* input with a leading icon */
.input-icon { position: relative; margin-bottom: 16px; }
.input-icon > .icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: #8aa4e6; pointer-events: none; transition: color .15s ease; }
.input-icon input { margin: 0; padding-left: 54px; min-height: var(--field-h); }
.input-icon:focus-within > .icon { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--control-h);
  padding: 0 22px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  font: inherit; font-size: 16px; font-weight: 700;
  cursor: pointer;
  text-decoration: none; text-align: center;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease, transform .1s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn .icon { width: 20px; height: 20px; }
.btn:active { transform: translateY(1px); filter: brightness(.94); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent-grad); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), var(--accent-glow); }
.btn-primary:hover { background: linear-gradient(135deg, #ff6376 0%, #f01a58 100%); color: var(--on-accent); }
.btn-neutral { background: var(--neutral-btn); color: var(--text-dark); border-color: var(--border-strong); }
.btn-neutral:hover { background: var(--neutral-btn-hover); color: #fff; border-color: #4a6db5; }
.btn-danger { background: transparent; color: #ff8a9a; border-color: rgba(255, 98, 120, .6); }
.btn-danger:hover { background: var(--accent-dark); color: #fff; border-color: var(--accent-dark); }
/* the one blue action: search */
.btn-search {
  min-height: 58px; font-size: 19px; font-weight: 600;
  background: linear-gradient(100deg, #1b7dff 0%, #6a4cff 100%); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 12px 30px -10px rgba(74, 98, 255, .7);
}
.btn-search:hover { background: linear-gradient(100deg, #3a8fff 0%, #7d60ff 100%); color: #fff; }
.btn-search .icon { width: 24px; height: 24px; }
/* remove-from-cart */
.btn-remove { background: var(--accent-grad); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 18px -6px rgba(255, 45, 85, .65); }
.btn-remove:hover { background: linear-gradient(135deg, #ff6376 0%, #f01a58 100%); color: #fff; }
.btn-block { width: 100%; }
.btn-sm, .btn[style*="padding:4px 10px"] { min-height: 42px; padding: 0 16px !important; font-size: 15px; border-radius: 12px; }
.btn-sm .icon { width: 18px; height: 18px; }

.actions-row { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.actions-row .btn-primary { flex: 1 1 220px; min-height: 58px; font-size: 18px; }

.slip + .actions-row .btn-primary { flex: 0 1 auto; min-width: 180px; }

.new-customer {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 18px;
  color: var(--accent); font-weight: 700; font-size: 19px;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px;
}
.new-customer .icon { width: 26px; height: 26px; stroke-width: 2.2; }
.new-customer:hover { color: #ff8396; }

.customer-none { margin: -6px 0 14px; font-size: 18px; color: var(--text-dark); }
.customer-name { margin: -6px 0 6px; font-size: 18px; font-weight: 700; }
.customer-addr { margin: 0 0 16px; line-height: 1.6; }

/* ---------- order type selector ---------- */
.order-type-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.order-type-buttons .ot-choice { margin: 0; }
.order-type-buttons a {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  min-height: 132px; padding: 18px 10px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(20, 46, 96, .8), rgba(13, 34, 74, .8));
  text-decoration: none; text-align: center;
  color: var(--text-dark); font-weight: 700; font-size: 20px;
  transition: background .15s ease, border-color .15s ease, box-shadow .2s ease, transform .1s ease;
}
.order-type-buttons a .icon { width: 42px; height: 42px; stroke-width: 1.6; color: #e6eeff; }
.order-type-buttons a:hover { border-color: #4a6db5; }
.order-type-buttons a:active { transform: scale(.985); }
/* radio mark, top-right */
.ot-mark {
  position: absolute; top: 14px; right: 14px; font-style: normal;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid #6f88bf;
}
.order-type-buttons a .ot-mark .icon { width: 15px; height: 15px; stroke-width: 3.2; color: transparent; }
.order-type-buttons a.selected {
  background: linear-gradient(135deg, #ff5a6c 0%, #ea1a55 60%, #d80f4a 100%);
  border-color: #ff9aa8; color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 140, 160, .5), 0 14px 44px -10px rgba(255, 45, 85, .75), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.order-type-buttons a.selected .icon { color: #fff; }
.order-type-buttons a.selected .ot-mark { background: #fff; border-color: #fff; }
.order-type-buttons a.selected .ot-mark .icon { color: var(--accent-dark); }
.ot-choice:focus-within a { box-shadow: var(--ring); }
.ot-choice:focus-within a.selected { box-shadow: var(--ring), 0 14px 44px -10px rgba(255, 45, 85, .75); }

/* ---------- product search + dropdown ---------- */
.search-field { position: relative; }
.search-field .input-icon { margin-bottom: 0; }
.product-results {
  display: none; position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; right: 0;
  max-height: 340px; overflow-y: auto;
  background: #0b2050;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.product-result-row {
  display: flex; align-items: center; min-height: 50px;
  padding: 8px 18px; cursor: pointer; font-size: 16px;
  border-bottom: 1px solid var(--border);
}
.product-result-row:last-child { border-bottom: none; }
.product-result-row:hover { background: var(--selected); color: #fff; }
.product-result-row.active { background: var(--selected); color: #fff; }
.product-result-nr { min-width: 44px; margin-right: 12px; font-weight: 700; opacity: .75; }
.product-result-none { cursor: default; opacity: .7; }
.customer-result-row { flex-wrap: wrap; column-gap: 12px; row-gap: 0; padding-top: 6px; padding-bottom: 6px; }
.customer-result-phone { opacity: .85; }
.customer-result-addr { flex-basis: 100%; font-size: 13px; opacity: .6; }
.product-result-none:hover { background: transparent; color: inherit; }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000; padding: 16px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(2, 8, 22, .72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.modal-box {
  background: linear-gradient(180deg, #11295a, #0a1d43);
  color: var(--text-dark);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  padding: 28px;
  max-width: 520px; width: 100%; max-height: 92vh; overflow-y: auto;
  animation: pop .18s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-box h3 { margin: 0 0 20px; font-size: 22px; line-height: 1.3; }
.modal-sizes { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 18px; }
.modal-size-btn {
  min-height: var(--control-h); padding: 0 18px;
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius); cursor: pointer;
  background: var(--input-bg); color: var(--text-dark);
  font: inherit; font-size: 16px; font-weight: 600;
  transition: border-color .15s ease, background .15s ease;
}
.modal-size-btn:hover { border-color: #4a6db5; }
.modal-size-btn.selected { border-color: #ff9aa8; background: var(--accent-grad); color: #fff; box-shadow: 0 8px 22px -8px rgba(255, 45, 85, .7); }
.extras-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; margin-bottom: 12px; }
.extras-list label { min-height: 40px; align-items: center; cursor: pointer; }
@media (max-width: 500px) { .extras-list { grid-template-columns: 1fr; } }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(6, 18, 44, .35); }
table { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
th, td { padding: 16px 18px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th {
  font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-soft); background: rgba(40, 72, 140, .28);
  white-space: nowrap;
}
tr:hover td { background: rgba(255, 255, 255, .025); }
tr:last-child td { border-bottom: none; }
td .muted { font-size: 14px; }
.cart-table td.num, .cart-table td:nth-child(3) { white-space: nowrap; }
.cart-table th, .cart-table td { padding: 15px 16px; }
.cart-table td:last-child { text-align: right; width: 1%; white-space: nowrap; }

.empty-state {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 0; padding: 30px 16px;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  color: var(--text-muted); font-size: 16px;
}
.empty-state .icon { width: 24px; height: 24px; }

/* ---------- totals ---------- */
.subtotal-line {
  display: flex; justify-content: space-between; align-items: center;
  color: var(--text-muted); font-size: 16px; padding: 4px 4px 0;
  font-variant-numeric: tabular-nums;
}
.total-box {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin: 12px 0 8px; padding: 18px 22px;
  background: linear-gradient(135deg, rgba(255, 82, 103, .18), rgba(229, 19, 79, .1));
  border: 1.5px solid rgba(255, 98, 120, .7);
  border-radius: var(--radius-lg);
  font-size: 36px; font-weight: 800; letter-spacing: -.5px;
  color: #fff;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 10px 34px -14px rgba(255, 45, 85, .6);
}
.total-box span { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-soft); }

.muted { color: var(--text-muted); font-size: 15px; }

/* ---------- login ---------- */
.login-page { background: var(--bg); }
.login-page::before { display: none; }
.login-split { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); position: relative; z-index: 1; }

.login-hero {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 56px 64px; color: #fff;
  background:
    radial-gradient(520px 420px at 85% 10%, rgba(255, 150, 120, .3), transparent 65%),
    radial-gradient(600px 500px at 0% 100%, rgba(70, 6, 30, .6), transparent 60%),
    linear-gradient(150deg, #ff4058 0%, #d8103f 55%, #86102f 100%);
}
.login-hero::before, .login-hero::after { content: ""; position: absolute; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .14); pointer-events: none; }
.login-hero::before { width: 520px; height: 520px; right: -180px; bottom: -160px; }
.login-hero::after  { width: 300px; height: 300px; right: -60px; bottom: -40px; }
.login-hero-inner { position: relative; z-index: 1; margin: auto 0; max-width: 460px; }
.brand-mark-lg { width: 72px; height: 72px; border-radius: 20px; background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); margin-bottom: 28px; }
.brand-mark-lg .icon { width: 38px; height: 38px; }
.login-hero-title { color: #fff; text-transform: none; font-size: 48px; line-height: 1.05; margin: 0 0 12px; font-weight: 800; letter-spacing: -1px; }
.login-hero-tag { font-size: 20px; margin: 0 0 28px; opacity: .94; }
.login-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.login-chips li {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px; font-weight: 600; font-size: 15px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.login-hero-foot { position: relative; z-index: 1; font-size: 14px; opacity: .85; }

.login-form-side { position: relative; display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.login-lang {
  position: absolute; top: 22px; right: 22px;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .05);
  color: var(--text-dark); text-decoration: none; font-weight: 700; font-size: 14px;
  transition: background-color .15s ease;
}
.login-lang:hover { background: var(--neutral-btn-hover); color: #fff; }
.login-card { width: 100%; max-width: 420px; }
.login-card h1 { font-size: 32px; letter-spacing: -.5px; margin: 0 0 8px; }
.login-sub { font-size: 16px; margin: 0 0 28px; }
.login-mobile-brand { display: none; align-items: center; gap: 12px; margin-bottom: 26px; font-size: 20px; }
.login-mobile-brand .brand-mark { color: #fff; width: 44px; height: 44px; }

.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); min-height: 38px; padding: 0 14px;
  border: none; border-radius: 10px; background: transparent; cursor: pointer;
  color: var(--text-muted); font: inherit; font-size: 14px; font-weight: 700;
}
.pw-toggle:hover { background: var(--neutral-btn-hover); color: #fff; }
#lg-pass { padding-right: 96px; }
.btn-lg { min-height: 58px; font-size: 17px; margin-top: 10px; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 1; }
.login-box { width: 100%; max-width: 440px; margin: 0; }
.login-box h1 { font-size: 28px; margin-bottom: 12px; }

@media (max-width: 860px) {
  .login-split { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-mobile-brand { display: flex; }
  .login-form-side { align-items: flex-start; padding-top: 76px; }
}

/* ---------- receipt (screen preview = what the printer outputs) ---------- */
.receipt-pre {
  font-family: var(--mono); font-size: 14px; line-height: 1.45;
  white-space: pre-wrap;
  background: #fffef9; color: #1c1c1c;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 20px; max-width: 380px; margin: 0 auto;
  box-shadow: var(--shadow-md);
}

/* The slip is paper: always black on white, whatever the page theme. */
.slip {
  --ink: #111;
  font-family: var(--font);
  background: #fff; color: var(--ink);
  max-width: 380px; margin: 0 auto 20px;
  padding: 28px 24px 32px;
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  font-size: 14px; line-height: 1.35;
  font-variant-numeric: tabular-nums;
  /* zig-zag paper edge top & bottom */
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%,
                conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.slip-head { text-align: center; margin-bottom: 16px; }
.slip-brand { font-size: 26px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; }
.slip-doc { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; margin-top: 2px; }
/* receipt title (no shop name on the slip) + clear "not an invoice" stamp */
.slip-doc-title { font-size: 24px; font-weight: 900; letter-spacing: .12em; margin-top: 0; }
.slip-stamp {
  display: inline-block; margin-top: 8px; padding: 3px 12px;
  border: 2px solid var(--ink); border-radius: 4px;
  font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
}

.slip-order { display: flex; align-items: stretch; justify-content: space-between; gap: 10px; }
.slip-order-no {
  display: flex; flex-direction: column; justify-content: center;
  border: 2.5px solid var(--ink); border-radius: 8px; padding: 6px 14px; line-height: 1;
}
.slip-order-no .slip-label { font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 4px; }
.slip-order-no strong { font-size: 34px; font-weight: 900; }
.slip-order-type {
  display: flex; align-items: center; justify-content: center; flex: 1;
  background: var(--ink); color: #fff; border-radius: 8px;
  font-size: 18px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.slip-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; font-weight: 600; }

.slip-customer { margin-top: 12px; padding: 10px 12px; border: 1.5px dashed var(--ink); border-radius: 8px; }
.slip-cust-name { font-weight: 800; font-size: 15px; }

.slip-rule { border-top: 2px dashed var(--ink); margin: 14px 0 8px; }

.slip-cols, .slip-item { display: grid; grid-template-columns: 36px 1fr auto; gap: 8px; align-items: start; }
.slip-cols { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.slip-cols span:last-child, .slip-price { text-align: right; }
.slip-item { padding: 7px 0; border-bottom: 1px dotted #777; }
.slip-qty { font-weight: 800; }
.slip-name { font-weight: 700; word-break: break-word; }
.slip-name em { font-style: normal; font-weight: 600; }
.slip-name small { display: block; font-size: 12px; font-weight: 500; }
.slip-price { font-weight: 700; white-space: nowrap; }
.slip-cols-report, .slip-item-report { grid-template-columns: 1fr 1fr auto; }
.slip-item-report { font-weight: 600; }
.slip-item-report.is-void { text-decoration: line-through; }
.slip-item-report.is-void .slip-price { text-decoration: none; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.slip-sum { padding-top: 2px; }
.slip-line { display: flex; justify-content: space-between; padding: 2px 0; }
.slip-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 8px; padding: 10px 0; border-top: 3px double var(--ink); border-bottom: 3px double var(--ink);
  font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
}
.slip-total strong { font-size: 26px; letter-spacing: 0; }

.slip-foot { text-align: center; margin-top: 16px; }
.slip-thanks { font-size: 16px; font-weight: 800; }
.slip-note { font-size: 11px; margin-top: 4px; letter-spacing: .05em; }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .page { padding: 20px 14px 44px; }
  .panel { padding: 18px; border-radius: 18px; }
  .page-head { gap: 14px; margin-bottom: 20px; }
  .page-icon { width: 52px; height: 52px; border-radius: 15px; }
  .page-icon .icon { width: 26px; height: 26px; }
  h1 { font-size: 30px; }
  .page-sub { font-size: 16px; }
  h2.panel-title { font-size: 17px; }
  .order-type-buttons a { min-height: 112px; font-size: 18px; }
  .total-box { font-size: 30px; }
  th, td { padding: 12px 12px; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- print: 80mm thermal receipt (always black on white) ---------- */
@media print {
  /* Default assumes an 80mm thermal roll. If your printer uses 58mm paper,
     change 80mm to 58mm here (and in the @page rule below). */
  @page { size: 80mm auto; margin: 2mm; }
  :root { color-scheme: light; --bg: #fff; --panel: #fff; --text-dark: #000; --border: #000; }
  html, body { background: #fff !important; color: #000; min-height: 0; }
  body::before { display: none; }
  .topbar, .no-print, .flash { display: none !important; }
  .page { padding: 0; max-width: none; margin: 0; }
  .slip {
    box-shadow: none; border-radius: 0; padding: 0; margin: 0; max-width: 100%; width: 100%;
    -webkit-mask: none; mask: none; font-size: 12px; color: #000; --ink: #000;
  }
  .slip-order-type { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .slip-brand { font-size: 22px; }
  .slip-doc-title { font-size: 20px; }
  .slip-order-no strong { font-size: 28px; }
  .slip-total strong { font-size: 22px; }
  .slip-item { break-inside: avoid; }
  .receipt-pre {
    background: #fff; color: #000;
    border: none; box-shadow: none; border-radius: 0;
    padding: 0; margin: 0; max-width: 100%; width: 100%;
    font-size: 12px; line-height: 1.35;
  }
}
