:root {
  --bg: #f6f0e8;
  --surface: #fffdf9;
  --surface-2: #f1e7db;
  --text: #2b1d14;
  --muted: #7a6757;
  --border: #e6dacb;
  --primary: #4a2c1a;
  --primary-text: #fff;
  --accent: #c98b4a;
  --sidebar: #2b1a10;
  --sidebar-text: #eadbc9;
  --ok: #2f7d4f;
  --warn: #b9770e;
  --danger: #b3392f;
  --info: #2b6a8f;
  --shadow: 0 12px 32px rgba(43, 29, 20, .08);
  --radius: 14px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #17100c;
  --surface: #241a14;
  --surface-2: #302219;
  --text: #f3e9dd;
  --muted: #b5a08c;
  --border: #3b2b21;
  --primary: #c98b4a;
  --primary-text: #1b130e;
  --accent: #e0a463;
  --sidebar: #100b08;
  --sidebar-text: #f0e3d4;
  --ok: #67c08b;
  --warn: #e2a84b;
  --danger: #ef7b70;
  --info: #73b3d8;
  --shadow: 0 18px 40px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 "Segoe UI", Tahoma, Arial, sans-serif;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 26px; line-height: 1.2; margin-bottom: 0; }
h2 { font-size: 18px; margin-bottom: 0; }
h3 { font-size: 15px; }
small, .muted { color: var(--muted); }
code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
hr { border: 0; border-top: 1px dashed var(--border); }

.app-body { background: var(--bg); }
.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .22s ease; }
.app-shell.sidebar-collapsed { grid-template-columns: 76px minmax(0, 1fr); }
.sidebar-collapse-toggle { display: inline-flex; flex: 0 0 auto; }
.sidebar-head { display:flex; align-items:center; gap:6px; min-width:0; }
.sidebar-head .brand { flex:1; min-width:0; padding-inline-end:0; }
.sidebar-head .sidebar-collapse-toggle { width:36px; height:36px; padding:0; color:var(--sidebar-text); background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.12); }
.sidebar-head .sidebar-collapse-toggle .material-symbols-rounded { font-size:20px; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  overflow: auto;
  background: var(--sidebar);
  color: var(--sidebar-text);
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; color: #fff; padding: 6px 10px 18px; }
.brand-mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.08); }
.brand-logo { width: 42px; height: 42px; object-fit: contain; border-radius: 12px; background: #fff; padding: 4px; }
.notice { background: #fff3cd; border: 1px solid #f0d58a; color: #6f5311; border-radius: 10px; padding: 12px 16px; }
.tenant-badge { display: grid; gap: 2px; padding: 10px 12px; margin-bottom: 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.04); }
.tenant-badge strong { font-size: 13px; color: #fff; }
.tenant-badge small { color: rgba(255,255,255,.55); }
.nav { display: grid; align-content: start; gap: 3px; flex: 1; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  color: var(--sidebar-text); padding: 8px 11px; border-radius: 9px; font-weight: 500;
}
.nav-link > span { width: 20px; flex: 0 0 20px; text-align: center; opacity: .9; font-size: 19px; line-height: 1; font-variation-settings: 'FILL' 0, 'wght' 450, 'GRAD' 0, 'opsz' 22; }
.nav-link:hover { background: rgba(255,255,255,.07); text-decoration: none; color: #fff; }
.nav-link.active { background: rgba(201,139,74,.28); color: #fff; }
.settings-subnav { display: grid; gap: 2px; margin: -1px 0 7px; padding-inline-start: 13px; border-inline-start: 1px solid rgba(255,255,255,.16); }
.settings-child-link { padding-block: 6px; font-size: 12px; opacity: .86; }
.settings-child-link > span { font-size: 16px; }
.sidebar-collapsed .settings-subnav { display: none; }
.menu-visibility-switch { display:inline-flex; align-items:center; gap:7px; padding:4px 7px; border:0; border-radius:999px; background:transparent; color:var(--muted); font:inherit; font-size:12px; font-weight:700; cursor:pointer; }
.menu-visibility-switch:hover { background:var(--surface-2); }
.menu-visibility-track { width:36px; height:20px; padding:2px; border-radius:999px; background:#a6a6a6; transition:background .18s ease; }
.menu-visibility-track > span { display:block; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.22); transition:transform .18s ease; }
.menu-visibility-switch.is-on { color:var(--ok); }
.menu-visibility-switch.is-on .menu-visibility-track { background:var(--ok); }
:root[dir="ltr"] .menu-visibility-switch.is-on .menu-visibility-track > span { transform:translateX(16px); }
:root[dir="rtl"] .menu-visibility-switch.is-on .menu-visibility-track > span { transform:translateX(-16px); }
.sidebar-footer { margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-footer form { margin: 0; }
.sidebar-logout { width: 100%; border: 0; background: transparent; text-align: start; font: inherit; cursor: pointer; }
.sidebar-logout:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-collapsed .sidebar { padding-inline: 4px; }
.sidebar-collapsed .sidebar-head { gap:2px; }
.sidebar-collapsed .brand { justify-content: center; padding:6px 0 18px; }
.sidebar-collapsed .brand > span:not(.brand-mark), .sidebar-collapsed .tenant-badge { display: none; }
.sidebar-collapsed .brand-logo, .sidebar-collapsed .brand-mark { width:30px; height:30px; }
.sidebar-collapsed .sidebar-head .sidebar-collapse-toggle { width:30px; height:32px; }
.sidebar-collapsed .nav-link { justify-content: center; gap: 0; padding-inline: 6px; font-size: 0; }
.sidebar-collapsed .nav-link > span { width: auto; font-size: 17px; }
.permissions-card { padding: 22px; }
.role-permission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.role-permission-card { padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.role-permission-card h2 { margin-bottom: 12px; }
.permission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.permission-option { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 8px; color: var(--text); font-size: 13px; }
.permission-option:hover { background: var(--surface-2); }
.permission-option input { width: 16px; height: 16px; accent-color: var(--accent); }
.user-permissions { padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.user-permissions h2 { margin-bottom: 12px; }
.main-shell { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 22px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.page-heading { display: grid; line-height: 1.2; flex: 1; min-width: 0; }
.page-heading strong { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eyebrow { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.topbar-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.content { width: 100%; max-width: 1500px; padding: 22px; margin: 0 auto; }
.inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.payment-proof-thumb { display:inline-flex; align-items:center; justify-content:center; width:132px; height:96px; margin:2px 0 10px; padding:4px; overflow:hidden; border:1px solid var(--border); border-radius:12px; background:var(--bg); cursor:zoom-in; }
.payment-proof-thumb img { display:block; width:100%; height:100%; object-fit:cover; border-radius:8px; }
.payment-proof-thumb-row { width:72px; height:52px; margin:0; padding:2px; border-radius:8px; }
.payment-proof-thumb-row img { border-radius:5px; }
.payment-proof-dialog { width:fit-content; max-width:96vw; max-height:94dvh; margin:auto; padding:42px 10px 10px; overflow:visible; border:1px solid var(--border); border-radius:16px; background:var(--surface); color:var(--text); box-shadow:0 24px 80px #0008; }
.payment-proof-dialog::backdrop { background:#120d0bd9; backdrop-filter:blur(3px); }
.payment-proof-dialog img { display:block; max-width:calc(96vw - 20px); max-height:calc(90dvh - 48px); width:auto; height:auto; object-fit:contain; border-radius:9px; }
.payment-proof-dialog-close { position:absolute; inset-block-start:7px; inset-inline-end:8px; width:34px; height:34px; border:0; border-radius:50%; background:var(--bg); color:var(--text); font-size:23px; cursor:pointer; }
.sidebar-backdrop { display: none; }

.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head > div:first-child { flex: 1; min-width: 200px; }
.page-head h1 { margin-top: 2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px; box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.card.narrow { max-width: 640px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { flex: 1; }
.card-head a { font-size: 12px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.metric-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: grid; gap: 6px; }
.metric-card span { color: var(--muted); font-size: 12px; }
.metric-card strong { font-size: 25px; line-height: 1.2; }
.metric-card strong small { font-size: 12px; font-weight: 600; color: var(--muted); }
.metric-card.accent { background: linear-gradient(135deg, var(--primary), #6e4227); color: var(--primary-text); border-color: transparent; }
.metric-card.accent span, .metric-card.accent strong small { color: rgba(255,255,255,.72); }
:root[data-theme="dark"] .metric-card.accent { background: linear-gradient(135deg, #8a552d, #4b2e1c); color: #fff; }

.empty-state { padding: 26px 12px; text-align: center; color: var(--muted); }
.empty-icon { font-size: 42px; margin-bottom: 8px; }
.list { display: grid; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); color: var(--text); }
.list-row:last-child { border-bottom: 0; }
.link-row:hover { text-decoration: none; color: var(--accent); }
.rank-list { display: grid; gap: 9px; }
.rank-row { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 7px; border-bottom: 1px dashed var(--border); }
.bar-chart { display: flex; align-items: end; gap: 8px; height: 180px; padding-top: 8px; }
.bar-item { flex: 1; min-width: 0; display: grid; justify-items: center; gap: 4px; height: 100%; grid-template-rows: 1fr auto auto; }
.bar-track { width: 100%; height: 100%; display: flex; align-items: end; background: var(--surface-2); border-radius: 7px; overflow: hidden; }
.bar-fill { width: 100%; min-height: 4px; background: linear-gradient(180deg, var(--accent), var(--primary)); border-radius: 7px; }
.bar-item span { font-size: 10px; color: var(--muted); }
.bar-item small { font-size: 10px; color: var(--muted); }

.btn, .icon-btn, .chip {
  font: inherit; cursor: pointer; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); padding: 8px 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; line-height: 1.2;
}
.btn:hover, .icon-btn:hover, .chip:hover { border-color: var(--accent); text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-success { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }
.icon-btn { width: 38px; height: 38px; padding: 0; border-radius: 10px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.chip { border-radius: 999px; background: var(--surface); }
.chip.active { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }

input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; min-width: 0;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, .icon-btn:focus-visible, .nav-link:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
select.compact { width: auto; max-width: 170px; padding: 6px 9px; }
textarea { min-height: 90px; resize: vertical; }
.field { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 600; }
.field input, .field select, .field textarea { color: var(--text); font-weight: 400; }
.field-error { color: var(--danger); font-size: 11px; font-weight: 400; }
.field-error:empty { display: none; }
.form-stack { display: grid; gap: 13px; }
.settings-savebar { position: sticky; top: 68px; z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; margin-bottom: 2px; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.settings-savebar .hint { margin: 0; }
.settings-savebar .btn { flex: 0 0 auto; }
[id^="settings-"] { scroll-margin-top: 138px; }
.order-refund-actions { scroll-margin-top: 100px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 16px; }
.span-2 { grid-column: span 2; }
.check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); flex: 0 0 auto; }
.validation-summary { color: var(--danger); font-size: 13px; }
.validation-summary:empty { display: none; }
.validation-summary ul { margin: 0; padding-inline-start: 18px; }

.table-card { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: start; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
thead th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); }
tbody tr:hover { background: rgba(201,139,74,.06); }
.table-card table { min-width: 640px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 9px; font-size: 11px; background: var(--surface-2); color: var(--muted); font-weight: 700; }
.badge.ok { background: rgba(47,125,79,.16); color: var(--ok); }
.badge.warn { background: rgba(185,119,14,.18); color: var(--warn); }
.badge.danger, .badge.off { background: rgba(179,57,47,.16); color: var(--danger); }
.badge.info { background: rgba(43,106,143,.15); color: var(--info); }

.auth-body { display: grid; place-items: center; min-height: 100vh; padding: 28px 16px; background: radial-gradient(circle at 15% 10%, rgba(201,139,74,.22), transparent 32%), radial-gradient(circle at 85% 85%, rgba(74,44,26,.16), transparent 35%), var(--bg); }
.auth-shell { width: 100%; display: grid; gap: 18px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 24px; color: var(--text); }
.auth-brand small { display: block; color: var(--muted); font-size: 11px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 26px; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 720px; }
.auth-card.center { text-align: center; }
.auth-card-head { margin-bottom: 20px; }
.auth-card-head h1 { font-size: 23px; margin-bottom: 4px; }
.auth-card-head p { color: var(--muted); font-size: 13px; margin-bottom: 0; }
.auth-lang { position: fixed; top: 16px; inset-inline-end: 16px; z-index: 5; }
.auth-lang select { min-width: 110px; background: var(--surface); }

.toast { position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 80; max-width: min(420px, 90vw); padding: 12px 16px; border-radius: 10px; color: #fff; background: var(--primary); box-shadow: var(--shadow); font-weight: 600; }
.toast.error { background: var(--danger); }
.toast.hide { opacity: 0; transform: translateY(8px); transition: .2s; }

/* Split Login Layout */
.auth-split {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.auth-promo {
    display: none;
    background: linear-gradient(145deg, var(--primary) 0%, #3d2414 100%);
    color: var(--primary-text);
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}

.auth-promo::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.promo-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 24px;
    height: 100%;
    min-height: 100%;
}

.promo-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.promo-brand .brand-icon {
    font-size: 32px;
}

.promo-brand h2 {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
}

.promo-title {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
}

.promo-subtitle {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.85;
    margin: 0;
    max-width: 420px;
}

.promo-image {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.promo-image img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    display: block;
}

/* Promo Stats */
.promo-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.promo-stats .stat {
    text-align: center;
    padding: 12px;
}

.promo-stats .stat strong {
    display: block;
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 4px;
}

.promo-stats .stat span {
    font-size: 13px;
    opacity: 0.8;
}

/* Form Side */
.auth-form-side {
    display: grid;
    place-items: center;
    padding: 48px 24px;
    background: radial-gradient(circle at 15% 10%, rgba(201,139,74,.22), transparent 32%), radial-gradient(circle at 85% 85%, rgba(74,44,26,.16), transparent 35%), var(--bg);
    min-height: 100vh;
}

/* Ensure form card stretches to match promo height on desktop */
@media (min-width: 900px) {
    .auth-form-side {
        align-content: center;
    }
    
    .auth-form-card {
        height: 100%;
        max-height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .auth-form-card > form {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

.auth-form-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px;
    box-shadow: var(--shadow);
}

.form-header {
    text-align: center;
    margin-bottom: 28px;
}

.form-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: grid;
    place-items: center;
    font-size: 24px;
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.3);
}

.form-header h1 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text);
}

.form-header p {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}

/* Input Wrapper with Icons */
.input-wrapper {
    position: relative;
}

.input-wrapper .input-icon {
    position: absolute;
    inset-inline-start: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--muted);
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrapper input {
    padding-inline-start: 44px !important;
}

.input-wrapper:focus-within .input-icon {
    color: var(--primary);
}

.toggle-password {
    position: absolute;
    inset-inline-end: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: grid;
    place-items: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.toggle-password:hover {
    background: var(--surface-2);
    color: var(--text);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

/* Checkbox Styling */
.check {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    position: relative;
}

.check:has(.checkmark) input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.check .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    display: grid;
    place-items: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.check .checkmark::after {
    content: "";
    width: 6px;
    height: 11px;
    border: solid var(--primary-text);
    border-width: 0 3px 3px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s;
}

.check input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.check input:checked + .checkmark::after {
    transform: rotate(45deg) scale(1);
}

.check input:focus-visible + .checkmark {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Submit Button */
.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.submit-btn .btn-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.2s;
}

.submit-btn:hover .btn-arrow {
    transform: translateX(3px);
}

.submit-btn:disabled {
    opacity: 0.8;
    cursor: wait;
}

.form-footer {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.form-footer a {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

.form-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.form-brand span {
    font-weight: 700;
    color: var(--text);
}

.form-brand small {
    color: var(--muted);
    font-size: 11px;
}

/* Responsive: Show promo side on desktop */
@media (min-width: 900px) {
    .auth-split {
        grid-template-columns: 1fr 1fr;
    }
    
    .auth-promo {
        display: block;
    }
    
    .auth-form-side {
        min-height: 100vh;
    }
    
    [dir="rtl"] .auth-split {
        direction: rtl;
    }
    
    [dir="rtl"] .auth-promo {
        order: -1;
    }
}

/* Tablet: smaller promo */
@media (max-width: 1100px) and (min-width: 900px) {
    .promo-content {
        gap: 20px;
    }
    
    .promo-image img {
        height: 220px;
    }
    
    .promo-stats {
        gap: 12px;
    }
    
    .promo-stats .stat strong {
        font-size: 20px;
    }
}

@media (max-width: 560px) {
    .auth-form-card {
        padding: 24px 20px;
        border-radius: 16px;
    }
    
    .form-header h1 {
        font-size: 22px;
    }
    
    .promo-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .promo-stats .stat {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 16px;
        text-align: left;
        padding: 12px 16px;
        background: var(--surface-2);
        border-radius: 10px;
    }
    
    .promo-stats .stat strong {
        font-size: 22px;
        margin-bottom: 0;
    }
}

@media print {
    .auth-promo { display: none !important; }
    .auth-split { grid-template-columns: 1fr !important; }
    .auth-form-side { background: #fff !important; padding: 0 !important; }
    .auth-form-card { box-shadow: none !important; border: none !important; padding: 0 !important; }
}
.pos-products { min-width: 0; }
.pos-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 370px); gap: 16px; align-items: start; }
.pos-toolbar { padding: 10px 12px; }
.pos-search-row { margin-bottom: 6px; }
.pos-search-row .field { gap: 4px; }
.pos-search-row .field > span { display: none; }
.pos-search-row input { min-height: 38px; }
.pos-layout { height: calc(100dvh - 108px); min-height: 460px; overflow: hidden; align-items: stretch; }
.pos-products { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; }
.pos-products .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.field[hidden] { display: none !important; }
.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 5px; margin-top: 6px; }
.icon-choice { min-width: 0; height: 36px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); font-size: 19px; cursor: pointer; }
.icon-choice:hover, .icon-choice[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.customer-search { margin-bottom: 6px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; overflow-y: auto; align-content: start; min-height: 0; padding: 2px 2px 10px; }
.product-card { font: inherit; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 9px 8px; display: grid; align-content: start; justify-items: center; gap: 4px; cursor: pointer; color: var(--text); min-height: 110px; }
.product-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.product-card .icon { font-size: 28px; }
.product-card img { width: 100%; height: 56px; object-fit: cover; border-radius: 8px; }
.product-card strong { font-size: 13px; overflow-wrap: anywhere; }
.product-card span { color: var(--muted); font-size: 12px; }
.cart { position: static; height: 100%; max-height: 100%; overflow-y: auto; align-content: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 11px; display: grid; gap: 8px; }
.pos-loyalty-wrap { display:grid; gap:6px; }
.pos-loyalty-wrap[hidden] { display:none !important; }
.pos-loyalty-toggle { width:100%; min-height:40px; display:flex; align-items:center; gap:8px; padding:6px 9px; border:1px solid color-mix(in srgb,var(--accent) 38%,var(--border)); border-radius:10px; background:color-mix(in srgb,var(--accent) 7%,var(--surface)); color:var(--text); text-align:start; font:inherit; cursor:pointer; }
.pos-loyalty-toggle > .material-symbols-rounded:first-child { color:var(--primary); font-size:20px; }
.pos-loyalty-toggle-copy { flex:1; min-width:0; display:grid; gap:1px; }
.pos-loyalty-toggle-copy strong { font-size:12px; }
.pos-loyalty-toggle-copy small { color:var(--muted); font-size:10px; }
.pos-loyalty-chevron { color:var(--muted); font-size:19px; transition:transform .18s ease; }
.pos-loyalty-toggle[aria-expanded="true"] .pos-loyalty-chevron { transform:rotate(180deg); }
.pos-loyalty { padding:8px; border:1px solid color-mix(in srgb,var(--accent) 35%,var(--border)); border-radius:10px; background:color-mix(in srgb,var(--accent) 5%,var(--surface)); }
.pos-loyalty[hidden] { display: none !important; }
.pos-loyalty-heading { display: flex; align-items: center; gap: 7px; color: var(--primary); }
.pos-loyalty-heading > .material-symbols-rounded { font-size: 20px; }
.pos-loyalty-heading > div { display: grid; gap: 1px; }
.pos-loyalty-heading small { color: var(--muted); font-size: 11px; }
.pos-loyalty-controls { display: flex; align-items: end; gap: 7px; margin-top: 7px; }
.pos-loyalty-controls .field { flex: 1; }
.pos-loyalty-controls .field span { font-size: 11px; }
.pos-loyalty-controls input { min-height: 34px; }
.pos-points-discount { margin-top: 5px; font-size: 12px; }
.pos-cart-shortcut { display: none; }
body.pos-screen { height: 100dvh; overflow: hidden; }
.pos-screen .app-shell { height: 100dvh; min-height: 0; }
.pos-screen .main-shell { height: 100dvh; min-height: 0; overflow: hidden; }
.pos-screen .topbar { display:none; }
.pos-screen .content { flex: 1 1 auto; height: 100%; min-height: 0; overflow: hidden; padding: 7px 10px; }
.pos-screen #pos-root { height: 100%; min-height: 0; overflow: hidden; }
.pos-screen .pos-layout { height: 100%; min-height: 0; overflow: hidden; align-items: stretch; gap: 10px; }
.pos-screen .pos-products { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }
.pos-screen .pos-toolbar { flex: 0 0 auto; }
.pos-screen .product-grid { display: grid; flex: 1 1 0; height: 0; min-height: 0; max-height: 100%; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; align-content: start; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; position: relative; isolation: isolate; }
.pos-screen .pos-products > .empty-state { flex: 0 0 auto; }
.pos-screen .pos-toolbar { padding: 6px 8px; }
.pos-screen .product-grid { gap: 6px; }
.pos-screen .product-card { min-height: 94px; padding: 6px; gap: 3px; }
.pos-screen .product-card img { height: 42px; }
.pos-screen .cart { padding: 8px; gap: 6px; }
.pos-screen .seg button { min-height: 40px; }
.pos-screen .cart-actions .btn { min-height: 46px; }
.preference-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--border); }
.preference-row:last-child { border-bottom: 0; }
.preference-row > .material-symbols-rounded { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--primary); background: var(--surface-2); font-size: 20px; }
.preference-row > div { display: grid; gap: 3px; }
.preference-row > div strong { font-size: 14px; }
.preference-row > div small { color: var(--muted); font-size: 12px; }
.preference-row > .btn, .preference-control select { min-height: 42px; }
.preference-row .btn { display: inline-flex; align-items: center; gap: 7px; }
.preference-row .btn .material-symbols-rounded { font-size: 19px; }
.preferences-card { padding: 10px 18px; }
.cart-line { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.cart-line-main { display:flex; min-width:0; align-items:center; gap:7px; }
.cart-line .name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:700; }
.cart-line .line-total { white-space:nowrap; font-size:12px; font-weight:800; }
.cart-line > .btn { width:25px; height:25px; padding:0; border-radius:8px; font-size:17px; line-height:1; }
.qty { display: inline-flex; flex:0 0 auto; align-items: center; gap: 3px; }
.qty button { width: 21px; height: 21px; padding:0; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; line-height:1; }
.qty span { min-width:16px; text-align:center; font-size:11px; font-weight:700; }
.totals { display: grid; gap: 5px; font-size: 13px; }
.totals .row { display: flex; justify-content: space-between; gap: 12px; }
.totals .grand { font-size: 19px; font-weight: 800; padding-top: 6px; border-top: 1px solid var(--border); }
.cart-actions { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,1fr) minmax(0,1fr); gap: 7px; }
.cart-actions .btn { min-width:0; padding-inline:8px; }
.pos-discount-btn { border:1px solid color-mix(in srgb,var(--accent) 56%,var(--border)); background:color-mix(in srgb,var(--accent) 12%,var(--surface)); color:var(--primary); display:inline-flex; align-items:center; justify-content:center; gap:4px; font-weight:750; }
.pos-discount-btn .material-symbols-rounded { font-size:17px; }
.pos-screen .cart { display:flex; flex-direction:column; height:100%; min-height:0; max-height:100%; overflow:hidden; }
.pos-screen .cart > .seg,
.pos-screen .cart > .field,
.pos-screen .cart > .customer-select-row { flex:0 0 auto; }
.cart-lines-scroll { flex:1 1 0; height:0; min-height:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; }
.cart-footer { position:relative; z-index:2; flex:0 0 auto; min-height:0; display:grid; gap:6px; align-content:end; background:var(--surface); }
.cart-footer .totals { gap:4px; }
.cart-footer .cart-actions .btn { min-height:46px; }
.cart-empty { padding:12px 8px; }
.customer-select-row { display:flex; align-items:center; gap:7px; min-width:0; }
.customer-select-row .customer-picker { flex:1; min-width:0; }
.customer-select-row .pos-add-customer { flex:0 0 40px; width:40px; height:40px; min-height:40px; padding:0; display:grid; place-items:center; }
.customer-select-row .pos-customer-keypad { flex:0 0 40px; width:40px; height:40px; min-height:40px; padding:0; display:grid; place-items:center; }
.pos-add-customer .material-symbols-rounded,.pos-customer-keypad .material-symbols-rounded { font-size:20px; }
.dialog#customer-create-dialog { width:min(440px,calc(100vw - 28px)); }
.customer-keypad-dialog { width:min(390px,calc(100vw - 28px)); max-height:90dvh; overflow:auto; }
.customer-keypad-heading { display:flex; align-items:center; gap:10px; }
.customer-keypad-heading h2 { margin:0; }
.customer-keypad-heading .material-symbols-rounded { color:var(--primary); font-size:25px; }
.customer-keypad-value { width:100%; min-height:58px; padding:10px 14px; border:1px solid var(--border); border-radius:12px; background:var(--bg); color:var(--text); font-size:24px; font-weight:800; letter-spacing:.08em; text-align:center; }
.touch-keypad { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.touch-key { min-height:60px; border:1px solid var(--border); border-radius:13px; background:var(--surface-2); color:var(--text); font:inherit; font-size:22px; font-weight:800; cursor:pointer; touch-action:manipulation; }
.touch-key:active { transform:scale(.97); background:color-mix(in srgb,var(--primary) 12%,var(--surface)); }
.touch-key-action { display:grid; place-items:center; color:var(--primary); }
.touch-key-action .material-symbols-rounded { font-size:21px; }
.customer-keypad-results { display:grid; gap:5px; max-height:126px; overflow:auto; padding:6px; border:1px solid var(--border); border-radius:11px; background:var(--surface); box-shadow:0 6px 18px rgba(0,0,0,.09); }
.customer-keypad-results[hidden] { display:none !important; }
.customer-keypad-result { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; min-height:40px; padding:7px 10px; border:1px solid var(--border); border-radius:9px; background:var(--surface); color:var(--text); text-align:start; font:inherit; font-size:12px; cursor:pointer; }
.customer-keypad-result:hover,.customer-keypad-result:focus-visible { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 10%,var(--surface)); }
.customer-keypad-result small { color:var(--muted); direction:ltr; }
.pos-bottom-fields { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:end; gap:8px; }
.pos-bottom-fields .field { min-width:0; }
.pos-pager-entry { display:flex; gap:5px; }
.pos-pager-entry input { min-width:0; flex:1; height:38px; min-height:38px; padding:5px 8px; }
.pos-pager-open { flex:0 0 40px; width:40px; min-height:38px; height:38px; padding:0; display:grid; place-items:center; }
.pos-pay-btn { min-height:52px!important; display:flex!important; align-items:center; justify-content:center; gap:7px; font-weight:850!important; font-size:17px!important; box-shadow:0 5px 14px color-mix(in srgb,var(--primary) 28%,transparent); }
.pos-pay-btn .material-symbols-rounded { font-size:21px; }
.pos-pay-btn kbd { margin-inline-start:4px; padding:2px 5px; border:1px solid color-mix(in srgb,var(--primary-text) 42%,transparent); border-radius:5px; font-family:inherit; font-size:10px; font-weight:700; line-height:1.25; opacity:.9; }
.pager-dialog { width:min(400px,calc(100vw - 28px)); }
.pager-number-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
.pos-pager-warning { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:12px; padding:12px 14px; border:2px solid var(--warning,#d97706); border-radius:14px; background:color-mix(in srgb,var(--warning,#d97706) 14%,var(--surface)); color:var(--text); }
.pos-pager-warning[hidden] { display:none; }
.pos-pager-warning > .material-symbols-rounded { font-size:30px; color:var(--warning,#d97706); }
.pos-pager-warning strong { display:block; font-size:17px; }
.pos-pager-warning span { font-size:13px; color:var(--muted); }
.pos-pager-warning .btn { min-height:48px; white-space:nowrap; }
.pos-pager-warning.is-shaking { animation:pos-pager-shake .45s ease; }
@keyframes pos-pager-shake { 0%,100% { transform:translateX(0); } 20%,60% { transform:translateX(-7px); } 40%,80% { transform:translateX(7px); } }
@media (prefers-reduced-motion: reduce) { .pos-pager-warning.is-shaking { animation:none; } }
.pager-number { min-height:64px; border:1px solid var(--border); border-radius:14px; background:var(--surface-2); color:var(--text); font:inherit; font-size:22px; font-weight:800; cursor:pointer; transition:transform .15s,background .15s,color .15s,box-shadow .15s; }
.pager-number:hover,.pager-number:focus-visible { transform:translateY(-2px); background:var(--primary); color:var(--primary-text); box-shadow:0 6px 16px color-mix(in srgb,var(--primary) 25%,transparent); outline:none; }
.discount-dialog { width:min(460px,calc(100vw - 28px)); }
.discount-dialog-heading { display:flex; align-items:flex-start; gap:12px; }
.discount-dialog-heading > .material-symbols-rounded { color:var(--primary); font-size:28px; }
.discount-dialog-heading h2 { margin:0 0 4px; }
.discount-tabs { display:grid; grid-template-columns:1fr 1fr; gap:6px; padding:5px; border-radius:12px; background:var(--surface-2); }
.discount-tab { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:8px 10px; border:0; border-radius:9px; background:transparent; color:var(--muted); font:inherit; font-weight:700; cursor:pointer; }
.discount-tab.active { background:var(--surface); color:var(--primary); box-shadow:0 2px 8px rgba(0,0,0,.08); }
.customer-activation { width:min(480px,calc(100vw - 28px)); margin:clamp(24px,8vh,90px) auto; padding:clamp(22px,5vw,40px); display:grid; gap:14px; text-align:center; }
.customer-activation .activation-icon { color:var(--primary); font-size:48px; }
.customer-activation h1 { margin:0; font-size:clamp(24px,5vw,34px); }
.cart-empty { text-align: center; color: var(--muted); padding: 24px 8px; }
.totals .row[hidden] { display:none !important; }
.customer-picker { position:relative; min-width:0; }
.customer-picker-control { position:relative; width:100%; }
.customer-picker-input,
.pos-screen .customer-select-row .customer-picker-input { display:block !important; width:100% !important; height:42px !important; min-height:42px !important; margin:0 !important; padding:8px 11px !important; padding-inline-end:42px !important; appearance:none; -webkit-appearance:none; border:1px solid var(--border) !important; border-radius:11px !important; background:var(--surface) !important; color:var(--text) !important; text-align:start; font:inherit; font-size:13px; box-shadow:0 2px 7px rgba(43,29,20,.08); cursor:text; }
.customer-picker-toggle { position:absolute; inset-inline-end:4px; top:4px; width:34px; height:34px; display:grid; place-items:center; padding:0; border:0; border-radius:8px; background:transparent; color:var(--muted); cursor:pointer; }
.customer-picker-toggle:hover,.customer-picker-toggle[aria-expanded="true"] { background:var(--surface-2); color:var(--primary); }
.customer-picker-toggle .material-symbols-rounded { font-size:21px; transition:transform .18s ease; }
.customer-picker-toggle[aria-expanded="true"] .material-symbols-rounded { transform:rotate(180deg); }
.customer-picker-input::placeholder { color:var(--muted); opacity:1; }
.customer-picker-input:focus { border-color:var(--accent); outline:3px solid color-mix(in srgb,var(--accent) 18%,transparent); }
.customer-picker-source { display:none !important; }
.customer-picker-menu { position:fixed; z-index:10000; max-height:270px; display:grid; grid-template-rows:minmax(0,1fr); overflow:hidden; border:1px solid var(--border); border-radius:12px; background:var(--surface); box-shadow:0 12px 32px rgba(0,0,0,.22); }
.customer-picker-menu[hidden] { display:none !important; }
.customer-picker-options { min-height:0; overflow-y:auto; padding:0 6px 6px; }
.customer-picker-option { width:100%; display:block; padding:9px 10px; border:0; border-radius:8px; background:transparent; color:var(--text); text-align:start; font:inherit; font-size:12px; cursor:pointer; }
.customer-picker-option:hover,.customer-picker-option[aria-selected="true"],.customer-picker-option.is-active { background:color-mix(in srgb,var(--accent) 17%,var(--surface)); color:var(--primary); }
.customer-picker-empty { padding:12px; color:var(--muted); text-align:center; font-size:12px; }
.pos-notes-field textarea { min-height:38px; height:38px; resize:vertical; padding:6px 9px; }
.seg { display: flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--text); padding: 7px 5px; font: inherit; cursor: pointer; }
.seg button.active { background: var(--primary); color: var(--primary-text); }
#order-type { display:flex; min-height:42px; flex:0 0 auto; }
#order-type button { min-width:0; white-space:nowrap; }
.external-orders-filters { display:flex; gap:6px; margin:0 0 12px; padding:4px; border-radius:13px; background:var(--surface-2); }
.external-orders-filters button { flex:1; display:flex; align-items:center; justify-content:center; gap:8px; min-height:48px; padding:8px 10px; border:1px solid transparent; border-radius:10px; background:transparent; color:var(--muted); font:inherit; font-size:13px; font-weight:800; cursor:pointer; }
.external-orders-filters button.active { border-color:var(--border); background:var(--surface); color:var(--primary); box-shadow:0 2px 8px #1f160d12; }
.external-orders-filters button span { display:grid; min-width:22px; height:22px; place-items:center; padding:0 5px; border-radius:999px; background:#eee5dc; color:var(--primary); font-size:11px; }

.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kanban-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; min-height: 240px; }
.kanban-col h3 { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ticket { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px; margin-bottom: 9px; display: grid; gap: 5px; }
.ticket .items { color: var(--muted); font-size: 12px; }
.ticket-number { font-size: 18px; color: var(--primary); }
.ticket-source { width: fit-content; border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 800; }
.ticket-source.external { background: #fff0df; color: #8f4a08; }
.ticket-source.internal { background: #e7efff; color: #244a91; }
.ticket-meta { color: var(--muted); font-size: 12px; font-weight: 700; }
.ticket-items { display: grid; gap: 7px; margin-top: 5px; }
.ticket-item { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 9px; border: 1px solid var(--border); border-radius: 9px; padding: 8px; }
.ticket-quantity { min-width: 38px; border-radius: 7px; background: var(--surface-2); padding: 5px 6px; text-align: center; color: var(--primary); font-size: 14px; }
.ticket-item-copy { display: grid; gap: 2px; min-width: 0; }
.ticket-item-copy > strong { color: var(--text); font-size: 14px; line-height: 1.35; }
.ticket-item-copy > span { color: var(--muted); font-size: 12px; }
.ticket-item-copy .ticket-modifiers { color: var(--primary); font-weight: 700; }
.ticket-item-note { display: inline-block; margin-top: 4px; padding: 2px 8px; border: 1px dashed currentColor; border-radius: 8px; color: #8a4b08; background: #fff6e5; font-weight: 800; white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-notes { display: flex; gap: 8px; align-items: flex-start; margin-top: 5px; padding: 9px; border: 1px solid #e5b85c; border-radius: 9px; background: #fff7df; color: #533700; }
.ticket-notes > .material-symbols-rounded { font-size: 20px; }
.ticket-notes > div { display: grid; gap: 3px; }
.ticket-notes > div > strong { font-size: 12px; }
.ticket-notes > div > span { font-size: 13px; font-weight: 700; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.table-card-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: grid; gap: 7px; }
.table-card-item.occupied { border-color: var(--danger); }
.table-card-item.reserved { border-color: var(--warn); }
.table-card-item.free { border-color: var(--ok); }
.table-card-item strong { font-size: 18px; }
.table-qr { display: grid; justify-items: center; gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--muted); text-align: center; text-decoration: none; font-size: 11px; line-height: 1.4; }
.table-qr img { display: block; width: 96px; height: 96px; padding: 4px; border-radius: 8px; background: #fff; image-rendering: pixelated; }
.table-qr:hover { border-color: var(--accent); color: var(--text); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-inline-end: 5px; background: var(--muted); }
.status-dot.free { background: var(--ok); }
.status-dot.occupied { background: var(--danger); }
.status-dot.reserved { background: var(--warn); }

.dialog { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); padding: 22px; width: min(94vw, 520px); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(0,0,0,.45); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.receipt { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.receipt .center { text-align: center; }
.receipt .line { display: flex; justify-content: space-between; gap: 12px; }
.receipt-pager { display:flex; align-items:center; justify-content:center; gap:8px; margin:10px 0 8px; padding:8px 10px; border:1px dashed var(--border); border-radius:9px; background:var(--surface-2); }
.receipt-pager strong { font-size:18px; letter-spacing:.06em; }

/* Thermal receipt preview and 80 mm BTP-S80 print layouts. */
.thermal-preview-page { min-height:100vh; margin:0; padding:22px 12px; background:#eeeae5; color:#171411; }
.thermal-preview-shell { width:min(100%,420px); margin:0 auto; }
.thermal-receipt { width:74mm; max-width:100%; margin:0 auto; padding:5mm 3mm; border:0; border-radius:0; background:#fff; color:#000; box-shadow:0 10px 34px #20180f20; font:12px Arial,"Noto Sans Arabic",sans-serif; line-height:1.35; }
.receipt-header { text-align:center; padding:0 0 9px; border-bottom:2px solid #000; }
.receipt-brand { font-size:21px; font-weight:900; line-height:1.2; overflow-wrap:anywhere; }
.receipt-subtitle { margin-top:3px; font-size:10px; font-weight:800; letter-spacing:.7px; }
.receipt-number { display:grid; gap:2px; margin:8px 0; padding:6px; border:1.5px solid #000; border-radius:7px; }
.receipt-number span { font-size:10px; font-weight:700; }
.receipt-number strong { font-size:19px; font-weight:900; line-height:1.1; }
.receipt-date { font-size:10px; font-weight:700; }
.receipt-meta { display:grid; gap:4px; padding:8px 0; border-bottom:1px dashed #555; }
.receipt-meta-row,.receipt-total-row,.receipt-section-title,.receipt-item-main { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.receipt-meta-row { font-size:11px; }
.receipt-meta-row strong { text-align:end; overflow-wrap:anywhere; }
.receipt-items { padding-top:6px; }
.receipt-section-title { padding:3px 0 5px; border-bottom:1px solid #000; font-size:9px; font-weight:900; letter-spacing:.4px; }
.receipt-item { padding:7px 0; border-bottom:1px dashed #777; break-inside:avoid; }
.receipt-item-name { font-size:12px; overflow-wrap:anywhere; }
.receipt-item-total { flex:0 0 auto; white-space:nowrap; direction:ltr; }
.receipt-item-sub { margin-top:2px; font-size:10px; direction:ltr; text-align:start; }
.receipt-item-options,.receipt-item-note { margin-top:3px; font-size:10px; overflow-wrap:anywhere; }
.receipt-item-note,.receipt-order-note { padding:5px; border:1px solid #000; border-radius:4px; font-weight:700; white-space:pre-wrap; }
.receipt-order-note { display:grid; gap:3px; margin-top:8px; font-size:10px; }
.receipt-totals,.receipt-payment { padding-top:7px; }
.receipt-total-row { margin:3px 0; font-size:11px; }
.receipt-total-row strong { direction:ltr; white-space:nowrap; }
.receipt-discount { font-weight:800; }
.receipt-grand-total { display:flex; justify-content:space-between; align-items:center; gap:6px; margin-top:7px; padding:8px 6px; border:2px solid #000; border-radius:6px; font-weight:900; }
.receipt-grand-total>span { font-size:11px; }
.receipt-grand-total>strong { font-size:16px; direction:ltr; white-space:nowrap; }
.receipt-grand-total small { font-size:9px; }
.receipt-footer { margin-top:9px; padding-top:7px; border-top:1px dashed #555; text-align:center; font-size:10px; white-space:pre-wrap; overflow-wrap:anywhere; }
.receipt-thanks { margin-top:7px; text-align:center; font-size:10px; font-weight:800; }
.thermal-preview-actions { display:flex; justify-content:center; margin-top:14px; }
@media print {
  @page { size:80mm auto; margin:0; }
  .thermal-preview-page { min-height:0; padding:0; background:#fff; }
  .thermal-preview-shell { width:80mm; max-width:80mm; margin:0; }
  .thermal-receipt { width:68mm; max-width:68mm; margin:0 auto; padding:0; box-shadow:none; }
  .thermal-preview-actions { display:none !important; }
}

.pagination { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 12px 14px; }
.pagination .meta { color: var(--muted); font-size: 12px; margin-inline-end: auto; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.filters .field { min-width: 150px; }
.hint { color: var(--muted); font-size: 12px; }
.danger-text { color: var(--danger); }
.success-text { color: var(--ok); }
.mono { font-family: ui-monospace, Consolas, monospace; }
.token-box { background: var(--surface-2); border-radius: 9px; padding: 12px; word-break: break-all; }
.public-menu { max-width: 1100px; margin: 0 auto; padding: 18px 16px 60px; }
.menu-header { background: var(--primary); color: var(--primary-text); border-radius: 0 0 22px 22px; padding: 24px 18px; margin: -18px -16px 18px; }
.menu-header h1 { font-size: 24px; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.menu-item { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; gap: 12px; }
.menu-item .emoji { width: 48px; height: 48px; display: grid; place-items: center; font-size: 27px; background: var(--surface-2); border-radius: 12px; flex: none; }
.menu-item h3 { font-size: 15px; margin-bottom: 2px; }
.menu-item p { color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.price { color: var(--primary); font-weight: 800; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .kanban { grid-template-columns: repeat(2, 1fr); }
  .pos-layout { grid-template-columns: minmax(0, 1fr) 330px; }
}

@media (max-width: 900px) {
  .sidebar-collapse-toggle { display: none !important; }
  .app-shell { grid-template-columns: 1fr; }
  .app-shell.sidebar-collapsed { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 260px; transform: translateX(-105%); transition: transform .2s ease; }
  .sidebar-collapsed .sidebar { padding: 18px 14px; }
  .sidebar-collapsed .brand { justify-content: flex-start; padding: 6px 10px 18px; }
  .sidebar-collapsed .brand > span:not(.brand-mark), .sidebar-collapsed .tenant-badge { display: grid; }
  .sidebar-collapsed .brand-logo, .sidebar-collapsed .brand-mark { width:38px; height:38px; }
  .sidebar-collapsed .nav-link { justify-content: flex-start; gap: 10px; padding: 8px 11px; font-size: 14px; }
  .sidebar-collapsed .nav-link > span { width: 18px; font-size: 16px; }
  [dir="rtl"] .sidebar { transform: translateX(105%); }
  .sidebar.open, [dir="rtl"] .sidebar.open { transform: none; }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.4); }
  .mobile-only { display: inline-flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .pos-layout { height: auto; min-height: 0; overflow: visible; grid-template-columns: 1fr; }
  .pos-screen { height: auto !important; min-height: 100dvh; overflow: auto !important; }
  .pos-screen .app-shell { height: auto; min-height: 100dvh; }
  .pos-screen .main-shell { height: auto; min-height: 100dvh; overflow: visible; }
  .pos-screen .content { height: auto; overflow: visible; min-height: auto; }
  .pos-screen #pos-root { height: auto; overflow: visible; }
  .pos-screen .pos-layout { height: auto; }
  .pos-screen .pos-products { display:flex; flex-direction:column; height:calc(52dvh - 40px); min-height:250px; }
  .pos-menu-toggle { display:inline-flex; flex:0 0 42px; width:42px; height:42px; }
  .pos-screen .product-grid { min-height:0; max-height:none; overflow-y:auto; }
  .pos-screen .cart { position: static; display:flex; flex-direction:column; height:auto; max-height:none; overflow:visible; }
  .pos-screen .cart-lines-scroll { flex:0 1 auto; height:auto; min-height:80px; max-height:190px; overflow-y:auto; }
  .pos-screen .cart-footer { position:sticky; bottom:0; z-index:4; padding:8px 0 max(8px,env(safe-area-inset-bottom)); background:var(--surface); box-shadow:0 -7px 14px color-mix(in srgb,var(--text) 8%,transparent); }
  .pos-cart-shortcut { position: fixed; z-index: 30; inset-inline: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 10px 16px; border: 0; border-radius: 14px; background: var(--primary); color: var(--primary-text); box-shadow: 0 8px 25px rgba(0,0,0,.23); font: inherit; font-weight: 800; cursor: pointer; }
  #pos-root { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .kanban { grid-template-columns: 1fr; }
}

@media (min-width: 901px) { .mobile-only { display: none; } }

@media (max-width: 560px) {
  .content { padding: 14px; }
  .topbar { padding: 10px 12px; gap: 8px; }
  .topbar-controls { gap: 5px; }
  .page-heading strong { font-size: 14px; }
  .metric-grid { gap: 9px; }
  .metric-card { padding: 12px; }
  .metric-card strong { font-size: 19px; }
  .page-head h1 { font-size: 21px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .product-card { min-height: 106px; padding: 8px 6px; }
  th, td { padding: 8px 9px; }
  .auth-card { padding: 20px; }
  .preference-row { grid-template-columns: 30px minmax(0,1fr); gap: 10px; }
  .preference-row > .btn, .preference-control { grid-column: 2; justify-self: start; }
}

@media print {
  .sidebar, .topbar, .page-head, .actions, .toast, .btn { display: none !important; }
  .app-shell { display: block; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; }
  body { background: #fff; color: #000; }
}
/* Product library */
.library-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.library-options { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; flex: 1; }
.library-options input, .library-item input { width: auto; }
.library-category { padding: 0; overflow: hidden; }
.library-category .card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 16px 18px; cursor: pointer; list-style: none; }
.library-category .card-head::-webkit-details-marker { display: none; }
.library-category .card-head::after { content: "⌄"; font-size: 22px; color: var(--muted); transition: transform .18s ease; }
.library-category[open] .card-head::after { transform: rotate(180deg); }
.library-category .card-head h2 { margin: 0; }
.library-category .library-grid { padding: 0 16px 16px; }
.library-category:not([open]) .library-grid { display: none; }
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 14px; align-items: stretch; }
.library-item { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 112px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); cursor: pointer; overflow: hidden; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.library-item:hover { border-color: var(--primary); box-shadow: 0 8px 22px rgba(30,26,22,.08); transform: translateY(-1px); }
.library-item.added { opacity: .58; cursor: not-allowed; }
.library-item.added:hover { transform: none; box-shadow: none; }
.library-item input { flex: 0 0 auto; margin: 0; }
.library-item-photo { display: block; flex: 0 0 76px; width: 76px; height: 76px; max-width: 76px; aspect-ratio: 1; object-fit: cover; object-position: center; border-radius: 11px; background: linear-gradient(135deg, #f0e6d9, #d8c6b3); }
.library-item-photo.is-unavailable { visibility: hidden; }
.library-item-body { display: grid; gap: 4px; min-width: 0; flex: 1; }
.library-item-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.library-item-title strong { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-item-title > span { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.library-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.cafe-order-alert { position: fixed; z-index: 12000; inset: 16px 16px auto auto; width: min(620px, calc(100% - 32px)); margin: 0; display: flex; align-items: center; gap: 13px; padding: 15px 16px; border: 1px solid #f2b3a7; border-radius: 19px; background: linear-gradient(110deg, #fff8f4, #fff); color: #40241d; box-shadow: 0 18px 52px rgba(65, 25, 10, .24); opacity: 0; pointer-events: none; transform: translateY(-18px) scale(.98); transition: opacity .22s ease, transform .22s ease; }
.cafe-order-alert.visible { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); animation: cafe-order-pulse .7s ease-out 2; }
.cafe-order-alert-icon { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 14px; background: #a4331b; color: #fff; font-size: 24px; }
.cafe-order-alert-copy { display: grid; gap: 2px; flex: 1; min-width: 0; }
.cafe-order-alert-copy strong { font-size: 16px; }
.cafe-order-alert-copy small { color: #77594e; font-size: 12px; }
.cafe-order-alert-action { padding: 9px 12px; border-radius: 11px; background: #a4331b; color: #fff; font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.cafe-order-alert-action:hover { color: #fff; filter: brightness(1.08); }
.pos-external-orders-badge { display: inline-grid; min-width: 23px; height: 23px; padding: 0 6px; place-items: center; border-radius: 999px; background: #e8e1da; color: #5f4738; font-size: 12px; font-weight: 900; }
.pos-external-orders-badge.has-orders { background: #c73520; color: #fff; box-shadow: 0 0 0 4px rgba(199,53,32,.12); animation: cafe-order-pulse .9s ease-in-out infinite alternate; }
#external-orders-open { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.external-orders-panel { display: grid; grid-template-rows: auto auto minmax(0, 1fr); flex: 1 1 0; min-height: 0; overflow: hidden; }
.external-orders-panel[hidden] { display: none !important; }
.external-orders-list { display: grid; align-content: start; gap: 10px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 3px 8px 1px; }
.cart.show-external-orders > :not(#order-type):not(#external-orders-panel) { display: none !important; }
.cart.show-external-orders #external-orders-panel { display: grid; }
.cart.show-external-orders > #order-type { flex: 0 0 auto; }
.external-order-details-dialog { width: min(660px, calc(100vw - 28px)); max-height: min(90dvh, 880px); overflow-y: auto; }
.external-orders-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.external-orders-heading h2 { margin: 2px 0 0; }
.external-orders-live-status { display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;background:#e9f6ee;color:#17633b;font-size:11px;font-weight:800;white-space:nowrap; }
.external-orders-live-status::before { content:"";width:7px;height:7px;border-radius:50%;background:#21a366;box-shadow:0 0 0 3px #21a36622; }
.external-orders-live-status.warn { background:#fff5e8;color:#8a5a08; }
.external-orders-live-status.warn::before { background:#d88b16;box-shadow:0 0 0 3px #d88b1622; }
.external-order-card { display: grid; gap: 9px; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: 0 5px 18px rgba(47,34,22,.06); }
.external-order-card-top,.external-order-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.external-order-identity { display: grid; gap: 4px; }
.external-order-identity strong { font-size: 16px; }
.external-order-identity span,.external-order-meta span { color: var(--muted); font-size: 13px; }
.external-order-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.external-order-touch-button { display: inline-flex; flex: 1 1 145px; align-items: center; justify-content: center; gap: 7px; min-height: 50px; padding: 10px 14px; font-size: 14px; font-weight: 800; touch-action: manipulation; }
.external-order-touch-button .material-symbols-rounded { font-size: 21px; line-height: 1; }
.external-order-hint { margin: 0; color: #855b00; font-size: 13px; font-weight: 700; }
.external-order-detail-lines { display: grid; gap: 2px; }
.external-order-detail-line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px dashed var(--border); }
.external-order-detail-line.grand { margin-top: 6px; font-size: 18px; font-weight: 900; }
.external-order-line-extra, .external-order-line-note { display: block; margin-top: 3px; font-size: 13px; color: var(--text-secondary, #5d544c); }
.external-order-line-note { color: #8a4b08; font-weight: 800; }
.external-order-totals { margin-top: 8px; }
.external-order-notes { margin-top: 12px; padding: 11px 13px; border-radius: 12px; background: var(--surface-2); white-space: pre-wrap; }
.external-order-receipt { display: grid; gap: 7px; width: 100%; margin: 14px 0; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); color: var(--text); cursor: zoom-in; font: inherit; font-weight: 700; }
.external-order-receipt img { display: block; width: 100%; height: 190px; object-fit: contain; border-radius: 9px; background: #f2eee9; }
.external-order-detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.external-order-detail-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; padding-inline: 16px; }
.external-order-detail-actions .btn-ready { background: #146c43; border-color: #146c43; color: #fff; }
.external-order-image-dialog { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 58px 18px 18px; border: 0; border-radius: 0; background: rgba(20,17,15,.96); }
.external-order-image-dialog::backdrop { background: rgba(20,17,15,.96); }
.external-order-image-dialog img { display: block; width: 100%; height: 100%; object-fit: contain; }
.external-order-image-close { position: absolute; top: 12px; inset-inline-end: 12px; color: #fff; }
.cafe-order-alert-close { width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: #77594e; font-size: 22px; cursor: pointer; }
.order-sound-toggle .material-symbols-rounded { font-size: 21px; }
.order-sound-toggle.is-enabled { color: #fff; background: #a4331b; border-color: #a4331b; }
@keyframes cafe-order-pulse { 50% { box-shadow: 0 18px 60px rgba(164, 51, 27, .42); } }
@media (max-width: 560px) {
  .library-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .library-item { min-height: 100px; padding: 10px; }
  .library-item-photo { flex-basis: 68px; width: 68px; height: 68px; max-width: 68px; }
  .library-item-title { align-items: flex-start; }
  .cafe-order-alert { inset: 10px 10px auto auto; width: min(620px, calc(100% - 20px)); gap: 9px; padding: 12px; }
  .cafe-order-alert-icon { width: 38px; height: 38px; flex-basis: 38px; }
  .cafe-order-alert-copy strong { font-size: 14px; }
  .cafe-order-alert-action { padding: 8px; font-size: 11px; }
  .external-order-details-dialog { width: calc(100vw - 16px); max-height: 92dvh; padding: 16px; }
  .external-orders-panel { max-height: 62dvh; }
  .external-orders-filters { gap: 3px; }
  .external-orders-filters button { gap: 4px; min-width: 0; min-height: 48px; padding-inline: 5px; font-size: 12px; }
  .external-orders-filters button span { min-width: 19px; height: 19px; padding-inline: 3px; font-size: 10px; }
  .external-orders-live-status { padding: 5px 8px; font-size: 10px; }
  .external-order-card { padding: 11px; }
  .external-order-touch-button { flex-basis: 100%; min-height: 52px; font-size: 14px; }
  .external-order-identity strong { font-size: 14px; }
  .external-order-detail-actions { display: grid; grid-template-columns: 1fr; }
  .external-order-receipt img { height: 150px; }
}
/* Keep the login composition within the visible viewport. */
.auth-body:has(.auth-split) {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 12px;
}

.auth-body:has(.auth-split) .auth-shell {
    min-height: 0;
}

.auth-body:has(.auth-split) .auth-split {
    min-height: 0;
}

.auth-body:has(.auth-split) .auth-form-side {
    min-height: 0;
    padding: 20px;
}

.auth-body:has(.auth-split) .auth-form-card {
    padding: 28px;
}

.auth-body:has(.auth-split) .form-header {
    margin-bottom: 18px;
}

.auth-body:has(.auth-split) .form-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
}

.auth-body:has(.auth-split) .form-header h1 {
    font-size: clamp(20px, 2vw, 24px);
}

.auth-body:has(.auth-split) .form-brand {
    margin-top: 18px;
    padding-top: 14px;
}

@media (min-width: 900px) {
    .auth-body:has(.auth-split) {
        padding: 12px;
    }

    .auth-body:has(.auth-split) .auth-shell,
    .auth-body:has(.auth-split) .auth-split {
        height: calc(100dvh - 24px);
    }

    .auth-body:has(.auth-split) .auth-form-side {
        height: 100%;
        padding: 16px;
    }

    .auth-body:has(.auth-split) .auth-form-card {
        height: auto;
        max-height: 100%;
    }

    .auth-body:has(.auth-split) .auth-promo {
        padding: 28px 32px;
    }

    .auth-body:has(.auth-split) .promo-content {
        grid-template-rows: auto minmax(0, 1fr) auto;
        gap: 16px;
    }

    .auth-body:has(.auth-split) .promo-image {
        min-height: 0;
    }

    .auth-body:has(.auth-split) .promo-image img {
        height: min(30dvh, 260px);
        min-height: 0;
    }

    .auth-body:has(.auth-split) .promo-stats {
        padding-top: 14px;
    }
}

@media (max-width: 899px) {
    .auth-body:has(.auth-split) {
        padding: 52px 12px 12px;
    }

    .auth-body:has(.auth-split) .auth-form-side {
        padding: 12px 0;
    }
}

@media (max-width: 560px) {
    .auth-body:has(.auth-split) .auth-form-card {
        padding: 22px 20px;
    }

    .auth-body:has(.auth-split) .form-header {
        margin-bottom: 16px;
    }

    .auth-body:has(.auth-split) .form-stack {
        gap: 10px;
    }

    .auth-body:has(.auth-split) .form-brand {
        margin-top: 14px;
        padding-top: 12px;
    }
}

@media (max-height: 700px) {
    .auth-body:has(.auth-split) .auth-form-card {
        padding: 20px 24px;
    }

    .auth-body:has(.auth-split) .form-header {
        margin-bottom: 12px;
    }

    .auth-body:has(.auth-split) .form-logo {
        width: 42px;
        height: 42px;
        margin-bottom: 8px;
    }

    .auth-body:has(.auth-split) .form-stack {
        gap: 9px;
    }

    .auth-body:has(.auth-split) .form-brand {
        margin-top: 12px;
        padding-top: 10px;
    }
}

/* Refined login presentation */
.auth-body:has(.auth-split) .auth-split {
    max-width: 1200px;
}

.auth-body:has(.auth-split) .auth-promo {
    background: linear-gradient(150deg, #56351f 0%, #321d12 100%);
}

.auth-body:has(.auth-split) .promo-content {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: clamp(12px, 2.2vh, 22px);
}

.auth-body:has(.auth-split) .promo-brand h2 {
    font-size: 21px;
    letter-spacing: .02em;
}

.auth-body:has(.auth-split) .promo-copy {
    max-width: 460px;
}

.auth-body:has(.auth-split) .promo-title {
    font-size: clamp(25px, 3vw, 38px);
    line-height: 1.25;
    letter-spacing: -.02em;
}

.auth-body:has(.auth-split) .promo-subtitle {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.8;
    opacity: .78;
}

.auth-body:has(.auth-split) .promo-image {
    align-self: center;
    justify-self: center;
    width: min(100%, 340px);
    aspect-ratio: 1;
    height: auto;
    border: 1px solid rgba(74, 44, 26, .08);
    border-radius: 24px;
    background: #fffdf9;
    box-shadow: 0 18px 50px rgba(16, 9, 5, .22);
}

.auth-body:has(.auth-split) .promo-image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
}

.auth-body:has(.auth-split) .promo-stats {
    padding-top: 12px;
    border-color: rgba(255, 255, 255, .18);
}

.auth-body:has(.auth-split) .promo-stats .stat {
    padding: 6px 4px;
}

.auth-body:has(.auth-split) .promo-stats .stat strong {
    font-size: 22px;
}

.auth-body:has(.auth-split) .auth-form-card {
    max-width: 460px;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(43, 29, 20, .12);
}

.auth-body:has(.auth-split) .form-header h1 {
    letter-spacing: -.02em;
}

.auth-body:has(.auth-split) .input-wrapper input {
    min-height: 48px;
    border-radius: 12px;
}

.auth-body:has(.auth-split) .submit-btn {
    min-height: 48px;
    border-radius: 12px;
}

@media (min-width: 900px) {
    .auth-body:has(.auth-split) .auth-promo {
        padding: 30px 36px;
    }

    .auth-body:has(.auth-split) .promo-image {
        width: min(100%, 400px, 34dvh);
        transform: none;
        margin-block: auto;
    }
}

@media (min-width: 900px) and (max-height: 800px) {
    .auth-body:has(.auth-split) .auth-promo {
        padding-block: 22px;
    }

    .auth-body:has(.auth-split) .promo-content {
        gap: clamp(8px, 1.5vh, 14px);
    }

    .auth-body:has(.auth-split) .promo-image {
        width: min(100%, 400px, 30dvh);
    }

    .auth-body:has(.auth-split) .promo-stats {
        padding-top: 8px;
    }
}

@media (max-width: 899px) {
    .auth-body:has(.auth-split) .auth-promo {
        display: none;
    }

    .auth-body:has(.auth-split) {
        padding: 48px 16px 16px;
    }

    .auth-body:has(.auth-split) .auth-shell,
    .auth-body:has(.auth-split) .auth-split {
        width: 100%;
        max-width: 520px;
    }

    .auth-body:has(.auth-split) .auth-form-side {
        width: 100%;
        padding: 8px 0;
    }

    .auth-body:has(.auth-split) .auth-form-card {
        width: 100%;
        max-width: 460px;
    }
}

@media (max-width: 560px) {
    .auth-body:has(.auth-split) {
        padding: 48px 14px 14px;
    }

    .auth-body:has(.auth-split) .auth-form-card {
        padding: 22px 18px;
        border-radius: 20px;
    }

    .auth-body:has(.auth-split) .form-header h1 {
        font-size: clamp(19px, 5.5vw, 22px);
        line-height: 1.4;
    }

    .auth-body:has(.auth-split) .form-header p {
        font-size: 12px;
    }

    .auth-body:has(.auth-split) .input-wrapper input,
    .auth-body:has(.auth-split) .submit-btn {
        min-height: 46px;
    }

    .auth-body:has(.auth-split) .form-brand small {
        font-size: 10px;
    }
}

@media (max-width: 380px) {
    .auth-body:has(.auth-split) {
        padding-inline: 10px;
    }

    .auth-body:has(.auth-split) .auth-form-card {
        padding: 18px 14px;
    }

    .auth-body:has(.auth-split) .form-stack {
        gap: 8px;
    }

    .auth-body:has(.auth-split) .form-header {
        margin-bottom: 12px;
    }

    .auth-body:has(.auth-split) .form-brand {
        margin-top: 10px;
        padding-top: 9px;
    }
}

@media (max-width: 899px) and (max-height: 680px) {
    .auth-body:has(.auth-split) {
        padding-top: 42px;
        padding-bottom: 8px;
    }

    .auth-body:has(.auth-split) .form-logo {
        width: 38px;
        height: 38px;
        margin-bottom: 6px;
        font-size: 20px;
    }

    .auth-body:has(.auth-split) .form-header {
        margin-bottom: 10px;
    }

    .auth-body:has(.auth-split) .input-wrapper input,
    .auth-body:has(.auth-split) .submit-btn {
        min-height: 42px;
    }

    .auth-body:has(.auth-split) .form-brand {
        margin-top: 8px;
        padding-top: 8px;
    }
}

/* ===== POS redesign (2026-11-01): one-row search, bottom action bar, pay dialog ===== */
.pos-toolbar { display:flex; align-items:center; gap:8px; min-width:0; }
.pos-search { position:relative; flex:0 0 230px; display:flex; align-items:center; gap:6px; height:42px; min-width:0; padding:0 10px; border:1px solid var(--border); border-radius:11px; background:var(--surface-2); color:var(--muted); cursor:text; transition:flex-basis .2s ease, border-color .15s ease, background .15s ease; }
.pos-search > .material-symbols-rounded { flex:0 0 auto; font-size:21px; }
.pos-search input[type="search"] { flex:1 1 auto; width:auto; min-width:0; height:100%; min-height:0; margin:0; padding:0; border:0; outline:0; background:transparent; color:var(--text); font:inherit; font-size:14px; box-shadow:none; }
.pos-search input[type="search"]::-webkit-search-cancel-button { cursor:pointer; }
.pos-search kbd { flex:0 0 auto; padding:1px 5px; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--muted); font-family:inherit; font-size:10px; font-weight:700; }
.pos-search:focus-within { border-color:var(--accent); background:var(--surface); box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent); }
.pos-search:focus-within kbd { display:none; }
.pos-toolbar .chips { flex:1 1 auto; min-width:0; flex-wrap:nowrap; overflow-x:auto; padding-bottom:0; scrollbar-width:none; }
.pos-toolbar .chips::-webkit-scrollbar { display:none; }
.pos-toolbar .chip { flex:0 0 auto; min-width:118px; min-height:48px; padding-inline:16px; display:inline-flex; align-items:center; justify-content:center; gap:7px; white-space:nowrap; font-size:14px; font-weight:800; }
.pos-toolbar .chip .material-symbols-rounded { font-size:20px; }
.pos-toolbar.is-searching .pos-search { flex:1 1 auto; }
.pos-toolbar.is-searching .chips { display:none; }

.pos-action-bar { flex:0 0 auto; display:flex; align-items:stretch; gap:8px; margin-top:8px; padding:7px; border:1px solid var(--border); border-radius:14px; background:var(--surface); box-shadow:0 2px 10px rgba(43,29,20,.06); }
.pos-action { flex:0 0 auto; min-width:86px; min-height:60px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; padding:6px 10px; border:1px solid var(--border); border-radius:12px; background:var(--surface-2); color:var(--text); font:inherit; font-size:12.5px; font-weight:800; line-height:1.2; cursor:pointer; touch-action:manipulation; transition:transform .12s ease, border-color .15s ease, background .15s ease; }
.pos-action > .material-symbols-rounded { font-size:23px; }
.pos-action:hover:not(:disabled) { border-color:var(--accent); }
.pos-action:active:not(:disabled) { transform:scale(.97); }
.pos-action:disabled { opacity:.45; cursor:not-allowed; }
.pos-action:focus-visible { outline:3px solid color-mix(in srgb,var(--accent) 55%,transparent); outline-offset:2px; }
.pos-action.is-set { border-color:color-mix(in srgb,var(--accent) 70%,var(--border)); background:color-mix(in srgb,var(--accent) 16%,var(--surface)); color:var(--primary); }
.pos-action-clear { color:var(--danger); }
.pos-action-discount { color:var(--primary); }
.pos-action-pay { flex:1 1 auto; flex-direction:row; justify-content:center; gap:12px; min-width:200px; border-color:var(--primary); background:var(--primary); color:var(--primary-text); box-shadow:0 6px 16px color-mix(in srgb,var(--primary) 30%,transparent); }
.pos-action-pay:hover:not(:disabled) { border-color:var(--primary); filter:brightness(1.07); }
.pos-action-pay > .material-symbols-rounded { font-size:27px; }
.pos-action-pay-copy { display:grid; justify-items:start; gap:1px; text-align:start; }
.pos-action-pay-copy > span { font-size:13px; opacity:.85; }
.pos-action-pay-copy > strong { font-size:21px; font-weight:900; line-height:1.1; white-space:nowrap; }
.pos-action-pay kbd { padding:2px 6px; border:1px solid color-mix(in srgb,var(--primary-text) 40%,transparent); border-radius:6px; font-family:inherit; font-size:10px; font-weight:700; opacity:.85; }

/* Cart lines: size/add-ons/note visible, touch-sized quantity buttons, tap to edit */
.cart-line { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"info total" "info actions"; align-items:center; column-gap:8px; row-gap:6px; padding:9px 0; border-bottom:1px dashed var(--border); }
.cart-line-info { grid-area:info; display:grid; gap:2px; align-content:center; min-width:0; margin:-4px -6px; padding:4px 6px; border:0; border-radius:9px; background:transparent; color:inherit; font:inherit; text-align:start; cursor:pointer; }
.cart-line-info:hover, .cart-line-info:focus-visible { background:var(--surface-2); outline:none; }
.cart-line .name { overflow:visible; white-space:normal; overflow-wrap:anywhere; font-size:14px; font-weight:800; line-height:1.35; }
.cart-line-details { color:var(--primary); font-size:12px; font-weight:700; line-height:1.35; }
.cart-line-note { width:fit-content; max-width:100%; padding:0 6px; border:1px dashed currentColor; border-radius:6px; background:#fff6e5; color:#8a4b08; font-size:11.5px; font-weight:700; overflow-wrap:anywhere; }
[data-theme="dark"] .cart-line-note { background:color-mix(in srgb,#e0a24a 14%,var(--surface)); color:#f0c27a; }
.cart-line .line-total { grid-area:total; justify-self:end; font-size:14px; font-weight:850; white-space:nowrap; }
.cart-line-actions { grid-area:actions; justify-self:end; display:flex; align-items:center; gap:6px; }
.cart-line .qty { gap:4px; }
.cart-line .qty button { width:36px; height:36px; border-radius:10px; font-size:19px; font-weight:700; touch-action:manipulation; }
.cart-line .qty span { min-width:26px; font-size:15px; font-weight:800; }
.cart-line-actions > .btn { width:36px; height:36px; padding:0; border-radius:10px; font-size:19px; line-height:1; }
.cart-meta { display:flex; flex-wrap:wrap; gap:6px; }
.cart-meta[hidden] { display:none !important; }
.cart-meta-chip { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:3px 9px; border-radius:999px; background:var(--surface-2); color:var(--primary); font-size:12px; font-weight:700; }

/* Size / add-on cards and quantity stepper in the product dialog */
.pos-product-dialog { width:min(560px,calc(100vw - 28px)); max-height:92dvh; overflow:auto; }
.option-heading { margin:14px 0 8px; font-size:14px; }
.option-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(118px,1fr)); gap:8px; }
.option-card { position:relative; display:grid; justify-items:center; align-content:center; gap:3px; min-height:76px; padding:16px 10px 10px; border:1.5px solid var(--border); border-radius:12px; background:var(--surface); color:var(--text); text-align:center; cursor:pointer; touch-action:manipulation; transition:border-color .15s ease, background .15s ease, transform .12s ease; }
.option-card:active { transform:scale(.98); }
.option-card .option-input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.option-card:focus-within { outline:3px solid color-mix(in srgb,var(--accent) 45%,transparent); outline-offset:1px; }
.option-name { font-size:14px; font-weight:800; line-height:1.3; overflow-wrap:anywhere; }
.option-price { color:var(--muted); font-size:12.5px; font-weight:700; }
.option-card.is-selected { border-color:var(--primary); background:color-mix(in srgb,var(--primary) 9%,var(--surface)); box-shadow:inset 0 0 0 1px var(--primary); }
.option-card.is-selected .option-price { color:var(--primary); }
.option-card.is-selected::after { content:"✓"; position:absolute; top:5px; inset-inline-end:5px; display:grid; place-items:center; width:18px; height:18px; border-radius:50%; background:var(--primary); color:var(--primary-text); font-size:12px; font-weight:900; }
.qty-stepper { display:flex; align-items:stretch; height:44px; border:1px solid var(--border); border-radius:11px; overflow:hidden; background:var(--surface); }
.qty-stepper button { flex:0 0 46px; border:0; background:var(--surface-2); color:var(--text); font:inherit; font-size:22px; font-weight:700; cursor:pointer; touch-action:manipulation; }
.qty-stepper button:active { background:color-mix(in srgb,var(--primary) 14%,var(--surface)); }
.qty-stepper input { flex:1 1 auto; width:auto; min-width:0; height:100%; min-height:0; margin:0; padding:0; border:0; border-radius:0; background:transparent; text-align:center; font-size:17px; font-weight:800; box-shadow:none; -moz-appearance:textfield; appearance:textfield; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }

/* Pay dialog */
.pos-pay-dialog { width:min(480px,calc(100vw - 28px)); max-height:94dvh; overflow:auto; }
.pos-pay-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.pos-pay-head strong { display:block; color:var(--primary); font-size:34px; font-weight:900; line-height:1.15; }
.pos-pay-methods button { display:flex; align-items:center; justify-content:center; gap:7px; min-height:54px; font-weight:800; }
.pos-pay-methods button .material-symbols-rounded { font-size:21px; }
.pos-pay-methods button:disabled { opacity:.45; cursor:not-allowed; }
.pos-cash { display:grid; gap:10px; }
.pos-cash[hidden] { display:none !important; }
.pos-cash input { min-height:56px; font-size:24px; font-weight:800; text-align:center; }
.pos-cash input::placeholder { font-size:13px; font-weight:600; }
.pos-cash-quick { display:flex; flex-wrap:wrap; gap:8px; }
.pos-cash-chip { flex:1 1 80px; min-height:48px; border:1px solid var(--border); border-radius:11px; background:var(--surface-2); color:var(--text); font:inherit; font-size:15px; font-weight:800; cursor:pointer; touch-action:manipulation; }
.pos-cash-chip:hover { border-color:var(--accent); }
.pos-cash-change { display:grid; place-items:center; min-height:54px; padding:8px; border-radius:12px; background:var(--surface-2); color:var(--muted); font-size:15px; font-weight:800; text-align:center; }
.pos-cash-change.is-change { background:color-mix(in srgb,var(--ok) 14%,var(--surface)); color:var(--ok); font-size:22px; }
.pos-cash-change.is-short { background:color-mix(in srgb,var(--danger) 12%,var(--surface)); color:var(--danger); font-size:18px; }
.pos-pay-dialog .dialog-actions .btn { min-height:52px; }
.pos-pay-dialog .dialog-actions .pos-pay-btn { flex:1 1 auto; }
.pos-notes-dialog { width:min(440px,calc(100vw - 28px)); }
.pos-screen .product-card { min-height:100px; padding-bottom:9px; }
.pos-product-dialog .dialog-actions .btn, .pos-notes-dialog .dialog-actions .btn, .pager-dialog .dialog-actions .btn { min-height:48px; }
.pos-product-dialog .dialog-actions .btn-primary { flex:1 1 auto; font-size:16px; }

@media (max-width: 1100px) {
  .pos-search { flex:0 0 46px; justify-content:center; padding:0; }
  .pos-search input[type="search"], .pos-search kbd { width:0; flex:0 0 0; opacity:0; }
  .pos-toolbar.is-searching .pos-search { justify-content:flex-start; padding:0 10px; }
  .pos-toolbar.is-searching .pos-search input[type="search"] { flex:1 1 auto; opacity:1; }
  .pos-action { min-width:70px; padding-inline:6px; font-size:11.5px; }
  .pos-action-pay { min-width:170px; }
  .pos-action-pay-copy > strong { font-size:18px; }
}

@media (max-width: 900px) {
  .pos-cart-shortcut { display:none !important; }
  .pos-action-bar { position:fixed; z-index:30; inset-inline:8px; bottom:calc(8px + env(safe-area-inset-bottom)); margin:0; gap:6px; padding:6px; box-shadow:0 8px 25px rgba(0,0,0,.2); }
  .pos-action { min-width:0; flex:1 1 0; min-height:54px; padding:4px; font-size:11px; }
  .pos-action > .material-symbols-rounded { font-size:21px; }
  .pos-action-pay { flex:2.4 1 0; min-width:0; gap:8px; }
  .pos-action-pay kbd { display:none; }
  .pos-action-pay-copy > strong { font-size:16px; }
  #pos-root { padding-bottom:calc(84px + env(safe-area-inset-bottom)); }
}

/* POS touch sizing: every tap target is at least 48px, main actions larger */
.pos-screen .pos-search { height:50px; }
.pos-screen .pos-search input[type="search"] { font-size:16px; }
.pos-screen .pos-toolbar .chip { min-height:50px; padding-inline:18px; font-size:15px; font-weight:700; }
.pos-screen #order-type { min-height:50px; }
.pos-screen #order-type button { font-size:14px; font-weight:700; }
.pos-screen .customer-select-row .pos-add-customer, .pos-screen .customer-select-row .pos-customer-keypad { flex-basis:50px; width:50px; height:50px; min-height:50px; }
.pos-screen .customer-select-row .customer-picker-input { height:50px !important; min-height:50px !important; font-size:14px; }
.pos-screen .product-card { min-height:112px; }
.pos-screen .product-card strong { font-size:14px; }
.pos-action-bar { gap:10px; padding:8px; }
.pos-action { min-width:100px; min-height:76px; gap:4px; font-size:14px; border-radius:14px; }
.pos-action > .material-symbols-rounded { font-size:28px; }
.pos-action-pay { min-width:230px; gap:14px; }
.pos-action-pay > .material-symbols-rounded { font-size:32px; }
.pos-action-pay-copy > span { font-size:14px; }
.pos-action-pay-copy > strong { font-size:25px; }
.cart-line { padding:10px 0; row-gap:8px; }
.cart-line .name { font-size:15px; }
.cart-line-details { font-size:13px; }
.cart-line .qty { gap:6px; }
.cart-line .qty button { width:46px; height:46px; border-radius:12px; font-size:22px; }
.cart-line .qty span { min-width:30px; font-size:17px; }
.cart-line-actions { gap:8px; }
.cart-line-actions > .btn { width:46px; height:46px; border-radius:12px; font-size:22px; }
.option-card { min-height:92px; border-radius:14px; }
.option-name { font-size:16px; }
.option-price { font-size:14px; }
.option-card.is-selected::after { width:22px; height:22px; font-size:13px; }
.qty-stepper { height:56px; border-radius:13px; }
.qty-stepper button { flex-basis:64px; font-size:26px; }
.qty-stepper input { font-size:20px; }
.pos-product-dialog .dialog-actions .btn, .pos-notes-dialog .dialog-actions .btn, .pager-dialog .dialog-actions .btn { min-height:56px; padding-inline:22px; font-size:16px; }
.pos-product-dialog input#dialog-notes { min-height:56px; font-size:15px; }
.pos-pay-methods button { min-height:64px; font-size:16px; }
.pos-pay-methods button .material-symbols-rounded { font-size:24px; }
.pos-cash input { min-height:66px; font-size:28px; }
.pos-cash-chip { min-height:60px; font-size:18px; border-radius:13px; }
.pos-cash-change { min-height:60px; }
.pos-pay-dialog .dialog-actions .btn { min-height:64px; font-size:17px; padding-inline:22px; }
.pos-pay-head .icon-btn { width:50px; height:50px; }
.pager-number { min-height:60px; font-size:22px; }
.pos-notes-dialog textarea { font-size:16px; }

@media (max-width: 1100px) {
  .pos-action { min-width:84px; font-size:13px; }
  .pos-action-pay { min-width:190px; }
  .pos-action-pay-copy > strong { font-size:21px; }
  .pos-screen .pos-search { flex-basis:50px; }
}

@media (max-width: 900px) {
  .pos-action { min-width:0; min-height:62px; font-size:11.5px; border-radius:12px; }
  .pos-action > .material-symbols-rounded { font-size:24px; }
  .pos-action-pay-copy > strong { font-size:17px; }
  .pos-action-pay > .material-symbols-rounded { font-size:24px; }
  #pos-root { padding-bottom:calc(92px + env(safe-area-inset-bottom)); }
}
.pos-cash-quick { display:grid; grid-template-columns:repeat(auto-fit,minmax(72px,1fr)); }
.pos-screen .customer-picker-toggle { top:8px; }

/* Printing settings: cafe defaults, this computer, QZ trust steps; POS reprint button */
.qz-subtitle { display:flex; align-items:center; gap:7px; margin:18px 0 4px; font-size:15px; }
.qz-subtitle .material-symbols-rounded { color:var(--primary); font-size:20px; }
.qz-device { margin-top:16px; padding:14px; border:1px solid var(--border); border-radius:12px; background:var(--surface-2); display:grid; gap:10px; }
.qz-device .qz-subtitle { margin-top:0; }
.qz-device .check { color:var(--text); font-size:14px; }
.qz-trust { margin-top:14px; padding:12px 14px; border:1px dashed var(--border); border-radius:12px; }
.qz-trust summary { display:flex; align-items:center; gap:8px; font-weight:800; cursor:pointer; }
.qz-trust summary .material-symbols-rounded { color:var(--ok); font-size:20px; }
.qz-trust ol { margin:10px 0 0; padding-inline-start:22px; display:grid; gap:8px; font-size:13.5px; line-height:1.6; }
.qz-trust .btn { display:inline-flex; align-items:center; gap:5px; margin-inline-start:6px; vertical-align:middle; }
.pos-screen .pos-reprint { flex:0 0 50px; width:50px; height:50px; display:grid; place-items:center; border-radius:12px; }
.pos-screen .pos-reprint .material-symbols-rounded { font-size:24px; }
.pos-screen .pos-reprint:disabled { opacity:.4; cursor:not-allowed; }
.qz-network { display:grid; gap:6px; padding:12px; border:1px solid var(--border); border-radius:10px; background:var(--surface); }
.qz-network > strong { display:flex; align-items:center; gap:6px; font-size:14px; }
.qz-network > strong .material-symbols-rounded { color:var(--primary); font-size:20px; }
.qz-network-row { display:grid; grid-template-columns:minmax(0,1fr) 110px auto; align-items:end; gap:8px; }
.qz-network-row .btn { min-height:42px; display:inline-flex; align-items:center; gap:5px; }
@media (max-width:560px) { .qz-network-row { grid-template-columns:1fr 1fr; } .qz-network-row .btn { grid-column:1 / -1; } }

/* Receipt settings page: options on one side, live paper preview on the other. */
.receipt-settings-layout { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:18px; align-items:start; }
.receipt-settings-form .form-grid .check { align-self:center; }
.receipt-preview-panel { position:sticky; top:84px; display:grid; gap:12px; padding:14px; border:1px solid var(--border); border-radius:16px; background:var(--surface); box-shadow:var(--shadow); }
.receipt-preview-paper { display:grid; justify-items:center; max-height:calc(100vh - 230px); overflow:auto; padding:14px 8px; border-radius:12px; background:var(--surface-2); }
.receipt-preview-paper canvas { display:block; max-width:100%; height:auto; background:#fff; box-shadow:0 8px 22px rgba(0,0,0,.18); image-rendering:auto; }
.receipt-preview-tabs button { min-height:42px; }
@media (max-width: 1000px) {
  .receipt-settings-layout { grid-template-columns:minmax(0,1fr); }
  .receipt-preview-panel { position:static; }
  .receipt-preview-paper { max-height:none; }
}

/* Kitchen printer page */
.kp-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.kp-choice { position:relative; display:grid; gap:6px; align-content:start; padding:16px; border:2px solid var(--border); border-radius:14px; background:var(--surface-2); cursor:pointer; transition:border-color .15s, background .15s; }
.kp-choice input { position:absolute; inset-inline-end:14px; top:14px; width:20px; height:20px; accent-color:var(--primary); }
.kp-choice > .material-symbols-rounded { font-size:30px; color:var(--primary); }
.kp-choice strong { font-size:16px; }
.kp-choice small { color:var(--muted); line-height:1.5; }
.kp-choice.is-selected { border-color:var(--primary); background:color-mix(in srgb,var(--primary) 9%,var(--surface)); }
.kitchen-printer-page .card-head h2 { display:flex; align-items:center; gap:6px; }
.kp-help { margin-top:10px; }
.kp-help summary { cursor:pointer; font-weight:700; }
.kp-help ol { margin:8px 0 0; padding-inline-start:20px; line-height:1.8; }
.kitchen-printer-page [data-kp-panel][hidden], .kp-device-note[hidden] { display:none; }
@media (max-width:760px) { .kp-choices { grid-template-columns:minmax(0,1fr); } }

/* Shift handover */
.handover-card { display:grid; gap:12px; }
.handover-card.is-incoming { border:2px solid var(--primary); }
.handover-card .card-head h2 { display:flex; align-items:center; gap:6px; }
.handover-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; }
.handover-facts > div { display:grid; gap:3px; padding:10px 12px; border-radius:12px; background:var(--surface-2); }
.handover-facts span { font-size:12px; color:var(--muted); }
.handover-facts strong { font-size:16px; }
.handover-facts .is-big strong { font-size:22px; }
.handover-diff { min-height:22px; font-weight:800; }
.handover-diff.is-match { color:var(--ok); }
.handover-diff.is-short { color:var(--danger); }
.handover-diff.is-over { color:var(--warn); }
.handover-mode { display:grid; gap:6px; border:0; padding:0; margin:0; }
.handover-reject summary { cursor:pointer; font-weight:700; color:var(--muted); }
.handover-reject[open] summary { margin-bottom:10px; }
.handover-actions { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px; }
.handover-actions form { padding:12px; border:1px solid var(--border); border-radius:12px; }

/* Online ordering switch (top bar) */
.online-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.online-pill .material-symbols-rounded { font-size: 19px; }
.online-pill.is-on { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); color: var(--ok); }
.online-pill.is-paused { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
.online-pill.is-closed { color: var(--muted); }
.online-pill:disabled { opacity: .6; cursor: wait; }
@media (max-width: 640px) { .online-pill [data-online-label] { display: none; } .online-pill { padding: 6px 9px; } }
.notice.warn-notice { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }

/* Birth date: day / month / year dropdowns */
.dob-picker { display: grid; grid-template-columns: 0.9fr 1.5fr 1.1fr; gap: 8px; }
.dob-picker select { min-width: 0; }

/* Table search + pagers (client: table-pager.js, server: Views/Shared/_Pager.cshtml) */
.table-tools { display: flex; gap: 8px; align-items: center; padding: 12px 16px 0; }
.table-search { width: min(320px, 100%); min-height: 38px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.client-pager, .server-pager { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--border); }
.client-pager[hidden] { display: none; }
.pager-info { color: var(--muted); font-size: 13px; }
.pager-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pager-page { min-width: 54px; text-align: center; font-weight: 800; font-size: 13px; }
.pager-gap { color: var(--muted); padding: 0 2px; }
@media print {
  .table-tools, .client-pager, .server-pager { display: none !important; }
  tr[hidden] { display: table-row !important; }
}

/* Shift report / daily orders: organised sheet with a final total */
.report-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 20px; }
.report-info div, .report-lines div { display: flex; flex-direction: column; gap: 2px; }
.report-info span { color: var(--muted); font-size: 12px; }
.report-info strong { font-size: 15px; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.report-grid > .card { margin: 0; }
.report-step { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-inline-end: 6px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 13px; font-weight: 900; vertical-align: middle; }
.report-lines { display: grid; }
.report-lines div { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.report-lines div:last-child { border-bottom: 0; }
.report-lines span { color: var(--muted); }
.report-lines strong { font-variant-numeric: tabular-nums; font-size: 15px; }
.report-lines .report-sum { border-top: 2px solid var(--text); border-bottom: 2px solid var(--text); margin: 4px 0; }
.report-lines .report-sum span, .report-lines .report-sum strong { color: var(--text); font-weight: 900; font-size: 16px; }
.report-table tfoot th { border-top: 2px solid var(--text); font-size: 15px; font-weight: 900; background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.report-total { border: 2px solid var(--primary); }
.report-grand { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0; padding: 14px 16px; border-radius: 12px; background: var(--primary); color: #fff; }
.report-grand span { font-size: 16px; font-weight: 800; }
.report-grand strong { font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums; }
.report-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.report-chip { display: inline-flex; gap: 6px; align-items: baseline; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 13px; }
.report-chip strong { font-variant-numeric: tabular-nums; }
.day-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.day-nav input[type="date"] { min-height: 38px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
@media print {
  .report-grand { background: #fff !important; color: #000 !important; border: 2px solid #000; }
  .report-step { background: #000 !important; }
}

.row-muted td { opacity: .55; }
@media print { .day-nav, .row-actions { display: none !important; } }
