:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --primary: #0f172a;
  --primary-accent: #2563eb;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "DejaVu Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 15px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-accent {
  background: var(--primary-accent);
  color: #ffffff;
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.textarea {
  min-height: 80px;
  resize: vertical;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.topbar-title {
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lang-switch {
  display: flex;
  gap: 4px;
}

.lang-btn {
  min-height: 36px;
  min-width: 38px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.guest-shell {
  max-width: 460px;
  margin: 0 auto;
  padding: 12px 14px 96px;
}

.admin-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-alt);
  color: var(--text-muted);
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

.menu-item-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
}

.menu-item-card.sold-out {
  opacity: 0.6;
}

.menu-item-photo {
  width: 82px;
  height: 82px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-alt);
  flex-shrink: 0;
}

.sticky-cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  justify-content: center;
}

.sticky-cart-inner {
  width: 100%;
  max-width: 440px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-bar-wrap {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  overflow: hidden;
  margin: 12px 0;
}

.progress-bar-indeterminate {
  height: 100%;
  width: 45%;
  background: var(--primary-accent);
  border-radius: 999px;
  animation: pulseSlide 1.6s infinite ease-in-out;
}

@keyframes pulseSlide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(260%);
  }
}

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

.tab-btn {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

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

.support-banner {
  background: #fef3c7;
  border-bottom: 2px solid #f59e0b;
  color: #78350f;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}

.modal-backdrop.center {
  align-items: center;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 18px;
  padding: 18px;
}

.modal-sheet.wide {
  max-width: 680px;
}

.lang-editor-bar {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.h-scroll-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 8px 0 4px;
}

.toast-box {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 90;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
}

.toast-box.error {
  background: #dc2626;
}

/* TV Order Board */
.tv-board {
  min-height: 100vh;
  background: #0f172a;
  color: #f8fafc;
  padding: 24px;
}

.tv-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

.tv-col {
  background: #1e293b;
  border-radius: 20px;
  padding: 20px;
  min-height: 75vh;
}

.tv-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.tv-num {
  font-size: 48px;
  font-weight: 800;
  padding: 14px 24px;
  border-radius: 16px;
  background: #334155;
  color: #ffffff;
}

.tv-num-ready {
  background: #16a34a;
  color: #ffffff;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.muted {
  color: var(--text-muted);
  font-size: 13px;
}

.error-box {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}
