/**
 * Banana Sea Club Operations interface.
 * Copyright © 2026 The ARK Consulting Seychelles. All rights reserved.
 */

:root {
  --ink: #142126;
  --muted: #657176;
  --cream: #f7f3ea;
  --paper: #fff;
  --teal: #218f7c;
  --teal-dark: #0d3136;
  --teal-soft: #e3f1ee;
  --orange: #ef8b12;
  --orange-soft: #fff1dc;
  --red: #b23b31;
  --red-soft: #fff0ed;
  --green: #1f8159;
  --green-soft: #e8f5ee;
  --line: #dce2df;
  --shadow: 0 18px 48px rgba(13, 49, 54, .10);
  --radius: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[hidden] { display: none !important; }

.language-switcher-login {
  position: fixed;
  z-index: 100;
  top: max(12px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid rgba(13, 49, 54, .15);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 6px 20px rgba(13, 49, 54, .08);
  font-size: .76rem;
  font-weight: 800;
}
.language-switcher a { color: var(--muted); text-decoration: none; }
.language-switcher a[aria-current="true"] { color: var(--ink); }
.topbar-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.language-switcher-inline {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  border-left: 1px solid var(--line);
  padding-left: 13px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--cream); color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; }
body { min-height: 100%; margin: 0; background: var(--cream); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid rgba(239, 139, 18, .32);
  outline-offset: 2px;
}
a { color: var(--teal-dark); }
h1, h2, h3, p { margin-top: 0; }

.eyebrow {
  margin: 0 0 5px;
  color: var(--orange);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.muted { color: var(--muted); }
.desktop-only { display: inline; }

.brand-lockup { display: flex; align-items: center; gap: 13px; }
.brand-lockup strong, .brand-lockup span { display: block; }
.brand-lockup strong { color: var(--teal-dark); font-size: 1.05rem; letter-spacing: .01em; }
.brand-lockup div > span { color: var(--muted); font-size: .79rem; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 2px solid var(--teal);
  border-radius: 50%;
  background: #fff8e7;
  color: var(--teal-dark);
  font-size: .83rem;
  font-weight: 900;
  letter-spacing: .06em;
  box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 6px rgba(239, 139, 18, .48);
}
.brand-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  object-fit: contain;
}
.brand-lockup-small .brand-logo { width: 43px; height: 43px; }
.brand-lockup-small .brand-mark { width: 42px; height: 42px; font-size: .72rem; }
.brand-lockup-small strong { font-size: .95rem; }
.brand-lockup-small div > span { font-size: .68rem; }

.button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border .15s ease;
}
.button:active { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: .48; }
.button-primary { background: var(--orange); color: #182324; }
.button-primary:hover:not(:disabled) { background: #f29a31; }
.button-secondary { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); }
.button-ghost { border-color: var(--line); background: #fff; color: var(--ink); }
.button-danger { border-color: #e7b8b2; background: var(--red-soft); color: var(--red); }
.button-wide { width: 100%; }

.notice { margin-bottom: 17px; border-radius: 10px; padding: 12px 14px; line-height: 1.45; }
.notice-error { background: var(--red-soft); color: #852b22; }
.notice-ok { background: var(--green-soft); color: #17623f; }

/* Login and installer */
.login-page, .install-page {
  background:
    radial-gradient(circle at 6% 9%, rgba(33,143,124,.19), transparent 24rem),
    radial-gradient(circle at 95% 5%, rgba(239,139,18,.18), transparent 27rem),
    var(--cream);
}
.login-shell, .install-page { min-height: 100vh; }
.login-shell { display: grid; place-items: center; padding: 28px 18px; }
.login-card, .install-card {
  width: min(100%, 460px);
  overflow: hidden;
  border: 1px solid rgba(13,49,54,.1);
  border-radius: 20px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
}
.login-card { padding: 32px; }
.login-copy { margin: 42px 0 25px; }
.login-copy h1, .install-body h1 { margin-bottom: 10px; color: var(--teal-dark); font-size: clamp(1.9rem, 6vw, 2.55rem); line-height: 1.05; letter-spacing: -.04em; }
.login-copy p:not(.eyebrow) { margin: 0; color: var(--muted); line-height: 1.55; }
.login-form, .install-body form { display: grid; gap: 16px; }
.login-form label, .install-body label, .dialog label, .basket-note {
  display: grid;
  gap: 7px;
  color: #334044;
  font-size: .8rem;
  font-weight: 800;
}
input, textarea, select {
  width: 100%;
  border: 1px solid #cbd4d0;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
}
textarea { resize: vertical; }
label small { color: var(--muted); font-weight: 500; }
.login-foot { margin: 23px 0 0; color: #929b98; font-size: .72rem; text-align: center; }
.install-card { margin: 7vh auto; width: min(calc(100% - 32px), 600px); }
.install-head { display: flex; align-items: center; gap: 14px; background: var(--teal-dark); color: #fff; padding: 24px 28px; }
.install-head strong, .install-head div > span { display: block; }
.install-head div > span { margin-top: 3px; color: #c6ded9; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.install-body { padding: 28px; }
.install-body .check { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.install-body .check input { width: auto; }

/* App shell */
.app-shell { min-height: 100vh; }
.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  border-bottom: 1px solid rgba(13,49,54,.1);
  background: rgba(255,255,255,.95);
  padding: 10px clamp(15px, 3vw, 36px);
  backdrop-filter: blur(14px);
}
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.icon-button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--teal-dark);
  padding: 7px 12px;
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
}
.icon-button > span:first-child { color: var(--orange); font-size: .72rem; }
.connection { border-radius: 999px; padding: 6px 9px; font-size: .7rem; font-weight: 800; }
.connection-online { background: var(--green-soft); color: var(--green); }
.connection-offline { background: var(--red-soft); color: var(--red); }
.user-chip { border-left: 1px solid var(--line); padding-left: 13px; }
.user-chip span, .user-chip small { display: block; }
.user-chip span { font-size: .78rem; font-weight: 800; }
.user-chip small { margin-top: 2px; color: var(--muted); font-size: .65rem; text-transform: uppercase; }
.logout-link { color: var(--muted); font-size: .75rem; font-weight: 700; text-decoration: none; }

.role-nav {
  position: sticky;
  z-index: 25;
  top: 66px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 8px clamp(15px, 3vw, 36px);
  scrollbar-width: none;
}
.role-nav::-webkit-scrollbar, .category-tabs-inner::-webkit-scrollbar, .service-points::-webkit-scrollbar, .menu-pages::-webkit-scrollbar { display: none; }
.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  padding: 8px 13px;
  font-size: .8rem;
  font-weight: 800;
  cursor: pointer;
}
.nav-tab.active { background: var(--teal-dark); color: #fff; }
.count-badge {
  display: inline-grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 999px;
  background: var(--orange-soft);
  color: #a45200;
  padding: 0 7px;
  font-size: .68rem;
  font-weight: 900;
}

#notify-button.notifications-active {
  color: #fff;
  background: #197a58;
  box-shadow: 0 0 0 3px rgba(25, 122, 88, .18);
}
.nav-tab.active .count-badge { background: var(--orange); color: var(--teal-dark); }

.workspace { width: min(100%, 1680px); margin: 0 auto; padding: clamp(16px, 2.5vw, 34px); }
.screen { display: none; }
.screen-active { display: block; }
.screen-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 20px;
}
.screen-heading h1 { margin: 0; color: var(--teal-dark); font-size: clamp(1.45rem, 3vw, 2.15rem); letter-spacing: -.035em; }
.screen-heading p:not(.eyebrow) { max-width: 650px; margin: 7px 0 0; color: var(--muted); line-height: 1.5; }
.open-tables-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.open-table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 28px rgba(13,49,54,.07); }
.open-table-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); background: #f8faf9; padding: 15px; }
.open-table-head h2 { margin: 1px 0 0; color: var(--teal-dark); font-size: 1.15rem; }
.open-table-total { text-align: right; }
.open-table-total span, .open-table-total strong { display: block; }
.open-table-total span { color: var(--muted); font-size: .66rem; text-transform: uppercase; }
.open-table-total strong { margin-top: 3px; color: var(--teal-dark); }
.open-table-rounds { display: grid; gap: 10px; padding: 12px; }
.table-round { border: 1px solid var(--line); border-radius: 10px; }
.table-round > header { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 9px 10px; font-size: .72rem; }
.table-round > header span { color: var(--muted); }
.table-line { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 8px; align-items: start; padding: 9px 10px; }
.table-line + .table-line { border-top: 1px solid var(--line); }
.table-line strong, .table-line small { display: block; }
.table-line strong { font-size: .76rem; }
.table-line small, .table-line-meta { color: var(--muted); font-size: .63rem; }
.table-line-meta { text-align: right; text-transform: capitalize; }
.open-table-add { margin: 0 12px 12px; }
.search-field { width: min(100%, 330px); color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.search-field span { display: block; margin-bottom: 5px; }

/* Menu and order */
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 355px; gap: clamp(18px, 2.4vw, 32px); }
.menu-pane { min-width: 0; }
.menu-pages, .category-tabs-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 5px;
  scrollbar-width: none;
}
.service-points { margin-bottom: 17px; }
.service-points {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 7px;
  scrollbar-width: none;
}
.service-point-group { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.62); padding: 8px; }
.service-section-name { display: block; margin: 0 4px 6px; color: var(--muted); font-size: .62rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.service-section-points { display: flex; gap: 6px; }
.service-point {
  flex: 0 0 auto;
  min-height: 42px;
  border: 1px solid #cfd9d5;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 8px 14px;
  font-size: .77rem;
  font-weight: 800;
  cursor: pointer;
}
.service-point.selected { border-color: var(--orange); background: var(--orange-soft); color: #7c4306; }
.service-point.occupied { border-color: #9bcbbd; background: var(--teal-soft); color: var(--teal-dark); }
.service-point.occupied::after { content: " · Open"; color: var(--green); font-size: .62rem; text-transform: uppercase; }
.service-point.occupied.selected { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); }
.menu-pages { margin-bottom: 9px; padding-top: 4px; }
.menu-page {
  flex: 0 0 auto;
  min-height: 43px;
  border: 1px solid var(--teal);
  border-radius: 999px;
  background: #fff;
  color: var(--teal-dark);
  padding: 8px 16px;
  font-size: .78rem;
  font-weight: 900;
  cursor: pointer;
}
.menu-page.active { background: var(--teal); color: #fff; }
.category-tabs { margin-bottom: 18px; }
.category-tabs-inner { margin-bottom: 8px; }
.category-tab {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.7);
  color: var(--muted);
  padding: 7px 12px;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
}
.category-tab.active { border-color: var(--orange); background: var(--orange-soft); color: #7c4306; }
.service-note {
  margin: -7px 0 15px;
  border-left: 3px solid var(--orange);
  color: var(--muted);
  padding-left: 10px;
  font-size: .75rem;
  font-weight: 700;
}
.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.menu-card {
  display: flex;
  min-height: 154px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 5px 18px rgba(13,49,54,.04);
  padding: 15px;
}
.menu-card.unavailable { opacity: .58; }
.menu-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.menu-card h3 { margin: 0; font-size: .92rem; line-height: 1.32; }
.menu-price { flex: 0 0 auto; color: var(--teal-dark); font-size: .85rem; font-weight: 900; white-space: nowrap; }
.menu-description { margin: 8px 0 12px; color: var(--muted); font-size: .73rem; line-height: 1.45; }
.station-pill { margin-top: auto; color: var(--muted); font-size: .64rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.menu-add { margin-top: 11px; min-height: 38px; padding: 7px 10px; font-size: .72rem; }
.variant-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 9px; }
.variant-button {
  border: 1px solid #b9d4ce;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  padding: 7px 9px;
  font-size: .68rem;
  font-weight: 900;
  cursor: pointer;
}
.variant-button:disabled { cursor: not-allowed; opacity: .48; }

.basket {
  position: sticky;
  top: 132px;
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow);
}
.basket-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 18px; }
.basket-head h2 { margin: 0; font-size: 1.15rem; }
.basket-lines { display: grid; max-height: min(42vh, 420px); gap: 0; overflow-y: auto; }
.basket-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; border-bottom: 1px solid #edf0ee; padding: 13px 18px; }
.basket-line strong, .basket-line small { display: block; }
.basket-line strong { font-size: .8rem; line-height: 1.35; }
.basket-line small { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.quantity-control { display: flex; align-items: center; gap: 7px; }
.quantity-control button { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.quantity-control span { min-width: 16px; text-align: center; font-size: .75rem; font-weight: 900; }
.empty-message { margin: 0; color: var(--muted); padding: 28px 18px; font-size: .78rem; line-height: 1.5; text-align: center; }
.basket-note { border-top: 1px solid var(--line); padding: 14px 18px 0; }
.basket-note textarea { min-height: 62px; font-size: .78rem; }
.basket-total { display: flex; justify-content: space-between; padding: 16px 18px 12px; }
.basket-total span { color: var(--muted); font-size: .78rem; font-weight: 800; }
.basket-total strong { color: var(--teal-dark); }
.table-session-summary {
  margin: 0 18px 12px;
  border-radius: 9px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  padding: 10px 11px;
  font-size: .7rem;
  font-weight: 750;
  line-height: 1.45;
}
.clear-table {
  width: calc(100% - 36px);
  margin: 0 18px 9px;
  border-color: #d6b974;
  background: #fffaf0;
  color: #76500e;
  font-size: .72rem;
}
.basket > .button { width: calc(100% - 36px); margin: 0 18px; }
.basket-help { margin: 11px 18px 17px; color: var(--muted); font-size: .66rem; line-height: 1.4; text-align: center; }

/* Queues */
.queue-legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .7rem; font-weight: 700; }
.queue-legend span { display: flex; align-items: center; gap: 5px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.dot-new { background: var(--orange); }
.dot-preparing { background: #567ad0; }
.dot-ready { background: var(--green); }
.queue-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.ticket {
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 5px solid var(--orange);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 28px rgba(13,49,54,.07);
}
.ticket.status-preparing { border-top-color: #567ad0; }
.ticket.status-part_ready, .ticket.status-ready, .ticket.status-collected { border-top-color: var(--green); }
.ticket-head { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 15px; }
.ticket-reference { display: block; color: var(--teal-dark); font-size: 1.03rem; }
.ticket-place { display: block; margin-top: 3px; font-size: .75rem; }
.ticket-age { color: var(--muted); font-size: .68rem; text-align: right; }
.ticket-status { display: block; margin-top: 4px; color: var(--orange); font-size: .62rem; font-weight: 900; text-transform: uppercase; }
.ticket-body { padding: 7px 15px 11px; }
.station-block { padding: 10px 0; }
.station-block + .station-block { border-top: 1px solid #edf0ee; }
.station-title { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: .65rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.ticket-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; margin: 7px 0; align-items: start; font-size: .78rem; }
.ticket-item .qty { color: var(--teal-dark); font-weight: 900; }
.ticket-item small { display: block; margin-top: 2px; color: var(--muted); font-size: .65rem; }
.line-status { border-radius: 999px; background: var(--cream); color: var(--muted); padding: 4px 7px; font-size: .58rem; font-weight: 900; text-transform: uppercase; }
.ticket-notes { margin: 8px 0 0; border-radius: 8px; background: var(--orange-soft); color: #6d430e; padding: 8px 9px; font-size: .7rem; line-height: 1.4; }
.ticket-actions { display: flex; flex-wrap: wrap; gap: 7px; border-top: 1px solid var(--line); padding: 12px 15px 15px; }
.ticket-actions .button { flex: 1 1 auto; min-height: 39px; padding: 8px 10px; font-size: .7rem; }
.empty-state { grid-column: 1 / -1; border: 1px dashed #cbd6d1; border-radius: var(--radius); color: var(--muted); padding: 48px 20px; text-align: center; }

/* Menu admin */
.menu-admin-list { display: grid; gap: 22px; }
.admin-category { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.admin-category-head { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: #fbfcfb; padding: 13px 15px; }
.admin-category-head h2 { margin: 0; font-size: .95rem; }
.admin-category-head span { color: var(--muted); font-size: .67rem; font-weight: 800; text-transform: uppercase; }
.admin-menu-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; border-bottom: 1px solid #edf0ee; padding: 12px 15px; }
.admin-menu-item:last-child { border-bottom: 0; }
.admin-menu-item strong, .admin-menu-item small { display: block; }
.admin-menu-item strong { font-size: .8rem; }
.admin-menu-item small { margin-top: 3px; color: var(--muted); font-size: .67rem; }
.availability {
  border: 1px solid #b7d8c9;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  padding: 6px 10px;
  font-size: .65rem;
  font-weight: 900;
  cursor: pointer;
}
.availability.off { border-color: #e3b8b3; background: var(--red-soft); color: var(--red); }
.edit-item { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px 10px; color: var(--teal-dark); font-size: .68rem; font-weight: 800; cursor: pointer; }
.staff-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.staff-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 95px auto; gap: 14px; align-items: center; border-bottom: 1px solid #edf0ee; padding: 13px 15px; }
.staff-row:last-child { border-bottom: 0; }
.staff-row strong, .staff-row small { display: block; }
.staff-row strong { font-size: .82rem; }
.staff-row small { margin-top: 3px; color: var(--muted); font-size: .67rem; }
.staff-role, .staff-status { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.staff-status.active { color: var(--green); }
.staff-status.disabled { color: var(--red); }

/* Dialog and feedback */
.dialog {
  width: min(calc(100% - 28px), 560px);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 28px 100px rgba(13,49,54,.28);
  padding: 0;
}
.dialog::backdrop { background: rgba(11,32,36,.56); backdrop-filter: blur(3px); }
.dialog form { display: grid; gap: 15px; padding: 22px; }
.dialog-small { width: min(calc(100% - 28px), 430px); }
.dialog-copy { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.dialog-head h2 { margin: 0; }
.dialog-close { border: 0; background: transparent; color: var(--muted); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.edit-order-dialog { width: min(calc(100% - 28px), 720px); }
.edit-order-lines { display: grid; gap: 10px; }
.edit-order-line {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 88px 120px minmax(120px, 1fr) auto;
  gap: 9px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfb;
  padding: 11px;
}
.edit-order-line > div strong, .edit-order-line > div small { display: block; }
.edit-order-line > div strong { font-size: .79rem; }
.edit-order-line > div small { margin-top: 3px; color: var(--muted); font-size: .65rem; }
.edit-order-line label { font-size: .65rem; }
.edit-order-line input, .edit-order-line select { padding: 8px 9px; font-size: .75rem; }
.remove-line { display: grid; gap: 4px; justify-items: center; color: var(--red); font-size: .62rem; font-weight: 800; }
.remove-line input { width: auto; }
.toast-region { position: fixed; z-index: 80; right: 18px; bottom: calc(18px + var(--safe-bottom)); display: grid; width: min(calc(100% - 36px), 390px); gap: 8px; }
.toast { border-left: 5px solid var(--teal); border-radius: 11px; background: #fff; box-shadow: 0 16px 50px rgba(13,49,54,.22); padding: 13px 15px; color: var(--ink); font-size: .77rem; line-height: 1.45; }
.toast-error { border-left-color: var(--red); }
.toast-ready { border-left-color: var(--green); }

@media (max-width: 1160px) {
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .queue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-layout { grid-template-columns: minmax(0, 1fr) 330px; }
}

@media (max-width: 820px) {
  .desktop-only, .user-chip { display: none; }
  .topbar { min-height: 60px; }
  .role-nav { top: 60px; }
  .order-layout { display: block; }
  .basket { position: relative; top: auto; margin-top: 18px; }
  .screen-heading { align-items: stretch; flex-direction: column; gap: 13px; }
  .search-field { width: 100%; }
  .menu-grid, .queue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edit-order-line { grid-template-columns: minmax(0, 1fr) 78px 110px; }
  .edit-order-line .edit-line-notes { grid-column: 1 / 3; }
  .open-tables-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .workspace { padding: 15px; padding-bottom: calc(24px + var(--safe-bottom)); }
  .brand-lockup-small div { display: none; }
  .topbar-actions { gap: 7px; }
  .logout-link { font-size: .7rem; }
  .connection { display: none; }
  .role-nav { padding-inline: 10px; }
  .menu-grid, .queue-grid { grid-template-columns: 1fr; }
  .menu-card { min-height: 135px; }
  .admin-menu-item { grid-template-columns: minmax(0, 1fr) auto; }
  .staff-row { grid-template-columns: minmax(0, 1fr) auto; }
  .staff-role, .staff-status { grid-row: 2; }
  .edit-item { grid-column: 2; }
  .field-row { grid-template-columns: 1fr; }
  .edit-order-line { grid-template-columns: minmax(0, 1fr) 76px; }
  .edit-order-line .edit-line-station { grid-column: 1; }
  .edit-order-line .edit-line-notes { grid-column: 1 / -1; }
  .dialog form { padding: 18px; }
  .topbar-brand { gap: 8px; }
  .language-switcher-inline { padding-left: 8px; font-size: .68rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
