:root {
  color-scheme: light;
  --bg: #f6f2ea;
  --surface: #ffffff;
  --text: #1b1f1d;
  --muted: #4f5f58;
  --accent: #006241;
  --accent-strong: #004f35;
  --accent-soft: rgba(0, 98, 65, 0.12);
  --border: #e2e6e1;
  --shadow: 0 20px 40px rgba(32, 35, 33, 0.1);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #ffffff 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 20px 48px;
  flex: 1;
}

.app-header {
  text-align: center;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.brand-logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 8px;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

h1 {
  font-size: clamp(2rem, 3vw, 2.6rem);
  margin: 0 0 8px;
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.section-title {
  font-size: 1.1rem;
  margin: 0 0 16px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: center;
}

.drink-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
}

.drink-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.drink-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 98, 65, 0.6);
  box-shadow: 0 18px 35px rgba(0, 98, 65, 0.2);
}

.drink-card.is-unavailable {
  cursor: not-allowed;
  opacity: 0.75;
}

.drink-card.is-unavailable:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.drink-card.is-selected {
  border: 2px solid var(--accent);
  box-shadow: 0 20px 40px rgba(0, 98, 65, 0.25);
}

.drink-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #f6f3ef;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drink-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.drink-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
}

.drink-card.is-unavailable .drink-name {
  color: var(--muted);
}

.drink-status {
  display: inline-flex;
  align-self: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 98, 65, 0.12);
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 600;
}

.order-section {
  margin-top: 36px;
  background: var(--surface);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.order-form {
  display: grid;
  gap: 16px;
  max-width: 420px;
  margin: 0 auto;
}

.header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.manage-section {
  margin-top: 32px;
  background: var(--surface);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.manage-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: stretch;
}

.manage-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 12px;
  background: #fdfbf8;
  height: 100%;
}

.manage-card input[type="file"] {
  width: 100%;
}

.manage-card .ghost {
  align-self: stretch;
}

.manage-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  background: #f3f0ea;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.manage-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.manage-form {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.manage-inline-form {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.manage-list {
  display: grid;
  gap: 12px;
}

.manage-row {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  background: #f7f4ef;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid var(--border);
}

.toggle-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
}

.toggle-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--muted);
}

.manage-row input[type="text"] {
  width: 100%;
}

.guest-picker {
  display: grid;
  gap: 12px;
  margin: 8px 0 0;
}

.guest-picker-title {
  margin: 0;
  font-weight: 600;
  color: var(--muted);
}

.guest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.guest-chip {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--accent);
  font-weight: 600;
  text-align: center;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 18px rgba(0, 98, 65, 0.08);
}

.guest-chip:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.guest-chip.is-selected {
  border: 2px solid var(--accent);
  box-shadow: 0 12px 22px rgba(0, 98, 65, 0.2);
}

.guest-row {
  grid-template-columns: 1fr auto;
}

.dashboard-overview {
  display: flex;
  justify-content: center;
  margin: 0 auto 24px;
}

.dashboard-metric {
  background: var(--surface);
  border-radius: 22px;
  padding: 18px 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
  min-width: 220px;
}

.dashboard-metric-label {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
}

.dashboard-metric-value {
  margin: 8px 0 0;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
}

.dashboard-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.dashboard-card {
  background: var(--surface);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.stat-list {
  display: grid;
  gap: 12px;
}

.stat-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  background: #f7f4ef;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  font-weight: 600;
}

.stat-rank {
  color: var(--muted);
}

.stat-label {
  color: var(--text);
}

.stat-count {
  color: var(--accent-strong);
}

.input-field {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

select {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}

select:focus {
  outline: 2px solid rgba(0, 98, 65, 0.35);
  border-color: var(--accent);
}

input {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
}

input:focus {
  outline: 2px solid rgba(0, 98, 65, 0.35);
  border-color: var(--accent);
}

.primary {
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
}

.ghost {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.ghost:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.order-board {
  background: var(--surface);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.order-board-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

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

.order-board-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.order-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #f7f4ef;
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
}

.order-info {
  font-weight: 600;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  margin: 8px 0;
}

.status {
  margin: 16px 0 0;
  text-align: center;
  font-weight: 600;
}

.sound-gate {
  margin-top: 16px;
  background: #f3f5f1;
  border: 1px dashed var(--accent);
  border-radius: 18px;
  padding: 16px;
  display: inline-flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.sound-gate-text {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.footer {
  text-align: center;
  color: var(--muted);
  padding: 16px 20px 28px;
  font-size: 0.85rem;
}

.splash {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #fdfbf7 0%, #f0e9e0 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: splashFade 0.8s ease forwards 3s;
}

.splash-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.splash-logo img {
  width: 180px;
  height: 180px;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.15));
}

@keyframes splashFade {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@media (max-width: 600px) {
  .app {
    padding: 24px 16px 40px;
  }

  .brand {
    gap: 12px;
  }

  .brand-logo {
    width: 72px;
    height: 72px;
  }

  .order-section {
    padding: 20px;
  }

  .order-card {
    flex-direction: column;
    align-items: stretch;
  }

  .manage-row {
    grid-template-columns: 1fr;
  }

  .manage-inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  .guest-chip {
    width: 64px;
    height: 64px;
    font-size: 0.85rem;
  }
}
