:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #14201c;
  background: #f4f7f5;
  font-synthesis: none;
  --ink: #14201c;
  --muted: #6f7b76;
  --line: #dfe6e2;
  --surface: #ffffff;
  --surface-soft: #eef3f0;
  --accent: #18b77a;
  --accent-dark: #087b51;
  --accent-soft: #dbf8eb;
  --navy: #10231d;
  --danger: #d95050;
  --danger-soft: #ffeded;
  --warning: #d8871d;
  --warning-soft: #fff3df;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 8px 24px rgba(16, 35, 29, 0.06);
  --shadow-lg: 0 24px 70px rgba(16, 35, 29, 0.16);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #f4f7f5; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #f4f7f5; color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
input, select, textarea { outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(24, 183, 122, .13); }

.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark, .auth-logo { display: grid; place-items: center; background: var(--navy); color: white; font-weight: 900; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; font-size: 20px; }
.brand strong { display: block; font-size: 16px; line-height: 1.2; }
.brand span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.mobile-brand { margin-bottom: 36px; }
.eyebrow { display: block; color: var(--accent-dark); font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--muted); }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); background: var(--navy); }
.auth-shell.simple { grid-template-columns: 1fr; place-items: center; padding: 24px; background: linear-gradient(145deg, #10231d 0%, #16352a 65%, #0b6f4c 130%); }
.auth-visual { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: clamp(48px, 7vw, 110px); color: white; }
.auth-visual::before { content: ""; position: absolute; width: 550px; height: 550px; right: -170px; bottom: -250px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; box-shadow: 0 0 0 75px rgba(255,255,255,.025), 0 0 0 150px rgba(255,255,255,.018); }
.auth-logo { width: 64px; height: 64px; border-radius: 20px; margin-bottom: 48px; background: var(--accent); color: #062d20; font-size: 31px; }
.auth-visual .eyebrow { color: #7fe1bb; }
.auth-visual h1 { max-width: 690px; margin: 17px 0 22px; font-size: clamp(48px, 6.2vw, 90px); line-height: .96; letter-spacing: -.055em; }
.auth-visual > p { max-width: 620px; margin: 0; color: rgba(255,255,255,.72); font-size: clamp(17px, 1.6vw, 22px); line-height: 1.65; }
.benefit-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 720px; margin-top: 54px; }
.benefit-grid > div { padding: 18px; border: 1px solid rgba(255,255,255,.11); border-radius: 18px; background: rgba(255,255,255,.055); backdrop-filter: blur(10px); }
.benefit-grid b { display: block; font-size: 14px; }
.benefit-grid span { display: block; margin-top: 7px; color: rgba(255,255,255,.59); font-size: 12px; line-height: 1.45; }
.auth-shell > .auth-card { align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: clamp(36px, 6vw, 90px); border-radius: 38px 0 0 38px; background: #fbfdfc; }
.auth-shell.simple > .auth-card { width: min(520px, 100%); align-self: auto; padding: 38px; border-radius: 28px; background: #fff; box-shadow: var(--shadow-lg); }
.auth-card h2 { margin: 0; font-size: 32px; letter-spacing: -.035em; }
.auth-card > p { margin: 11px 0 30px; line-height: 1.6; }
.auth-heading { margin: 38px 0 26px; }
.auth-heading h1 { margin: 9px 0 10px; font-size: 36px; line-height: 1.08; letter-spacing: -.045em; }
.auth-heading p { margin: 0; color: var(--muted); line-height: 1.55; }
.back-button { align-self: flex-start; margin: -10px 0 28px; border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 800; }
.text-button { border: 0; background: transparent; color: var(--accent-dark); padding: 14px 4px; font-weight: 800; text-align: center; }
.danger-text { color: var(--danger); }
.privacy-note { margin-top: 18px; padding: 12px; border-radius: 13px; background: var(--surface-soft); color: var(--muted); text-align: center; font-size: 12px; line-height: 1.45; }

.form-stack { display: grid; gap: 15px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
label { display: block; color: #3f4c47; font-size: 12px; font-weight: 850; }
label input, label select, label textarea, .field input, .field select { width: 100%; min-height: 52px; margin-top: 7px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); font-size: 15px; font-weight: 550; }
.code-input { text-align: center; font-size: 25px !important; font-weight: 900 !important; letter-spacing: .12em; text-transform: uppercase; }
.btn { min-height: 46px; border: 0; border-radius: 14px; padding: 0 16px; font-weight: 850; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.btn:active { transform: translateY(1px) scale(.993); }
.btn.large { min-height: 56px; font-size: 15px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--navy); color: white; box-shadow: 0 10px 24px rgba(16,35,29,.16); }
.btn.accent { background: var(--accent); color: #062d20; box-shadow: 0 10px 24px rgba(24,183,122,.22); }
.btn.secondary { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.btn.ghost { background: var(--surface-soft); color: var(--ink); }
.btn.small { min-height: 36px; padding: 0 11px; font-size: 12px; }

.onboarding-shell { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: linear-gradient(135deg, #eaf5ef, #f7faf8); }
.onboarding-card { width: min(700px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 30px; background: #fff; box-shadow: var(--shadow-lg); }
.progress-line { display: flex; gap: 7px; margin-bottom: 28px; }
.progress-line span { height: 5px; flex: 1; border-radius: 99px; background: #e7ece9; }
.progress-line span.active { background: var(--accent); }

.employee-shell { min-height: 100vh; background: linear-gradient(180deg, #f7faf8 0%, #edf4f0 100%); }
.employee-header { display: flex; align-items: center; justify-content: space-between; max-width: 1000px; margin: auto; padding: 22px 24px; }
.employee-content { max-width: 800px; margin: 0 auto; padding: 55px 24px 60px; text-align: center; }
.employee-content h1 { margin: 10px 0 8px; font-size: clamp(36px, 7vw, 58px); letter-spacing: -.05em; }
.employee-content > p { margin: 0 0 35px; color: var(--muted); font-size: 16px; }
.employee-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.employee-card { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow-sm); }
.employee-card:hover { border-color: rgba(24,183,122,.5); box-shadow: 0 15px 38px rgba(16,35,29,.1); }
.employee-card strong { font-size: 17px; }
.employee-card small { color: var(--muted); text-transform: capitalize; }
.employee-avatar { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 4px; border-radius: 22px; background: hsl(var(--avatar-hue, 155) 55% 90%); color: hsl(var(--avatar-hue, 155) 65% 28%); font-size: 21px; font-weight: 900; }
.employee-avatar.large { --avatar-hue: 155; width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 28px; font-size: 28px; }
.employee-footer { display: flex; justify-content: center; gap: 20px; margin-top: 34px; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 999px; font-size: 11px; font-weight: 850; white-space: nowrap; }
.status-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-badge.online { background: var(--accent-soft); color: var(--accent-dark); }
.status-badge.warning { background: var(--warning-soft); color: #9a5c0e; }
.status-badge.syncing { background: #e8f1ff; color: #376ca4; }

.pin-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f1f6f3; }
.pin-card { width: min(420px, 100%); padding: 30px; text-align: center; border-radius: 30px; background: #fff; box-shadow: var(--shadow-lg); }
.pin-card .back-button { display: block; }
.pin-card h1 { margin: 0; font-size: 28px; }
.pin-card > p { margin: 7px 0 20px; color: var(--muted); }
.pin-dots { display: flex; justify-content: center; gap: 13px; margin: 24px 0; }
.pin-dot { width: 14px; height: 14px; border-radius: 50%; background: #dce3df; transition: .15s; }
.pin-dot.filled { background: var(--navy); transform: scale(1.08); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.key { min-height: 64px; border: 0; border-radius: 17px; background: #f0f4f2; color: var(--ink); font-size: 22px; font-weight: 850; }
.key[data-pin-key="clear"] { font-size: 12px; color: var(--muted); }
.key:active { background: #e0e9e4; transform: scale(.98); }
.inline-error { margin: -10px 0 16px; color: var(--danger); font-size: 12px; font-weight: 800; }
.offline-login-note { margin-top: 18px; color: var(--muted); font-size: 12px; }

.app-shell { min-height: 100vh; padding-bottom: 94px; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 78px; padding: 13px 16px; border-bottom: 1px solid rgba(223,230,226,.88); background: rgba(244,247,245,.93); backdrop-filter: blur(14px); }
.topbar-kicker { display: block; color: var(--accent-dark); font-size: 10px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.topbar h1 { margin: 3px 0 0; font-size: 21px; line-height: 1.1; letter-spacing: -.03em; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.avatar-button { width: 41px; height: 41px; border: 0; border-radius: 14px; background: var(--navy); color: white; font-size: 12px; font-weight: 900; }
.content { max-width: 1180px; margin: 0 auto; padding: 16px; }
.sell-content { padding-bottom: 100px; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 13px; }
.quick-card { min-height: 82px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 18px; padding: 12px; background: #fff; text-align: left; box-shadow: var(--shadow-sm); }
.quick-card > span { display: grid; place-items: center; min-width: 37px; height: 37px; border-radius: 12px; background: var(--surface-soft); color: var(--accent-dark); font-size: 11px; font-weight: 900; }
.quick-card strong, .quick-card small { display: block; }
.quick-card strong { font-size: 14px; }
.quick-card small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.order-context { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; padding: 13px 14px; border-radius: 18px; background: var(--navy); color: white; }
.order-context div strong, .order-context div small { display: block; }
.order-context strong { margin: 3px 0; }
.order-context small { color: rgba(255,255,255,.65); font-size: 10px; }
.context-label { color: #77dcb5; font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.order-context button { min-height: 38px; border: 0; border-radius: 12px; padding: 0 13px; background: var(--accent); color: #073526; font-size: 11px; font-weight: 900; }
.search-wrap { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; padding: 0 13px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.search-wrap svg { width: 19px; color: var(--muted); }
.search-wrap input { width: 100%; min-height: 49px; border: 0; background: transparent; box-shadow: none !important; }
.category-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.category-row::-webkit-scrollbar { display: none; }
.category-btn { min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #52605a; font-size: 12px; font-weight: 850; white-space: nowrap; }
.category-btn.active { border-color: var(--navy); background: var(--navy); color: white; }
.item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.item-card { position: relative; min-height: 137px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 19px; padding: 13px; background: #fff; color: var(--ink); text-align: left; box-shadow: var(--shadow-sm); }
.item-card:active { transform: scale(.985); }
.item-card-body { width: 100%; }
.item-card h3 { margin: 0 0 5px; font-size: 15px; line-height: 1.22; }
.item-card p { margin: 0; color: var(--muted); font-size: 10px; }
.item-card > strong { font-size: 14px; }
.item-station { padding: 4px 7px; border-radius: 8px; background: var(--surface-soft); color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.item-station.kot { background: #fff0e3; color: #a95817; }
.item-station.bot { background: #e8f1ff; color: #376ca4; }
.item-card.soldout { opacity: .48; filter: grayscale(.7); }
.sold-badge { position: absolute; top: 10px; right: 10px; padding: 4px 7px; border-radius: 999px; background: var(--danger-soft); color: var(--danger); font-size: 8px; font-weight: 900; }
.cart-fab { position: fixed; left: 14px; right: 14px; bottom: 86px; z-index: 35; min-height: 60px; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 11px; border: 0; border-radius: 18px; padding: 0 15px; background: var(--accent); color: #062d20; box-shadow: 0 14px 34px rgba(24,183,122,.33); }
.cart-count { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: rgba(255,255,255,.65); font-size: 12px; font-weight: 900; }
.cart-label { text-align: left; font-weight: 900; }
.cart-fab strong { font-size: 14px; }
.bottom-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px max(6px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); box-shadow: 0 -8px 28px rgba(16,35,29,.07); backdrop-filter: blur(12px); }
.nav-btn { min-height: 57px; display: grid; place-items: center; gap: 2px; border: 0; border-radius: 13px; background: transparent; color: #7f8b86; font-size: 9px; font-weight: 750; }
.nav-btn svg { width: 21px; height: 21px; }
.nav-btn.active { background: var(--surface-soft); color: var(--navy); font-weight: 900; }

.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-size: 20px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.legend { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.legend i, .table-card-top i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.table-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.table-card { min-height: 128px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; border: 1px solid var(--line); border-radius: 19px; padding: 14px; background: #fff; text-align: left; box-shadow: var(--shadow-sm); }
.table-card.occupied { border-color: #9be1c5; background: linear-gradient(145deg, #f4fff9, #e8f8f0); }
.table-card-top { width: 100%; display: flex; align-items: center; justify-content: space-between; font-weight: 900; }
.table-card > strong { font-size: 17px; }
.table-card small { color: var(--muted); font-size: 10px; }
.order-list, .receipt-list { display: grid; gap: 11px; }
.order-card { border: 1px solid var(--line); border-radius: 20px; padding: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.order-card-main { display: flex; justify-content: space-between; gap: 12px; }
.order-card h3 { margin: 4px 0 4px; font-size: 18px; }
.order-card p { margin: 0; color: var(--muted); font-size: 10px; }
.order-card-main > strong { white-space: nowrap; font-size: 16px; }
.order-type { color: var(--accent-dark); font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.order-tags { display: flex; gap: 6px; margin-top: 12px; }
.tag { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 8px; font-weight: 900; text-transform: capitalize; }
.tag.success { background: var(--accent-soft); color: var(--accent-dark); }
.tag.warning { background: var(--warning-soft); color: #9a5c0e; }
.tag.danger { background: var(--danger-soft); color: var(--danger); }
.card-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 12px; }
.receipt-card { width: 100%; border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: #fff; text-align: left; box-shadow: var(--shadow-sm); }
.receipt-card > div { display: flex; justify-content: space-between; gap: 10px; }
.receipt-card span { color: var(--muted); font-size: 10px; font-weight: 850; }
.receipt-card strong { font-size: 16px; }
.receipt-card p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 220px; padding: 30px; text-align: center; color: var(--muted); }
.empty-state strong { color: var(--ink); font-size: 16px; }
.empty-state span { margin-top: 5px; font-size: 11px; }
.empty-icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 12px; border-radius: 17px; background: var(--surface-soft); color: var(--accent-dark); font-size: 20px; font-weight: 900; }

.summary-hero { padding: 21px; border-radius: 22px; background: var(--navy); color: white; box-shadow: var(--shadow-sm); }
.summary-hero > span { color: #7fe1bb; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.summary-hero > strong { display: block; margin: 7px 0 13px; font-size: 32px; letter-spacing: -.04em; }
.summary-hero > div { display: flex; gap: 18px; color: rgba(255,255,255,.62); }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 22px; }
.metric { padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.metric span { display: block; color: var(--muted); font-size: 10px; }
.metric strong { display: block; margin-top: 6px; font-size: 18px; }
.settings-section { margin-top: 20px; }
.settings-section h2 { margin: 0 0 9px 4px; color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.settings-link { width: 100%; min-height: 69px; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 11px; border: 1px solid var(--line); border-bottom: 0; padding: 10px 13px; background: #fff; color: var(--ink); text-align: left; }
.settings-link:first-of-type { border-radius: 18px 18px 0 0; }
.settings-link:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 18px 18px; }
.settings-link:only-of-type { border: 1px solid var(--line); border-radius: 18px; }
.settings-link div strong, .settings-link div small { display: block; }
.settings-link strong { font-size: 13px; }
.settings-link small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.settings-link > b { color: #a0aaa5; font-size: 22px; }
.setting-icon { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 13px; background: var(--surface-soft); color: var(--accent-dark); font-size: 17px; font-weight: 900; }
.danger-link strong { color: var(--danger); }

.sheet-backdrop { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; background: rgba(12, 27, 22, .52); backdrop-filter: blur(3px); }
.sheet { width: 100%; max-height: 94vh; overflow-y: auto; padding: 17px 17px calc(20px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: #fff; box-shadow: 0 -24px 70px rgba(0,0,0,.24); }
.sheet-handle { width: 43px; height: 5px; margin: 0 auto 16px; border-radius: 999px; background: #d6ded9; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet-head h2 { margin: 5px 0 4px; font-size: 24px; line-height: 1.08; letter-spacing: -.035em; }
.sheet-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.icon-btn { width: 40px; height: 40px; flex: 0 0 40px; border: 0; border-radius: 13px; background: var(--surface-soft); color: var(--ink); font-size: 22px; }
.cart-lines { display: grid; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.cart-line.cancelled { opacity: .45; text-decoration: line-through; }
.cart-line-copy strong, .cart-line-copy small { display: block; }
.cart-line-copy strong { font-size: 14px; }
.cart-line-copy small { margin: 5px 0; color: var(--muted); font-size: 9px; }
.cart-line-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.cart-line-controls > strong { font-size: 13px; }
.qty { display: flex; align-items: center; gap: 9px; }
.qty button { width: 31px; height: 31px; border: 0; border-radius: 10px; background: var(--surface-soft); font-weight: 900; }
.qty span { min-width: 14px; text-align: center; font-weight: 900; }
.line-delete { border: 0; background: transparent; color: var(--danger); font-size: 9px; font-weight: 850; }
.bill-summary { display: grid; gap: 7px; margin-top: 15px; padding: 14px; border-radius: 17px; background: var(--surface-soft); }
.bill-summary > div { display: flex; justify-content: space-between; gap: 10px; color: #52605a; font-size: 11px; }
.bill-summary .grand-total { margin-top: 4px; padding-top: 11px; border-top: 1px solid #d3ddd7; color: var(--ink); font-size: 17px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 15px; }
.sheet-actions .wide { grid-column: 1 / -1; }
.modifier-list { display: grid; gap: 8px; margin-bottom: 16px; }
.modifier-option { min-height: 59px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.modifier-option div strong, .modifier-option div small { display: block; }
.modifier-option strong { font-size: 13px; }
.modifier-option small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.modifier-option input { width: 21px; height: 21px; accent-color: var(--accent); }
.payment-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.payment-method { min-height: 74px; display: grid; place-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 15px; background: #fff; color: var(--muted); font-size: 10px; font-weight: 850; }
.payment-method span { font-size: 20px; }
.payment-method.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.amount-field input { height: 63px; font-size: 24px; font-weight: 900; }
.quick-cash { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 9px; }
.quick-cash button { min-height: 38px; border: 0; border-radius: 11px; background: var(--surface-soft); color: var(--ink); font-size: 9px; font-weight: 850; }
.previous-payments { display: grid; gap: 6px; margin-top: 14px; padding: 12px; border-radius: 14px; background: var(--surface-soft); }
.previous-payments div { display: flex; justify-content: space-between; font-size: 11px; }
.split-options { display: grid; gap: 10px; }
.split-options button { min-height: 82px; display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 17px; padding: 13px; background: #fff; text-align: left; }
.split-options button > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--surface-soft); color: var(--accent-dark); font-size: 22px; font-weight: 900; }
.split-options strong, .split-options small { display: block; }
.split-options small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.printer-card { padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.printer-card > div:first-child { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.printer-type { padding: 5px 8px; border-radius: 8px; background: var(--surface-soft); color: var(--accent-dark); font-size: 9px; font-weight: 900; }
.notice { margin-bottom: 14px; padding: 12px 13px; border-radius: 14px; font-size: 11px; line-height: 1.5; }
.notice.success { background: var(--accent-soft); color: var(--accent-dark); }
.notice.warning { background: var(--warning-soft); color: #8b570f; }
.settings-list { display: grid; gap: 8px; margin-top: 16px; }
.settings-row { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 11px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.settings-row div > strong, .settings-row div > small { display: block; }
.settings-row strong { font-size: 13px; }
.settings-row small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.switch { position: relative; width: 48px; height: 28px; flex: 0 0 48px; border: 0; border-radius: 999px; background: #ced7d2; }
.switch::after { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: white; transition: .18s; box-shadow: 0 2px 5px rgba(0,0,0,.15); }
.switch.on { background: var(--accent); }
.switch.on::after { left: 23px; }
.employee-mini { display: flex; align-items: center; gap: 10px; }
.employee-mini > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--surface-soft); color: var(--accent-dark); font-size: 11px; font-weight: 900; }
.step-list { display: grid; gap: 10px; margin: 0 0 20px; padding-left: 23px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.pair-code { padding: 20px 10px; border-radius: 19px; background: var(--navy); color: white; text-align: center; font-size: clamp(31px, 10vw, 46px); font-weight: 950; letter-spacing: .12em; }
.pair-expiry { margin: 12px 0 18px; color: var(--muted); text-align: center; font-size: 11px; }
.pairing-sheet .btn + .btn { margin-top: 9px; }

.receipt-print { width: 100%; padding: 13px; border: 1px dashed #c9d2cd; border-radius: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; }
.receipt-print h1 { margin: 0 0 5px; text-align: center; font-size: 16px; }
.receipt-print .center { text-align: center; }
.receipt-print hr { border: 0; border-top: 1px dashed #aeb9b3; }
.receipt-print table { width: 100%; border-collapse: collapse; }
.receipt-print td { padding: 3px 0; vertical-align: top; }
.receipt-print td:last-child { text-align: right; white-space: nowrap; }
.toast { position: fixed; left: 50%; bottom: 162px; z-index: 120; max-width: min(92vw, 440px); padding: 12px 15px; border-radius: 14px; background: var(--navy); color: white; text-align: center; font-size: 11px; font-weight: 750; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .2s; box-shadow: 0 12px 35px rgba(0,0,0,.22); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast[data-tone="success"] { background: #087b51; }
.toast[data-tone="warning"] { background: #9a5c0e; }
.print-area { display: none; }
.loading-screen { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 22px; background: #f4f7f5; }
.loading-screen p { color: var(--muted); }
.spinner { width: 32px; height: 32px; border: 3px solid #dce6e1; border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; background: #fbfdfc; }
  .auth-visual { min-height: 47vh; padding: 35px 24px 48px; border-radius: 0 0 30px 30px; background: var(--navy); }
  .auth-logo { width: 52px; height: 52px; margin-bottom: 25px; border-radius: 17px; font-size: 25px; }
  .auth-visual h1 { margin: 12px 0 15px; font-size: clamp(43px, 13vw, 61px); }
  .auth-visual > p { font-size: 14px; line-height: 1.55; }
  .benefit-grid { display: none; }
  .auth-shell > .auth-card { min-height: 53vh; justify-content: flex-start; padding: 31px 22px 34px; border-radius: 0; }
  .auth-shell.simple { padding: 0; background: #f4f7f5; }
  .auth-shell.simple > .auth-card { min-height: 100vh; width: 100%; padding: 27px 20px; border-radius: 0; box-shadow: none; }
  .mobile-brand { margin-bottom: 28px; }
  .auth-card h2 { font-size: 28px; }
  .auth-heading { margin: 31px 0 23px; }
  .auth-heading h1 { font-size: 32px; }
  .onboarding-shell { align-items: start; padding: 0; }
  .onboarding-card { min-height: 100vh; padding: 27px 19px; border: 0; border-radius: 0; box-shadow: none; }
  .form-grid.two { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .employee-header { padding: 16px; }
  .employee-header .brand span { display: none; }
  .employee-content { padding: 38px 16px 50px; }
  .employee-content h1 { font-size: 42px; }
  .employee-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .employee-card { min-height: 156px; border-radius: 20px; }
  .employee-avatar { width: 58px; height: 58px; border-radius: 19px; font-size: 18px; }
  .employee-footer { flex-direction: column; gap: 0; }
  .pin-shell { padding: 0; background: #fff; }
  .pin-card { min-height: 100vh; width: 100%; display: flex; flex-direction: column; justify-content: center; padding: 25px 23px; border-radius: 0; box-shadow: none; }
  .pin-card .back-button { position: absolute; top: 23px; left: 16px; }
  .topbar .status-badge { display: none; }
  .summary-hero > strong { font-size: 28px; }
}

@media (min-width: 700px) {
  .app-shell { padding-left: 91px; padding-bottom: 0; }
  .bottom-nav { top: 0; bottom: 0; right: auto; width: 91px; grid-template-columns: 1fr; grid-template-rows: repeat(5, 78px); align-content: start; padding: 16px 9px; border-top: 0; border-right: 1px solid var(--line); }
  .content { padding: 23px; }
  .quick-actions { max-width: 520px; }
  .item-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .table-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cart-fab { left: auto; right: 25px; bottom: 25px; width: 370px; }
  .sheet-backdrop { align-items: center; justify-content: center; padding: 24px; }
  .sheet { max-width: 700px; max-height: 90vh; border-radius: 28px; }
  .sheet.compact { max-width: 530px; }
  .toast { bottom: 32px; }
}

@media (min-width: 1050px) {
  .sell-content { display: grid; grid-template-columns: minmax(0, 1fr); }
  .item-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media print {
  body > *:not(#printArea) { display: none !important; }
  #printArea { display: block !important; padding: 0; color: #000; background: #fff; }
  .receipt-print { width: 76mm; margin: 0 auto; padding: 0; border: 0; border-radius: 0; font-size: 12px; }
  .receipt-print h1 { font-size: 18px; }
}

/* ================================================================
   Pocket POS 4.0 - Mobile-first operational refresh
   ================================================================ */
:root {
  --page-max: 1280px;
  --tap: 48px;
  --green-50: #f1fbf6;
  --green-100: #e2f7ec;
  --green-700: #087b51;
}

body { -webkit-tap-highlight-color: transparent; }
.app-shell { background: linear-gradient(180deg, #f8fbf9 0, #f2f6f4 100%); }
.topbar { min-height: 72px; padding: 11px 16px; }
.topbar-copy { min-width: 0; }
.topbar h1 { font-size: clamp(21px, 3vw, 27px); }
.topbar p { max-width: 58vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { width: 100%; max-width: var(--page-max); padding: 14px 14px 112px; }

.sale-start-panel { display: grid; gap: 10px; margin-bottom: 12px; }
.sale-type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.sale-type-btn { min-height: 72px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 17px; padding: 11px 12px; background: var(--surface); color: var(--ink); text-align: left; box-shadow: 0 5px 18px rgba(16,35,29,.05); }
.sale-type-btn > span { width: 39px; height: 39px; flex: 0 0 39px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-soft); color: var(--accent-dark); }
.sale-type-btn > span svg { width: 19px; height: 19px; }
.sale-type-btn strong, .sale-type-btn small { display: block; }
.sale-type-btn strong { font-size: 14px; }
.sale-type-btn small { max-width: 120px; margin-top: 3px; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sale-type-btn.active { border-color: #8bdab8; background: var(--green-50); box-shadow: 0 0 0 2px rgba(24,183,122,.08); }
.active-order-strip { width: 100%; min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-radius: 17px; padding: 12px 14px; background: var(--navy); color: #fff; text-align: left; box-shadow: 0 12px 28px rgba(16,35,29,.16); }
.active-order-strip div span, .active-order-strip div strong, .active-order-strip div small { display: block; }
.active-order-strip div span { color: #83dfbc; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.active-order-strip div strong { margin-top: 2px; font-size: 15px; }
.active-order-strip div small { margin-top: 3px; color: rgba(255,255,255,.65); font-size: 10px; }
.active-order-strip > b { font-size: 15px; white-space: nowrap; }

.menu-toolbar { position: sticky; top: 72px; z-index: 20; margin: 0 -14px 12px; padding: 10px 14px 8px; background: rgba(248,251,249,.96); backdrop-filter: blur(12px); }
.search-wrap { min-height: 50px; border-radius: 15px; }
.search-wrap input { font-size: 15px; }
.category-row { scrollbar-width: none; padding-bottom: 2px; }
.category-row::-webkit-scrollbar, .filter-row::-webkit-scrollbar { display: none; }
.category-btn, .filter-chip { min-height: 42px; padding: 0 16px; border-radius: 999px; font-size: 11px; }

.item-grid { gap: 10px; }
.item-card { min-height: 132px; padding: 12px; border-radius: 18px; }
.item-card-topline { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.item-add { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 10px; background: var(--green-100); color: var(--accent-dark); font-size: 20px; line-height: 1; font-weight: 700; }
.item-card h3 { font-size: 15px; }
.item-card > strong { font-size: 14px; }
.item-card:active:not(:disabled) { transform: scale(.97); border-color: #8bdab8; }
.item-card.soldout .item-add { display: none; }
.sold-badge { position: static; font-size: 8px; }

.cart-fab { bottom: calc(76px + env(safe-area-inset-bottom)); min-height: 62px; border-radius: 18px; }
.cart-label b, .cart-label small { display: block; }
.cart-label b { font-size: 12px; }
.cart-label small { margin-top: 2px; font-size: 9px; opacity: .72; }

.filter-row { display: flex; gap: 8px; margin: 0 -14px 18px; padding: 2px 14px; overflow-x: auto; }
.filter-chip { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; color: var(--muted); font-weight: 800; }
.filter-chip.active { border-color: var(--navy); background: var(--navy); color: #fff; }
.tables-content .section-heading { margin-top: 2px; }
.table-grid { gap: 10px; }
.table-card { position: relative; min-height: 132px; padding: 14px; border-radius: 18px; }
.table-card.available { background: #fff; }
.table-card.occupied { border-color: #89d9b6; background: linear-gradient(145deg, #f5fff9, #e5f8ef); }
.table-available-dot { width: 8px; height: 8px; border-radius: 50%; background: #c8d4ce; }
.table-status-copy strong, .table-status-copy small { display: block; }
.table-status-copy strong { font-size: 16px; line-height: 1.2; }
.table-status-copy small { margin-top: 6px; font-size: 10px; }
.table-alert { position: absolute; top: 12px; right: 12px; padding: 4px 7px; border-radius: 999px; background: var(--warning-soft); color: #9a5c0e; font-size: 8px; font-weight: 900; }

.orders-content .filter-row { margin-bottom: 12px; }
.order-card { padding: 15px; }
.order-card h3 { font-size: 18px; }
.order-card p { font-size: 10px; }
.card-actions .btn { min-height: 44px; }

.more-content { max-width: 1180px; }
.more-hero { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px; border-radius: 22px; background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.more-hero span, .more-hero strong, .more-hero small { display: block; }
.more-hero span { color: #83dfbc; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.more-hero strong { margin: 5px 0 7px; font-size: 30px; letter-spacing: -.04em; }
.more-hero small { color: rgba(255,255,255,.63); font-size: 10px; }
.more-hero .btn { flex: 0 0 auto; }
.setup-card { margin-top: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-sm); }
.setup-card-head { display: flex; justify-content: space-between; gap: 12px; }
.setup-card-head h2 { margin: 5px 0 0; font-size: 18px; }
.setup-card-head > b { font-size: 22px; color: var(--accent-dark); }
.setup-progress { height: 8px; margin: 14px 0 12px; overflow: hidden; border-radius: 99px; background: var(--surface-soft); }
.setup-progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.setup-checks { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.setup-checks span { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 8px; font-weight: 800; }
.setup-checks span.done { background: var(--accent-soft); color: var(--accent-dark); }
.settings-grid { display: grid; gap: 9px; }
.settings-card { width: 100%; min-height: 82px; display: grid; grid-template-columns: 43px 1fr auto; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 18px; padding: 11px 13px; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 5px 18px rgba(16,35,29,.035); }
.settings-card div strong, .settings-card div small { display: block; }
.settings-card strong { font-size: 13px; }
.settings-card small { max-width: 270px; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.settings-card > b { color: #9ba7a1; font-size: 22px; }
.account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 22px; }

.order-sheet { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.cart-lines { gap: 12px; }
.cart-group { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.cart-group-title { display: flex; justify-content: space-between; padding: 10px 13px; background: var(--surface-soft); color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.cart-group-title b { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 8px; background: #fff; color: var(--ink); }
.cart-group .cart-line { margin: 0 13px; }
.cart-group .cart-line:last-child { border-bottom: 0; }
.order-sticky-actions { position: sticky; bottom: -1px; z-index: 3; margin: 14px -17px -17px; padding: 12px 17px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); backdrop-filter: blur(12px); }
.order-secondary-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.order-secondary-actions .btn { min-height: 44px; padding: 0 8px; font-size: 11px; }

.payment-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.payment-overview > div { padding: 11px; border-radius: 14px; background: var(--surface-soft); }
.payment-overview span, .payment-overview b { display: block; }
.payment-overview span { color: var(--muted); font-size: 8px; }
.payment-overview b { margin-top: 5px; font-size: 11px; }
.payment-overview .remaining { background: var(--navy); color: #fff; }
.payment-overview .remaining span { color: rgba(255,255,255,.62); }
.cash-change { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 15px; padding: 13px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-dark); font-size: 11px; font-weight: 800; }
.cash-change b { font-size: 16px; }
.previous-payments > strong { display: block; margin-bottom: 8px; font-size: 10px; }

@media (max-width: 420px) {
  .topbar-actions .avatar-button { width: 40px; height: 40px; }
  .sale-type-btn { min-height: 68px; padding: 9px; }
  .sale-type-btn > span { width: 35px; height: 35px; flex-basis: 35px; }
  .sale-type-btn strong { font-size: 13px; }
  .item-card { min-height: 126px; padding: 11px; }
  .item-card h3 { font-size: 14px; }
  .table-card { min-height: 122px; padding: 12px; }
  .account-actions { grid-template-columns: 1fr; }
}

@media (min-width: 700px) {
  .topbar { padding: 14px 28px; }
  .topbar-copy, .topbar-actions { position: relative; }
  .content { padding: 24px 28px 40px; }
  .menu-toolbar { top: 0; margin: 0 0 16px; padding: 0; background: transparent; backdrop-filter: none; }
  .sale-start-panel { max-width: 720px; }
  .sale-type-switch { max-width: 600px; }
  .item-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
  .item-card { min-height: 148px; }
  .filter-row { margin: 0 0 18px; padding: 0; }
  .table-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
  .table-card { min-height: 145px; }
  .settings-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .settings-card { min-height: 94px; }
  .sheet.order-sheet { width: min(760px, 100%); }
  .payment-sheet { width: min(560px, 100%); }
}

@media (min-width: 1050px) {
  .content { padding-left: 42px; padding-right: 42px; }
  .sell-content { display: block; }
  .sale-start-panel { max-width: 700px; }
  .item-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
  .table-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .more-hero, .setup-card { max-width: 100%; }
}

@media (min-width: 1450px) {
  .item-grid { grid-template-columns: repeat(6, minmax(0,1fr)); }
  .table-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
}
