.dev-panel {
  border: 1px dashed rgba(255, 255, 255, 0.25);
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.4);
}

.dev-panel small {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--muted);
}

.availability-grid.admin {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.menu-card img,
.beverage-card img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin: 0.25rem auto 0.5rem;
}

.beverage-toggle-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.5rem;
}

.beverage-toggle {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.beverage-toggle.offline {
  opacity: 0.5;
}

.notification-bell {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.notification-bell .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #f97316;
  color: #030712;
}

.notification-bell .badge.hidden {
  display: none;
}

.notification-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(360px, 85vw);
  height: 100vh;
  background: var(--card-alt);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.45);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 200;
  display: flex;
  flex-direction: column;
}

.notification-drawer.open {
  transform: translateX(0);
}

.notification-drawer header {
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.notification-drawer .drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.order-toast {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 1rem;
  border: 1px solid rgba(74, 222, 128, 0.4);
  padding: 1rem 1.25rem;
  color: var(--text);
  box-shadow: var(--shadow);
  z-index: 210;
  animation: toastFade 4s forwards;
}

@keyframes toastFade {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }

  10%,
  80% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

:root {
  color-scheme: dark;
  --bg: #05060c;
  --bg-alt: #0b0f1a;
  --card: #11172a;
  --card-alt: #1c2338;
  --text: #eef1ff;
  --muted: #9aa4c3;
  --accent: #4ade80;
  --accent-strong: #22c55e;
  --danger: #ff5f5f;
  --warning: #fbbf24;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  overscroll-behavior-y: contain;
}

body.has-global-header {
  padding-top: 76px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 250;
  backdrop-filter: blur(16px);
  background: rgba(5, 6, 12, 0.75);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 1.25rem;
}

.logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
}

.logo-lockup img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
}

.logo-lockup strong {
  display: block;
  font-size: 1rem;
}

.logo-lockup span {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.2em;
}

.hero {
  padding: 2.5rem 1.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(74, 222, 128, 0.25), transparent 55%), var(--bg);
}

.brand {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.brand-text h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin: 0 0 0.75rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.subtitle {
  max-width: 38rem;
  color: var(--muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn,
.menu-card,
.beverage-card,
.availability-card,
.notification-bell,
.shortcut-card,
.logo-lockup,
.beverage-toggle,
.order-popup-actions .btn,
.toggle-row,
.client-card,
.order-card {
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn,
.shortcut-card,
.notification-bell {
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  background: var(--card);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.pressable.is-pressed,
.btn:active,
.menu-card:active,
.beverage-card:active,
.notification-bell:active {
  transform: scale(0.97);
}

.press-feedback-active {
  animation: pressGlow 1s ease;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35), 0 10px 30px rgba(34, 197, 94, 0.25);
}

@keyframes pressGlow {
  0% {
    outline: 2px solid rgba(34, 197, 94, 0.8);
    outline-offset: 0;
    filter: brightness(1.1);
  }

  40% {
    outline-offset: 4px;
    filter: brightness(1.2);
  }

  100% {
    outline: 0 solid transparent;
    outline-offset: 0;
    filter: brightness(1);
  }
}

.btn:focus-visible,
.menu-card:focus-visible,
.beverage-card:focus-visible,
.notification-bell:focus-visible,
.shortcut-card:focus-visible,
.logo-lockup:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #041105;
}

.btn.ghost {
  border: 1px solid var(--border);
  background: transparent;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  padding-bottom: 0.25rem;
  border-bottom: 1px solid transparent;
  color: var(--accent);
}

.social-links .whatsapp {
  color: #25d366;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 0 1.5rem 2.5rem;
}

.features section {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

footer {
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
}

/* Atalhos */
.shortcut-page {
  padding: 2rem 1.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-height: 100vh;
}

.shortcut-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.shortcut-card {
  background: var(--card);
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s;
}

.shortcut-card:hover {
  transform: translateY(-4px);
}

.shortcut-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: contain;
}

.shortcut-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.shortcut-card span {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Map pages */
.map-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.map-header {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: linear-gradient(180deg, rgba(17, 23, 42, 0.95), rgba(5, 6, 12, 0.85));
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--border);
}

.status-pill {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  width: fit-content;
}

.status-pill.online {
  background: rgba(74, 222, 128, 0.15);
  color: var(--accent);
}

.status-pill.offline {
  background: rgba(255, 95, 95, 0.15);
  color: var(--danger);
}

.map-container {
  width: 100%;
  border-radius: 1.25rem;
  overflow: hidden;
}

#client-map {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 320px;
  max-height: 520px;
  border-radius: inherit;
}

#admin-map {
  width: 100%;
  min-height: 420px;
  height: 70vh;
  border-radius: inherit;
}

.map-content {
  padding: 1.5rem 1.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.map-controls {
  position: relative;
  background: rgba(5, 6, 12, 0.85);
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.distance-pill {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-weight: 600;
}

.qty-chip.bump {
  animation: qtyBump 0.3s ease;
}

@keyframes qtyBump {
  0% {
    transform: translateY(-2px) scale(0.95);
    opacity: 0.6;
  }

  60% {
    transform: translateY(0) scale(1.1);
    opacity: 1;
  }

  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.availability-grid {
  padding: 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.availability-card {
  background: var(--card);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  text-align: center;
}

.availability-card img {
  width: 72px;
  height: 72px;
  margin: 0 auto 0.75rem;
}

.availability-card.available {
  border-color: rgba(74, 222, 128, 0.35);
}

.availability-card.unavailable {
  opacity: 0.45;
}

.order-bar {
  padding: 1rem 1.25rem 2.25rem;
}

.share-location-btn.active {
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: var(--accent);
}

.share-location-btn.requesting {
  opacity: 0.7;
  pointer-events: none;
}

.order-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 14, 0.8);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 30;
}

.order-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.order-sheet {
  background: var(--card-alt);
  width: min(520px, 100%);
  border-radius: 1.5rem 1.5rem 0 0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.menu-card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.75rem 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
  text-align: center;
  position: relative;
}

.menu-card.selected {
  border-color: rgba(74, 222, 128, 0.6);
  box-shadow: 0 12px 24px rgba(74, 222, 128, 0.25);
  background: rgba(74, 222, 128, 0.12);
}

.menu-card.unavailable {
  opacity: 0.4;
  cursor: not-allowed;
}

.menu-card.menu-card--beverages {
  cursor: pointer;
  padding-bottom: 0.85rem;
}

.menu-card.menu-card--beverages .chevron {
  font-size: 1.25rem;
  display: inline-flex;
  transition: transform 0.25s ease;
}

.menu-card.menu-card--beverages.parent-open .chevron {
  transform: rotate(180deg);
}

.menu-card.menu-card--beverages .qty-chip,
.menu-card.menu-card--beverages .qty-control {
  display: none;
}

.qty-chip {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.qty-control {
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.qty-control button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1.1rem;
}

.qty-control span {
  min-width: 32px;
  text-align: center;
  font-weight: 600;
}

.beverage-panel {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.beverage-panel.hidden {
  display: none;
}

.beverage-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.beverage-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
}

.beverage-card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 160px;
  position: relative;
}

.beverage-card.selected {
  border-color: rgba(74, 222, 128, 0.6);
  background: rgba(74, 222, 128, 0.08);
  box-shadow: 0 8px 20px rgba(74, 222, 128, 0.2);
}

.beverage-card.disabled {
  opacity: 0.35;
  border-color: rgba(255, 95, 95, 0.45);
}

.order-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  font-weight: 600;
}

.order-item-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-weight: 500;
}

.order-item-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.input-group input {
  padding: 0.75rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.location-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 14, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.location-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.location-modal .card {
  background: var(--card);
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  padding: 1.5rem;
  max-width: 420px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.toast-container {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 100;
}

.toast {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: toast 4s forwards;
}

.toast.success {
  border-color: rgba(74, 222, 128, 0.4);
}

.toast.error {
  border-color: rgba(255, 95, 95, 0.4);
}

@keyframes toast {
  0% {
    opacity: 0;
    transform: translate(-50%, -10px);
  }

  10%,
  80% {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -10px);
  }
}

/* Admin */
.admin-page {
  min-height: 100vh;
  background: var(--bg);
}

.admin-login,
.admin-app {
  padding: 1.5rem;
}

.admin-login-card {
  max-width: 420px;
  margin: 12vh auto;
  padding: 2rem;
  background: var(--card);
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .admin-layout {
    flex-direction: row;
  }
}

.admin-map-wrapper {
  flex: 2;
  min-height: 70vh;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.admin-sidebar {
  flex: 1;
  background: var(--card);
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 70vh;
  overflow-y: auto;
}

.sidebar-section {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.01);
}

.sidebar-section.alert {
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.4);
  border-color: rgba(74, 222, 128, 0.4);
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.notification-card,
.order-card {
  padding: 0.75rem;
  border-radius: 1rem;
  background: rgba(17, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-row:last-child {
  border-bottom: none;
}

.switch {
  position: relative;
  width: 46px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  transition: background 0.3s;
}

.slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

input:checked+.slider {
  background: rgba(34, 197, 94, 0.6);
}

input:checked+.slider::before {
  transform: translateX(20px);
}

.hidden {
  display: none !important;
}

.mapboxgl-canvas {
  touch-action: pan-y;
}

.marker {
  width: 32px;
  height: 32px;
  background-size: cover;
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.6);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.marker.cart {
  background-image: url('../assets/cart-icon.png');
}

.marker.person {
  background-image: url('../assets/person-icon.png');
}

.marker.person.offline {
  filter: grayscale(1) brightness(0.4);
}

.marker.order {
  width: 28px;
  height: 28px;
  background: #22c55e;
  border-radius: 8px;
  color: #041105;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.badge {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
}

.notification-card.unread {
  border-color: rgba(74, 222, 128, 0.4);
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.15);
}

.client-card.offline {
  opacity: 0.5;
}

.mapboxgl-popup.order-popup .mapboxgl-popup-content {
  background: #05060c;
  border-radius: 1.125rem;
  padding: 0;
  border: 1px solid var(--border);
  min-width: 220px;
  box-shadow: var(--shadow);
}

.order-popup-shell {
  display: flex;
  flex-direction: column;
}

.order-popup-header {
  padding: 1rem 1.25rem;
  color: var(--text);
}

.order-popup-body {
  background: #ffffff;
  color: #030712;
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.order-popup-body .btn {
  width: 100%;
  justify-content: center;
  color: #030712;
}

.order-popup-body .btn.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
}

.order-popup-body .btn.whatsapp-btn {
  background: #25d366;
  color: #021c09;
}

.mapboxgl-popup.order-popup .mapboxgl-popup-close-button {
  color: #fff;
  font-size: 1.25rem;
}

.order-popup-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.list-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

small {
  color: var(--muted);
}

@media (max-width: 768px) {
  .admin-page {
    font-size: 17px;
  }

  .admin-app {
    padding-bottom: 2.5rem;
  }

  .admin-map-wrapper {
    min-height: 55vh;
  }

  .admin-sidebar {
    max-height: none;
  }
}