/* MicroPOS design system — shared by the register (index.html), Admin and Super Admin.
 *
 * Two employee designs, chosen per shop in Admin > Register design (tenants.ui_theme):
 *   html[data-ui="modern"]   light/dark, rounded, Inter  (the default)
 *   html[data-ui="classic"]  old restaurant POS: navy screen, beveled grey keys, colour-coded menu keys, paper guest check
 * js/mp-ui.js sets data-ui (and the dark class) before first paint.
 *
 * Pages still use Tailwind utilities for layout and for the modals built in JS; the "compat" block at the end of the
 * classic section re-skins those so nothing looks out of place in either design. */

@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/assets/fonts/Inter-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('/assets/fonts/Inter-Medium.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/assets/fonts/Inter-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('/assets/fonts/Inter-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 800; font-display: swap; src: url('/assets/fonts/Inter-ExtraBold.ttf') format('truetype'); }

/* ------------------------------------------------------------------ tokens */
:root {
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'DejaVu Sans Mono', Menlo, Consolas, monospace;
  --bg: #eef1f5; --surface: #ffffff; --surface-2: #f6f8fa; --line: #e3e8ee; --line-2: #d3dae3;
  --text: #0f172a; --muted: #5b6b82; --faint: #94a3b8;
  --brand: #059669; --brand-2: #047857; --brand-soft: #e7f8f0; --brand-ink: #065f46;
  --blue: #2563eb; --blue-2: #1d4ed8; --amber: #d97706; --amber-soft: #fff5e0; --red: #dc2626; --red-soft: #fdecec;
  --radius: 16px; --radius-sm: 11px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 18px rgba(15, 23, 42, .06);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .25);
  --overlay: rgba(15, 23, 42, .55);
  color-scheme: light;
}
html.dark {
  --bg: #0a1120; --surface: #111a2e; --surface-2: #0d1526; --line: #1f2b45; --line-2: #2b3a5a;
  --text: #e8eef8; --muted: #93a4c0; --faint: #5f7191;
  --brand: #10b981; --brand-2: #34d399; --brand-soft: rgba(16, 185, 129, .14); --brand-ink: #a7f3d0;
  --blue: #3b82f6; --blue-2: #60a5fa; --amber: #f59e0b; --amber-soft: rgba(245, 158, 11, .14); --red: #f87171; --red-soft: rgba(248, 113, 113, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  --overlay: rgba(2, 6, 16, .7);
  color-scheme: dark;
}

html, body.mp { background: var(--bg); }
body.mp, body.mp.font-sans { font-family: var(--font) !important; color: var(--text); -webkit-font-smoothing: antialiased; }
body.mp button, body.mp input, body.mp select, body.mp textarea { font-family: inherit; }
.hidden { display: none !important; }
.mp-num { font-variant-numeric: tabular-nums; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.mp-i { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ buttons, fields, pills */
.mp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; letter-spacing: .005em; cursor: pointer; transition: background .15s, transform .08s, box-shadow .15s, border-color .15s; -webkit-tap-highlight-color: transparent; }
.mp-btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--faint); }
.mp-btn:active:not(:disabled) { transform: scale(.985); }
.mp-btn:focus-visible, .mp-iconbtn:focus-visible, .mp-item:focus-visible, .mp-input:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: 1px; }
.mp-btn:disabled { opacity: .45; cursor: not-allowed; }
.mp-btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(5, 150, 105, .35); }
.mp-btn-primary:hover:not(:disabled) { background: var(--brand-2); border-color: var(--brand-2); }
html.dark .mp-btn-primary { color: #04251a; }
.mp-btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.mp-btn-ghost:hover:not(:disabled) { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.mp-btn-ok { background: var(--brand); border-color: var(--brand); color: #fff; }
.mp-btn-ok:hover:not(:disabled) { background: var(--brand-2); border-color: var(--brand-2); }
.mp-btn-info { background: var(--blue); border-color: var(--blue); color: #fff; }
.mp-btn-info:hover:not(:disabled) { background: var(--blue-2); border-color: var(--blue-2); }
.mp-btn-amber { background: var(--amber); border-color: var(--amber); color: #fff; }
.mp-btn-amber:hover:not(:disabled) { filter: brightness(.94); background: var(--amber); }
.mp-btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.mp-btn-outline-ok { color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand) 45%, transparent); background: transparent; }
.mp-btn-outline-ok:hover:not(:disabled) { background: var(--brand-soft); border-color: var(--brand); }
.mp-btn-outline-amber { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 50%, transparent); background: transparent; }
.mp-btn-outline-amber:hover:not(:disabled) { background: var(--amber-soft); border-color: var(--amber); }
.mp-btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.mp-btn-block { width: 100%; }

.mp-iconbtn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 11px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; text-decoration: none; }
.mp-iconbtn:hover { background: var(--surface); color: var(--text); border-color: var(--line); }
.mp-iconbtn.icon-only { width: 38px; padding: 0; justify-content: center; }
.mp-iconbtn.danger:hover { color: var(--red); }
.mp-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--line); color: var(--muted); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.mp-count.on { background: var(--brand); color: #fff; }

.mp-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; letter-spacing: .01em; }
.mp-input { width: 100%; height: 44px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.mp-input::placeholder { color: var(--faint); }
.mp-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.mp-input-lg { height: 54px; font-size: 22px; font-weight: 700; }
.mp-error { font-size: 13px; font-weight: 600; color: var(--red); }

.mp-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted); }
.mp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--faint) 22%, transparent); }
.mp-dot[data-state="ok"] { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .22); }
.mp-dot[data-state="bad"] { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .22); }

/* ------------------------------------------------------------------ logos */
.mp-logo { display: block; height: 30px; width: auto; }
.mp-logo-light { display: none; }                                     /* white-text version, for dark surfaces */
html.dark .mp-logo-dark { display: none; } html.dark .mp-logo-light { display: block; }

/* ------------------------------------------------------------------ modals */
.mp-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--overlay); backdrop-filter: blur(3px); }
.mp-modal.z60 { z-index: 60; }
.mp-dialog { width: 100%; max-width: 400px; max-height: 90vh; display: flex; flex-direction: column; background: var(--surface); color: var(--text); border-radius: 22px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); animation: mp-pop .16s ease-out; }
.mp-dialog.wide { max-width: 520px; }
.mp-dialog.narrow { max-width: 380px; }
@keyframes mp-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.mp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 24px 26px 4px; }
.mp-head h3 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.mp-body { padding: 8px 26px 26px; overflow-y: auto; min-height: 0; }
.mp-sub { margin: 0 0 16px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.mp-actions { display: flex; gap: 10px; padding-top: 18px; }
.mp-actions > * { flex: 1; }
.mp-x { width: 32px; height: 32px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.mp-x:hover { background: var(--surface-2); color: var(--text); }
.mp-spinner { width: 54px; height: 54px; margin: 6px auto 20px; border-radius: 50%; border: 4px solid color-mix(in srgb, var(--brand) 22%, transparent); border-top-color: var(--brand); animation: mp-spin .9s linear infinite; }
@keyframes mp-spin { to { transform: rotate(360deg); } }
.mp-bigamount { font-size: 34px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mp-notice-icon { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); }
.mp-notice-icon.warn { background: var(--amber-soft); color: var(--amber); }
.mp-notice-icon.bad { background: var(--red-soft); color: var(--red); }
.mp-notice-icon .mp-i { width: 28px; height: 28px; stroke-width: 2.2; }
.mp-toasts { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.mp-toast { max-width: 360px; padding: 12px 16px; border-radius: 12px; background: #0f172a; color: #fff; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-lg); animation: mp-pop .16s ease-out; }
.mp-toast.bad { background: #b91c1c; }

/* ------------------------------------------------------------------ sign-in */
.mp-login { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--bg); }
.mp-login-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 48px 56px; color: #ecfdf5;
  background: radial-gradient(900px 500px at 15% 10%, rgba(52, 211, 153, .35), transparent 60%), radial-gradient(700px 600px at 100% 100%, rgba(5, 150, 105, .55), transparent 60%), linear-gradient(160deg, #064e3b 0%, #022c22 100%); }
.mp-login-brand::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 70%); pointer-events: none; }
.mp-login-brand > * { position: relative; z-index: 1; }
.mp-login-brand img { height: 46px; width: auto; display: block; align-self: flex-start; }
.mp-login-brand h2 { margin: 0 0 14px; font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; max-width: 14ch; }
.mp-login-brand p { margin: 0; font-size: 16px; line-height: 1.6; color: #a7f3d0; max-width: 40ch; }
.mp-login-points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.mp-login-points li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; font-weight: 500; color: #d1fae5; }
.mp-login-points .mp-i { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .1); }
.mp-login-foot { font-size: 12.5px; color: #6ee7b7; opacity: .8; }
.mp-login-form { position: relative; display: flex; align-items: center; justify-content: center; padding: 32px; }
.mp-login-card { width: 100%; max-width: 380px; }
.mp-login-card .mp-mobile-logo { display: none; margin-bottom: 26px; }
.mp-login-card h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.025em; }
.mp-login-card .lead { margin: 6px 0 26px; font-size: 14.5px; color: var(--muted); }
.mp-login-card form > div { margin-bottom: 14px; }
.mp-login-card .mp-switch { margin-top: 18px; text-align: center; }
.mp-login-card .mp-switch button { background: none; border: 0; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 10px; border-radius: 8px; }
.mp-login-card .mp-switch button:hover { color: var(--text); background: var(--surface-2); }
.mp-login-legal { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; font-size: 12px; color: var(--faint); }
@media (max-width: 860px) { .mp-login { grid-template-columns: 1fr; } .mp-login-brand { display: none; } .mp-login-card .mp-mobile-logo { display: block; } }

/* ------------------------------------------------------------------ register */
.mp-app { display: grid; grid-template-columns: minmax(0, 1fr) 410px; grid-template-rows: minmax(0, 1fr); height: 100vh; width: 100vw; overflow: hidden; }
.mp-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 18px 22px 0; }
.mp-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 2px 2px 16px; }
.mp-top-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.mp-top-left .sep { width: 1px; height: 30px; background: var(--line-2); }
.mp-shop { min-width: 0; }
.mp-top-left { flex: 1 1 auto; }
.mp-shop-name { font-size: 17px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-shop-user { font-size: 12px; color: var(--faint); }
.mp-top-right { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.mp-clock { font-size: 13px; font-weight: 600; color: var(--muted); margin-right: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mp-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.mp-search { position: relative; flex: 1; max-width: 420px; }
.mp-search .mp-i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.mp-search input { padding-left: 42px; }
.mp-toolbar .meta { font-size: 13px; color: var(--faint); font-weight: 500; }
.mp-grid { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; align-content: start; overflow-y: auto; padding: 2px 4px 24px 2px; }
.mp-empty { grid-column: 1 / -1; padding: 60px 0; text-align: center; color: var(--faint); font-size: 14px; }

.mp-item { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 132px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; box-shadow: var(--shadow); transition: transform .12s, box-shadow .15s, border-color .15s; -webkit-tap-highlight-color: transparent; }
.mp-item:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.mp-item:active { transform: scale(.975); }
.mp-item-av { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 800; background: hsl(var(--h, 160) 75% 92%); color: hsl(var(--h, 160) 60% 32%); }
html.dark .mp-item-av { background: hsl(var(--h, 160) 40% 22%); color: hsl(var(--h, 160) 80% 78%); }
.mp-item-name { font-size: 14.5px; font-weight: 600; line-height: 1.3; letter-spacing: -.005em; }
.mp-item-foot { margin-top: auto; width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mp-item-price { font-size: 16px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.mp-item-add { font-size: 11px; font-weight: 600; color: var(--faint); }
.mp-item-badge { position: absolute; top: 10px; right: 10px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; display: none; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(5, 150, 105, .4); }
html.dark .mp-item-badge { color: #04251a; }
.mp-item.in-cart .mp-item-badge { display: flex; }
.mp-item.in-cart { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }

.mp-order { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-left: 1px solid var(--line); }
.mp-order-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 14px; }
.mp-order-head h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.mp-order-head .sub { font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.mp-lines { flex: 1; overflow-y: auto; padding: 0 22px; }
.mp-line { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.mp-line:first-child { border-top: 0; }
.mp-line-main { flex: 1; min-width: 0; }
.mp-line-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-line-unit { font-size: 12px; color: var(--faint); margin-top: 1px; }
.mp-qty { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.mp-qty button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.mp-qty button:hover { background: var(--line); color: var(--text); }
.mp-qty span { min-width: 22px; text-align: center; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mp-line-total { width: 66px; text-align: right; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mp-order-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 56px; color: var(--faint); font-size: 14px; text-align: center; }
.mp-order-empty .mp-i { width: 44px; height: 44px; stroke-width: 1.3; opacity: .7; }

.mp-checkout { padding: 16px 22px 22px; border-top: 1px solid var(--line); background: var(--surface-2); }
.mp-member { margin-bottom: 14px; }
.mp-member-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 12px; background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 28%, transparent); font-size: 13px; font-weight: 600; color: var(--amber); }
.mp-member-chip .acts { display: flex; gap: 12px; flex-shrink: 0; }
.mp-member-chip .acts button { background: none; border: 0; color: inherit; font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; padding: 0; }
.mp-trow { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; color: var(--muted); padding: 2px 0; font-variant-numeric: tabular-nums; }
.mp-trow.cash { color: var(--brand); } .mp-trow.points { color: var(--amber); }
.mp-trow.balance { font-size: 17px; font-weight: 800; color: var(--blue); }
.mp-grand { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding-top: 12px; border-top: 1px dashed var(--line-2); font-weight: 800; letter-spacing: -.02em; }
.mp-grand .l { font-size: 16px; } .mp-grand .v { font-size: 32px; font-variant-numeric: tabular-nums; }
.mp-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.mp-pay .mp-btn { min-height: 74px; border-radius: 16px; font-size: 16px; font-weight: 800; letter-spacing: .02em; flex-direction: column; gap: 6px; }
.mp-pay .mp-i { width: 24px; height: 24px; }
.mp-pay .mp-btn:disabled { background: var(--line); border-color: var(--line); color: var(--faint); opacity: 1; box-shadow: none; }
.mp-order-foot { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 0 12px; font-size: 11.5px; color: var(--faint); background: var(--surface-2); }
.mp-order-foot img { height: 15px; width: auto; opacity: .9; }
.mp-secondary-row { display: flex; gap: 8px; margin-top: 12px; }
.mp-secondary-row .mp-btn { flex: 1; min-height: 38px; font-size: 13px; }

.mp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mp-table th { text-align: left; padding: 0 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.mp-table th.r, .mp-table td.r { text-align: right; }
.mp-table td { padding: 13px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.mp-table tbody tr { cursor: pointer; } .mp-table tbody tr:hover td { background: var(--surface-2); }
.mp-card { border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); padding: 16px; }
.mp-list-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 11px 6px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); text-align: left; font-size: 14px; cursor: pointer; }
.mp-list-btn:first-child { border-top: 0; } .mp-list-btn:hover { background: var(--surface-2); }
.mp-list-btn .pts { color: var(--faint); font-size: 13px; }
.mp-receipt-frame { overflow-y: auto; border-radius: 14px; border: 1px solid var(--line); }

@media (max-width: 1500px) { .mp-iconbtn .t { display: none; } .mp-iconbtn { width: 38px; padding: 0; justify-content: center; } .mp-iconbtn .mp-count { position: absolute; transform: translate(14px, -12px); } .mp-iconbtn { position: relative; } }
@media (max-width: 1280px) { .mp-clock { display: none; } }
@media (max-width: 1100px) { .mp-app { grid-template-columns: minmax(0, 1fr) 350px; } }
@media (max-width: 760px) { .mp-app { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) 46vh; } .mp-order { border-left: 0; border-top: 1px solid var(--line); } .mp-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }

/* ================================================================== CLASSIC: old restaurant POS ================================================================== */
html[data-ui="classic"] {
  --font: Tahoma, Verdana, 'DejaVu Sans', 'Liberation Sans', Arial, sans-serif;
  --bg: #0b2b4d; --surface: #d4d0c8; --surface-2: #c3bfb6; --line: #7b776e; --line-2: #55524b;
  --text: #101010; --muted: #2c2b28; --faint: #555249;
  --brand: #1a7a2e; --brand-2: #14611f; --brand-soft: #cfe8d3; --brand-ink: #0c4a18;
  --blue: #1b4f9c; --blue-2: #153f7d; --amber: #9a5b00; --amber-soft: #f0e0b8; --red: #a11d1d; --red-soft: #f1cfcf;
  --radius: 3px; --radius-sm: 3px; --shadow: none; --shadow-lg: 4px 4px 0 rgba(0, 0, 0, .5); --overlay: rgba(0, 10, 30, .72);
  --lit: #ffffff; --shade: #6b6860; --dark: #1a1a1a;
  color-scheme: light;
}
html[data-ui="classic"] body.mp { letter-spacing: 0; }
html[data-ui="classic"] .mp-num, html[data-ui="classic"] .mp-line-total { font-variant-numeric: tabular-nums; }
html[data-ui="classic"] * { scrollbar-width: auto; scrollbar-color: #9d998f #d4d0c8; }
html[data-ui="classic"] .mp-logo-dark { display: none; } html[data-ui="classic"] .mp-logo-light { display: block; }

/* beveled keys */
html[data-ui="classic"] .mp-btn, html[data-ui="classic"] .mp-iconbtn, html[data-ui="classic"] .mp-x, html[data-ui="classic"] .mp-qty button {
  border-radius: 2px; border: 2px solid; border-color: var(--lit) var(--dark) var(--dark) var(--lit); background: linear-gradient(#e6e3dc, #c6c2b9); color: #101010; box-shadow: inset -1px -1px 0 #8a867d, inset 1px 1px 0 #f4f2ee;
  font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: 12.5px; text-shadow: none; transition: none;
}
html[data-ui="classic"] .mp-btn:hover:not(:disabled), html[data-ui="classic"] .mp-iconbtn:hover { background: linear-gradient(#f0eee8, #d2cec5); border-color: var(--lit) var(--dark) var(--dark) var(--lit); color: #000; }
html[data-ui="classic"] .mp-btn:active:not(:disabled), html[data-ui="classic"] .mp-iconbtn:active, html[data-ui="classic"] .mp-qty button:active { transform: none; border-color: var(--dark) var(--lit) var(--lit) var(--dark); box-shadow: inset 1px 1px 0 #8a867d; background: #bdb9b0; padding-top: 2px; }
html[data-ui="classic"] .mp-btn:disabled { opacity: 1; color: #8c887e; text-shadow: 1px 1px 0 #f4f2ee; background: #cdc9c0; }
html[data-ui="classic"] .mp-btn-primary, html[data-ui="classic"] .mp-btn-ok { background: linear-gradient(#3aa14e, #1a7a2e); color: #fff; text-shadow: 1px 1px 0 #0b3a15; box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .45), inset -1px -1px 0 rgba(0, 0, 0, .35); }
html[data-ui="classic"] .mp-btn-primary:hover:not(:disabled), html[data-ui="classic"] .mp-btn-ok:hover:not(:disabled) { background: linear-gradient(#49b25d, #1f8a35); color: #fff; }
html[data-ui="classic"] .mp-btn-info { background: linear-gradient(#4a82d0, #1b4f9c); color: #fff; text-shadow: 1px 1px 0 #0a2550; box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .45), inset -1px -1px 0 rgba(0, 0, 0, .35); }
html[data-ui="classic"] .mp-btn-info:hover:not(:disabled) { background: linear-gradient(#5b92e0, #2159ad); color: #fff; }
html[data-ui="classic"] .mp-btn-amber { background: linear-gradient(#e0a43a, #b87410); color: #fff; text-shadow: 1px 1px 0 #5a3500; }
html[data-ui="classic"] .mp-btn-danger { background: linear-gradient(#d24a4a, #a11d1d); color: #fff; text-shadow: 1px 1px 0 #4d0a0a; }
html[data-ui="classic"] .mp-btn-ghost { background: linear-gradient(#e6e3dc, #c6c2b9); color: #101010; border-color: var(--lit) var(--dark) var(--dark) var(--lit); }
html[data-ui="classic"] .mp-btn-outline-ok, html[data-ui="classic"] .mp-btn-outline-amber { background: linear-gradient(#e6e3dc, #c6c2b9); color: #101010; }
html[data-ui="classic"] .mp-btn:focus-visible, html[data-ui="classic"] .mp-iconbtn:focus-visible, html[data-ui="classic"] .mp-item:focus-visible { outline: 2px dotted #000; outline-offset: -6px; }
html[data-ui="classic"] .mp-input { border-radius: 0; border: 2px solid; border-color: var(--dark) var(--lit) var(--lit) var(--dark); background: #fff; box-shadow: inset 1px 1px 0 #8a867d; height: 40px; font-size: 15px; color: #000; }
html[data-ui="classic"] .mp-input:focus { box-shadow: inset 1px 1px 0 #8a867d, 0 0 0 2px #1b4f9c; border-color: var(--dark) var(--lit) var(--lit) var(--dark); }
html[data-ui="classic"] .mp-input-lg { height: 52px; font-family: var(--mono); }
html[data-ui="classic"] .mp-label { text-transform: uppercase; font-size: 11px; letter-spacing: .06em; color: #101010; font-weight: 700; }
html[data-ui="classic"] .mp-error { color: #a11d1d; }
html[data-ui="classic"] .mp-pill { border-radius: 0; border: 2px solid; border-color: var(--dark) var(--lit) var(--lit) var(--dark); background: #101a14; color: #7dff9a; font-family: var(--mono); font-size: 11.5px; height: 28px; text-transform: uppercase; letter-spacing: .04em; }
html[data-ui="classic"] .mp-dot { border-radius: 0; width: 9px; height: 9px; box-shadow: none; }
html[data-ui="classic"] .mp-count { border-radius: 0; background: #101010; color: #ffe34d; }
html[data-ui="classic"] .mp-count.on { background: #a11d1d; color: #fff; }

/* dialogs: grey windows with a navy title bar */
html[data-ui="classic"] .mp-modal { backdrop-filter: none; }
html[data-ui="classic"] .mp-dialog { border-radius: 0; border: 3px solid; border-color: var(--lit) var(--dark) var(--dark) var(--lit); background: #d4d0c8; outline: 1px solid #000; animation: none; box-shadow: var(--shadow-lg); }
html[data-ui="classic"] .mp-head { padding: 0; background: linear-gradient(90deg, #0a246a, #3a6ea5); color: #fff; }
html[data-ui="classic"] .mp-head h3 { padding: 6px 10px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
html[data-ui="classic"] .mp-head .mp-x { margin: 2px; width: 22px; height: 22px; color: #000; }
html[data-ui="classic"] .mp-body { padding: 16px 18px 18px; }
html[data-ui="classic"] .mp-sub { color: #1c1b19; font-size: 13px; }
html[data-ui="classic"] .mp-bigamount { font-family: var(--mono); background: #0b0b0b; color: #ffb000; padding: 8px 14px; border: 2px solid; border-color: var(--dark) var(--lit) var(--lit) var(--dark); letter-spacing: 0; display: inline-block; }
html[data-ui="classic"] .mp-spinner { border-radius: 0; border-radius: 50%; border-color: #8a867d; border-top-color: #0a246a; }
html[data-ui="classic"] .mp-notice-icon { border-radius: 0; background: #cfe8d3; color: #0c4a18; border: 2px solid #1a7a2e; }
html[data-ui="classic"] .mp-notice-icon.warn { background: #f0e0b8; color: #6a4000; border-color: #9a5b00; }
html[data-ui="classic"] .mp-notice-icon.bad { background: #f1cfcf; color: #6e1010; border-color: #a11d1d; }
html[data-ui="classic"] .mp-toast { border-radius: 0; background: #101010; color: #7dff9a; font-family: var(--mono); border: 2px solid #7dff9a; box-shadow: none; }
html[data-ui="classic"] .mp-toast.bad { background: #3a0a0a; color: #ffb3b3; border-color: #ff6b6b; }

/* sign-on */
html[data-ui="classic"] .mp-login { display: flex; align-items: center; justify-content: center; background: #0b2b4d; background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: 28px 28px; }
html[data-ui="classic"] .mp-login-brand { display: none; }
html[data-ui="classic"] .mp-login-form { padding: 0; display: block; width: 420px; max-width: 92vw; position: static; }
html[data-ui="classic"] .mp-login-card { max-width: 420px; background: #d4d0c8; border: 3px solid; border-color: var(--lit) var(--dark) var(--dark) var(--lit); outline: 1px solid #000; box-shadow: var(--shadow-lg); padding: 0 0 22px; }
html[data-ui="classic"] .mp-login-card .mp-mobile-logo { display: block; margin: 0; padding: 18px 20px; background: linear-gradient(#103a66, #0a2848); border-bottom: 3px solid #000; }
html[data-ui="classic"] .mp-login-card .mp-mobile-logo img.mp-logo-light { height: 34px; }
html[data-ui="classic"] .mp-login-card h1 { margin: 0; padding: 5px 10px; background: linear-gradient(90deg, #0a246a, #3a6ea5); color: #fff; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
html[data-ui="classic"] .mp-login-card .lead { margin: 14px 22px 16px; color: #1c1b19; font-size: 13px; }
html[data-ui="classic"] .mp-login-card form { margin: 0 22px; }
html[data-ui="classic"] .mp-login-card .mp-switch { margin: 14px 22px 0; }
html[data-ui="classic"] .mp-login-card .mp-switch button { color: #101010; text-decoration: underline; text-transform: uppercase; font-size: 11.5px; letter-spacing: .04em; }
html[data-ui="classic"] .mp-login-legal { color: #8fb0d6; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }

/* the terminal: navy desk, header bar, colour-coded keys, paper guest check */
html[data-ui="classic"] .mp-app { grid-template-columns: minmax(0, 1fr) 420px; background: #0b2b4d; }
html[data-ui="classic"] .mp-main { padding: 0; background: #0b2b4d; }
html[data-ui="classic"] .mp-top { padding: 8px 12px; background: linear-gradient(#17497f, #0d2f55); border-bottom: 3px solid #000; box-shadow: 0 1px 0 #3d73b3 inset; }
html[data-ui="classic"] .mp-top-left .sep { background: #4a7bb5; width: 2px; }
html[data-ui="classic"] .mp-shop-name { color: #ffe34d; text-transform: uppercase; letter-spacing: .08em; font-size: 16px; text-shadow: 1px 1px 0 #000; }
html[data-ui="classic"] .mp-shop-user { color: #a9c6e8; text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; font-family: var(--mono); }
html[data-ui="classic"] .mp-clock { color: #7dff9a; font-family: var(--mono); background: #0a0f0c; padding: 5px 10px; border: 2px solid; border-color: var(--dark) #5a5a5a #5a5a5a var(--dark); letter-spacing: .04em; text-transform: uppercase; margin-right: 10px; }
html[data-ui="classic"] .mp-top-right { gap: 5px; }
html[data-ui="classic"] .mp-iconbtn { height: 32px; padding: 0 10px; }
html[data-ui="classic"] .mp-iconbtn.icon-only { width: 34px; }
html[data-ui="classic"] #theme-toggle { display: none; }
html[data-ui="classic"] .mp-toolbar { margin: 0; padding: 8px 12px; background: #0f3a66; border-bottom: 2px solid #000; }
html[data-ui="classic"] .mp-search .mp-i { color: #555; }
html[data-ui="classic"] .mp-toolbar .meta { color: #a9c6e8; font-family: var(--mono); text-transform: uppercase; font-size: 11px; letter-spacing: .05em; }
html[data-ui="classic"] .mp-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 12px; background: #0b2b4d; }
html[data-ui="classic"] .mp-empty { color: #a9c6e8; }
html[data-ui="classic"] .mp-item { --c1: hsl(var(--h, 210) 74% 54%); --c2: hsl(var(--h, 210) 78% 34%); align-items: stretch; justify-content: space-between; gap: 4px; min-height: 92px; padding: 8px 8px 6px; border-radius: 3px; border: 3px solid; border-color: hsl(var(--h, 210) 75% 74%) #000 #000 hsl(var(--h, 210) 75% 74%); background: linear-gradient(var(--c1), var(--c2)); color: #fff; text-align: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); transition: none; }
html[data-ui="classic"] .mp-item:hover { transform: none; filter: brightness(1.12); border-color: hsl(var(--h, 210) 75% 74%) #000 #000 hsl(var(--h, 210) 75% 74%); }
html[data-ui="classic"] .mp-item:active { transform: none; border-color: #000 hsl(var(--h, 210) 75% 74%) hsl(var(--h, 210) 75% 74%) #000; background: linear-gradient(var(--c2), var(--c1)); padding-top: 10px; }
html[data-ui="classic"] .mp-item[data-y="1"] { color: #000; --c1: hsl(var(--h) 90% 62%); --c2: hsl(var(--h) 90% 46%); }
html[data-ui="classic"] .mp-item-av { display: none; }
html[data-ui="classic"] .mp-item-name { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 13.5px; font-weight: 800; text-transform: uppercase; line-height: 1.15; letter-spacing: .02em; text-shadow: 1px 1px 0 rgba(0, 0, 0, .65); }
html[data-ui="classic"] .mp-item[data-y="1"] .mp-item-name { text-shadow: 1px 1px 0 rgba(255, 255, 255, .45); }
html[data-ui="classic"] .mp-item-foot { margin: 0; justify-content: center; gap: 8px; }
html[data-ui="classic"] .mp-item-price { background: #0a0a0a; color: #ffb000; font-family: var(--mono); font-size: 12.5px; font-weight: 700; padding: 1px 7px; letter-spacing: 0; border: 1px solid #000; }
html[data-ui="classic"] .mp-item-add { color: inherit; font-size: 10px; text-transform: uppercase; opacity: .9; text-shadow: 1px 1px 0 rgba(0, 0, 0, .55); }
html[data-ui="classic"] .mp-item-badge { top: auto; bottom: 5px; right: 5px; border-radius: 0; min-width: 22px; height: 22px; background: #a11d1d; color: #fff; border: 2px solid #fff; box-shadow: 1px 1px 0 #000; font-family: var(--mono); }
html[data-ui="classic"] .mp-item.in-cart { border-color: #fff #000 #000 #fff; }

html[data-ui="classic"] .mp-order { background: #d4d0c8; border-left: 4px solid #000; }
html[data-ui="classic"] .mp-order-head { padding: 0; background: linear-gradient(90deg, #0a246a, #3a6ea5); color: #fff; }
html[data-ui="classic"] .mp-order-head > div { padding: 6px 10px; }
html[data-ui="classic"] .mp-order-head h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #fff; }
html[data-ui="classic"] .mp-order-head .sub { color: #cfe0f5; font-family: var(--mono); font-size: 11px; text-transform: uppercase; margin-top: 0; }
html[data-ui="classic"] .mp-order-head .mp-btn { margin: 3px; min-height: 26px; padding: 0 10px; font-size: 11px; }
html[data-ui="classic"] .mp-lines { margin: 8px 8px 0; padding: 4px 10px; background: #fffbe9; border: 2px solid; border-color: var(--dark) var(--lit) var(--lit) var(--dark); box-shadow: inset 1px 1px 0 #8a867d; background-image: repeating-linear-gradient(transparent 0, transparent 31px, rgba(60, 100, 160, .13) 31px, rgba(60, 100, 160, .13) 32px); font-family: var(--mono); }
html[data-ui="classic"] .mp-line { padding: 5px 0; border-top: 0; gap: 6px; }
html[data-ui="classic"] .mp-line-name { font-size: 13.5px; font-weight: 700; text-transform: uppercase; color: #000; }
html[data-ui="classic"] .mp-line-unit { color: #5b5a52; font-size: 11px; }
html[data-ui="classic"] .mp-line-total { font-size: 14px; font-weight: 700; color: #000; }
html[data-ui="classic"] .mp-qty { padding: 0; gap: 0; border-radius: 0; border: 0; background: transparent; }
html[data-ui="classic"] .mp-qty button { width: 24px; height: 24px; border-radius: 0; font-size: 15px; }
html[data-ui="classic"] .mp-qty span { min-width: 26px; font-size: 14px; font-weight: 800; background: #fff; border: 2px solid; border-color: var(--dark) var(--lit) var(--lit) var(--dark); line-height: 20px; }
html[data-ui="classic"] .mp-order-empty { color: #8a8678; font-family: var(--mono); text-transform: uppercase; font-size: 12px; margin-top: 40px; letter-spacing: .06em; }
html[data-ui="classic"] .mp-order-empty .mp-i { display: none; }
html[data-ui="classic"] .mp-checkout { background: #d4d0c8; border-top: 0; padding: 10px 8px 10px; }
html[data-ui="classic"] .mp-member-chip { border-radius: 0; background: #f0e0b8; color: #101010; border: 2px solid; border-color: var(--dark) var(--lit) var(--lit) var(--dark); font-size: 12px; text-transform: uppercase; }
html[data-ui="classic"] .mp-trow { color: #101010; font-family: var(--mono); font-size: 13px; text-transform: uppercase; padding: 1px 4px; }
html[data-ui="classic"] .mp-trow.cash { color: #0c4a18; } html[data-ui="classic"] .mp-trow.points { color: #6a4000; } html[data-ui="classic"] .mp-trow.balance { color: #153f7d; font-size: 15px; }
html[data-ui="classic"] .mp-grand { margin: 8px 0 0; padding: 8px 12px; background: #0a0a0a; color: #ffb000; border: 2px solid; border-color: var(--dark) var(--lit) var(--lit) var(--dark); font-family: var(--mono); letter-spacing: 0; align-items: center; }
html[data-ui="classic"] .mp-grand .l { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; } html[data-ui="classic"] .mp-grand .v { font-size: 34px; text-shadow: 0 0 8px rgba(255, 176, 0, .55); }
html[data-ui="classic"] .mp-pay { gap: 6px; margin-top: 10px; }
html[data-ui="classic"] .mp-pay .mp-btn { min-height: 76px; font-size: 20px; border-radius: 3px; border-width: 3px; letter-spacing: .08em; flex-direction: row; gap: 10px; }
html[data-ui="classic"] .mp-pay .mp-btn:disabled { background: #cdc9c0; border-color: var(--lit) var(--dark) var(--dark) var(--lit); color: #8c887e; text-shadow: 1px 1px 0 #f4f2ee; }
html[data-ui="classic"] .mp-secondary-row { margin-top: 6px; }
html[data-ui="classic"] .mp-order-foot { background: #0d2f55; color: #a9c6e8; padding: 6px 0; text-transform: uppercase; letter-spacing: .08em; font-size: 10px; border-top: 3px solid #000; }
html[data-ui="classic"] .mp-table th { color: #101010; border-bottom: 2px solid #000; } html[data-ui="classic"] .mp-table td { border-top: 1px dotted #55524b; }
html[data-ui="classic"] .mp-table tbody tr:hover td { background: #0a246a; color: #fff; }
html[data-ui="classic"] .mp-card { border-radius: 0; background: #e6e3dc; border: 2px solid; border-color: var(--dark) var(--lit) var(--lit) var(--dark); }
html[data-ui="classic"] .mp-list-btn { border-top: 1px dotted #55524b; color: #000; } html[data-ui="classic"] .mp-list-btn:hover { background: #0a246a; color: #fff; } html[data-ui="classic"] .mp-list-btn:hover .pts { color: #ffe34d; }
html[data-ui="classic"] .mp-receipt-frame { border-radius: 0; border: 2px solid #000; }

/* ---- compat: Tailwind-built pages and JS modals (cash scan, manager code, Admin, Super Admin) re-skinned for the classic design ---- */
html[data-ui="classic"] body { font-family: var(--font) !important; background: #0b2b4d !important; color: #101010; }
html[data-ui="classic"] [class*="rounded"] { border-radius: 2px !important; }
html[data-ui="classic"] .rounded-full { border-radius: 999px !important; }
html[data-ui="classic"] [class*="shadow"] { box-shadow: none !important; }
html[data-ui="classic"] .bg-white { background-color: #d4d0c8 !important; }
html[data-ui="classic"] .bg-neutral-50, html[data-ui="classic"] .bg-neutral-100, html[data-ui="classic"] [class*="bg-neutral-50\/"] { background-color: #e6e3dc !important; }
html[data-ui="classic"] .bg-neutral-200 { background-color: #c3bfb6 !important; }
html[data-ui="classic"] .bg-neutral-900 { background-color: #101010 !important; }
html[data-ui="classic"] [class*="ring-1"], html[data-ui="classic"] [class*="border-neutral"] { box-shadow: none !important; }
html[data-ui="classic"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), html[data-ui="classic"] select, html[data-ui="classic"] textarea { background: #fff !important; color: #000 !important; border: 2px solid !important; border-color: #1a1a1a #fff #fff #1a1a1a !important; border-radius: 0 !important; }
html[data-ui="classic"] button:not(.mp-btn):not(.mp-iconbtn):not(.mp-x):not(.mp-item):not(.mp-list-btn):not([class*="mp-"]) { border: 2px solid; border-color: #fff #1a1a1a #1a1a1a #fff; font-weight: 700; }
html[data-ui="classic"] .bg-emerald-500, html[data-ui="classic"] .bg-emerald-600 { background: linear-gradient(#3aa14e, #1a7a2e) !important; color: #fff !important; }
html[data-ui="classic"] .bg-blue-500, html[data-ui="classic"] .bg-blue-600 { background: linear-gradient(#4a82d0, #1b4f9c) !important; color: #fff !important; }
html[data-ui="classic"] .bg-amber-500 { background: linear-gradient(#e0a43a, #b87410) !important; color: #fff !important; }
html[data-ui="classic"] .text-neutral-400, html[data-ui="classic"] .text-neutral-500, html[data-ui="classic"] .text-neutral-300 { color: #3b3a35 !important; }
html[data-ui="classic"] #mc-form, html[data-ui="classic"] #cv-modal > div { border: 3px solid; border-color: #fff #1a1a1a #1a1a1a #fff; outline: 1px solid #000; box-shadow: 4px 4px 0 rgba(0, 0, 0, .5) !important; }

[data-i] { display: inline-flex; align-items: center; }

/* ------------------------------------------------------------------ Admin: "Register design" picker */
.mp-designs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mp-design { text-align: left; padding: 10px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .15s, box-shadow .15s; font: inherit; }
.mp-design:hover { border-color: var(--faint); }
.mp-design[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.mp-design b { display: flex; align-items: center; justify-content: space-between; margin: 10px 4px 2px; font-size: 14.5px; }
.mp-design small { display: block; margin: 0 4px 4px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.mp-design .tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brand); color: #fff; }
.mp-prev { display: grid; grid-template-columns: 1fr 34%; height: 112px; border-radius: 10px; overflow: hidden; font-size: 0; }
.mp-prev .keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 8px; align-content: start; }
.mp-prev .keys i { display: block; height: 22px; }
.mp-prev .chk { padding: 8px; }
.mp-prev .chk i { display: block; height: 5px; margin-bottom: 6px; }
.mp-prev.modern { background: #eef1f5; }
.mp-prev.modern .keys i { background: #fff; border-radius: 6px; box-shadow: 0 1px 2px rgba(15, 23, 42, .15); border-bottom: 3px solid #10b981; }
.mp-prev.modern .chk { background: #fff; border-left: 1px solid #e3e8ee; }
.mp-prev.modern .chk i { background: #e3e8ee; border-radius: 3px; } .mp-prev.modern .chk i:last-child { background: #059669; height: 14px; margin-top: 10px; border-radius: 6px; }
.mp-prev.classic { background: #0b2b4d; }
.mp-prev.classic .keys i { border: 2px solid; border-color: rgba(255, 255, 255, .55) #000 #000 rgba(255, 255, 255, .55); }
.mp-prev.classic .keys i:nth-child(4n+1) { background: #2db04a; } .mp-prev.classic .keys i:nth-child(4n+2) { background: #d14a3a; } .mp-prev.classic .keys i:nth-child(4n+3) { background: #3b78d0; } .mp-prev.classic .keys i:nth-child(4n) { background: #e6b422; }
.mp-prev.classic .chk { background: #d4d0c8; border-left: 3px solid #000; }
.mp-prev.classic .chk i { background: #fffbe9; height: 5px; } .mp-prev.classic .chk i:last-child { background: #0a0a0a; height: 14px; margin-top: 10px; }
@media (max-width: 560px) { .mp-designs { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ Admin: section bar (js/admin-nav.js) */
.mp-subnav { position: sticky; top: 0; z-index: 30; display: flex; gap: 6px; flex-wrap: wrap; margin: -8px 0 22px; padding: 10px 0; background: var(--bg); }
.mp-subnav a { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.mp-subnav a:hover { color: var(--text); border-color: var(--faint); }
.mp-subnav a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
html.dark .mp-subnav a.on { color: #04251a; }
html[data-ui="classic"] .mp-subnav { background: #0b2b4d; gap: 4px; }
html[data-ui="classic"] .mp-subnav a { border-radius: 2px; border: 2px solid; border-color: #fff #1a1a1a #1a1a1a #fff; background: linear-gradient(#e6e3dc, #c6c2b9); color: #101010; text-transform: uppercase; font-size: 11.5px; letter-spacing: .03em; }
html[data-ui="classic"] .mp-subnav a.on { background: linear-gradient(#3aa14e, #1a7a2e); color: #fff; }
.mp-subnav + * { scroll-margin-top: 70px; }
#app-shell section { scroll-margin-top: 64px; }

/* classic: text that sits straight on the navy desk (Admin / Super Admin headers) */
html[data-ui="classic"] #shop-name:not(.mp-shop-name) { color: #ffe34d !important; text-transform: uppercase; letter-spacing: .08em; text-shadow: 1px 1px 0 #000; }
html[data-ui="classic"] #shop-username:not(.mp-shop-user) { color: #a9c6e8 !important; font-family: var(--mono); text-transform: uppercase; }
html[data-ui="classic"] #app-shell > div:first-child:not(.mp-app) a, html[data-ui="classic"] #app-shell > div:first-child:not(.mp-app) button:not(#theme-toggle) { color: #fff !important; text-transform: uppercase; letter-spacing: .04em; font-size: 11.5px !important; }
html[data-ui="classic"] .text-emerald-600, html[data-ui="classic"] .text-emerald-700 { color: #0c4a18 !important; }
html[data-ui="classic"] .text-red-500, html[data-ui="classic"] .text-red-600 { color: #8a1111 !important; }
html[data-ui="classic"] .text-neutral-600, html[data-ui="classic"] .text-neutral-700 { color: #1a1a1a !important; }

#cv-input::placeholder { letter-spacing: 0; font-size: 14px; font-family: var(--font); }

/* ------------------------------------------------------------------ category tabs (register) */
.mp-tabs { display: flex; gap: 8px; margin: 0 0 14px; padding: 2px 2px 6px; overflow-x: auto; flex: none; scrollbar-width: thin; }
.mp-tab { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.mp-tab span { font-size: 11.5px; font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; }
.mp-tab:hover { color: var(--text); border-color: var(--faint); }
.mp-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(5, 150, 105, .35); }
.mp-tab.on span { color: rgba(255, 255, 255, .8); }
html.dark .mp-tab.on { color: #04251a; } html.dark .mp-tab.on span { color: rgba(4, 37, 26, .7); }
html[data-ui="classic"] .mp-tabs { margin: 0; padding: 8px 12px 0; gap: 3px; background: #0b2b4d; border-bottom: 3px solid #000; }
html[data-ui="classic"] .mp-tab { height: 34px; padding: 0 12px; border-radius: 3px 3px 0 0; border: 2px solid; border-bottom: 0; border-color: #fff #1a1a1a #1a1a1a #fff; background: linear-gradient(#e6e3dc, #c6c2b9); color: #101010; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; font-weight: 700; margin-bottom: -3px; }
html[data-ui="classic"] .mp-tab span { color: #55524b; font-family: var(--mono); }
html[data-ui="classic"] .mp-tab:hover { color: #000; border-color: #fff #1a1a1a #1a1a1a #fff; background: linear-gradient(#f0eee8, #d2cec5); }
html[data-ui="classic"] .mp-tab.on { background: #0f3a66; color: #ffe34d; border-color: #fff #1a1a1a #0f3a66 #fff; box-shadow: none; height: 38px; text-shadow: 1px 1px 0 #000; }
html[data-ui="classic"] .mp-tab.on span { color: #a9c6e8; }

/* ---- Discounts (register) ---- */
.mp-trow.discount { color: var(--brand); }
.mp-btn.on { background: var(--amber-soft); border-color: var(--amber); }
.mp-disc-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.mp-disc { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.mp-disc:hover { border-color: var(--faint); background: var(--surface-2); }
.mp-disc .nm { font-size: 15px; font-weight: 700; }
.mp-disc .sub { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 1px; }
.mp-disc .pct { font-size: 18px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mp-disc.on { border-color: var(--brand); background: var(--brand-soft); }
.mp-disc.on .sub { color: var(--brand-ink); }
html[data-ui="classic"] .mp-trow.discount { color: #0c4a18; }
html[data-ui="classic"] .mp-btn.on { background: linear-gradient(#f0d98a, #d9b84e); }
html[data-ui="classic"] .mp-disc { border-radius: 0; border: 2px solid; border-color: var(--lit) var(--dark) var(--dark) var(--lit); background: linear-gradient(#e6e3dc, #c6c2b9); color: #101010; text-transform: uppercase; }
html[data-ui="classic"] .mp-disc .sub { color: #3a3a3a; }
html[data-ui="classic"] .mp-disc .pct { color: #0c4a18; font-family: var(--mono); }
html[data-ui="classic"] .mp-disc.on { background: linear-gradient(#f0d98a, #d9b84e); border-color: var(--dark) var(--lit) var(--lit) var(--dark); }

/* ---- Server (restaurant) register: floor plan, tables, tab chrome ---- */
.mp-floor.hidden, .mp-chip.hidden, .mp-linkbtn.hidden, .mp-tables-btn.hidden { display: none !important; }
.mp-app[data-view="floor"] { grid-template-columns: minmax(0, 1fr); }
.mp-app[data-view="floor"] .mp-order, .mp-app[data-view="floor"] .mp-toolbar, .mp-app[data-view="floor"] #item-tabs, .mp-app[data-view="floor"] #inventory-grid { display: none !important; }
.mp-order-title { flex: 1; min-width: 0; }
.mp-tables-btn { margin-right: 12px; flex: none; }
.mp-linkbtn { background: none; border: 0; padding: 0 0 0 8px; font: inherit; font-weight: 700; color: var(--blue); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.mp-linkbtn::before { content: "·"; color: var(--faint); margin-right: 8px; text-decoration: none; display: inline-block; }
.mp-chip { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--brand-soft); color: var(--brand-ink); }
.mp-chip.saving { background: var(--amber-soft); color: var(--amber); } .mp-chip.error { background: var(--red-soft); color: var(--red); }

.mp-floor { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; }
.mp-floor-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex: none; }
.mp-floor-top .mp-tabs { flex: 1; min-width: 0; }
.mp-floor-info { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding-top: 6px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.mp-legend { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--faint); }
.mp-legend i { width: 10px; height: 10px; border-radius: 3px; border: 2px solid var(--line-2); margin-left: 8px; }
.mp-legend i:first-child { margin-left: 0; }
.mp-legend i.seated { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 14%, transparent); }
.mp-legend i.open { border-color: var(--amber); background: var(--amber-soft); }
.mp-legend i.check { border-color: var(--brand); background: var(--brand-soft); }
.mp-floor-wrap { flex: 1 1 0; min-height: 0; overflow: auto; display: flex; justify-content: center; align-items: flex-start; padding: 2px 0 18px; }
.mp-floor-canvas { position: relative; width: min(100%, calc((100vh - 190px) * 1.6)); aspect-ratio: 16 / 10; container-type: inline-size; flex: none; border-radius: 18px; border: 1px solid var(--line); background:
  linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 5% 8%, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 5% 8%, var(--surface); }
.mp-floor-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--faint); text-align: center; padding: 20px; }
.mp-floor-empty .mp-i { width: 44px; height: 44px; stroke-width: 1.3; opacity: .7; } .mp-floor-empty b { color: var(--muted); font-size: 16px; }
.mp-guestkeys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mp-guestkey { min-height: 54px; padding: 0 6px; font-size: 19px; font-weight: 800; flex-direction: column; gap: 0; }
.mp-guestkey small { font-size: 10.5px; font-weight: 500; color: var(--faint); }


html[data-ui="classic"] .mp-floor { padding: 0; }
html[data-ui="classic"] .mp-floor-top { background: #0b2b4d; border-bottom: 3px solid #000; align-items: flex-end; }
html[data-ui="classic"] .mp-floor-top .mp-tabs { border-bottom: 0; }
html[data-ui="classic"] .mp-floor-info { padding: 0 14px 8px; color: #ffe34d; font-family: var(--mono); font-size: 12px; text-transform: uppercase; }
html[data-ui="classic"] .mp-legend { color: #a9c6e8; font-size: 10.5px; }
html[data-ui="classic"] .mp-legend i { border-radius: 0; border: 1px solid #000; background: linear-gradient(#e6e3dc, #c6c2b9); }
html[data-ui="classic"] .mp-legend i.seated { background: #3a6ea5; } html[data-ui="classic"] .mp-legend i.open { background: #e8c545; } html[data-ui="classic"] .mp-legend i.check { background: #2f9e44; }
html[data-ui="classic"] .mp-floor-wrap { padding: 14px 14px 18px; background: #0b2b4d; }
html[data-ui="classic"] .mp-floor-canvas { border-radius: 0; border: 3px solid; border-color: #1a1a1a #6a9bd1 #6a9bd1 #1a1a1a; background:
  linear-gradient(rgba(106, 155, 209, .13) 1px, transparent 1px) 0 0 / 5% 8%, linear-gradient(90deg, rgba(106, 155, 209, .13) 1px, transparent 1px) 0 0 / 5% 8%, #0a2342; }
html[data-ui="classic"] .mp-floor-empty { color: #a9c6e8; } html[data-ui="classic"] .mp-floor-empty b { color: #ffe34d; text-transform: uppercase; }
html[data-ui="classic"] .mp-linkbtn { color: #ffe34d; } html[data-ui="classic"] .mp-chip { border-radius: 0; background: #2f9e44; color: #fff; font-family: var(--mono); text-transform: uppercase; }
html[data-ui="classic"] .mp-chip.saving { background: #d9b030; color: #101010; } html[data-ui="classic"] .mp-chip.error { background: #b3261e; color: #fff; }
html[data-ui="classic"] .mp-guestkey { font-family: var(--mono); }

/* ---- Admin: register type picker + floor plan editor ---- */
.mp-prev.rt { background: var(--surface-2); border: 1px solid var(--line); }
.mp-prev.rt-cashier .keys i { background: #fff; border-radius: 5px; box-shadow: 0 1px 2px rgba(15, 23, 42, .15); border-bottom: 3px solid #10b981; }
.mp-prev.rt-cashier .chk { background: #fff; border-left: 1px solid var(--line); } .mp-prev.rt-cashier .chk i { background: #e3e8ee; border-radius: 3px; } .mp-prev.rt-cashier .chk i:last-child { background: #059669; height: 14px; margin-top: 10px; border-radius: 6px; }
.mp-prev.rt-server { display: block; position: relative; background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 10% 20%, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 10% 20%, var(--surface-2); }
.mp-prev.rt-server .fl i { position: absolute; width: 22px; height: 22px; border-radius: 6px; background: #fff; border: 2px solid var(--line-2); transform: translate(-50%, -50%); }
.mp-prev.rt-server .fl i.b, .mp-prev.rt-server .fl i.e { border-radius: 50%; } .mp-prev.rt-server .fl i.c { width: 38px; }
.mp-prev.rt-server .fl i.a { left: 16%; top: 28%; } .mp-prev.rt-server .fl i.b { left: 40%; top: 30%; border-color: #d97706; background: #fff5e0; } .mp-prev.rt-server .fl i.c { left: 72%; top: 28%; }
.mp-prev.rt-server .fl i.d { left: 20%; top: 72%; border-color: #059669; background: #e7f8f0; } .mp-prev.rt-server .fl i.e { left: 50%; top: 72%; } .mp-prev.rt-server .fl i.f { left: 80%; top: 72%; }
.mp-fed { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 20px; align-items: start; }
.mp-fed .mp-floor-canvas { width: 100%; }
.mp-fed .mp-tbl { cursor: grab; touch-action: none; user-select: none; }
.mp-fed-side { display: flex; flex-direction: column; gap: 14px; }
.mp-fed-side form { padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.mp-fed-side select { width: 100%; }
@media (max-width: 900px) { .mp-fed { grid-template-columns: 1fr; } }
html[data-ui="classic"] .mp-prev.rt-server { background: #0a2342; border: 0; }
html[data-ui="classic"] .mp-fed-side form { border-radius: 0; border: 2px solid; border-color: #fff #1a1a1a #1a1a1a #fff; background: #d4d0c8; }
html[data-ui="classic"] .mp-app[data-view="floor"] { grid-template-columns: minmax(0, 1fr); }

/* ---- tables drawn as tables: a tabletop with a chair for every seat ---- */
.mp-tbl { --band: max(13px, 1.75cqw); --wood-a: #f6eddb; --wood-b: #e6d6b8; --wood-line: #c7ae83; --cloth: linear-gradient(145deg, var(--wood-a), var(--wood-b)); --ink: #2a2118; --ink-2: #6b5a43; --chair: #d5dce7; --chair-line: #98a6ba; --occ: var(--chair); --occ-line: var(--chair-line);
  position: absolute; transform: translate(-50%, -50%); width: max(92px, 11cqw); aspect-ratio: 1; padding: 0; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mp-tbl.wide { width: max(142px, 17cqw); aspect-ratio: 1.8; }
.mp-tbl .top { position: absolute; inset: var(--band); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; overflow: hidden; text-align: center; border-radius: 12px; background: var(--cloth); border: 2px solid var(--wood-line); box-shadow: 0 3px 9px rgba(60, 40, 10, .25), inset 0 0 0 2px rgba(255, 255, 255, .38); transition: box-shadow .15s, transform .1s; }
.mp-tbl.round .top { border-radius: 50%; }
.mp-tbl:hover .top { box-shadow: 0 6px 16px rgba(60, 40, 10, .32), inset 0 0 0 2px rgba(255, 255, 255, .38); }
.mp-tbl:active .top { transform: scale(.97); }
.mp-tbl .n { font-size: max(16px, 2cqw); font-weight: 800; letter-spacing: -.01em; line-height: 1.05; }
.mp-tbl .l { font-size: max(11.5px, 1.25cqw); font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; line-height: 1.1; }
.mp-tbl .s { font-size: max(9.5px, 1cqw); font-weight: 600; color: var(--ink-2); opacity: .85; line-height: 1.1; }
.mp-tbl .chair { position: absolute; display: block; background: var(--chair); border: 1.5px solid var(--chair-line); box-shadow: 0 1px 2px rgba(15, 23, 42, .22); }
.mp-tbl .chair.occ { background: var(--occ); border-color: var(--occ-line); }
.mp-tbl .chair.t, .mp-tbl .chair.b, .mp-tbl .chair.o { width: calc(var(--band) * 1.55); height: calc(var(--band) * .74); border-radius: 7px; }
.mp-tbl .chair.l, .mp-tbl .chair.r { width: calc(var(--band) * .74); height: calc(var(--band) * 1.55); border-radius: 7px; }
.mp-tbl .chair.t { top: calc(var(--band) * .05); transform: translateX(-50%); border-radius: 8px 8px 4px 4px; }
.mp-tbl .chair.b { bottom: calc(var(--band) * .05); transform: translateX(-50%); border-radius: 4px 4px 8px 8px; }
.mp-tbl .chair.l { left: calc(var(--band) * .05); transform: translateY(-50%); border-radius: 8px 4px 4px 8px; }
.mp-tbl .chair.r { right: calc(var(--band) * .05); transform: translateY(-50%); border-radius: 4px 8px 8px 4px; }
.mp-tbl.seated { --cloth: linear-gradient(145deg, #e3edff, #c5d8fb); --wood-line: #2563eb; --ink: #14306b; --ink-2: #345394; --occ: #3b82f6; --occ-line: #1d4ed8; }
.mp-tbl.open { --cloth: linear-gradient(145deg, #fff0cf, #ffd98c); --wood-line: #d97706; --ink: #4d2c00; --ink-2: #86510a; --occ: #f59e0b; --occ-line: #b45309; }
.mp-tbl.check { --cloth: linear-gradient(145deg, #d9f6e8, #aee9ca); --wood-line: #059669; --ink: #053f30; --ink-2: #0b6a52; --occ: #10b981; --occ-line: #047857; }
.mp-tbl.stale { --cloth: linear-gradient(145deg, #fde3e3, #f8b9b9); --wood-line: #dc2626; --ink: #6e1414; --ink-2: #a12828; --occ: #ef4444; --occ-line: #b91c1c; }
html.dark .mp-tbl { --wood-a: #5a4630; --wood-b: #44341f; --wood-line: #8a7048; --ink: #f6ecd9; --ink-2: #d2bf9d; --chair: #2e3b57; --chair-line: #566a8f; }
html.dark .mp-tbl.seated { --cloth: linear-gradient(145deg, #23407a, #1a2f5c); --ink: #e1ebff; --ink-2: #aac2f2; } html.dark .mp-tbl.open { --cloth: linear-gradient(145deg, #7a4d10, #5d3a0b); --ink: #ffefcf; --ink-2: #f1cf92; }
html.dark .mp-tbl.check { --cloth: linear-gradient(145deg, #0f5a45, #0a4636); --ink: #d9f7ea; --ink-2: #9be0c2; } html.dark .mp-tbl.stale { --cloth: linear-gradient(145deg, #7a2323, #5e1919); --ink: #ffe0e0; --ink-2: #f3a9a9; }
.mp-section-tag { position: absolute; left: 14px; top: 10px; font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); pointer-events: none; }
.mp-section-tag b { color: var(--muted); font-weight: 800; }
.mp-fed .mp-tbl { cursor: grab; touch-action: none; user-select: none; }
.mp-fed .mp-tbl.sel .top { outline: 3px solid var(--blue); outline-offset: 2px; }

html[data-ui="classic"] .mp-tbl { --wood-a: #c99a62; --wood-b: #8a5a2c; --wood-line: #1a1a1a; --ink: #fff6e2; --ink-2: #fbe9c4; --chair: #5b5e66; --chair-line: #111; --occ: #e8c545; --occ-line: #111; }
html[data-ui="classic"] .mp-tbl .top { border-radius: 3px; border: 2px solid; border-color: #f3d9ae #1a1a1a #1a1a1a #f3d9ae; box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .28), inset 2px 2px 0 rgba(255, 255, 255, .25), 3px 3px 0 rgba(0, 0, 0, .5); }
html[data-ui="classic"] .mp-tbl.round .top { border-radius: 50%; }
html[data-ui="classic"] .mp-tbl:hover .top { box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .28), inset 2px 2px 0 rgba(255, 255, 255, .35), 3px 3px 0 rgba(0, 0, 0, .5); filter: brightness(1.08); }
html[data-ui="classic"] .mp-tbl:active .top { transform: translate(2px, 2px); box-shadow: none; }
html[data-ui="classic"] .mp-tbl .n { text-transform: uppercase; text-shadow: 1px 1px 0 rgba(0, 0, 0, .7); }
html[data-ui="classic"] .mp-tbl .l { font-family: var(--mono); text-shadow: 1px 1px 0 rgba(0, 0, 0, .6); }
html[data-ui="classic"] .mp-tbl .s { font-family: var(--mono); text-transform: uppercase; text-shadow: 1px 1px 0 rgba(0, 0, 0, .55); }
html[data-ui="classic"] .mp-tbl .chair { border-radius: 2px !important; box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .25), 2px 2px 0 rgba(0, 0, 0, .45); }
html[data-ui="classic"] .mp-tbl.seated { --cloth: linear-gradient(#5f93cc, #2c5c93); --ink: #fff; --ink-2: #e4efff; --occ: #6aa7ea; }
html[data-ui="classic"] .mp-tbl.open { --cloth: linear-gradient(#f3d667, #d9b030); --ink: #101010; --ink-2: #3a2c00; --occ: #f3d667; }
html[data-ui="classic"] .mp-tbl.open .n, html[data-ui="classic"] .mp-tbl.open .l, html[data-ui="classic"] .mp-tbl.open .s { text-shadow: none; }
html[data-ui="classic"] .mp-tbl.check { --cloth: linear-gradient(#4cc462, #1f8a3a); --ink: #fff; --ink-2: #eaffee; --occ: #5fe07a; }
html[data-ui="classic"] .mp-tbl.stale { --cloth: linear-gradient(#ec6a5e, #b3261e); --ink: #fff; --ink-2: #ffe3e0; --occ: #ff8a7d; }
html[data-ui="classic"] .mp-section-tag { color: #6a9bd1; } html[data-ui="classic"] .mp-section-tag b { color: #ffe34d; }
html[data-ui="classic"] .mp-fed .mp-tbl.sel .top { outline: 3px solid #ffe34d; outline-offset: 2px; }

/* ---- Server register: checks bar, split dialog, money check ---- */
.mp-checks { display: flex; gap: 6px; padding: 0 22px 10px; overflow-x: auto; flex: none; }
.mp-checks.hidden { display: none !important; }
.mp-check-chip { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.mp-check-chip span { font-variant-numeric: tabular-nums; color: var(--faint); font-weight: 700; }
.mp-check-chip:hover { border-color: var(--faint); color: var(--text); }
.mp-check-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; } .mp-check-chip.on span { color: rgba(255, 255, 255, .85); }
.mp-seg { display: flex; gap: 6px; margin-bottom: 14px; }
.mp-seg button { flex: 1; min-height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.mp-seg button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.mp-split-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.mp-split-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-top: 1px solid var(--line); }
.mp-split-row:first-child { border-top: 0; } .mp-split-row.on { background: var(--brand-soft); }
.mp-split-row .nm b { display: block; font-size: 14px; } .mp-split-row .nm small { color: var(--faint); font-size: 12px; }
.mp-split-even { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 18px 0 6px; font-size: 15px; color: var(--muted); }
.mp-warn { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); font-size: 13px; font-weight: 600; }
.mp-kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mp-kv > div b { color: var(--text); } .mp-kv > div.big { font-size: 17px; border-bottom: 0; } .mp-kv > div.big b { color: var(--brand); font-size: 20px; }
.mp-money-list { display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow-y: auto; margin-top: 10px; }
.mp-money-card { text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.mp-money-card:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-soft); } .mp-money-card:disabled { opacity: .7; cursor: default; }
.mp-money-card .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; } .mp-money-card .top b { font-size: 16px; } .mp-money-card .top span { color: var(--faint); font-size: 12px; }
.mp-money-card .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; } .mp-money-card .nums small { display: block; font-size: 11px; font-weight: 600; color: var(--faint); }
.mp-money-card .warn { margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--amber); }
.mp-money-diff { min-height: 24px; margin-top: 6px; font-size: 17px; font-weight: 800; color: var(--brand); } .mp-money-diff.over { color: var(--amber); } .mp-money-diff.short { color: var(--red); }
html[data-ui="classic"] .mp-checks { padding: 4px 6px 6px; gap: 3px; background: #0b2b4d; border-bottom: 2px solid #000; }
html[data-ui="classic"] .mp-check-chip { border-radius: 0; height: 28px; border: 2px solid; border-color: #fff #1a1a1a #1a1a1a #fff; background: linear-gradient(#e6e3dc, #c6c2b9); color: #101010; font-size: 11px; text-transform: uppercase; }
html[data-ui="classic"] .mp-check-chip span { color: #55524b; font-family: var(--mono); } html[data-ui="classic"] .mp-check-chip.on { background: #0f3a66; color: #ffe34d; border-color: #fff #1a1a1a #0f3a66 #fff; } html[data-ui="classic"] .mp-check-chip.on span { color: #a9c6e8; }
html[data-ui="classic"] .mp-seg button { border-radius: 0; border: 2px solid; border-color: #fff #1a1a1a #1a1a1a #fff; background: linear-gradient(#e6e3dc, #c6c2b9); color: #101010; text-transform: uppercase; font-size: 12px; }
html[data-ui="classic"] .mp-seg button.on { background: #0f3a66; color: #ffe34d; border-color: #1a1a1a #fff #fff #1a1a1a; }
html[data-ui="classic"] .mp-split-list { border-radius: 0; border: 2px solid; border-color: #1a1a1a #fff #fff #1a1a1a; background: #fff; }
html[data-ui="classic"] .mp-split-row { border-top: 1px dotted #999; } html[data-ui="classic"] .mp-split-row.on { background: #f0e0b8; } html[data-ui="classic"] .mp-split-row .nm b { text-transform: uppercase; font-size: 12.5px; }
html[data-ui="classic"] .mp-money-card { border-radius: 0; border: 2px solid; border-color: #fff #1a1a1a #1a1a1a #fff; background: linear-gradient(#e6e3dc, #c6c2b9); color: #101010; text-transform: uppercase; }
html[data-ui="classic"] .mp-money-card .nums { font-family: var(--mono); } html[data-ui="classic"] .mp-money-card .top span, html[data-ui="classic"] .mp-money-card .nums small { color: #55524b; }
html[data-ui="classic"] .mp-kv > div { border-bottom: 1px dotted #999; color: #101010; text-transform: uppercase; font-size: 12.5px; } html[data-ui="classic"] .mp-kv > div b { color: #101010; font-family: var(--mono); } html[data-ui="classic"] .mp-kv > div.big b { color: #0c4a18; }
html[data-ui="classic"] .mp-warn { border-radius: 0; background: #f0e0b8; color: #6a4000; text-transform: uppercase; font-size: 12px; }
html[data-ui="classic"] .mp-money-diff { font-family: var(--mono); text-transform: uppercase; color: #0c4a18; } html[data-ui="classic"] .mp-money-diff.over { color: #6a4000; } html[data-ui="classic"] .mp-money-diff.short { color: #b3261e; }

/* ---- Admin: servers + cash-outs ---- */
.mp-fed-secsrv { display: flex; align-items: center; gap: 10px; margin: -4px 0 10px; font-size: 13.5px; color: var(--muted); } .mp-fed-secsrv.hidden { display: none !important; } .mp-fed-secsrv select { min-width: 160px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; }
.mp-fed-servers { padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.mp-fed-srv { display: flex; align-items: center; justify-content: space-between; padding: 5px 2px; border-bottom: 1px solid var(--line); font-size: 14px; } .mp-fed-srv button { border: 0; background: none; color: var(--faint); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; } .mp-fed-srv button:hover { color: var(--red); }
#fed-server-form { display: flex; gap: 8px; margin-top: 10px; }
.mp-cotable { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; } .mp-cotable th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); padding: 6px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; } .mp-cotable td { padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mp-cotable td.over { color: var(--amber); font-weight: 800; } .mp-cotable td.short { color: var(--red); font-weight: 800; }
html[data-ui="classic"] .mp-fed-servers { border-radius: 0; border: 2px solid; border-color: #fff #1a1a1a #1a1a1a #fff; background: #d4d0c8; }
.mp-tbl .n, .mp-tbl .l, .mp-tbl .s { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 3px; }
.mp-tbl.round .top { padding: 0 9%; }
.mp-fed { grid-template-columns: minmax(0, 1fr); }
.mp-fed-side { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.mp-fed-side > #fed-add { align-self: start; } .mp-fed-side > #fed-msg { grid-column: 1 / -1; margin: 0; }
@media (max-width: 760px) { .mp-fed-side { grid-template-columns: 1fr; } }
.mp-tbl.round .top { padding: 0 4%; } .mp-tbl.round .l { font-size: max(10.5px, 1.15cqw); }

/* ---- servers per table: name tag under the table, selection tools in Admin ---- */
.mp-tbl .srv { position: absolute; left: 50%; top: calc(100% + 1px); transform: translateX(-50%); z-index: 1; max-width: 120%; padding: 1px 8px; border-radius: 999px; font-size: max(10px, 1.05cqw); font-weight: 800; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: hsl(var(--h, 210) 70% 90%); color: hsl(var(--h, 210) 65% 24%); border: 1px solid hsl(var(--h, 210) 55% 62%); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); pointer-events: none; }
html.dark .mp-tbl .srv { background: hsl(var(--h, 210) 45% 24%); color: hsl(var(--h, 210) 80% 88%); border-color: hsl(var(--h, 210) 40% 45%); }
html[data-ui="classic"] .mp-tbl .srv { border-radius: 0; font-family: var(--mono); text-transform: uppercase; background: hsl(var(--h, 210) 60% 82%); color: #101010; border: 1px solid #000; box-shadow: 2px 2px 0 rgba(0, 0, 0, .5); }
.mp-fed-selbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; } .mp-fed-selbar.hidden { display: none !important; }
.mp-fed-selbar .mp-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.mp-fed-bulk { padding: 14px; border-radius: 14px; border: 1px solid var(--brand); background: var(--brand-soft); } .mp-fed-bulk.hidden { display: none !important; }
.mp-fed .mp-tbl.sel .top { outline: 3px solid var(--blue); outline-offset: 2px; }
html[data-ui="classic"] .mp-fed-selbar .mp-btn.on { background: linear-gradient(#f0d98a, #d9b84e); color: #101010; }
html[data-ui="classic"] .mp-fed-bulk { border-radius: 0; border: 2px solid; border-color: #fff #1a1a1a #1a1a1a #fff; background: #d4d0c8; }

/* iPad and other narrow screens: the Money check button, summary and legend stay (they sit in a row under the section tabs) */
@media (max-width: 1280px) {
  .mp-floor-top { flex-wrap: wrap; gap: 0; }
  .mp-floor-top .mp-tabs { flex: 1 1 100%; margin-bottom: 6px; }
  .mp-floor-info { width: 100%; flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 8px 16px; padding: 0 0 10px; }
  .mp-floor-info #floor-summary { margin-left: auto; }
  html[data-ui="classic"] .mp-floor-info { padding: 6px 14px 8px; }
  html[data-ui="classic"] .mp-floor-top .mp-tabs { margin-bottom: 0; }
}

/* iPad widths: a single-row header, a tidier order panel */
@media (max-width: 1100px) {
  .mp-top { gap: 8px; }
  .mp-top-left { gap: 10px; } .mp-top-left .mp-logo { height: 26px; }
  .mp-top-right { flex-wrap: nowrap; flex: none; }
  .mp-shop-user { display: none; }
  .mp-top-right .mp-pill { padding: 0 9px; } .mp-top-right .mp-pill #connection-text { display: none; }
  .mp-order-title h2 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mp-tables-btn { margin-right: 8px; }
  .mp-secondary-row .mp-btn { font-size: 12px; padding: 0 6px; }
  .mp-order-head { padding: 14px 14px 10px; } .mp-checks { padding: 0 14px 10px; }
}

/* iPad Safari: 100vh is taller than the visible screen (the address bar), which hid the bottom of the register; dvh is the visible height */
@supports (height: 100dvh) {
  #app-shell { height: 100dvh; }
  .mp-app { height: 100dvh; }
  .mp-floor-canvas { width: min(100%, calc((100dvh - 190px) * 1.6)); }
  .mp-fed .mp-floor-canvas { width: 100%; }
}
