:root {
  color-scheme: light;
  --bg: #eff6ff;
  --card: #ffffff;
  --text: #172033;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --line: #bfdbfe;
  --danger: #dc2626;
}

* { box-sizing: border-box; }
html, body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, .18), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, .16), transparent 28rem),
    var(--bg);
  color: var(--text);
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px auto;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(30, 58, 138, .96), rgba(37, 99, 235, .94)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 12px, transparent 12px 24px);
  color: white;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -160px auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(255,255,255,.13);
}
.hero-content { position: relative; z-index: 1; }
.hero-image {
  position: relative;
  z-index: 1;
  width: min(260px, 28vw);
  filter: drop-shadow(0 18px 24px rgba(15, 23, 42, .26));
}
.hero-clear { position: relative; z-index: 1; }
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.hero-badges span {
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  backdrop-filter: blur(8px);
  font-weight: 700;
}
.hero h1 { margin: 0 0 8px; font-size: clamp(30px, 5vw, 54px); }
.hero p { margin: 0; opacity: .95; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 13px; font-weight: 700; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
  gap: 18px;
  padding: 18px;
}
.restaurant-card, .order-card, .menu-card { grid-column: 1; }
.summary-card { grid-column: 2; grid-row: 1 / span 3; align-self: start; position: sticky; top: 12px; }
.admin-card { margin: 0 18px 24px; }

.card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 16px 36px rgba(37, 99, 235, .12);
  padding: 20px;
  backdrop-filter: blur(10px);
}
h2 { margin: 0 0 16px; }
.restaurant-card h2::before { content: "🏪 "; }
.order-card h2::before { content: "👥 "; }
.menu-card h2::before { content: "🥙 "; }
.summary-card h2::before { content: "🧾 "; }
button, input, textarea, select {
  font: inherit;
  border-radius: 12px;
  border: 1px solid #93c5fd;
  padding: 12px 14px;
}
input, textarea, select { width: 100%; background: #f8fbff; font-size: 16px; }
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}
button {
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  color: white;
  border-color: var(--accent);
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
button:active { transform: scale(0.97); transition: transform 90ms ease-out; }
button:hover { background: var(--accent-dark); box-shadow: 0 12px 22px rgba(37, 99, 235, .24); }
@media (hover: hover) and (pointer: fine) {
  button:hover { transform: translateY(-1px); }
}
@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
  button:hover { transform: none; }
  button:active { transform: none; }
}
button.secondary { background: white; color: var(--accent-dark); }
button.danger { background: var(--danger); border-color: var(--danger); }

.restaurant-select-label {
  display: block;
  color: var(--muted);
  font-weight: 700;
}
.restaurant-select-label select {
  margin-top: 8px;
}
.restaurant-info {
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: #dbeafe;
  color: #1e40af;
  font-weight: 800;
}
.person-row, .admin-row, .section-title, .summary-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.person-row input { flex: 1; }
.quick-title {
  margin: 14px 0 8px;
  color: var(--muted);
  font-weight: 700;
}
.quick-people, .tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.quick-people { margin-top: 0; }
.person-tab {
  display: inline-flex;
  align-items: stretch;
}
.person-tab .tab {
  border-radius: 12px 0 0 12px;
}
.remove-person {
  width: 44px;
  padding: 0;
  border-radius: 0 12px 12px 0;
  background: var(--danger);
  border-color: var(--danger);
  box-shadow: none;
}
.quick-person {
  background: #dbeafe;
  color: #1e40af;
  border-color: #bfdbfe;
}
.quick-person.added {
  background: #bfdbfe;
  color: #1e3a8a;
}
.quick-person.added:hover,
.person-tab.done .tab,
.tab.done {
  background: linear-gradient(135deg, #15803d, #16a34a);
  border-color: #15803d;
  color: white;
}
.finish-person {
  width: 100%;
  margin-top: 14px;
  background: linear-gradient(135deg, #15803d, #16a34a);
  border-color: #15803d;
}
.finish-person:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tab {
  background: #dbeafe;
  color: #1e40af;
  border-color: #bfdbfe;
}
.tab.active { background: var(--accent); color: white; }

.category { margin-top: 18px; }
.category h3 { margin: 0 0 8px; color: #1e40af; }
.item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  margin: 10px 0;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}
.item-main {
  display: grid;
  gap: 8px;
}
.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
}
.options label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.options select {
  margin-top: 4px;
  padding: 8px 10px;
}
.selected-options {
  display: grid;
  gap: 8px;
}
.entry-options {
  padding: 8px;
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
}
.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.remove-entry {
  min-height: 44px;
  padding: 10px 14px;
  background: var(--danger);
  border-color: var(--danger);
  box-shadow: none;
  font-size: 14px;
}
.note-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.note-label input {
  margin-top: 4px;
  padding: 8px 10px;
}
.price { font-weight: 700; }
.qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty button { width: 44px; height: 44px; padding: 0; }
.qty span { min-width: 24px; text-align: center; font-weight: 700; }

.caller-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff, #eff6ff);
}
.caller-result {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 12px;
  background: white;
  color: #1e40af;
  font-weight: 900;
  text-align: center;
}
.summary.empty { color: var(--muted); }
.person-summary {
  border-bottom: 1px solid #dbeafe;
  padding: 12px 0;
}
.person-summary strong { display: block; margin-bottom: 6px; }
.summary ul { margin: 6px 0; padding-left: 20px; }
.total { font-size: 20px; font-weight: 800; margin-top: 14px; }
.total number-flow { display: inline-block; font-variant-numeric: tabular-nums; }
.import-box { display: block; margin-top: 14px; color: var(--muted); }
.import-box textarea { margin: 8px 0; min-height: 90px; }
.hint { color: var(--muted); }

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-image {
    width: min(230px, 70vw);
    margin: 0 auto;
  }
  .hero-badges { justify-content: center; }
  .section-title, .person-row, .admin-row, .summary-actions { flex-direction: column; align-items: stretch; }
  .layout { display: block; }
  .card { margin-bottom: 16px; }
  .summary-card { position: static; }
  .item { grid-template-columns: 1fr; }
  .options { grid-template-columns: 1fr; }
  input, textarea, select { font-size: 16px; }
}
