/* Restaurant Suite: Arabic-first design system (RTL). Fonts: Cairo (SIL OFL 1.1). */
@font-face { font-family: "Cairo"; font-weight: 400; font-display: swap; src: url(../fonts/cairo-arabic-400.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Cairo"; font-weight: 500; font-display: swap; src: url(../fonts/cairo-arabic-500.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Cairo"; font-weight: 600; font-display: swap; src: url(../fonts/cairo-arabic-600.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Cairo"; font-weight: 700; font-display: swap; src: url(../fonts/cairo-arabic-700.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Cairo"; font-weight: 800; font-display: swap; src: url(../fonts/cairo-arabic-800.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Cairo"; font-weight: 400; font-display: swap; src: url(../fonts/cairo-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "Cairo"; font-weight: 600; font-display: swap; src: url(../fonts/cairo-latin-600.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "Cairo"; font-weight: 700; font-display: swap; src: url(../fonts/cairo-latin-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "Cairo"; font-weight: 800; font-display: swap; src: url(../fonts/cairo-latin-800.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }

:root {
	--navy-950: #07142a; --navy-900: #0b1b33; --navy-800: #12284a; --navy-700: #1b3a66; --navy-600: #29507f; --navy-100: #e6ecf5;
	--amber-700: #b9700f; --amber-600: #d98e1f; --amber-500: #f2a93b; --amber-300: #f8cd84; --amber-100: #fdf1dc; --amber-50: #fff9ef;
	--bg: #f5f2ec; --surface: #ffffff; --surface-2: #faf8f4; --line: #e8e2d8; --line-strong: #d8d0c2;
	--ink: #13203a; --ink-2: #3a4760; --muted: #6b7489; --faint: #9aa1b0;
	--success: #157a43; --success-bg: #e3f4ea; --danger: #b42318; --danger-bg: #fdecea; --warn: #b54708; --warn-bg: #fef3e2; --info: #1d5fb8; --info-bg: #e7f0fc;
	--r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 26px;
	--sh-1: 0 1px 2px rgba(11,27,51,.06), 0 1px 1px rgba(11,27,51,.04);
	--sh-2: 0 6px 18px -6px rgba(11,27,51,.16), 0 2px 6px rgba(11,27,51,.06);
	--sh-3: 0 24px 60px -18px rgba(11,27,51,.38);
	--font: "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif;
	--t-fast: 140ms cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.55;
	-webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -webkit-tap-highlight-color: transparent; }
[v-cloak] { display: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: var(--navy-700); text-decoration: none; }
:focus-visible { outline: 3px solid var(--amber-500); outline-offset: 2px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.center { justify-content: center; }
.hide-sm { } .only-sm { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 16px; height: 16px; } .ic-lg { width: 26px; height: 26px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
	border-radius: var(--r-sm); font-weight: 700; font-size: 15px; transition: transform var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
	white-space: nowrap; user-select: none; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-primary { background: var(--navy-800); color: #fff; box-shadow: var(--sh-1); }
.btn-primary:hover:not(:disabled) { background: var(--navy-700); }
.btn-amber { background: var(--amber-500); color: var(--navy-950); box-shadow: 0 6px 16px -6px rgba(217,142,31,.6); }
.btn-amber:hover:not(:disabled) { background: var(--amber-300); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: rgba(11,27,51,.06); }
.btn-soft { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-soft:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-2); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-success { background: var(--success); color: #fff; }
.btn-lg { min-height: 58px; font-size: 18px; border-radius: var(--r); padding: 0 24px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.btn-block { width: 100%; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--ink-2); }
.icon-btn:hover { background: rgba(11,27,51,.06); }

/* ---------- inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, .select, .textarea { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--r-sm); border: 1.5px solid var(--line);
	background: var(--surface); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.textarea { min-height: 76px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--amber-500); box-shadow: 0 0 0 4px rgba(242,169,59,.18); }
.input[dir=ltr] { text-align: left; }

/* ---------- chips / badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line);
	background: var(--surface); font-weight: 600; color: var(--ink-2); transition: all var(--t-fast); white-space: nowrap; }
.chip:hover { border-color: var(--line-strong); }
.chip.on { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.chip.amber.on { background: var(--amber-500); border-color: var(--amber-500); color: var(--navy-950); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.b-new { background: var(--info-bg); color: var(--info); }
.b-accepted { background: #efe9fe; color: #5b3cc4; }
.b-preparing { background: var(--warn-bg); color: var(--warn); }
.b-ready { background: var(--success-bg); color: var(--success); }
.b-completed, .b-paid { background: #eef1f5; color: #475467; }
.b-cancelled, .b-returned { background: var(--danger-bg); color: var(--danger); }
.b-held { background: var(--amber-100); color: var(--amber-700); }
.b-draft, .b-sent { background: var(--navy-100); color: var(--navy-700); }

/* ---------- cards / layout ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card-pad { padding: 20px; }
.card h3 { margin: 0 0 12px; font-size: 16px; font-weight: 800; }
.section-title { font-size: 18px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.empty { display: grid; place-items: center; gap: 8px; padding: 40px 20px; color: var(--muted); text-align: center; }
.empty .ic { width: 40px; height: 40px; color: var(--faint); }
.skeleton { background: linear-gradient(90deg, #ece7df 0%, #f6f2ec 50%, #ece7df 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r); }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- top bar ---------- */
.topbar { height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 18px; background: var(--navy-900); color: #fff; position: sticky; top: 0; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; white-space: nowrap; color: inherit; }
.topbar .brand { color: #fff; min-height: 44px; min-width: 44px; justify-content: center; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(140deg, var(--amber-500), var(--amber-700)); display: grid; place-items: center; color: var(--navy-950); box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.brand small { display: block; font-weight: 600; font-size: 11.5px; color: #aab6cc; margin-top: -4px; }
.topbar .icon-btn { color: #d6deea; } .topbar .icon-btn:hover { background: rgba(255,255,255,.08); }
.nav-tabs { display: flex; gap: 4px; margin-inline-start: 10px; }
.nav-tab { height: 44px; padding: 0 14px; border-radius: 10px; color: #c3cde0; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.nav-tab:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-tab.on { background: rgba(242,169,59,.16); color: var(--amber-300); }
.user-pill { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 14px; border-radius: 999px; background: rgba(255,255,255,.06); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--amber-500); color: var(--navy-950); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61,220,132,.18); }
.live-dot.off { background: #f97066; box-shadow: 0 0 0 4px rgba(249,112,102,.18); }
.offline-bar { background: var(--danger); color: #fff; text-align: center; padding: 6px; font-weight: 700; font-size: 14px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero { position: relative; background: var(--navy-900); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.login-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(1200px 500px at 110% -10%, rgba(242,169,59,.28), transparent 60%), radial-gradient(800px 400px at -20% 120%, rgba(41,80,127,.7), transparent 60%); }
.login-hero > * { position: relative; }
.login-hero h1 { font-size: 46px; line-height: 1.25; margin: 0 0 14px; font-weight: 800; letter-spacing: -.02em; }
.login-hero h1 em { font-style: normal; color: var(--amber-500); }
.login-hero p { color: #b9c4d8; font-size: 17px; max-width: 460px; margin: 0; }
.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 520px; }
.mosaic div { aspect-ratio: 1; border-radius: 18px; background-size: cover; background-position: center; box-shadow: var(--sh-3); }
.mosaic div:nth-child(2) { transform: translateY(18px); } .mosaic div:nth-child(5) { transform: translateY(18px); }
.unit-strip { display: flex; gap: 18px; color: #c3cde0; font-weight: 700; }
.unit-strip span { display: inline-flex; align-items: center; gap: 8px; }
.unit-strip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.login-form { display: grid; place-items: center; padding: 40px 24px; }
.login-form form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; }
.login-form h2 { margin: 0; font-size: 28px; font-weight: 800; }
.err { background: var(--danger-bg); color: var(--danger); border-radius: var(--r-sm); padding: 10px 14px; font-weight: 600; font-size: 14px; }
.notice { background: var(--warn-bg); color: var(--warn); border-radius: var(--r-sm); padding: 10px 14px; font-weight: 600; font-size: 14px; }

/* ---------- launcher ---------- */
.page { max-width: 1280px; margin: 0 auto; padding: 28px 24px 60px; }
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.hello h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.tile { text-align: start; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1);
	display: flex; flex-direction: column; gap: 12px; transition: transform var(--t-fast), box-shadow var(--t-fast); min-height: 170px; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.tile .ti { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; }
.tile b { font-size: 18px; } .tile span { color: var(--muted); font-size: 14px; }
.branch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.branch-card { text-align: start; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1.5px solid var(--line); display: flex; gap: 14px; align-items: center; transition: all var(--t-fast); }
.branch-card:hover { border-color: var(--amber-500); box-shadow: var(--sh-2); }
.branch-card .bi { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 800; }
.branch-card b { display: block; font-size: 16px; } .branch-card small { color: var(--muted); }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: 112px minmax(0, 1fr) 420px; height: calc(100vh - 64px); }
.cats { background: var(--navy-950); padding: 12px 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 16px; color: #aab6cc; font-weight: 700; font-size: 13px; text-align: center; line-height: 1.3; transition: all var(--t-fast); }
.cat .ic { width: 26px; height: 26px; }
.cat:hover { background: rgba(255,255,255,.06); color: #fff; }
.cat.on { background: var(--amber-500); color: var(--navy-950); box-shadow: 0 10px 22px -10px rgba(242,169,59,.8); }
.menu { display: flex; flex-direction: column; min-width: 0; }
.menu-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; row-gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search .ic { position: absolute; inset-inline-start: 14px; top: 13px; color: var(--faint); }
.search .input { padding-inline-start: 44px; background: var(--surface-2); border-color: transparent; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { min-height: 44px; padding: 0 14px; border-radius: 9px; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--navy-800); box-shadow: var(--sh-1); }
.products { flex: 1; overflow-y: auto; padding: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; align-content: start; }
.product { text-align: start; background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column;
	transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast); box-shadow: var(--sh-1); position: relative; }
.product:hover { box-shadow: var(--sh-2); border-color: var(--line-strong); }
.product:active { transform: scale(.98); }
.product .ph { aspect-ratio: 4/3; background: #eee center/cover no-repeat; position: relative; }
.product .ph::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, rgba(7,20,42,.35)); }
.product .pb { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.product .pn { font-weight: 800; font-size: 15.5px; line-height: 1.35; }
.product .pp { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.product .pp b { color: var(--navy-800); font-size: 16px; }
.product .sizes { font-size: 12px; color: var(--muted); }
.product .qty-tag { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; min-width: 30px; height: 30px; border-radius: 999px; background: var(--amber-500); color: var(--navy-950); font-weight: 800; display: grid; place-items: center; padding: 0 8px; box-shadow: var(--sh-2); }
.cart { background: var(--surface); border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.cart-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.cart-lines { flex: 1; overflow-y: auto; padding: 8px 12px; }
.line { padding: 12px 8px; border-bottom: 1px dashed var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
.line:last-child { border-bottom: 0; }
.line .ln { font-weight: 700; } .line .lm { font-size: 13px; color: var(--muted); grid-column: 1 / -1; }
.line .lt { font-weight: 800; text-align: end; }
.stepper { display: inline-flex; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.stepper button { width: 44px; height: 44px; display: grid; place-items: center; color: var(--navy-800); }
.stepper b { min-width: 40px; text-align: center; }
.cart-foot { border-top: 1px solid var(--line); padding: 14px 18px 18px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.totals { display: flex; flex-direction: column; gap: 4px; }
.totals .row { justify-content: space-between; }
.totals .grand { font-size: 24px; font-weight: 800; color: var(--navy-900); padding-top: 6px; border-top: 1px solid var(--line); margin-top: 4px; }
.cart-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cart-actions .btn-lg { grid-column: 1 / -1; }
.order-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.kstatus { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- modals ---------- */
.overlay { position: fixed; inset: 0; background: rgba(7,20,42,.55); backdrop-filter: blur(3px); z-index: 60; display: grid; place-items: center; padding: 20px; animation: fade .15s ease; }
.modal { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: pop .18s cubic-bezier(.2,.9,.3,1.2); }
.modal.wide { width: min(880px, 100%); } .modal.xwide { width: min(1100px, 100%); }
.modal-head { padding: 18px 22px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 20px; font-weight: 800; flex: 1; }
.modal-body { padding: 20px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { padding: 14px 22px 20px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: scale(.96) translateY(8px); opacity: 0; } }
.item-hero { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; }
.item-hero .ph { aspect-ratio: 1; border-radius: var(--r); background: #eee center/cover; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.opt { padding: 12px 14px; border-radius: var(--r); border: 1.5px solid var(--line); text-align: start; display: flex; flex-direction: column; gap: 2px; transition: all var(--t-fast); }
.opt b { font-size: 15px; } .opt span { color: var(--muted); font-size: 13px; }
.opt.on { border-color: var(--amber-500); background: var(--amber-50); box-shadow: 0 0 0 3px rgba(242,169,59,.18); }
.pay-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
.due { background: var(--navy-900); color: #fff; border-radius: var(--r-lg); padding: 18px 20px; }
.due small { color: #aab6cc; font-weight: 600; } .due b { display: block; font-size: 38px; font-weight: 800; line-height: 1.2; color: var(--amber-500); }
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.method { padding: 14px 8px; border-radius: var(--r); border: 1.5px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.method.on { border-color: var(--navy-800); background: var(--navy-100); color: var(--navy-800); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; direction: ltr; }
.keypad button { height: 56px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 22px; font-weight: 700; }
.keypad button:active { background: var(--amber-100); }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.paylist { display: flex; flex-direction: column; gap: 6px; }
.payrow { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.change { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: var(--r); background: var(--success-bg); color: var(--success); font-weight: 800; font-size: 18px; }
.change.short { background: var(--warn-bg); color: var(--warn); }

/* ---------- receipt ---------- */
.receipt { width: 320px; margin: 0 auto; background: #fff; padding: 18px 16px; font-size: 13px; color: #000; border: 1px dashed #ccc; border-radius: 8px; }
.receipt h3 { text-align: center; margin: 0; font-size: 18px; } .receipt .c { text-align: center; }
.receipt table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.receipt td { padding: 3px 0; vertical-align: top; } .receipt td:last-child { text-align: left; }
.receipt .sep { border-top: 1px dashed #000; margin: 8px 0; }
.receipt .big { font-size: 17px; font-weight: 800; }

/* ---------- toasts ---------- */
.toasts { position: fixed; bottom: 22px; inset-inline-start: 50%; transform: translateX(50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
[dir=rtl] .toasts { transform: translateX(-50%); inset-inline-start: auto; left: 50%; }
.toast { pointer-events: auto; min-width: 260px; max-width: 520px; padding: 12px 18px; border-radius: 14px; background: var(--navy-900); color: #fff; font-weight: 600; box-shadow: var(--sh-3); display: flex; gap: 10px; align-items: center; animation: pop .2s ease; }
.toast.error { background: var(--danger); } .toast.success { background: var(--success); }

/* ---------- drawer ---------- */
.drawer-wrap { position: fixed; inset: 0; z-index: 55; background: rgba(7,20,42,.45); animation: fade .15s ease; }
.drawer { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: min(560px, 100%); background: var(--surface); box-shadow: var(--sh-3); display: flex; flex-direction: column; animation: slide .2s ease; }
@keyframes slide { from { transform: translateX(-30px); opacity: 0; } }
.list-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.list-row:hover { background: var(--surface-2); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: start; font-weight: 700; color: var(--muted); font-size: 12.5px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.t td { padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t tr.click { cursor: pointer; } .t tr.click:hover td { background: var(--amber-50); }
.t td.num, .t th.num { display: table-cell; direction: rtl; unicode-bidi: normal; }
.t .neg { color: var(--danger); } .t .up { color: var(--success); } /* not ".pos": that is the POS screen layout class */

/* ---------- KDS ---------- */
.kds { min-height: calc(100vh - 64px); background: #0a1426; color: #e6ecf5; }
.kds-bar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid #1c2a44; flex-wrap: wrap; position: sticky; top: 64px; background: #0a1426; z-index: 5; }
.kds-bar .chip { background: #12203a; border-color: #22324f; color: #b9c4d8; }
.kds-bar .chip.on { background: var(--amber-500); color: var(--navy-950); border-color: var(--amber-500); }
.kds-stats { display: flex; gap: 18px; margin-inline-start: auto; font-weight: 700; color: #8ea0bf; }
.kds-stats b { color: #fff; font-size: 18px; }
.kds-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 16px 18px 40px; }
.kds-col h3 { margin: 0 0 12px; font-size: 15px; display: flex; align-items: center; gap: 8px; color: #b9c4d8; }
.kds-col h3 .cnt { background: #1c2a44; border-radius: 999px; padding: 0 10px; color: #fff; }
.ticket { background: #12203a; border: 1px solid #22324f; border-radius: 18px; margin-bottom: 14px; overflow: hidden; box-shadow: 0 10px 30px -18px #000; animation: pop .25s ease; }
.ticket.flash { animation: flash 1.2s ease 3; }
@keyframes flash { 50% { box-shadow: 0 0 0 4px var(--amber-500); } }
.ticket-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #22324f; }
.ticket-head .no { font-weight: 800; font-size: 18px; color: #fff; }
.age { margin-inline-start: auto; font-weight: 800; padding: 2px 10px; border-radius: 999px; font-size: 14px; }
.age.ok { background: rgba(61,220,132,.14); color: #3ddc84; } .age.mid { background: rgba(242,169,59,.16); color: var(--amber-500); } .age.late { background: rgba(249,112,102,.18); color: #f97066; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.ticket-body { padding: 10px 14px; }
.titem { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed #22324f; }
.titem:last-child { border-bottom: 0; }
.titem .q { min-width: 36px; height: 30px; border-radius: 8px; background: #1c2a44; color: var(--amber-500); font-weight: 800; display: grid; place-items: center; padding: 0 6px; }
.titem .n { font-weight: 700; font-size: 16px; color: #fff; } .titem .m { color: var(--amber-300); font-size: 13.5px; } .titem .note { color: #f97066; font-size: 13px; }
.ticket-foot { padding: 10px 14px 14px; display: flex; gap: 8px; }
.ticket-foot .btn { flex: 1; min-height: 50px; font-size: 16px; }
.st-strip { height: 4px; }

/* ---------- dashboard ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi .kl { font-size: 13px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.kpi .kv { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--navy-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .ks { font-size: 12.5px; color: var(--muted); }
.kpi.hero { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.kpi.hero .kl { color: #aab6cc; } .kpi.hero .kv { color: var(--amber-500); font-size: 32px; } .kpi.hero .ks { color: #aab6cc; }
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-2e { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.chart { width: 100%; display: block; }
.chart text { font-family: var(--font); fill: var(--muted); font-size: 11px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-inline-end: 6px; }
.barrow { display: grid; grid-template-columns: 170px 1fr 110px; gap: 10px; align-items: center; padding: 6px 0; cursor: pointer; }
.barrow:hover .bar-in { filter: brightness(1.08); }
.bar { height: 14px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-in { height: 100%; border-radius: 999px; }
.top-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.top-item:last-child { border-bottom: 0; }
.top-item .ph { width: 44px; height: 44px; border-radius: 12px; background: #eee center/cover; flex: none; }
.rank { width: 26px; height: 26px; border-radius: 8px; background: var(--amber-100); color: var(--amber-700); font-weight: 800; display: grid; place-items: center; font-size: 13px; flex: none; }
.pill-up { color: var(--success); font-weight: 700; } .pill-down { color: var(--danger); font-weight: 700; }

/* ---------- warehouse ---------- */
.wh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 18px; }
.wh { text-align: start; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1.5px solid var(--line); display: flex; flex-direction: column; gap: 6px; transition: all var(--t-fast); }
.wh.on { border-color: var(--navy-800); box-shadow: 0 0 0 3px var(--navy-100); }
.wh .whv { font-size: 20px; font-weight: 800; color: var(--navy-900); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button { padding: 10px 16px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--navy-800); border-color: var(--amber-500); }
.low { color: var(--danger); font-weight: 700; }

/* ---------- responsive (tablet) ---------- */
@media (max-width: 1180px) {
	.pos { grid-template-columns: 92px minmax(0, 1fr) 360px; }
	.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid-2, .grid-2e { grid-template-columns: 1fr; }
	.nav-tab span { display: none; }
	.products { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
	/* tablets: the search takes its own row so the order-type, orders and shift buttons stay visible */
	.menu-head .search { flex: 1 1 100%; max-width: none; }
	.menu-head .seg button { padding: 0 10px; }
}
@media (max-width: 900px) {
	.login { grid-template-columns: 1fr; } .login-hero { display: none; }
	.pos { grid-template-columns: 1fr; height: auto; }
	.cats { flex-direction: row; overflow-x: auto; position: sticky; top: 64px; z-index: 4; }
	.cat { min-width: 84px; }
	.cart { border-inline-start: 0; border-top: 1px solid var(--line); }
	.kds-cols { grid-template-columns: 1fr; }
	.pay-grid { grid-template-columns: 1fr; }
	.hide-sm { display: none !important; } .only-sm { display: initial; }
	.barrow { grid-template-columns: 110px 1fr 90px; }
	.topbar { padding: 0 10px; gap: 8px; }
}

/* ---------- print (80mm receipt / shift report) ---------- */
@media print {
	@page { size: 80mm auto; margin: 4mm; }
	body { background: #fff; }
	body * { visibility: hidden; }
	.print-area, .print-area * { visibility: visible; }
	.print-area { position: absolute; top: 0; left: 0; right: 0; }
	.no-print { display: none !important; }
	.receipt { border: 0; width: auto; padding: 0; }
}
