﻿:root {
  --ink: #fff5df;
  --paper: #fff8ec;
  --muted: rgba(255, 245, 223, 0.72);
  --green: #0d6d47;
  --red: #a62b1f;
  --gold: #e9b23f;
  --gold-bright: #ffc96a;
  --line: rgba(255, 243, 216, 0.15);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 14%, rgba(166, 43, 31, 0.36), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(13, 109, 71, 0.42), transparent 34%),
    linear-gradient(135deg, #130905, #25120c 48%, #082f24);
  font-family: Inter, Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.18;
  background:
    repeating-linear-gradient(45deg, transparent 0 18px, rgba(255, 201, 106, 0.13) 18px 20px),
    repeating-linear-gradient(-45deg, transparent 0 24px, rgba(13, 109, 71, 0.18) 24px 26px);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 8px clamp(18px, 3vw, 34px);
  background: rgba(18, 12, 8, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
}

.topbar nav a {
  padding: 8px 0;
  color: rgba(255, 243, 216, 0.78);
  font-size: 16px;
  font-weight: 900;
}

.topbar nav a:hover,
.topbar nav a[href="waiter.html"] {
  color: var(--gold-bright);
}

.lang-toggle {
  display: inline-flex;
  gap: 5px;
  min-width: 82px;
  min-height: 38px;
  padding: 4px;
  color: rgba(255, 243, 216, 0.9);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 243, 216, 0.18);
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.lang-toggle span {
  display: grid;
  width: 34px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
}

.lang-toggle.is-en [data-lang-option="en"],
.lang-toggle.is-es [data-lang-option="es"] {
  color: #7c1f16;
  background: #fff;
}

.waiter-main {
  padding: 104px clamp(18px, 5vw, 76px) 56px;
}

.waiter-hero,
.waiter-layout,
.sent-panel {
  max-width: 1260px;
  margin-right: auto;
  margin-left: auto;
}

.waiter-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  align-items: center;
  gap: clamp(22px, 5vw, 58px);
  margin-bottom: 24px;
  padding: clamp(28px, 5vw, 54px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    radial-gradient(circle at bottom right, rgba(13, 109, 71, 0.42), transparent 38%);
  border: 1px solid var(--line);
  border-radius: 8px 34px 8px 34px;
  box-shadow: var(--shadow);
}

.waiter-hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(48px, 8vw, 110px);
  line-height: 0.92;
}

.waiter-hero p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
}

.waiter-hero img {
  justify-self: end;
  max-height: 190px;
  object-fit: contain;
  filter: drop-shadow(0 22px 36px rgba(0, 0, 0, 0.34));
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.waiter-layout {
  display: grid;
  grid-template-columns: minmax(290px, 350px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.table-panel,
.orders-panel,
.sent-panel {
  padding: 18px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 26px 8px 26px 8px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.2);
}

.panel-title,
.orders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.menu-shortcut,
.primary-action,
.secondary-action,
.danger-action {
  min-height: 42px;
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.menu-shortcut,
.primary-action {
  color: #211108;
  background: var(--gold);
}

.secondary-action {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
}

.danger-action {
  color: #fff;
  background: var(--red);
}

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

.table-grid button {
  display: grid;
  gap: 6px;
  min-height: 82px;
  padding: 13px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    radial-gradient(circle at bottom right, rgba(13, 109, 71, 0.36), transparent 48%);
  border: 1px solid var(--line);
  border-radius: 8px 20px 8px 20px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.table-grid button:nth-child(even) { border-radius: 20px 8px 20px 8px; }
.table-grid button.active {
  color: #211108;
  background: var(--gold);
  transform: translateY(-2px);
}

.table-grid strong { font-size: 18px; }
.table-grid span,
.orders-head span {
  color: inherit;
  font-size: 12px;
  font-weight: 900;
  opacity: 0.72;
}

.orders-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.orders-head h2,
.sent-head h2 {
  margin: 0;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1;
}

.order-list {
  display: grid;
  gap: 14px;
}

.order-ticket {
  display: grid;
  gap: 12px;
  position: relative;
  padding: 18px 16px 16px;
  color: #27140d;
  background: var(--paper);
  border-radius: 8px 24px 8px 24px;
}

.order-ticket header,
.order-ticket li,
.waiter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-ticket header,
.order-ticket li {
  justify-content: space-between;
}

.order-ticket header {
  padding-right: 40px;
}

.status-pill {
  padding: 7px 10px;
  color: #fff;
  background: var(--green);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

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

.order-ticket li {
  flex-wrap: wrap;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
}

.order-ticket li span {
  flex: 1 1 auto;
}

.delete-order-x,
.delete-item-x {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font: inherit;
  font-weight: 1000;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(82, 12, 16, 0.18);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.delete-order-x:hover,
.delete-item-x:hover {
  filter: brightness(1.08);
  transform: translateY(-1px) scale(1.04);
}

.delete-order-x {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 32px;
  height: 32px;
  background: #74151c;
  box-shadow: 0 12px 24px rgba(116, 21, 28, 0.28);
}

.delete-item-x {
  width: 26px;
  height: 26px;
  background: #dc554d;
  font-size: 13px;
}

.note {
  margin: 0;
  padding: 12px;
  background: rgba(13, 109, 71, 0.08);
  border-radius: 8px;
  line-height: 1.5;
}

.waiter-actions {
  flex-wrap: wrap;
  margin-top: 6px;
}

.waiter-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.mini-danger {
  min-height: 30px;
  padding: 6px 11px;
  font-size: 12px;
}

.cart-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.sent-panel {
  margin-top: 20px;
}

.sent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.sent-card {
  padding: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sent-card h3 { margin: 0 0 10px; }
.sent-card div {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  padding: 13px 16px;
  color: #201108;
  background: var(--gold-bright);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-weight: 900;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

@media (max-width: 900px) {
  .waiter-hero,
  .waiter-layout { grid-template-columns: 1fr; }
  .waiter-hero img { justify-self: start; }
}

@media (max-width: 560px) {
  .topbar {
    position: absolute;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
  }
  .topbar nav {
    flex: 1;
    flex-wrap: nowrap;
    gap: 13px;
    overflow-x: auto;
  }
  .topbar nav a {
    flex: 0 0 auto;
    font-size: 13px;
  }
  .waiter-main { padding-top: 124px; }
  .table-grid { grid-template-columns: 1fr; }
}

