:root {
  color-scheme: light;
  --ink: #1b3029;
  --muted: #627168;
  --deep: #173d32;
  --deep-2: #245544;
  --deep-soft: #e9f1eb;
  --cream: #f5f4ee;
  --paper: #fffefa;
  --line: #e3e7df;
  --rust: #ae5a40;
  --rust-soft: #f5e9e3;
  --gold: #cfaa6c;
  --green: #2e6954;
  --green-soft: #e3eee8;
  --red: #a63c36;
  --red-soft: #f8e9e6;
  --shadow: 0 18px 48px rgba(24, 48, 38, .085);
  --shadow-soft: 0 7px 22px rgba(24, 48, 38, .055);
  --radius: 20px;
  --radius-sm: 13px;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--cream); }
body { margin: 0; color: var(--ink); background: radial-gradient(ellipse at 50% -120px, #fffefa 0%, var(--cream) 70%); font-family: var(--font-body); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); }
h1, h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.025em; }
h1 { margin-bottom: .35rem; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.08; }
h2 { margin-bottom: .5rem; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.18; }
h3 { margin-bottom: .4rem; font-size: 1rem; }
p { color: var(--muted); }
:focus-visible { outline: 3px solid #985039; outline-offset: 3px; border-radius: 7px; }
.topbar :focus-visible, .button-primary:focus-visible, .order-cart-dock:focus-visible { outline-color: #f0d8aa; }
::selection { color: white; background: var(--deep-2); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 12px; inset-inline-start: 12px; padding: 12px 16px; color: white; background: var(--deep); border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: relative; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px clamp(16px, 4vw, 56px); color: white; background: linear-gradient(112deg, #14382f 0%, var(--deep) 52%, #214c3d 100%); box-shadow: 0 4px 18px rgba(18, 45, 36, .12); }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: max-content; }
.brand-mark { display: grid; width: 39px; height: 39px; place-items: center; border: 1px solid rgba(244, 228, 197, .55); border-radius: 13px; color: #f0d8aa; font-family: var(--font-display); font-size: 1.4rem; }
.brand-copy { display: grid; line-height: 1.12; }
.brand-name { font-size: .88rem; font-weight: 760; letter-spacing: .18em; }
.brand-subtitle { margin-top: 4px; color: #d1d9d3; font-family: var(--font-display); font-size: .82rem; font-style: italic; }
.topbar-tools { display: flex; align-items: center; gap: 14px; }
.language-form { display: flex; align-items: center; gap: 5px; }
.language-form select { width: 60px; min-height: 38px; padding: 5px 8px; border: 1px solid rgba(255,255,255,.38); border-radius: 8px; color: white; background: transparent; }
.language-form select option { color: var(--ink); background: white; }
.language-submit { min-height: 38px; padding: 0 10px; border: 1px solid rgba(255,255,255,.38); border-radius: 8px; color: white; background: transparent; cursor: pointer; white-space: nowrap; }
.language-submit-short { display: none; }
.language-submit:hover { background: rgba(255,255,255,.1); }
.user-chip { display: inline-flex; align-items: center; gap: 7px; color: #e4e9e4; font-size: .83rem; }
.user-dot, .live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #94c4a7; }
.primary-nav, .public-nav { display: flex; align-items: stretch; gap: 5px; padding: 4px clamp(16px, 4vw, 56px); overflow-x: auto; border-bottom: 1px solid var(--line); background: rgba(255, 254, 250, .96); scrollbar-width: thin; }
.nav-link { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 11px; color: #5d6963; font-size: .86rem; font-weight: 650; white-space: nowrap; background: transparent; border: 0; cursor: pointer; transition: color .16s ease, background-color .16s ease; }
.nav-link:hover { color: var(--deep); background: #f4f5ef; }
.nav-link.is-active { color: var(--deep); background: var(--deep-soft); font-weight: 740; }
.nav-link.is-active::after { display: none; }
.nav-public { margin-inline-start: auto; }
.nav-notifications { gap: 7px; }
.notification-count { display: inline-grid; min-width: 20px; height: 20px; padding: 0 5px; place-items: center; border-radius: 99px; color: white; background: var(--rust); font-size: .7rem; }
.notification-count[hidden] { display: none; }
.logout-form { display: flex; }
.nav-logout { font: inherit; }
.mobile-nav { display: none; }
.mobile-tabbar { display: none; }
.main-content { flex: 1; width: min(1400px, 100%); margin: 0 auto; padding: 34px clamp(16px, 4vw, 56px) 56px; }
.site-footer { display: flex; align-items: center; gap: 9px; padding: 16px clamp(16px, 4vw, 56px); color: var(--muted); border-top: 1px solid var(--line); background: #f4f1e9; font-size: .78rem; }
.footer-mark { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid #98a39a; border-radius: 50%; color: var(--deep); font-family: var(--font-display); }
.footer-separator { color: var(--rust); }
.footer-note { margin-inline-start: auto; }
.message-stack { position: fixed; z-index: 30; top: 82px; inset-inline-end: 18px; display: grid; width: min(390px, calc(100% - 36px)); gap: 8px; }
.flash-message { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 13px 15px; border: 1px solid #cddfd2; border-radius: 12px; background: #eff6f0; box-shadow: var(--shadow); }
.flash-error { border-color: #efc9c2; background: #fff1ed; }
.flash-warning { border-color: #ebd9b1; background: #fff9e9; }
.flash-dismiss { flex: 0 0 auto; min-width: 32px; min-height: 32px; border: 0; border-radius: 8px; background: transparent; font-size: 1.2rem; cursor: pointer; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #76613e; font-size: .72rem; font-weight: 760; letter-spacing: .12em; line-height: 1.3; text-transform: uppercase; }
.eyebrow-line { display: inline-block; width: 21px; height: 1px; background: var(--rust); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 27px; }
.page-heading h1 { margin-top: 9px; }
.page-intro { max-width: 620px; margin-bottom: 0; font-size: .96rem; }
.page-heading-compact { align-items: center; }
.page-heading-dashboard { align-items: center; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 10px 17px; border: 1px solid transparent; border-radius: 12px; font-size: .9rem; font-weight: 720; line-height: 1.2; text-align: center; cursor: pointer; transition: background-color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.button-primary { color: white; background: linear-gradient(135deg, var(--deep), var(--deep-2)); box-shadow: 0 5px 13px rgba(23,59,49,.16); }
.button-primary:hover { background: #245344; }
.button-secondary { color: var(--deep); border-color: #b8c8bd; background: #f6faf6; }
.button-secondary:hover { border-color: var(--deep); background: var(--deep-soft); }
.button-quiet { color: #53615a; border-color: var(--line); background: var(--paper); }
.button-quiet:hover { color: var(--deep); border-color: #b6c6bb; }
.button-danger { color: white; background: var(--red); }
.button-danger:hover { background: #8f302b; }
.button-full { width: 100%; }
.button-plus { color: #e5c98f; font-size: 1.2rem; line-height: 1; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--deep-2); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.text-link:hover, .table-action:hover { text-decoration: underline; text-underline-offset: 3px; }
.icon-link { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 14px; color: var(--deep); background: white; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 19px; }
.stat-card { position: relative; display: flex; min-height: 148px; flex-direction: column; justify-content: space-between; padding: 19px 20px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-soft); }
.stat-card::after { position: absolute; inset-inline-end: -19px; bottom: -38px; width: 95px; height: 95px; content: ""; border: 1px solid rgba(23,59,49,.1); border-radius: 50%; }
.stat-card-primary { color: white; border-color: var(--deep); background: var(--deep); }
.stat-card-primary .stat-label, .stat-card-primary .stat-footnote { color: #d2e0d7; }
.stat-card-primary .stat-value { color: white; }
.stat-card-warm { background: #fcf4ed; border-color: #eee0d1; }
.stat-card-outline { background: #f1f5f0; }
.stat-label { color: var(--muted); font-size: .8rem; font-weight: 700; }
.stat-value { color: var(--deep); font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.55rem); line-height: 1; }
.stat-value-money { font-size: clamp(1.25rem, 2vw, 1.75rem); }
.stat-footnote { color: var(--muted); font-size: .75rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .9fr); gap: 18px; margin-bottom: 18px; }
.panel { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-soft); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.panel-heading h2 { margin: 5px 0 0; font-size: 1.45rem; }
.panel-heading .eyebrow { font-size: .68rem; }
.order-list { display: grid; }
.order-row { display: grid; grid-template-columns: 36px minmax(0,1fr) auto auto; align-items: center; gap: 12px; min-height: 69px; border-bottom: 1px solid #eeeee7; }
.order-row:last-child { border-bottom: 0; }
.order-row:hover .order-row-main strong { color: var(--rust); }
.order-row-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: var(--deep); background: var(--deep-soft); font-size: .72rem; font-weight: 750; }
.order-row-main { display: grid; gap: 3px; }
.order-row-main strong { font-size: .88rem; }
.order-row-main small { color: var(--muted); font-size: .75rem; }
.order-row-total { color: var(--deep); font-size: .82rem; font-weight: 740; white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 25px; padding: 3px 8px; border-radius: 99px; color: #42534a; background: #edf0eb; font-size: .68rem; font-weight: 750; white-space: nowrap; }
.status-received { color: #885327; background: #f8eddc; }
.status-preparing { color: #315873; background: #e5eef4; }
.status-ready { color: #275e49; background: #e2f0e6; }
.status-served, .status-active { color: #275e49; background: var(--green-soft); }
.status-cancelled, .status-inactive { color: #79413b; background: #f5e8e4; }
.room-balance-list { display: grid; margin: -4px 0 15px; }
.room-balance-row { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 9px; min-height: 49px; border-bottom: 1px solid #efefe8; font-size: .78rem; }
.room-number { display: grid; width: 38px; height: 34px; place-items: center; border-radius: 9px; color: var(--deep); background: var(--cream); font-size: .79rem; font-weight: 750; }
.room-guest { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.room-balance-row strong { color: var(--deep); font-size: .75rem; white-space: nowrap; }
.empty-inline { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 142px; color: var(--muted); text-align: center; }
.empty-inline p { margin: 0; }
.empty-check { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); }
.empty-copy { padding: 14px 0; font-size: .85rem; }
.recent-panel { margin-top: 1px; }

.table-scroll { width: 100%; overflow-x: auto; border: 1px solid #e9e9e1; border-radius: 12px; }
.data-table { width: 100%; min-width: 680px; border-collapse: collapse; text-align: start; }
.data-table th { padding: 12px 14px; color: var(--muted); background: #f6f6f1; font-size: .7rem; font-weight: 740; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 14px; border-top: 1px solid #edede7; color: #46524c; font-size: .81rem; vertical-align: middle; }
.data-table td strong { color: var(--ink); }
.table-action { color: var(--deep-2); font-size: .79rem; font-weight: 720; }
.table-empty { padding: 27px !important; color: var(--muted) !important; text-align: center; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.result-count { color: var(--muted); font-size: .77rem; }
.muted { color: var(--muted); }

.kitchen-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.status-legend { display: flex; flex-wrap: wrap; gap: 15px; }
.status-legend span, .refresh-note { display: inline-flex; align-items: center; gap: 7px; color: #58645d; font-size: .76rem; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-received { background: #ce994c; }.dot-preparing { background: #5590ae; }.dot-ready { background: #4f9672; }
.refresh-note { color: var(--muted); }
.refresh-note .live-dot { background: #72ad86; box-shadow: 0 0 0 3px #e3eee6; }
.kitchen-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; align-items: start; }
.ticket-card { padding: 17px; border: 1px solid var(--line); border-top: 4px solid #c9974f; border-radius: 15px; background: var(--paper); box-shadow: var(--shadow-soft); }
.ticket-preparing { border-top-color: #5486a0; }.ticket-ready { border-top-color: #4a8a69; }
.ticket-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 12px; border-bottom: 1px dashed #deded4; }
.ticket-header > div { display: flex; align-items: baseline; gap: 9px; }
.ticket-number { color: var(--deep); font-family: var(--font-display); font-size: 1.4rem; font-weight: 650; }
.ticket-time { color: var(--muted); font-size: .8rem; font-weight: 650; }
.ticket-guest { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 5px; }
.ticket-guest strong { font-size: .91rem; }
.ticket-guest span { color: var(--rust); font-size: .8rem; font-weight: 750; }
.ticket-source { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .72rem; }
.source-icon { color: var(--rust); }
.ticket-lines { display: grid; gap: 9px; margin: 14px 0; padding: 0; list-style: none; }
.ticket-lines li { display: grid; grid-template-columns: 27px minmax(0,1fr) auto; align-items: start; gap: 7px; font-size: .8rem; }
.ticket-quantity { color: var(--rust); font-weight: 800; }
.ticket-item-name { color: #4e5a53; }
.ticket-lines strong { color: var(--ink); font-size: .75rem; white-space: nowrap; }
.ticket-note { display: flex; gap: 7px; margin: 0 0 13px; padding: 9px 10px; border-radius: 9px; color: #745341; background: #faf1e9; font-size: .78rem; }
.note-mark { color: var(--rust); font-family: var(--font-display); font-size: 1.2rem; line-height: 1; }
.ticket-total { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .79rem; }
.ticket-total strong { color: var(--deep); font-size: .97rem; }
.ticket-actions { display: grid; gap: 8px; }
.ticket-actions form { margin: 0; }
.cancel-details { border-top: 1px solid #eee9e4; }
.cancel-details summary { min-height: 39px; padding-top: 11px; color: #945148; font-size: .75rem; font-weight: 720; cursor: pointer; }
.cancel-inline-form { display: grid; gap: 8px; padding-top: 5px; }
.cancel-inline-form input { min-height: 42px; }
.empty-panel { display: grid; justify-items: center; gap: 8px; padding: 48px 24px; border: 1px dashed #cdd4cc; border-radius: var(--radius); background: rgba(255,254,250,.72); text-align: center; }
.empty-panel-mark { display: grid; width: 54px; height: 54px; margin-bottom: 6px; place-items: center; border: 1px solid #cad7cf; border-radius: 50%; color: var(--deep); background: var(--deep-soft); font-family: var(--font-display); font-size: 1.65rem; }
.empty-panel h2 { margin: 0; }
.empty-panel p { max-width: 440px; margin: 0 0 6px; }
.empty-kitchen { min-height: 330px; }

.pos-layout { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(300px,.8fr); gap: 18px; align-items: start; }
.pos-catalog, .pos-summary { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-soft); }
.pos-summary { position: sticky; top: 14px; }
.pos-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 21px; }
.pos-section-heading h2, .pos-summary-heading h2 { margin: 5px 0 0; font-size: 1.4rem; }
.catalog-search { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #fff; }
.catalog-search input { width: 160px; min-width: 0; min-height: 38px; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; }
.catalog-search input:focus-visible { outline: 0; }
.catalog-search:focus-within { outline: 3px solid #245544; outline-offset: 2px; }
.catalog-category { margin-top: 23px; }
.catalog-category h3 { display: flex; align-items: center; gap: 9px; color: var(--deep); font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.catalog-category h3::after { flex: 1; height: 1px; content: ""; background: #e8e7df; }
.order-category-nav { display: flex; gap: 8px; margin: 0 0 18px; padding: 4px 0; overflow-x: auto; scrollbar-width: thin; }
.order-category-link { display: inline-flex; min-height: 42px; flex: 0 0 auto; align-items: center; padding: 0 14px; border: 1px solid #d9ded7; border-radius: 99px; color: #4e5f55; background: white; font-size: .78rem; font-weight: 680; white-space: nowrap; }
.order-category-link:hover, .order-category-link.is-active { color: white; border-color: var(--deep); background: var(--deep); box-shadow: 0 3px 10px rgba(23, 61, 50, .12); }
.catalog-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.catalog-item { display: grid; grid-template-columns: 56px minmax(0,1fr) 30px; align-items: center; gap: 10px; min-height: 75px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: white; text-align: start; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.catalog-item:hover { border-color: #9fb3a5; background: #f8fbf8; transform: translateY(-1px); }
.catalog-item img, .catalog-item-placeholder { display: grid; width: 56px; height: 56px; place-items: center; border-radius: 9px; object-fit: cover; }
.catalog-item-copy { display: grid; gap: 4px; min-width: 0; }
.catalog-item-copy strong { overflow: hidden; color: var(--ink); font-size: .79rem; text-overflow: ellipsis; white-space: nowrap; }
.catalog-item-copy small { color: var(--rust); font-size: .73rem; font-weight: 760; }
.catalog-add { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--deep); background: var(--deep-soft); font-size: 1.15rem; }
.pos-summary-heading { margin-bottom: 18px; }
.order-cart-dock, .cart-panel-close { display: none; }
.field-group { display: grid; gap: 6px; margin-bottom: 15px; }
.field-group > label { color: #37473f; font-size: .81rem; font-weight: 730; }
.field-group input, .field-group select, .field-group textarea, .cancel-inline-form input, .language-form select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cfd5ce; border-radius: 9px; color: var(--ink); background: white; }
.field-group textarea { min-height: 90px; resize: vertical; }
.field-group input[type="checkbox"] { width: 20px; min-height: 20px; accent-color: var(--deep); }
.field-group input:focus, .field-group select:focus, .field-group textarea:focus, .cancel-inline-form input:focus { border-color: var(--deep-2); outline: 3px solid rgba(34,77,64,.14); }
.cart-lines { display: grid; gap: 9px; max-height: 285px; margin: 17px 0; overflow-y: auto; }
.cart-empty { margin: 0; padding: 19px 10px; border: 1px dashed #d7dbd3; border-radius: 10px; font-size: .8rem; text-align: center; }
.cart-line { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; padding-bottom: 9px; border-bottom: 1px solid #eeeee8; }
.cart-line-name { color: var(--ink); font-size: .8rem; font-weight: 680; }
.cart-line-controls { display: inline-flex; align-items: center; gap: 5px; }
.cart-line-controls button { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--deep); background: white; font-weight: 800; cursor: pointer; }
.cart-line-controls button:hover { background: var(--deep-soft); }
.cart-line-controls .cart-remove { color: var(--red); }
.cart-line-subtotal { grid-column: 1 / -1; color: var(--muted); font-size: .75rem; }
.cart-total { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 17px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #5d6963; font-size: .84rem; }
.cart-total strong { color: var(--deep); font-family: var(--font-display); font-size: 1.35rem; }
.button-order-submit { margin-top: 5px; }
.form-footnote { margin: 11px 0 0; font-size: .72rem; text-align: center; }
.field-errors, .form-errors { color: #8b332f; font-size: .78rem; }
.field-errors ul, .form-errors ul { margin: 3px 0 0; padding-inline-start: 20px; }
.field-group.has-error input, .field-group.has-error select, .field-group.has-error textarea { border-color: #c96a5e; }
.form-errors { margin-bottom: 13px; padding: 11px 13px; border: 1px solid #efc7c1; border-radius: 9px; background: #fff1ed; }
.field-help { color: var(--muted); font-size: .73rem; }

.auth-page .main-content { display: grid; place-items: center; }
.auth-layout { display: grid; width: min(880px,100%); min-height: 460px; grid-template-columns: .92fr 1.08fr; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.auth-aside { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(25px,5vw,54px); overflow: hidden; color: white; background: var(--deep); }
.auth-aside::before, .auth-aside::after { position: absolute; width: 260px; height: 260px; content: ""; border: 1px solid rgba(242,220,173,.2); border-radius: 50%; }
.auth-aside::before { inset-inline-end: -130px; bottom: -92px; }
.auth-aside::after { inset-inline-end: -73px; bottom: -147px; }
.auth-aside .eyebrow { margin-top: 27px; color: #dbc99e; }
.auth-aside h1 { margin: 12px 0; color: white; font-size: clamp(2.1rem,4vw,3.25rem); }
.auth-aside p { max-width: 300px; color: #d6ded8; }
.auth-monogram { display: grid; width: 73px; height: 73px; place-items: center; border: 1px solid rgba(231,211,165,.62); border-radius: 50%; color: #e7d3a5; font-family: var(--font-display); font-size: 2.5rem; }
.auth-aside-rule { width: 58px; height: 1px; margin-top: 18px; background: var(--gold); }
.auth-aside-caption { margin-top: 10px; color: #cad5ce; font-family: var(--font-display); font-size: .92rem; font-style: italic; }
.auth-card { align-self: center; padding: clamp(26px,5vw,58px); }
.auth-card-heading { margin-bottom: 24px; }
.auth-card-heading h2 { margin: 8px 0 0; font-size: 1.8rem; }
.form-stack { display: grid; }
.form-stack input, .form-stack select, .form-stack textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cfd5ce; border-radius: 9px; color: var(--ink); background: white; }
.form-stack input[type="checkbox"] { width: 20px; min-height: 20px; accent-color: var(--deep); }
.auth-private-note { display: flex; align-items: center; gap: 7px; margin: 20px 0 0; color: var(--muted); font-size: .75rem; }
.lock-icon { color: var(--rust); font-weight: 800; }
.form-panel { width: min(740px,100%); margin: 0 auto; padding: clamp(18px,4vw,32px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-soft); }
.form-panel .form-stack { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 17px; }
.form-panel .field-group:has(textarea), .form-panel .form-errors, .form-panel .form-actions { grid-column: 1 / -1; }
.stay-form-panel { width: min(860px,100%); }
.stay-form-section { min-width: 0; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fcfbf6; }
.stay-form-section legend { padding: 0 8px; color: var(--deep); font-family: var(--font-display); font-size: 1.2rem; font-weight: 650; }
.stay-form-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 17px; }
.stay-form-fields .field-group:has(textarea) { grid-column: 1 / -1; }
.stay-contact { color: var(--muted); font-size: .76rem; }
.field-checkbox { grid-template-columns: 22px minmax(0,1fr); align-items: center; gap: 10px; min-height: 46px; }
.field-checkbox label { grid-column: 2; grid-row: 1; }
.field-checkbox input { grid-column: 1; grid-row: 1; }
.form-actions { display: flex; gap: 9px; padding-top: 5px; }

.room-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.room-card { display: flex; min-height: 240px; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-soft); }
.room-card-top { display: flex; align-items: center; justify-content: space-between; }
.room-card-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: var(--deep); background: var(--deep-soft); font-size: 1.15rem; }
.room-card h2 { margin: 17px 0 7px; font-size: 1.7rem; }
.room-card-guest { display: grid; gap: 2px; color: #4e5b53; font-size: .82rem; }
.room-card-guest small { color: var(--muted); font-size: .72rem; }
.room-card-balance { display: flex; justify-content: space-between; gap: 8px; margin: auto 0 13px; padding-top: 16px; color: var(--muted); font-size: .76rem; }
.room-card-balance strong { color: var(--deep); }
.menu-admin-panel { margin-bottom: 16px; }
.admin-menu-grid { display: grid; }
.admin-menu-item { display: grid; grid-template-columns: 54px minmax(0,1fr) auto auto; align-items: center; gap: 13px; min-height: 74px; border-top: 1px solid #eeeee8; }
.admin-menu-item > img, .admin-menu-placeholder { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 9px; color: var(--muted); background: #e9eee8; object-fit: cover; }
.admin-menu-item-copy { display: grid; gap: 2px; min-width: 0; }
.admin-menu-item-copy strong { overflow: hidden; font-size: .83rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-menu-item-copy small { overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-menu-price { color: var(--rust); font-size: .75rem; font-weight: 700; }
.role-label { display: inline-flex; padding: 5px 9px; border-radius: 99px; color: var(--deep); background: var(--deep-soft); font-size: .72rem; font-weight: 700; }
.staff-table { min-width: 850px; }
.staff-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.staff-actions form { margin: 0; }
.staff-actions .button { min-height: 39px; padding: 7px 10px; font-size: .74rem; white-space: nowrap; }
.finance-layout { display: grid; grid-template-columns: minmax(270px,.72fr) minmax(0,1.5fr); gap: 17px; align-items: start; }
.finance-form-panel { position: sticky; top: 15px; }
.finance-history-panel { min-width: 0; }
.unread-summary { padding: 7px 12px; border-radius: 99px; color: var(--deep); background: var(--deep-soft); font-size: .78rem; font-weight: 700; }
.notification-list { display: grid; gap: 10px; }
.notification-card { display: grid; grid-template-columns: 40px minmax(0,1fr) 36px; align-items: start; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.notification-unread { border-inline-start: 4px solid var(--rust); background: #fffdf8; }
.notification-icon { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 50%; color: var(--deep); background: var(--deep-soft); font-weight: 800; }
.notification-copy h2 { margin: 0 0 3px; font-family: var(--font-body); font-size: .9rem; font-weight: 750; letter-spacing: 0; }
.notification-copy p { margin: 0 0 6px; font-size: .8rem; }
.notification-copy time { color: var(--muted); font-size: .7rem; }
.notification-open { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--deep); }
.notification-actions { display: grid; justify-items: end; gap: 7px; }
.notification-actions form { margin: 0; }
.mark-read-button { min-height: 34px; padding: 4px 9px; border: 1px solid #ced8cf; border-radius: 8px; color: var(--deep); background: #f8fbf7; font-size: .68rem; font-weight: 700; cursor: pointer; }
.mark-read-button:hover { background: var(--deep-soft); }
.public-menu-page .main-content { width: min(1180px,100%); }
.menu-hero { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 205px; margin: 5px 0 17px; padding: 31px clamp(22px,5vw,54px); overflow: hidden; border-radius: 22px; color: white; background: var(--deep); }
.menu-hero::after { position: absolute; top: -180px; inset-inline-end: 8%; width: 360px; height: 360px; content: ""; border: 1px solid rgba(234,215,176,.19); border-radius: 50%; box-shadow: 0 0 0 36px rgba(234,215,176,.03), 0 0 0 72px rgba(234,215,176,.025); }
.menu-hero-copy { position: relative; z-index: 1; max-width: 670px; }
.menu-hero .eyebrow { color: #e2cca0; }
.menu-hero h1 { margin: 13px 0 8px; color: white; font-size: clamp(2.5rem,6vw,4.15rem); }
.hero-intro { margin: 0; color: #d2ddd5; font-family: var(--font-display); font-size: 1.05rem; font-style: italic; }
.menu-hero-seal { position: relative; z-index: 1; display: grid; width: 105px; height: 105px; flex: 0 0 auto; align-content: center; justify-items: center; border: 1px solid rgba(233,213,166,.58); border-radius: 50%; color: #e9d5a6; }
.menu-hero-seal::before { position: absolute; inset: 7px; content: ""; border: 1px solid rgba(233,213,166,.32); border-radius: 50%; }
.menu-hero-seal span { font-family: var(--font-display); font-size: 2.65rem; line-height: 1; }
.menu-hero-seal small { margin-top: 3px; font-size: .47rem; font-weight: 700; letter-spacing: .16em; }
.category-pills { position: sticky; z-index: 10; top: 0; display: flex; gap: 8px; margin: 0 -4px 27px; padding: 10px 4px; overflow-x: auto; background: rgba(247,244,237,.95); backdrop-filter: blur(10px); scrollbar-width: thin; -webkit-overflow-scrolling: touch; scroll-snap-type: inline proximity; }
.category-pills a { display: inline-flex; min-height: 38px; align-items: center; padding: 0 14px; border: 1px solid #d9ded7; border-radius: 99px; color: #4e5f55; background: #fffefa; font-size: .78rem; font-weight: 680; white-space: nowrap; }
.category-pills a { scroll-snap-align: start; }
.category-pills a:hover { color: white; border-color: var(--deep); background: var(--deep); }
.menu-category { margin-bottom: 32px; scroll-margin-top: 70px; }
.menu-category:target .section-heading h2 { color: var(--deep-2); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-heading h2 { margin: 6px 0 0; font-size: 1.85rem; }
.section-description { max-width: 600px; margin: 5px 0 0; font-size: .83rem; }
.menu-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.menu-card { display: grid; grid-template-columns: 138px minmax(0,1fr); min-height: 158px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); box-shadow: var(--shadow-soft); }
.menu-card-image-wrap, .menu-card-image-placeholder { min-height: 100%; background: #e6e8df; }
.menu-card-image { width: 100%; height: 100%; min-height: 158px; object-fit: cover; }
.menu-card-image-placeholder { display: grid; place-items: center; color: #9ba69a; background: linear-gradient(145deg,#e5e9df,#f0e8db); }
.menu-art { position: relative; isolation: isolate; overflow: hidden; color: #875b37; background: radial-gradient(ellipse at 50% 110%,rgba(184,130,73,.19),transparent 54%),linear-gradient(145deg,#f3eadb,#e4e9df); }
.menu-art::before, .menu-art::after { position: absolute; z-index: -1; content: ""; border: 1px solid currentColor; border-radius: 50%; opacity: .16; }
.menu-art::before { width: 72%; aspect-ratio: 1; inset-inline-start: -24%; top: -36%; }
.menu-art::after { width: 56%; aspect-ratio: 1; inset-inline-end: -19%; bottom: -32%; }
.menu-art-tajines { color: #9a6539; background: radial-gradient(ellipse at 56% 92%,rgba(191,126,61,.25),transparent 52%),linear-gradient(145deg,#f6ead8,#ebe2d0); }
.menu-art-salades { color: #4a765c; background: radial-gradient(ellipse at 45% 100%,rgba(87,134,92,.22),transparent 54%),linear-gradient(145deg,#edf1df,#dae8d9); }
.menu-art-boissons { color: #8d6145; background: radial-gradient(ellipse at 55% 95%,rgba(180,119,79,.2),transparent 55%),linear-gradient(145deg,#f2e7dc,#e5e9df); }
.menu-art-svg { position: relative; z-index: 1; display: block; width: 58px; height: 58px; overflow: visible; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 3px 2px rgba(38,52,44,.08)); }
.menu-card-image-placeholder .menu-art-svg { width: clamp(54px,6vw,82px); height: clamp(54px,6vw,82px); }
.catalog-item-placeholder .menu-art-svg { width: 34px; height: 34px; stroke-width: 1.9; }
.admin-menu-placeholder .menu-art-svg { width: 30px; height: 30px; stroke-width: 1.9; }
.catalog-search-empty { display: grid; min-height: 132px; margin: 0; place-items: center; border: 1px dashed #cdd7cf; border-radius: 13px; color: var(--muted); background: #f8faf6; font-size: .88rem; text-align: center; }
.catalog-search-empty[hidden] { display: none; }
.menu-card-body { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 15px 16px; }
.menu-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.menu-card-heading h3 { margin: 0; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; line-height: 1.2; }
.menu-price { color: var(--rust); font-size: .81rem; font-weight: 770; white-space: nowrap; }
.menu-card-body > p:not(.allergen-note) { margin: 7px 0 0; font-size: .77rem; line-height: 1.45; }
.menu-card-body .allergen-note { display: flex; align-items: flex-start; gap: 7px; margin: 11px 0 0; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.allergen-note strong { color: #5c675f; }
.allergen-icon { display: grid; width: 16px; height: 16px; flex: 0 0 auto; place-items: center; border: 1px solid #aeb8af; border-radius: 50%; font-size: .62rem; font-weight: 800; }
.public-menu-footnote { margin: 32px auto 0; color: var(--muted); font-size: .75rem; text-align: center; }
.allergen-disclaimer { display: flex; align-items: flex-start; gap: 11px; margin: 22px 0 0; padding: 13px 15px; border: 1px solid #dfbaa8; border-inline-start: 4px solid var(--rust); border-radius: 12px; color: #49372f; background: var(--rust-soft); font-size: .86rem; line-height: 1.5; }
.allergen-disclaimer-mark { display: grid; width: 21px; height: 21px; flex: 0 0 auto; place-items: center; border: 1px solid #bd8065; border-radius: 50%; color: #78432f; font-size: .72rem; font-weight: 800; }
.public-menu-page .site-footer { justify-content: center; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.panel-heading-actions { display: flex; align-items: center; gap: 12px; }
.qr-print-panel { display: flex; align-items: center; gap: 22px; margin-bottom: 18px; padding: 18px 22px; border: 1px solid #dce4db; border-radius: var(--radius); background: #f0f5ef; }
.qr-print-panel > img { flex: 0 0 auto; width: 136px; height: 136px; padding: 7px; border: 1px solid #e4e6de; border-radius: 10px; background: white; object-fit: contain; }
.qr-print-panel h2 { margin: 5px 0; font-size: 1.35rem; }
.qr-print-panel p { margin: 0 0 9px; font-size: .8rem; }
.qr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.category-create-panel { margin-bottom: 18px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.category-create-panel summary { min-height: 32px; color: var(--deep); font-size: .85rem; font-weight: 750; cursor: pointer; }
.category-create-form { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-items: end; gap: 11px; padding-top: 14px; }
.category-create-form .field-group { margin: 0; }
.category-create-form .field-group:nth-last-of-type(-n+3) { grid-column: span 1; }
.category-create-form button { min-height: 46px; }

/* Arabic uses a true RTL document direction while preserving isolated LTR values. */
html[dir="rtl"] body { direction: rtl; text-align: right; font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif; }
html[dir="rtl"] h1, html[dir="rtl"] h2 { font-family: "Noto Naskh Arabic", Amiri, "Segoe UI", Tahoma, serif; letter-spacing: 0; }
html[dir="rtl"] .language-form select { direction: ltr; text-align: left; }
html[dir="rtl"] .brand-copy { text-align: right; }
html[dir="rtl"] .message-stack { inset-inline-end: 12px; }
html[dir="rtl"] .mobile-nav-links a,
html[dir="rtl"] .mobile-nav-links button { text-align: right; }
html[dir="rtl"] .data-table,
html[dir="rtl"] .catalog-item { text-align: right; }
html[dir="rtl"] .notification-open { justify-self: end; }
html[dir="rtl"] .category-create-form .field-control { text-align: right; }
html[dir="rtl"] .menu-price { direction: ltr; unicode-bidi: isolate; flex-shrink: 0; min-width: max-content; white-space: nowrap; font-size: .68rem; }
html[dir="rtl"] .stat-value-money,
html[dir="rtl"] .room-card-balance strong,
html[dir="rtl"] .admin-menu-price,
html[dir="rtl"] time,
html[dir="rtl"] input[type="number"],
html[dir="rtl"] input[type="date"],
html[dir="rtl"] input[type="time"] { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .filter-form input[type="search"] { text-align: right; }

/* Refined shared surfaces and interaction states. */
.auth-layout, .panel, .ticket-card, .pos-catalog, .pos-summary, .room-card,
.notification-card, .menu-card, .form-panel { border-radius: var(--radius); }
.auth-layout { box-shadow: var(--shadow); }
.field-group input, .field-group select, .field-group textarea,
.form-stack input, .form-stack select, .form-stack textarea,
.cancel-inline-form input { min-height: 48px; border-radius: 12px; transition: border-color .16s ease, box-shadow .16s ease; }
.field-group input:focus, .field-group select:focus, .field-group textarea:focus,
.form-stack input:focus, .form-stack select:focus, .form-stack textarea:focus,
.cancel-inline-form input:focus { border-color: var(--deep-2); outline: 3px solid #245544; outline-offset: 2px; }
.status-pill { min-height: 28px; padding-inline: 10px; letter-spacing: .01em; }
.empty-panel { border-radius: var(--radius); background: rgba(255, 254, 250, .82); }
.kitchen-toolbar { border-radius: 14px; box-shadow: 0 3px 12px rgba(24, 48, 38, .035); }
.ticket-card { box-shadow: var(--shadow-soft); }
.ticket-header { border-bottom-style: solid; border-bottom-color: #e8e9e2; }
.order-category-link { min-height: 44px; border-radius: 12px; transition: color .16s ease, border-color .16s ease, background-color .16s ease; }
.catalog-item { border-radius: 14px; box-shadow: 0 2px 8px rgba(24, 48, 38, .025); }
.catalog-item:focus-visible { outline-offset: 2px; }
.cart-line-controls button { border-radius: 10px; }
.form-panel, .pos-catalog, .pos-summary { box-shadow: var(--shadow-soft); }
.stay-form-section { border-radius: var(--radius-sm); background: #fbfaf6; }
.notification-card { box-shadow: 0 3px 14px rgba(24, 48, 38, .035); }
.data-table th { letter-spacing: .06em; }
.data-table tbody tr { transition: background-color .16s ease; }
.auth-card-heading { margin-bottom: 27px; }
.auth-private-note { line-height: 1.5; }
.mobile-tab { transition: color .16s ease, background-color .16s ease; }
.mobile-tab.is-active { box-shadow: inset 0 0 0 1px rgba(23, 61, 50, .045); }

@media (hover: hover) {
  .room-card, .notification-card, .ticket-card { transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
  .room-card:hover, .notification-card:hover { border-color: #d1dbd2; box-shadow: var(--shadow-soft); transform: translateY(-2px); }
  .data-table tbody tr:hover { background: #fbfcf8; }
  .nav-link:hover { background: #f1f4ef; }
}

@media print {
  body.print-qr { background: white; }
  .print-qr .app-shell > :not(.main-content) { display: none !important; }
  .print-qr .main-content > :not(#menu-qr-print) { display: none !important; }
  .print-qr #menu-qr-print { display: flex !important; width: 100%; min-height: 90vh; align-items: center; justify-content: center; gap: 35px; margin: 0; border: 0; background: white; box-shadow: none; }
  .print-qr #menu-qr-print > img { width: 250px; height: 250px; }
  .print-qr #menu-qr-print h2 { font-size: 28pt; }
  .print-qr #menu-qr-print p, .print-qr #menu-qr-print .eyebrow { font-size: 12pt; }
  .print-qr #menu-qr-print .qr-actions > * { display: none !important; }
}

@media (max-width: 1050px) {
  .primary-nav { display: none; }
  .mobile-nav { position: relative; display: block; z-index: 15; border-bottom: 1px solid var(--line); background: var(--paper); }
  .mobile-nav summary { display: flex; min-height: 47px; align-items: center; gap: 8px; padding: 0 17px; color: var(--deep); font-size: .83rem; font-weight: 700; cursor: pointer; list-style: none; }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .menu-icon { color: var(--rust); font-size: 1.05rem; }
  .mobile-nav-links { display: none; }
  .mobile-nav[open] .mobile-nav-links { position: absolute; top: 46px; inset-inline: 0; display: grid; padding: 8px 16px 15px; border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
  .mobile-nav-links a, .mobile-nav-links button { display: flex; min-height: 45px; align-items: center; padding: 0 8px; border: 0; border-bottom: 1px solid #eeeee7; color: #48584f; background: transparent; font-size: .85rem; font-weight: 650; text-align: start; cursor: pointer; }
  .mobile-nav-links form { display: contents; }
  .kitchen-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .room-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .menu-card { grid-template-columns: 118px minmax(0,1fr); }
}
@media (min-width: 1051px) and (max-width: 1300px) {
  .primary-nav { padding-inline: 16px; }
  .primary-nav .nav-link { padding-inline: 7px; font-size: .76rem; }
}
@media (max-width: 760px) {
  .topbar { padding: 12px 16px; }
  .language-form select, .language-submit { min-height: 44px; }
  .user-chip { display: none; }
  .public-nav { min-height: 46px; padding-inline: 12px; }
  .public-nav .nav-link { min-height: 48px; }
  .main-content { padding: 26px 16px 40px; }
  .site-footer { padding: 14px 16px; }
  .message-stack { top: 72px; width: calc(100% - 24px); }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 15px; margin-bottom: 20px; }
  .page-heading > .button, .page-heading > .button-quiet { width: 100%; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .stat-card { min-height: 126px; padding: 15px; }
  .stat-value { font-size: 2rem; }
  .stat-value-money { font-size: 1.24rem; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 12px; }
  .panel { padding: 16px; }
  .panel-heading { align-items: flex-start; }
  .panel-heading h2 { font-size: 1.3rem; }
  .order-row { grid-template-columns: 34px minmax(0,1fr) auto; gap: 9px; padding: 9px 0; }
  .order-row-total { grid-column: 2 / -1; justify-self: end; }
  .order-row .status-pill { justify-self: end; }
  .text-link { font-size: .75rem; }
  .kitchen-toolbar { align-items: flex-start; flex-direction: column; }
  .kitchen-grid { grid-template-columns: 1fr; }
  .ticket-card { padding: 16px; }
  .pos-layout { grid-template-columns: 1fr; }
  .pos-summary { position: static; grid-row: 1; }
  .pos-catalog { grid-row: 2; padding: 16px; }
  .pos-section-heading { align-items: flex-start; flex-direction: column; }
  .catalog-search { width: 100%; }
  .catalog-search input { flex: 1; width: auto; }
  .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .room-grid { grid-template-columns: 1fr; }
  .room-card { min-height: 215px; }
  .form-panel .form-stack { grid-template-columns: 1fr; }
  .form-panel .field-group:has(textarea), .form-panel .form-errors, .form-panel .form-actions { grid-column: auto; }
  .stay-form-fields { grid-template-columns: 1fr; }
  .stay-form-fields .field-group:has(textarea) { grid-column: auto; }
  .finance-layout { grid-template-columns: 1fr; }
  .finance-form-panel { position: static; }
  .admin-menu-item { grid-template-columns: 48px minmax(0,1fr) auto; gap: 9px; padding: 9px 0; }
  .admin-menu-item .table-action { grid-column: 2 / -1; justify-self: start; }
  .qr-print-panel { align-items: flex-start; gap: 14px; padding: 14px; }
  .qr-print-panel > img { width: 94px; height: 94px; }
  .qr-print-panel h2 { font-size: 1.12rem; }
  .qr-actions { align-items: flex-start; flex-direction: column; gap: 9px; }
  .category-create-form { grid-template-columns: 1fr; }
  .menu-hero { min-height: 185px; padding: 25px 20px; border-radius: 16px; }
  .menu-hero-seal { width: 70px; height: 70px; }
  .menu-hero-seal span { font-size: 1.8rem; }
  .menu-hero-seal small { font-size: .37rem; }
  .menu-hero h1 { font-size: clamp(2.25rem,10vw,3.15rem); }
  .hero-intro { max-width: 330px; font-size: .9rem; }
  .menu-grid { grid-template-columns: 1fr; gap: 10px; }
  .menu-card { grid-template-columns: 112px minmax(0,1fr); min-height: 145px; }
  .menu-card-image { min-height: 145px; }
  .menu-card-image-placeholder { min-height: 145px; }
  .menu-card-body { padding: 12px; }
  .menu-card-heading h3 { font-size: 1.03rem; }
  .menu-price { font-size: .75rem; }
  .public-menu-page .main-content { padding-top: 18px; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { min-height: 220px; padding: 24px; }
  .auth-monogram { width: 51px; height: 51px; font-size: 1.8rem; }
  .auth-aside .eyebrow { margin-top: 15px; }
  .auth-aside h1 { font-size: 2.1rem; }
  .auth-aside p { margin-bottom: 0; font-size: .85rem; }
  .auth-aside-rule, .auth-aside-caption { display: none; }
  .auth-card { padding: 25px 20px; }
}
@media (max-width: 430px) {
  .brand-mark { width: 35px; height: 35px; }
  .brand-name { font-size: .79rem; }
  .brand-subtitle { font-size: .72rem; }
  .language-form { gap: 4px; }
  .language-form select { width: 64px; padding-inline: 6px; }
  .language-submit { min-width: 40px; padding-inline: 7px; }
  .language-submit-full { display: none; }
  .language-submit-short { display: inline; }
  .main-content { padding-inline: 13px; }
  .catalog-grid { grid-template-columns: 1fr; }
  .catalog-item { grid-template-columns: 54px minmax(0,1fr) 30px; }
  .menu-card { grid-template-columns: 94px minmax(0,1fr); }
  .menu-card-image { min-height: 140px; }
  .menu-card-body { padding: 10px; }
  .menu-price { white-space: normal; text-align: right; }
  .list-toolbar { align-items: stretch; flex-direction: column; }
  .notification-card { grid-template-columns: 34px minmax(0,1fr) 30px; gap: 9px; padding: 13px; }
}

/* Phone app shell: native-feeling fixed tabs, safe-area spacing, and touch targets. */
@media (max-width: 1050px) {
  .app-shell { min-height: 100vh; min-height: 100svh; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .mobile-tabbar {
    position: fixed;
    z-index: 40;
    inset-inline: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    min-height: 64px;
    padding: 4px;
    padding-right: max(8px, env(safe-area-inset-right));
    padding-bottom: calc(4px + env(safe-area-inset-bottom));
    padding-left: max(8px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: rgba(255, 254, 250, .98);
    box-shadow: 0 -5px 22px rgba(35, 46, 38, .08);
    backdrop-filter: blur(14px);
  }
  .mobile-tabbar-admin { grid-template-columns: .9fr .95fr 1fr 1.4fr .7fr; }
  .mobile-tabbar-staff { grid-template-columns: .95fr 1.25fr 1.5fr .8fr; }
  .mobile-tabbar-staff > .mobile-tab:nth-child(2) .mobile-tab-label { white-space: normal; }
  .mobile-tabbar > .mobile-tab, .mobile-more-menu { min-width: 0; }
  .mobile-tab {
    position: relative;
    display: flex;
    min-height: 56px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 3px 2px;
    border: 0;
    border-radius: 12px;
    color: #66736c;
    background: transparent;
    font-size: .67rem;
    font-weight: 680;
    line-height: 1.08;
    text-align: center;
    cursor: pointer;
  }
  .mobile-tab:hover { color: var(--deep); background: #f4f5ef; }
  .mobile-tab.is-active { color: var(--deep); background: var(--deep-soft); }
  .mobile-more-menu.is-active .mobile-more-toggle { color: var(--deep); background: var(--deep-soft); }
  .mobile-tab-icon { display: grid; width: 24px; height: 24px; place-items: center; font-size: 1.15rem; line-height: 1; }
  .mobile-tab-icon svg { display: block; width: 22px; height: 22px; }
  .mobile-tab-label { max-width: none; overflow: visible; overflow-wrap: normal; text-overflow: clip; white-space: nowrap; font-size: .7rem; }
  .mobile-tab-notifications .notification-count { position: absolute; top: 0; inset-inline-end: calc(50% - 24px); min-width: 18px; height: 18px; padding: 0 4px; border: 2px solid var(--paper); font-size: .61rem; }
  .mobile-more-menu { position: static; display: block; }
  .mobile-more-toggle { width: 100%; list-style: none; }
  .mobile-more-toggle::-webkit-details-marker { display: none; }
  .mobile-more-panel {
    position: absolute;
    inset-inline-end: 10px;
    bottom: calc(100% + 8px);
    display: grid;
    width: min(300px, calc(100vw - 20px));
    max-height: min(65svh, 520px);
    padding: 8px 12px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--paper);
    box-shadow: var(--shadow);
  }
  .mobile-more-panel a, .mobile-more-panel button {
    display: flex;
    min-height: 48px;
    align-items: center;
    padding: 0 8px;
    border: 0;
    border-bottom: 1px solid #eeeee7;
    color: #48584f;
    background: transparent;
    font: inherit;
    font-size: .88rem;
    font-weight: 650;
    text-align: start;
    cursor: pointer;
  }
  .mobile-more-panel a[aria-current="page"] { color: var(--deep); background: var(--deep-soft); }
  .mobile-more-panel .mobile-language-form { display: none; }
  .mobile-more-panel form:not(.mobile-language-form) { display: contents; }
  .primary-nav { display: none; }
  .mobile-nav { display: none; }
}

@media (max-width: 760px) {
  body.authenticated-app .topbar { display: none; }
  body.authenticated-app .page-heading-dashboard { display: none; }
  body.authenticated-app .main-content { padding-top: max(14px, env(safe-area-inset-top)); }
  .mobile-more-panel .mobile-language-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 7px;
    padding: 5px 0 10px;
    border-bottom: 1px solid #eeeee7;
  }
  .mobile-language-form > label { color: var(--muted); font-size: .8rem; font-weight: 700; }
  .mobile-language-form select {
    width: 62px;
    min-height: 48px;
    padding: 6px 8px;
    border: 1px solid #cfd5ce;
    border-radius: 8px;
    color: var(--ink);
    background: white;
  }
  .mobile-more-panel .mobile-language-form .language-submit {
    display: inline-flex;
    min-width: 48px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border: 1px solid #b8c8bd;
    border-radius: 8px;
    color: var(--deep);
    background: #f6faf6;
  }
  .mobile-language-form .language-submit-full { display: none; }
  .mobile-language-form .language-submit-short { display: inline; }
  html[dir="rtl"] .mobile-language-form select { direction: ltr; text-align: left; }
  .topbar {
    gap: 8px;
    min-height: 58px;
    padding: calc(7px + env(safe-area-inset-top)) 12px 7px;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
  }
  .brand { min-height: 48px; gap: 8px; }
  .brand-mark { width: 34px; height: 34px; font-size: 1.2rem; }
  .brand-name { font-size: .76rem; }
  .brand-subtitle { margin-top: 2px; font-size: .66rem; }
  .topbar-tools { gap: 6px; }
  .language-form { gap: 4px; }
  .language-form select, .language-submit { min-height: 48px; }
  .language-form select { width: 54px; padding-inline: 5px; }
  .language-submit { min-width: 48px; padding-inline: 7px; }
  .user-chip { display: none; }
  .main-content { padding: 18px 13px 25px; padding-right: max(13px, env(safe-area-inset-right)); padding-left: max(13px, env(safe-area-inset-left)); }
  .site-footer { display: none; }
  .page-heading { gap: 11px; margin-bottom: 16px; }
  .page-heading h1 { margin-top: 5px; font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .page-intro { font-size: .88rem; }
  .room-balance-row { grid-template-columns: minmax(64px, 82px) minmax(0, 1fr) auto; }
  .room-number { width: 100%; min-width: 0; max-width: 100%; padding-inline: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-heading > .button, .page-heading > .button-quiet { min-height: 48px; }
  .icon-link { width: 48px; height: 48px; }
  .notification-open { width: 48px; height: 48px; }
  .mark-read-button { min-height: 48px; padding-inline: 12px; font-size: .75rem; }
  .category-create-form button { min-height: 48px; }
  .table-action { display: inline-flex; min-height: 48px; align-items: center; }
  .panel { padding: 14px; }
  .field-group input, .field-group select, .field-group textarea, .cancel-inline-form input { min-height: 48px; font-size: 16px; }
  .flash-dismiss { min-width: 48px; min-height: 48px; }
  .category-create-panel summary { min-height: 48px; padding-block: 8px; }
  .field-group textarea { min-height: 96px; }
  .kitchen-toolbar { gap: 8px; margin-bottom: 12px; padding: 11px 12px; }
  .status-legend { gap: 8px 12px; }
  .status-legend span, .refresh-note { font-size: .74rem; }
  .kitchen-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .empty-kitchen { min-height: 220px; padding: 30px 18px; }
  .ticket-card { padding: 15px; border-top-width: 6px; }
  .ticket-header { padding-bottom: 13px; }
  .ticket-header .status-pill { min-height: 32px; padding: 5px 11px; font-size: .77rem; }
  .ticket-number { font-size: 1.5rem; }
  .ticket-guest { align-items: flex-start; flex-direction: column; gap: 3px; }
  .ticket-lines { gap: 11px; }
  .ticket-lines li { grid-template-columns: 31px minmax(0, 1fr) auto; gap: 8px; font-size: .88rem; }
  .ticket-actions { gap: 9px; }
  .ticket-actions > form .button, .cancel-inline-form .button { min-height: 52px; font-size: .95rem; }
  .cancel-details summary { min-height: 48px; padding-top: 14px; font-size: .82rem; }

  /* Render admin records as readable cards instead of wide horizontal tables. */
  .table-scroll { overflow: visible; border: 0; }
  .data-table { display: block; min-width: 0; }
  .data-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .data-table tbody { display: grid; gap: 10px; }
  .data-table tbody tr { display: grid; gap: 0; padding: 6px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
  .data-table td { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid #edede7; font-size: .8rem; text-align: end; }
  .data-table td:first-child { border-top: 0; }
  .data-table td::before { flex: 0 0 36%; color: var(--muted); content: attr(data-label); font-size: .72rem; font-weight: 700; text-align: start; }
  .data-table .table-cell-value { display: grid; flex: 1; gap: 2px; min-width: 0; text-align: end; }
  .data-table td.table-empty { display: block; padding: 15px !important; border: 0; text-align: center; }
  .data-table td.table-empty::before { content: none; }
  .data-table .staff-actions { align-items: stretch; flex-direction: column; }
  .data-table .staff-actions .button { min-height: 48px; }

  /* POS order entry: scroll categories, select food, open the cart from a fixed dock. */
  body.order-entry-page .main-content { padding-top: max(14px, env(safe-area-inset-top)); }
  .order-entry-page .page-heading { gap: 8px; margin-bottom: 12px; }
  .order-entry-page .page-heading .page-intro { display: none; }
  .order-entry-page .page-heading > .button { width: auto; min-height: 48px; padding: 8px 12px; }
  .pos-layout { display: block; }
  .pos-catalog { padding: 13px; }
  .pos-summary { position: fixed; z-index: 46; left: max(8px, env(safe-area-inset-left)); right: max(8px, env(safe-area-inset-right)); bottom: calc(64px + env(safe-area-inset-bottom)); max-height: min(76svh, 640px); padding: 15px; overflow-y: auto; overscroll-behavior: contain; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 34px rgba(23, 59, 49, .2); transform: translateY(calc(100% + 28px)); visibility: hidden; transition: transform .2s ease, visibility .2s ease; }
  .pos-summary.is-open { transform: translateY(0); visibility: visible; }
  .order-cart-dock { display: flex; }
  .order-cart-dock.is-hidden { display: none; }
  .pos-summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
  .pos-summary-heading h2 { font-size: 1.25rem; }
  .cart-panel-close { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--deep); background: white; font-size: 1.5rem; cursor: pointer; }
  .cart-lines { max-height: 185px; margin: 11px 0; }
  .cart-line-controls button { width: 48px; height: 48px; }
  .cart-total { margin: 9px 0 12px; padding: 10px 0; }
  .order-cart-dock { position: fixed; z-index: 45; left: max(8px, env(safe-area-inset-left)); right: max(8px, env(safe-area-inset-right)); bottom: calc(64px + env(safe-area-inset-bottom)); display: flex; min-height: 58px; align-items: center; gap: 10px; padding: 8px 13px; border: 1px solid #245344; border-radius: 14px; color: white; background: var(--deep); box-shadow: 0 7px 24px rgba(23, 59, 49, .24); font: inherit; font-weight: 700; cursor: pointer; }
  .order-cart-count { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--deep); background: #f0d8aa; font-size: .8rem; }
  .order-cart-label { flex: 1; text-align: start; }
  .order-cart-dock strong { font-size: .85rem; white-space: nowrap; }
  .order-cart-chevron { font-size: 1.15rem; }
  .order-category-nav { position: sticky; z-index: 8; top: 0; display: flex; gap: 7px; margin: 0 -1px 14px; padding: 8px 1px; overflow-x: auto; background: rgba(255, 254, 250, .96); scrollbar-width: none; scroll-snap-type: inline proximity; -webkit-overflow-scrolling: touch; }
  .order-category-nav::-webkit-scrollbar { display: none; }
  .order-category-link { display: inline-flex; min-height: 48px; flex: 0 0 auto; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid #d9ded7; border-radius: 99px; color: #4e5f55; background: white; font-size: .8rem; font-weight: 700; white-space: nowrap; scroll-snap-align: start; }
  .catalog-category { scroll-margin-top: 66px; margin-top: 18px; }
  .catalog-category h3 { margin-bottom: 9px; font-size: 1.16rem; }
  .catalog-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .catalog-item { grid-template-columns: 54px minmax(0, 1fr) 38px; min-height: 72px; padding: 8px; }
  .catalog-item img, .catalog-item-placeholder { width: 54px; height: 54px; }
  .catalog-item-copy strong { font-size: .86rem; white-space: normal; }
  .catalog-item-copy small { font-size: .78rem; }
  .catalog-add { width: 36px; height: 36px; }
  .catalog-search, .catalog-search input { min-height: 48px; }
  .order-cart-dock, .cart-panel-close { touch-action: manipulation; }
  .category-pills a { min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .pos-summary { transition-duration: .01ms; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
