
:root {
  --bg-main: #02030b;
  --bg-card: rgba(10, 15, 40, 0.96);
  --bg-card-soft: rgba(15, 22, 60, 0.92);
  --border-soft: rgba(196, 181, 253, 0.4);
  --accent: #fbbf24;
  --accent-soft: rgba(251, 191, 36, 0.2);
  --accent-strong: #f97316;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --price: #facc15;
  --danger: #f97373;
  --radius-card: 18px;
  --shadow-glow: 0 0 22px rgba(251, 191, 36, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Inter", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  min-height: 100vh;
}

body {
  padding: 18px;
  overflow-x: hidden;
}

/* Preloader */

#preloader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #111827 0%, #020617 55%, #02030b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.preloader-logo img {
  height: 110px;
  width: auto;
  object-fit: contain;
}

.preloader-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.preloader-title {
  font-size: 20px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

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

.preloader-spinner {
  margin-top: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(251, 191, 36, 0.25);
  border-top-color: #fbbf24;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Animated background */

.cosmic-background {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.bg-layer {
  position: absolute;
  inset: 0;
}

.bg-stars {
  background-image:
    radial-gradient(2px 2px at 20% 20%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 80% 30%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 40% 80%, rgba(255,255,255,0.5), transparent),
    radial-gradient(2px 2px at 70% 60%, rgba(255,255,255,0.65), transparent);
  background-repeat: no-repeat;
  background-size: 600px 600px, 700px 700px, 800px 800px, 900px 900px;
  animation: starsDrift 40s ease-in-out infinite alternate;
  opacity: 0.4;
}

.bg-aurora {
  background: radial-gradient(circle at 10% 0%, rgba(56, 189, 248, 0.45), transparent 55%),
              radial-gradient(circle at 80% 100%, rgba(251, 191, 36, 0.4), transparent 55%);
  filter: blur(4px);
  mix-blend-mode: screen;
  animation: auroraWave 32s ease-in-out infinite alternate;
  opacity: 0.9;
}

@keyframes starsDrift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-40px, 20px, 0);
  }
}

@keyframes auroraWave {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(20px, -10px, 0) scale(1.08);
  }
}

/* Layout base */

.app {
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark img {
  height: 70px;
  width: auto;
  object-fit: contain;
}

.brand-text h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.brand-text p {
  margin: 4px 0 0 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-muted);
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Table selector */

.table-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.9));
  border: 1px solid rgba(191, 219, 254, 0.8);
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.7);
  font-size: 13px;
}

.table-selector .label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  color: var(--text-muted);
}

.table-selector select {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

/* Buttons */

.primary-btn {
  border: none;
  outline: none;
  cursor: pointer;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-size: 12px;
  color: #0b0b11;
  background: radial-gradient(circle at 0 0, #fefce8 0, #facc15 35%, #eab308 75%);
  box-shadow: 0 0 18px rgba(234, 179, 8, 0.8);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
  white-space: nowrap;
}

.primary-btn.large {
  width: 100%;
  justify-content: center;
  display: inline-flex;
  align-items: center;
}

.primary-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 0 24px rgba(250, 204, 21, 0.9);
  filter: brightness(1.05);
}

.primary-btn:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.7);
}

/* Main layout */

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

.menu-section {
  min-width: 0;
}

.menu-disclaimer {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 12px;
}

/* Menu container */

.menu-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Category card */

.category-card {
  background: radial-gradient(circle at top left, rgba(55, 65, 81, 0.5), rgba(15, 23, 42, 0.96));
  border-radius: var(--radius-card);
  border: 1px solid var(--border-soft);
  box-shadow: 0 0 18px rgba(15, 23, 42, 0.9);
  overflow: hidden;
  backdrop-filter: blur(18px);
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  animation: cardEnter 0.4s ease forwards;
}

.category-card.signature {
  background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.32), rgba(15, 23, 42, 0.98));
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.8);
}

@keyframes cardEnter {
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.category-header {
  width: 100%;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: none;
  background: transparent;
  cursor: pointer;
}

.category-header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.category-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-badge {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(196, 181, 253, 0.9);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.95),
    rgba(30, 64, 175, 0.9)
  );
}

.category-badge.signature {
  border-color: rgba(251, 191, 36, 0.95);
  color: #fefce8;
}

.category-arrow {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.9);
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.category-card.open .category-arrow {
  transform: rotate(90deg);
  background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.9), rgba(180, 83, 9, 0.95));
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.9);
}

/* Category body */

.category-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 260ms ease;
}

.category-inner {
  padding: 0 14px 12px 14px;
}

.category-note {
  font-size: 12px;
  color: var(--accent-strong);
  margin: 2px 0 8px;
}

/* Subcategories */

.subcategory {
  margin-top: 6px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.96);
  overflow: hidden;
}

.subcategory-header {
  width: 100%;
  border: none;
  background: transparent;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.subcategory-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.subcategory-arrow {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.subcategory-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 220ms ease;
  padding: 0 10px;
}

.subcategory.open .subcategory-body {
  padding-top: 4px;
  padding-bottom: 6px;
}

.subcategory.open .subcategory-arrow {
  transform: rotate(90deg);
}

.subcategory-note {
  font-size: 11px;
  color: var(--accent-strong);
  margin: 4px 0 6px;
}

/* Menu items */

.menu-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-item {
  padding: 7px 6px;
  border-bottom: 1px solid rgba(55, 65, 81, 0.8);
  cursor: pointer;
  border-radius: 10px;
  transition: background 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.menu-item-name {
  font-size: 14px;
  font-weight: 500;
}

.menu-item-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--price);
}

.menu-item-description {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
}

.menu-item:hover {
  background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.16), transparent 70%);
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.5);
}

/* Order sidebar */

.order-sidebar {
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.98));
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 0 24px rgba(15, 23, 42, 0.9);
  padding: 16px 16px 12px;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-header h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.order-subtitle {
  margin: 4px 0 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

.order-items {
  flex: 1;
  overflow-y: auto;
  margin-top: 6px;
  padding-right: 4px;
}

.order-item-empty {
  font-size: 12px;
  color: var(--text-muted);
  text-align: left;
  padding: 8px 0;
}

.order-item {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) auto auto;
  gap: 6px;
  align-items: center;
  padding: 8px 7px;
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.95);
  margin-bottom: 6px;
}

.order-item-name-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.order-item-name {
  font-size: 13px;
}

.order-item-category {
  font-size: 11px;
  color: var(--text-muted);
}

.order-item-note {
  font-size: 10px;
  color: var(--accent-strong);
  margin-top: 2px;
}

.order-item-qty {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}

.qty-btn {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.qty-btn:hover {
  background: rgba(209, 213, 219, 0.18);
}

.order-qty-value {
  font-size: 13px;
  min-width: 16px;
  text-align: center;
}

.order-item-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--price);
  text-align: right;
}

.order-footer {
  border-top: 1px solid rgba(55, 65, 81, 0.8);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-notes label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.order-notes textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.96);
  color: var(--text-main);
  font-size: 11px;
  padding: 6px 7px;
  resize: vertical;
  min-height: 54px;
}

.order-notes textarea::placeholder {
  color: rgba(156, 163, 175, 0.9);
}

.order-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.order-total-row span:first-child {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
}

.order-total-row span:last-child {
  font-size: 16px;
}

.wa-helper {
  margin: 0;
  font-size: 10px;
  color: var(--text-muted);
  text-align: left;
}

/* Scrollbar */

.order-items::-webkit-scrollbar {
  width: 6px;
}

.order-items::-webkit-scrollbar-track {
  background: transparent;
}

.order-items::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.9);
  border-radius: 999px;
}

/* Gin modal */

.gin-modal {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), rgba(3, 7, 18, 0.98));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.gin-modal.visible {
  opacity: 1;
  pointer-events: auto;
}

.gin-modal-box {
  width: min(520px, 100% - 32px);
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.4), rgba(15, 23, 42, 0.98));
  border-radius: 22px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  box-shadow: 0 0 28px rgba(59, 130, 246, 0.9);
  padding: 18px 18px 14px;
}

.gin-modal-box h2 {
  margin: 0 0 4px;
  font-size: 17px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gin-modal-subtitle {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.gin-modal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.gin-choice-btn {
  border-radius: 999px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  background: rgba(17, 24, 39, 0.95);
  padding: 6px 10px;
  font-size: 11px;
  color: var(--text-main);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.gin-choice-btn:hover {
  background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.9), rgba(59, 130, 246, 0.98));
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.9);
  transform: translateY(-1px);
}

.gin-modal-footer {
  display: flex;
  justify-content: flex-end;
}

/* Responsive */

@media (max-width: 960px) {
  .layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  }
}

@media (max-width: 780px) {
  body {
    padding: 14px;
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

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

  .order-sidebar {
    position: static;
    max-height: none;
    margin-top: 12px;
  }
}

@media (max-width: 520px) {
  .brand-text h1 {
    font-size: 19px;
  }

  .brand-text p {
    font-size: 10px;
  }

  .menu-item-name {
    font-size: 15px;
  }

  .menu-item-description {
    font-size: 13px;
  }

  .category-title {
    font-size: 15px;
  }

  .menu-disclaimer {
    font-size: 13px;
  }

  .brand-mark img {
    height: 64px;
  }
}

.subcategory-note {
  font-size: 11px;
  color: var(--accent-strong);
  margin: 0 0 4px;
}

.gin-variants-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  margin-bottom: 2px;
}

.gin-variant-chip {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  padding: 4px 8px;
  font-size: 11px;
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.9);
}

/* Admin Panel */

.admin-modal {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(15,23,42,0.96), rgba(3,7,18,0.98));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.admin-modal.visible {
  opacity: 1;
  pointer-events: auto;
}

.admin-modal-box {
  width: min(920px, 100% - 32px);
  max-height: calc(100vh - 40px);
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(30,64,175,0.75), rgba(15,23,42,0.98));
  border-radius: 22px;
  border: 1px solid rgba(191,219,254,0.9);
  box-shadow: 0 0 32px rgba(59,130,246,0.9);
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.admin-modal-header h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-modal-header p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.admin-close-btn {
  border: none;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  background: rgba(15,23,42,0.9);
  color: var(--text-main);
  font-size: 18px;
  cursor: pointer;
}

.admin-auth {
  border-radius: 14px;
  border: 1px dashed rgba(191,219,254,0.9);
  padding: 10px 10px 12px;
  background: rgba(15,23,42,0.85);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-auth label {
  font-size: 12px;
}

.admin-auth input {
  border-radius: 999px;
  border: 1px solid rgba(191,219,254,0.9);
  background: rgba(15,23,42,0.96);
  color: var(--text-main);
  padding: 6px 10px;
  font-size: 13px;
}

.admin-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
}

.admin-panel-body {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.admin-panel-body.visible {
  display: flex;
}

.admin-panel-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.admin-section h3 {
  margin: 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.admin-section-sub {
  margin: 2px 0 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.admin-items-list {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.8);
  background: rgba(15,23,42,0.96);
}

.admin-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  font-size: 11px;
  border-bottom: 1px solid rgba(31,41,55,0.9);
}

.admin-item-row:last-child {
  border-bottom: none;
}

.admin-item-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.admin-item-name {
  font-size: 12px;
}

.admin-item-cat {
  font-size: 10px;
  color: var(--text-muted);
}

.admin-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
}

.admin-toggle input {
  display: none;
}

.admin-toggle-indicator {
  width: 30px;
  height: 16px;
  border-radius: 999px;
  background: rgba(30,64,175,0.5);
  border: 1px solid rgba(191,219,254,0.9);
  position: relative;
  flex-shrink: 0;
}

.admin-toggle-indicator::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #e5e7eb;
  transition: transform 160ms ease;
}

.admin-toggle input:checked + .admin-toggle-indicator::after {
  transform: translateX(11px);
  background: #facc15;
}

.admin-toggle input:checked + .admin-toggle-indicator {
  background: rgba(250,204,21,0.25);
}

.admin-toggle-label {
  font-size: 12px;
}

.admin-note-box {
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.8);
  background: rgba(15,23,42,0.9);
  font-size: 11px;
  color: var(--text-muted);
}

/* Stato prodotto disattivato */
.admin-summary-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 6px 0 8px;
  font-size: 11px;
}

.admin-card {
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.8);
  background: radial-gradient(circle at top left, rgba(30,64,175,0.55), rgba(15,23,42,0.98));
  padding: 6px 8px;
}

.admin-card-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.admin-card-value {
  font-size: 16px;
  font-weight: 600;
  margin-top: 2px;
}

.admin-card-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.admin-history {
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.6);
  background: rgba(15,23,42,0.96);
  max-height: 220px;
  overflow-y: auto;
  padding: 6px 8px;
  font-size: 11px;
}

.admin-history-item {
  border-bottom: 1px solid rgba(31,41,55,0.9);
  padding: 4px 0;
}

.admin-history-item:last-child {
  border-bottom: none;
}

.admin-history-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 2px;
}

.admin-history-meta {
  font-size: 10px;
  color: var(--text-muted);
}

.admin-history-total {
  font-size: 11px;
  font-weight: 600;
  color: #bbf7d0;
}

.admin-tops-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 6px;
}

.admin-toplist {
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.6);
  background: rgba(15,23,42,0.96);
  padding: 6px 8px;
  font-size: 11px;
}

.admin-toplist h4 {
  margin: 0 0 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.admin-toplist div {
  font-size: 11px;
}

@media (max-width: 780px) {
  .admin-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-tops-row {
    grid-template-columns: minmax(0,1fr);
  }
}


.menu-item.disabled {
  opacity: 0.35;
  pointer-events: none;
  position: relative;
}

.menu-item.disabled::after {
  content: "Non disponibile";
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--danger);
  background: rgba(15,23,42,0.95);
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(248,113,113,0.9);
}

/* Happy hour styling */

.body-happy-hour .price-happy {
  color: #bbf7d0;
}

/* Responsive admin */

@media (max-width: 780px) {
  .admin-modal-box {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  .admin-panel-columns {
    grid-template-columns: minmax(0,1fr);
  }
}


.gin-variant-chip {
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.8);
  background: rgba(15,23,42,0.96);
  color: var(--text-main);
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 80ms ease;
}
.gin-variant-chip:hover {
  border-color: rgba(248,250,252,0.9);
  transform: translateY(-1px);
}
.gin-variant-chip--selected {
  background: radial-gradient(circle at top, rgba(56,189,248,0.9), rgba(15,23,42,0.98));
  border-color: rgba(56,189,248,1);
}


/* Popup selezione tavolo */
.table-popup {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.table-popup-hidden {
  display: none;
}

.table-popup-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(15, 23, 42, 0.98), rgba(3, 7, 18, 0.98)),
    radial-gradient(circle at bottom, rgba(30, 64, 175, 0.65), transparent 65%);
  backdrop-filter: blur(18px);
}

.table-popup-box {
  position: relative;
  width: min(480px, 100% - 32px);
  padding: 22px 20px 18px;
  border-radius: 22px;
  background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.35), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(250, 204, 21, 0.9);
  box-shadow: 0 0 28px rgba(250, 204, 21, 0.9);
}

.table-popup-title {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.table-popup-subtitle {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.table-popup-areas {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.area-chip {
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.85);
  padding: 7px 14px;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.96);
  color: var(--text-main);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.area-chip.active,
.area-chip:hover {
  background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.9), rgba(30, 64, 175, 0.98));
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.9);
}

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

.table-chip {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: rgba(15, 23, 42, 0.96);
  color: var(--text-main);
  font-size: 11px;
  padding: 6px 6px;
  text-align: center;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.table-chip.active,
.table-chip:hover {
  background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.9), rgba(15, 23, 42, 0.98));
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.8);
}

.table-popup-confirm {
  margin-top: 2px;
}

/* Mobile tweaks popup */
@media (max-width: 520px) {
  .table-popup-box {
    padding: 20px 16px 16px;
  }
  .table-popup-title {
    font-size: 16px;
  }
  .table-popup-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
