/* CODE MAP:
   - Root/theme and topbar styles.
   - Table dashboard and table menu styles.
   - Restaurant/category/product card styles.
   - Login/cart/admin/receiver surfaces.
   - Mobile/tablet responsive tuning.
*/
:root {
  --bg: #05030a;
  --panel: rgba(5, 8, 17, 0.7);
  --panel-strong: rgba(7, 10, 20, 0.9);
  --line: rgba(255, 255, 255, 0.18);
  --text: #f3f7fb;
  --muted: #b8c4d1;
  --cyan: #00e5ff;
  --pink: #ff2bd6;
  --yellow: #ffe14c;
  --green: #72a474;
  --gold: #d9ba72;
  --lavender: #a98bd6;
  --red: #ff455d;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  touch-action: manipulation;
}

.screen-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: url("../assets/gameon-cover.jpeg") center / cover no-repeat;
  filter: saturate(1.2) contrast(1.08);
  transform: scale(1.02);
}

.muted-bg {
  filter: saturate(0.7) contrast(1.05) brightness(0.75);
}

.screen-shade {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(3, 4, 10, 0.86), rgba(3, 4, 10, 0.42) 42%, rgba(3, 4, 10, 0.9)),
    linear-gradient(90deg, rgba(0, 229, 255, 0.16), rgba(255, 43, 214, 0.12), rgba(255, 225, 76, 0.08));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 86px;
  padding: 18px 24px 12px;
  background: linear-gradient(180deg, rgba(4, 4, 10, 0.9), rgba(4, 4, 10, 0));
}

.brand-lockup {
  min-width: 0;
}

.eyebrow,
.section-label,
.restaurant-type {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 2px;
  font-size: 2rem;
  line-height: 1.05;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(0, 229, 255, 0.45);
}

h2 {
  margin-top: 4px;
  font-size: 2.6rem;
  line-height: 1;
}

.nav-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.back-link,
.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(8, 9, 20, 0.58);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.12);
  backdrop-filter: blur(12px);
}

.back-link {
  width: 58px;
  min-height: 58px;
  border-radius: 50%;
  font-size: 1.85rem;
  font-weight: 900;
}

.lang-toggle {
  flex: 0 0 auto;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.nav-button,
.primary-button,
.cart-add,
.admin-tabs button,
.admin-row-actions button,
.form-actions button,
.form-preview button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  background: rgba(7, 10, 20, 0.72);
  font-weight: 900;
  cursor: pointer;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.nav-session-label {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 8px;
  padding: 9px 12px;
  background: rgba(0, 229, 255, 0.1);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.nav-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
}

.primary-button,
.cart-add {
  border-color: rgba(0, 229, 255, 0.38);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.22), rgba(255, 43, 214, 0.22));
}

.toggle-track {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.toggle-dot {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.7);
  transition: transform 180ms ease;
}

.lang-toggle[data-lang="ro"] .toggle-dot {
  transform: translateX(18px);
}

/* Page shells and restaurant selector. */
.page-shell {
  width: min(1040px, calc(100% - 32px));
  min-height: calc(100vh - 96px);
  margin: 0 auto;
  padding: 16px 0 32px;
}

body[data-page="restaurant"] .topbar .brand-lockup,
body[data-page="gameon"] .topbar .brand-lockup,
body[data-page="menu"] .topbar .brand-lockup {
  display: none;
}

.hero-strip,
.restaurant-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0 0 22px;
}

.hero-logo,
.restaurant-mark {
  flex: 0 0 auto;
  width: 132px;
  height: 132px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(255, 43, 214, 0.34), 0 0 28px rgba(0, 229, 255, 0.22);
}

.restaurant-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

/* Table floor dashboard: first screen for opening table-specific orders. */
.table-toolbar,
.selected-table-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(5, 8, 17, 0.72);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.table-card {
  display: grid;
  min-height: 142px;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 12px;
  background: rgba(7, 10, 20, 0.76);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.table-card.active {
  border-color: rgba(0, 229, 255, 0.86);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2), 0 18px 34px rgba(0, 0, 0, 0.28);
}

.table-card.busy {
  border-color: rgba(255, 69, 93, 0.74);
  background: linear-gradient(180deg, rgba(99, 9, 25, 0.88), rgba(31, 7, 16, 0.92));
}

.table-card.burning {
  animation: tableBurn 1.2s ease-in-out infinite alternate;
}

@keyframes tableBurn {
  0% {
    box-shadow: 0 0 12px rgba(255, 69, 93, 0.34), 0 16px 34px rgba(0, 0, 0, 0.28);
  }
  100% {
    box-shadow: 0 0 26px rgba(255, 69, 93, 0.78), 0 0 42px rgba(255, 127, 39, 0.38), 0 18px 40px rgba(0, 0, 0, 0.34);
  }
}

.table-icon {
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 58px;
  border-radius: 8px;
  background: transparent;
  color: var(--cyan);
  font-weight: 1000;
}

.table-top {
  position: absolute;
  inset: 13px 16px;
  border: 2px solid rgba(0, 229, 255, 0.78);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.26), rgba(0, 229, 255, 0.08));
  box-shadow: inset 0 0 16px rgba(0, 229, 255, 0.28), 0 0 14px rgba(0, 229, 255, 0.18);
}

.table-number {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 0.82rem;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}

.chair {
  position: absolute;
  width: 13px;
  height: 13px;
  border: 1px solid rgba(0, 229, 255, 0.68);
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.18);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.18);
}

.chair-top {
  top: 1px;
  left: calc(50% - 6px);
}

.chair-right {
  top: calc(50% - 6px);
  right: 2px;
}

.chair-bottom {
  bottom: 1px;
  left: calc(50% - 6px);
}

.chair-left {
  top: calc(50% - 6px);
  left: 2px;
}

.table-icon-large {
  width: 118px;
  height: 92px;
}

.table-icon-large .table-top {
  inset: 20px 26px;
}

.table-icon-large .chair {
  width: 18px;
  height: 18px;
}

.table-card.busy .table-icon {
  color: #fff;
}

.table-card.busy .table-top,
.table-card.busy .chair {
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.14);
}

.table-copy {
  min-width: 0;
  text-align: center;
}

.table-copy strong {
  display: block;
  font-size: 1rem;
  line-height: 1.15;
}

.table-copy small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 850;
}

.table-status,
.table-status-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.table-status span,
.table-status-pill,
.table-pill {
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 950;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.table-status button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 6px 9px;
  color: #fff;
  background: rgba(255, 69, 93, 0.86);
  font-weight: 950;
  cursor: pointer;
}

.selected-table-panel {
  margin-bottom: 18px;
}

.order-table-pill {
  margin-top: 6px;
}

.muted-table {
  color: var(--muted);
}

.login-table-context {
  border: 1px solid rgba(0, 229, 255, 0.26);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 229, 255, 0.1);
  color: var(--text);
  font-weight: 900;
}

.login-table-context.is-warning {
  border-color: rgba(255, 225, 76, 0.28);
  background: rgba(255, 225, 76, 0.1);
  color: var(--yellow);
}

.restaurant-card {
  position: relative;
  display: flex;
  min-height: 260px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 12px;
  background: var(--panel);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
  text-align: center;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.restaurant-card::after,
.category-button::after {
  content: "";
  position: absolute;
  inset: auto 12px 10px;
  height: 3px;
  border-radius: 999px;
  opacity: 0.85;
}

.restaurant-card:active,
.category-button:active,
.back-link:active,
.lang-toggle:active {
  transform: scale(0.98);
}

.restaurant-card.selected,
.category-button.selected {
  border-color: rgba(0, 229, 255, 0.68);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.28), 0 0 34px rgba(255, 43, 214, 0.24);
}

.table-card:hover,
.restaurant-card:hover,
.product-card:hover,
.category-buttons button:hover {
  border-color: rgba(0, 229, 255, 0.52);
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.18), 0 18px 38px rgba(0, 0, 0, 0.34);
}

.card-gameon::after {
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--yellow));
}

.card-tajine::after {
  background: linear-gradient(90deg, var(--gold), #0b9c8d);
}

.card-rosa::after {
  background: linear-gradient(90deg, #c7b694, var(--green));
}

.card-priel::after {
  background: linear-gradient(90deg, var(--lavender), var(--gold));
}

.card-gratar::after {
  background: linear-gradient(90deg, #45d9f2, var(--red));
}

.card-ciorbar::after {
  background: linear-gradient(90deg, #243878, #ffd827, #df1f2d);
}

.card-crave::after {
  background: linear-gradient(90deg, #ffbd2f, #8a461d, #fff3c8);
}

.card-tamar::after {
  background: linear-gradient(90deg, #08a88a, #edc45f, #c9483d);
}

.card-salad::after {
  background: linear-gradient(90deg, #78d46b, #f4d45b, #37b4c8);
}

.card-kids::after {
  background: linear-gradient(90deg, #ff8d3a, #7ed6ff, #fff06a);
}

.card-collection::after,
.card-generic::after {
  background: linear-gradient(90deg, var(--cyan), #ffffff, var(--pink));
}

.logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.16);
}

.logo-frame img {
  width: 122px;
  height: 122px;
  object-fit: contain;
}

.logo-initials {
  color: #07101a;
  font-size: 2rem;
  font-weight: 1000;
  text-shadow: none;
}

.restaurant-name {
  display: block;
  max-width: 100%;
  font-size: 1.18rem;
  font-weight: 950;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.restaurant-type {
  min-height: 2.1em;
  line-height: 1.15;
}

.restaurant-count,
.hero-meta {
  color: rgba(243, 247, 251, 0.78);
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
}

/* Category/menu navigation screens. */
.gameon-shell {
  width: min(860px, calc(100% - 32px));
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.category-button {
  position: relative;
  display: flex;
  min-height: 174px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(6, 8, 18, 0.72);
  text-align: center;
  font-size: 1rem;
  font-weight: 950;
  text-transform: uppercase;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.category-button::after {
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--yellow));
}

.category-button small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.category-code {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 1000;
  box-shadow: inset 0 0 22px rgba(0, 229, 255, 0.12), 0 0 18px rgba(255, 43, 214, 0.16);
}

.placeholder-panel,
.menu-hero-panel {
  display: flex;
  min-height: 520px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: var(--panel-strong);
  text-align: center;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
}

.menu-page-shell {
  width: min(980px, calc(100% - 32px));
}

.menu-hero-panel {
  min-height: auto;
  flex-direction: row;
  justify-content: flex-start;
  gap: 24px;
  margin-bottom: 16px;
  text-align: left;
}

.menu-hero-copy {
  min-width: 0;
}

.menu-hero-panel .placeholder-logo {
  margin-bottom: 0;
}

.compact-panel {
  min-height: 480px;
}

.placeholder-logo {
  width: min(240px, 68vw);
  height: min(240px, 68vw);
  object-fit: contain;
  border-radius: 50%;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 28px rgba(255, 255, 255, 0.2);
}

.logo-slot {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.hero-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff, #d7ecff);
  font-size: clamp(2.4rem, 8vw, 4.6rem);
}

.status-line {
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 800;
  text-transform: uppercase;
}

.category-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 12px;
  margin: 0 0 16px;
  align-items: stretch;
}

.category-buttons {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 10px;
  scrollbar-width: thin;
}

.category-buttons button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 150px;
  max-width: 300px;
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(7, 10, 20, 0.74);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 950;
  cursor: pointer;
}

.category-buttons button.active {
  border-color: rgba(255, 225, 76, 0.58);
  background: rgba(255, 225, 76, 0.13);
  box-shadow: 0 0 18px rgba(255, 225, 76, 0.14);
}

.category-buttons span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-buttons strong {
  color: var(--yellow);
}

.menu-search {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.menu-search span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.menu-search input {
  width: 100%;
  min-height: 58px;
  border-color: rgba(0, 229, 255, 0.22);
  background: rgba(7, 10, 20, 0.78);
}

.product-menu {
  display: grid;
  gap: 18px;
}

.single-category {
  margin-top: 16px;
}

.product-category {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 16px;
}

.product-category-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.product-category-head h3 {
  margin: 2px 0 0;
  font-size: 1.45rem;
  line-height: 1.1;
}

.product-category-head > span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 1000;
  box-shadow: inset 0 0 18px rgba(0, 229, 255, 0.12);
}

/* Product menu cards: customer-facing two-column food grid. */
.product-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.product-row {
  display: flex;
  min-height: 292px;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: rgba(6, 8, 18, 0.7);
}

.product-card {
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.product-image-box {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 164px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.product-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image-box.empty span {
  color: rgba(243, 247, 251, 0.64);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.product-main {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  justify-items: center;
  min-width: 0;
  text-align: center;
}

.product-row h4 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.product-row p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
}

.product-row strong {
  color: var(--yellow);
  font-size: 1rem;
  white-space: nowrap;
}

.product-actions {
  display: flex;
  width: 100%;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

/* Login, cart, admin, and order management surfaces. */
.auth-shell {
  display: grid;
  place-items: center;
}

.auth-card,
.checkout-panel,
.cart-summary,
.cart-group,
.admin-toolbar,
.admin-filters,
.product-form,
.category-form,
.admin-product-row,
.admin-category-row,
.order-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.auth-card {
  display: grid;
  width: min(440px, 100%);
  gap: 14px;
  padding: 24px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

input,
select {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--text);
  background: rgba(3, 6, 14, 0.72);
  font: inherit;
}

input::placeholder {
  color: rgba(243, 247, 251, 0.42);
}

.form-error {
  min-height: 1.2em;
  color: #ff9aa8;
  font-weight: 850;
}

.is-hidden {
  display: none !important;
}

.cart-summary,
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 18px;
}

.checkout-panel,
.admin-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
}

.cart-groups,
.orders-list,
.admin-product-list,
.admin-category-list {
  display: grid;
  gap: 12px;
}

.cart-group {
  padding: 16px;
}

.cart-group header,
.order-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.cart-line {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 76px;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 0;
}

.cart-line .product-image-box {
  width: 78px;
  min-height: 72px;
  flex-basis: 78px;
}

.cart-line h4,
.order-card h3 {
  margin: 0;
}

.cart-line p,
.admin-muted,
.order-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.cart-line input {
  width: 76px;
}

.cart-empty {
  display: grid;
  gap: 14px;
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
}

.admin-tabs {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-tabs button.active {
  border-color: rgba(0, 229, 255, 0.56);
  background: rgba(0, 229, 255, 0.18);
}

.admin-filters {
  grid-template-columns: minmax(180px, 260px) minmax(220px, 1fr);
}

.product-form,
.category-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
}

.form-preview {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-preview .product-image-box {
  width: 82px;
  min-height: 72px;
  flex-basis: 82px;
}

.form-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.admin-product-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 96px auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.admin-product-row.inactive {
  opacity: 0.55;
}

.admin-product-row .product-image-box {
  width: 82px;
  min-height: 74px;
  flex-basis: 82px;
}

.admin-product-row h4 {
  margin: 0;
}

.admin-product-row p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.admin-category-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.category-order-badge {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 50%;
  color: var(--yellow);
  background: rgba(0, 229, 255, 0.1);
  font-weight: 1000;
}

.admin-category-row h4 {
  margin: 0;
}

.admin-category-row p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.category-order-controls {
  display: flex;
  gap: 8px;
}

.admin-row-actions button:disabled,
.category-order-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.admin-row-actions {
  display: flex;
  gap: 8px;
}

.order-card {
  padding: 16px;
}

.order-card ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.order-card li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 8px;
}

.order-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.order-actions button {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--text);
  background: rgba(255, 69, 93, 0.18);
  font-weight: 900;
  cursor: pointer;
}

/* Restaurant receiver screen and order history controls. */
.receiver-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 20px;
  background: var(--panel-strong);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.receiver-hero.has-pending {
  border-color: rgba(255, 225, 76, 0.72);
  box-shadow: 0 0 28px rgba(255, 225, 76, 0.16), 0 18px 44px rgba(0, 0, 0, 0.32);
}

.receiver-history-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(6, 8, 18, 0.66);
}

.receiver-history-filter h3 {
  margin: 2px 0 0;
}

.receiver-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.receiver-filter-buttons button.active {
  border-color: rgba(0, 229, 255, 0.56);
  background: rgba(0, 229, 255, 0.18);
}

.receiver-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.receiver-grid h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.receiver-card.ringing-order {
  animation: orderPulse 1s ease-in-out infinite;
}

.receiver-list-card {
  padding: 14px;
}

.receiver-list-card header.receiver-list-row {
  align-items: center;
  margin-bottom: 0;
}

.receiver-list-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.receiver-list-main h3 {
  font-size: 1.12rem;
}

.receiver-list-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.receiver-list-actions .details-button {
  border-color: rgba(0, 229, 255, 0.34);
  background: rgba(0, 229, 255, 0.14);
}

.receiver-order-details {
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
}

.receiver-detail-meta {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.receiver-detail-meta p {
  margin: 0;
}

.receiver-order-details small {
  color: var(--muted);
  font-size: 0.74rem;
}

@keyframes orderPulse {
  0%,
  100% {
    border-color: rgba(255, 255, 255, 0.18);
  }
  50% {
    border-color: rgba(255, 225, 76, 0.9);
    box-shadow: 0 0 22px rgba(255, 225, 76, 0.16);
  }
}

.app-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(360px, calc(100% - 36px));
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(3, 8, 16, 0.94);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.18);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.app-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}

/* Desktop-only expansion: wide POS screens show more menu items without changing mobile/tablet. */
@media (min-width: 1024px) {
  .page-shell {
    width: min(1580px, calc(100% - 48px));
  }

  .menu-page-shell {
    width: min(1720px, calc(100% - 48px));
  }

  .product-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .product-row {
    min-height: 250px;
  }

  .product-image-box {
    min-height: 118px;
  }
}

@media (min-width: 1480px) {
  .product-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Mobile and tablet layout tuning. */
@media (max-width: 940px) {
  .table-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .restaurant-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    min-height: 78px;
    padding: 14px 16px 8px;
  }

  .back-link {
    width: 48px;
    min-height: 48px;
    font-size: 1.45rem;
  }

  h1 {
    font-size: 1.45rem;
  }

  h2 {
    font-size: 2rem;
  }

  .page-shell,
  .gameon-shell {
    width: min(100% - 22px, 520px);
    min-height: calc(100vh - 86px);
  }

  .hero-strip,
  .restaurant-hero {
    gap: 14px;
  }

  .hero-logo,
  .restaurant-mark {
    width: 86px;
    height: 86px;
  }

  .restaurant-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .table-toolbar,
  .selected-table-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .table-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .table-card {
    min-height: 132px;
    padding: 10px;
  }

  .restaurant-card {
    min-height: 206px;
    padding: 14px 10px;
  }

  .logo-frame {
    width: 112px;
    height: 112px;
  }

  .logo-frame img {
    width: 104px;
    height: 104px;
  }

  .restaurant-name {
    font-size: 1rem;
  }

  .category-button {
    min-height: 150px;
    padding: 14px 10px;
    font-size: 0.9rem;
  }

  .category-code {
    width: 62px;
    height: 62px;
    font-size: 1.05rem;
  }

  .menu-hero-panel {
    align-items: center;
    gap: 14px;
    padding: 18px;
  }

  .category-strip {
    grid-template-columns: 1fr;
  }

  .category-buttons button,
  .menu-search input {
    min-height: 50px;
  }

  .menu-hero-panel .placeholder-logo {
    width: 118px;
    height: 118px;
    margin-bottom: 0;
  }

  .product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product-row {
    min-height: 244px;
    gap: 9px;
    padding: 9px;
  }

  .product-image-box {
    min-height: 118px;
  }

  .product-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .product-row h4 {
    font-size: 0.86rem;
  }

  .product-row p {
    font-size: 0.7rem;
  }

  .product-row strong {
    text-align: center;
  }

  .checkout-panel,
  .admin-filters,
  .product-form,
  .category-form {
    grid-template-columns: 1fr;
  }

  .cart-summary,
  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-product-row,
  .admin-category-row {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .receiver-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .receiver-history-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .receiver-filter-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .receiver-grid {
    grid-template-columns: 1fr;
  }

  .receiver-list-card header.receiver-list-row {
    align-items: stretch;
    flex-direction: column;
  }

  .receiver-list-actions {
    justify-content: flex-start;
  }

  .admin-product-row > strong,
  .admin-row-actions,
  .category-order-controls {
    grid-column: 2;
  }

  .admin-row-actions,
  .category-order-controls {
    flex-wrap: wrap;
  }

  .product-category-head h3 {
    font-size: 1.18rem;
  }
}

@media (max-width: 390px) {
  .restaurant-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .table-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .restaurant-card {
    min-height: 184px;
  }
}

/* Login-only page: no topbar/back button/language switch, only the centered account form. */
.login-only-page .auth-shell {
  min-height: 100vh;
  padding-top: 24px;
}

.login-only-shell {
  display: grid;
  place-items: center;
}

/* table.html can now show the table selector directly after customer login. */
.table-menu-selector[hidden] {
  display: none !important;
}
