/* static/css/styles.css — The Saucy Goat */

/*
  CSS Variables for consistent colors
*/
:root {
  /* Primary colors from mockup */
  --navy: #1a2b5c;
  --red: #d42a2a;
  --red-dark: #b02020;
  --cream: #f5f1e8;
  
  /* Semantic colors */
  --green: #4caf50;
  --green-dark: #45a049;
  --orange: #f57c00;
  --urgent-red: #c62828;
  
  /* Neutrals */
  --white: #ffffff;
  --gray-light: #e8e8e8;
  --gray-medium: #666666;
  --gray-dark: #333333;

  /* Typography scale */
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.25rem;
  --text-lg: 1.5rem;
  --text-xl: 2rem;
  --text-2xl: 3.75rem;

  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1);
  --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.25);

  /* Border radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-pill: 999px;

  /* Transitions */
  --transition-bg: background-color 0.15s;

  /* Text colors */
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;
  --text-body: #374151;

  /* Borders */
  --border-subtle: 1px solid #e5e7eb;

  /* Font weight scale */
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: bold;

  /* Letter spacing scale */
  --letter-spacing-tight: 0.05em;
  --letter-spacing-medium: 0.08em;
  --letter-spacing-wide: 0.1em;

  /* Line height */
  --line-height-tight: 1;

  /* Spacing scale */
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;

  /* Layout widths */
  --max-width-narrow: 56rem;
  --max-width-wide: 80rem;

  /* Borders */
  --border-navy: 2px solid var(--navy);
  --border-input: 2px solid #d1d5db;

  /* Opacity */
  --opacity-muted: 0.75;
  --opacity-disabled: 0.5;
}

/*
  Base body styles with subtle texture
*/
body {
  font-family: 'Space Mono', monospace;
  background-color: var(--cream);
  
  /* Add subtle texture like in mockup */
  background-image: 
    repeating-linear-gradient(
      0deg, 
      transparent, 
      transparent 2px, 
      rgba(0,0,0,.02) 2px, 
      rgba(0,0,0,.02) 4px
    );
}

/*
  Headings use Bebas Neue
*/
h1, h2, h3, h4, h5, h6 {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: var(--letter-spacing-wide);
}

/* Bebas Neue headings and UI labels */
.menu-header__title, .menu-category__name,
.cart-total, .cart-total__label, .cart-order-btn,
.kitchen-header__title, .kitchen-header__subtitle,
.kitchen-pin__label, .kitchen-pin__code,
.kitchen-close-btn, .kitchen-guests-title,
.feedback-notification__title,
.stat-card__value,
.guest-card__name,
.guest-notification__title, .guest-notification__approve-btn,
.order-confirmation__text,
.modal--icon .modal__message, .modal__title,
.modal__cancel-btn, .modal__confirm-btn, .modal__btn-label, .modal__save-btn,
.location-option__label,
.landing-title, .landing-subtitle, .landing-card__title, .landing-btn,
.error-title, .error-btn,
.admin-header__title, .admin-back-link, .admin-section-title,
.cleanup-card__title, .btn-danger,
.payment-approved,
.identity-panel__label,
.wait-timer,
.no-guests__title {
  font-family: 'Bebas Neue', sans-serif;
}

/*
  Animation: Slide in from top
  Used for modals and notifications
*/
@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-slideIn {
  animation: slideIn 0.3s ease-out;
}

/*
  Animation: Pulse opacity — used for urgent wait timers
*/
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/*
  HTMX loading indicator
  Shows while request is in progress
*/
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: inline-block;
}


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

/*
  Wait timer color classes
  Applied dynamically based on how long order has been waiting
*/

/* 0-5 minutes: All good */
.wait-timer.good {
  background-color: #e8f5e9;
  color: #2e7d32;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-weight: var(--font-weight-bold);
}

/* 5-10 minutes: Getting old */
.wait-timer.warning {
  background-color: #fff3e0;
  color: #f57c00;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-weight: var(--font-weight-bold);
}

/* 10+ minutes: Urgent! */
.wait-timer.urgent {
  background-color: #ffebee;
  color: #c62828;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-weight: var(--font-weight-bold);
  animation: pulse 2s infinite;
}

/*
  Custom scrollbar (webkit browsers)
*/
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--cream);
}

::-webkit-scrollbar-thumb {
  background: var(--navy);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--red);
}


/*
  Checkbox styling
*/
input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--green);
}

/*
  Print styles
  When kitchen wants to print orders
*/
@media print {
  button, nav, .no-print {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .order-card {
    page-break-after: always;
  }
}

/*
  Responsive font sizes
  Scale down on mobile
*/
@media (max-width: 768px) {
  h1 { font-size: var(--text-xl); }
  h2 { font-size: var(--text-xl); }
}

/*
  Focus styles for accessibility (focus-visible avoids outline on mouse click)
*/
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

/*
  Success/Error message styling
*/
.success {
  background-color: #e8f5e9;
  color: #2e7d32;
  padding: 12px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--green);
  margin: 8px 0;
}

.error {
  background-color: #ffebee;
  color: #c62828;
  padding: 12px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--urgent-red);
  margin: 8px 0;
}



/* ============================================================================
   MODAL ANIMATIONS
   ============================================================================ */

/* Fade in backdrop */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-fadeIn {
  animation: fadeIn 0.2s ease-out;
}





/* ============================================================================
   HTMX LOADING STATES & FEEDBACK
   ============================================================================ */

/* Dim and disable buttons during HTMX requests */
.htmx-request {
  pointer-events: none;
  cursor: wait;
}

button.htmx-request {
  opacity: 0.6;
}

/* Add spinner to buttons during request */
button.htmx-request::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-left-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Make buttons relative so spinner positions correctly */
button {
  position: relative;
}

/* Visual "click" feedback */
button:active:not(.htmx-request),
[hx-post]:active:not(.htmx-request),
[hx-get]:active:not(.htmx-request),
[hx-delete]:active:not(.htmx-request) {
  transform: scale(0.97);
  transition: transform 0.1s;
}

/* Prevent interaction during requests */
.htmx-request * {
  pointer-events: none;
}


/* Smooth transitions */
button,
[hx-post],
[hx-get],
[hx-delete] {
  transition: opacity 0.2s, transform 0.1s;
}


/* Shared navy header box pattern */
.menu-header__box,
.kitchen-header__box,
.admin-header__box {
  background-color: var(--navy);
  color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--spacing-lg);
}

/* Shared white card styles */
.stat-card,
.guest-card,
.landing-card,
.no-guests,
.error-card,
.cleanup-card,
.admin-sessions-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ============================================================================
   GUEST MENU PAGE
   ============================================================================ */

.menu-page {
  min-height: 100vh;
  padding-bottom: 13rem;
}

.notifications-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Guest order status notifications — pill style by default */
.guest-notification {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid;
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.25rem 0.5rem var(--spacing-sm);
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.guest-notification--ready {
  background-color: #fef9c3;
  border-color: #eab308;
  color: #713f12;
}

.guest-notification--paid {
  background-color: #dcfce7;
  border-color: #22c55e;
  color: #14532d;
}

.guest-notification--cancelled {
  background-color: #fee2e2;
  border-color: #ef4444;
  color: #7f1d1d;
}

.guest-notification--requested {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  cursor: default;
}

.guest-notification__icon {
  font-size: var(--text-lg);
  line-height: var(--line-height-tight);
}

.guest-notification__title {
  font-size: var(--text-md);
  letter-spacing: var(--letter-spacing-tight);
}

.guest-notification__approve-btn {
  background-color: #22c55e;
  color: white;
  padding: var(--spacing-sm) 2rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-size: var(--text-md);
  letter-spacing: var(--letter-spacing-medium);
  transition: var(--transition-bg);
}

.guest-notification__approve-btn:hover {
  background-color: #16a34a;
}

/* Header */
.menu-header {
  max-width: var(--max-width-narrow);
  margin: 0 auto 0.5rem;
  padding: var(--spacing-md) var(--spacing-md) 0;
}

.menu-header__box {
  padding: 1.25rem;
  text-align: center;
}

.menu-header__title {
  font-size: var(--text-2xl);
  color: white;
  letter-spacing: var(--letter-spacing-wide);
}

/* Identity panel (Who are you + Tell the kitchen) */
.identity-panel {
  max-width: var(--max-width-narrow);
  margin: 0 auto var(--spacing-md);
  padding: 0 var(--spacing-md);
}

.identity-panel__inner {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--spacing-sm);
  display: flex;
  gap: var(--spacing-sm);
}

.identity-panel__who {
  width: 50%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-right: var(--border-subtle);
  padding-right: var(--spacing-sm);
}

.identity-panel__kitchen {
  width: 50%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.identity-panel__label {
  font-size: var(--text-md);
  color: var(--text-muted);
  letter-spacing: var(--letter-spacing-tight);
  text-align: center;
}

/* Character picker */
.char-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  justify-items: center;
}

.char-btn {
  font-size: 2rem;
  border-radius: var(--radius-md);
  padding: 0.25rem;
  transition: all 0.15s;
  width: fit-content;
  background: none;
  border: none;
  cursor: pointer;
}

.char-btn:active {
  transform: scale(0.9);
}

.char-btn.is-selected {
  background-color: var(--navy);
  transform: scale(1.1);
}

/* Location buttons (Here / Go) */
.location-row {
  display: flex;
  gap: 0.25rem;
  margin-top: var(--spacing-lg);
}

.location-btn {
  flex: 1;
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  padding: 0.5rem 0;
  border-radius: var(--radius-md);
  transition: all 0.15s;
  border: none;
  cursor: pointer;
  background-color: #f3f4f6;
  color: #4b5563;
}

.location-btn.is-selected {
  background-color: var(--navy);
  color: white;
}

/* Feedback grid (Tell the kitchen) */
.feedback-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
}

.feedback-btn {
  font-size: 2rem;
  border-radius: var(--radius-md);
  padding: 0.25rem;
  transition: all 0.15s;
  background: none;
  border: none;
  cursor: pointer;
}

.feedback-btn:active {
  transform: scale(0.9);
  background-color: #f3f4f6;
}

.location-spacer {
  visibility: hidden;
  display: flex;
  gap: 0.25rem;
}

@media (max-width: 480px) {
  .identity-panel__inner {
    flex-direction: column;
  }

  .identity-panel__who,
  .identity-panel__kitchen {
    width: 100%;
  }

  .char-btn,
  .feedback-btn {
    font-size: 3.5rem;
  }

  /* Spacer only exists to align columns side-by-side — not needed when stacked */
  .location-spacer {
    display: none;
  }
}

/* Menu categories and grid */
.menu-section {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.menu-category {
  margin-bottom: var(--spacing-sm);
}

.menu-category__header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: 0.5rem;
}

.menu-category__divider {
  flex: 1;
  border: var(--border-navy);
  border-radius: var(--radius-pill);
}

.menu-category__name {
  font-size: var(--text-lg);
  color: var(--navy);
  letter-spacing: var(--letter-spacing-wide);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

/* Menu item card */
.menu-item-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.menu-item-card:hover {
  box-shadow: var(--shadow-md);
  background-color: #f9fafb;
}

.menu-item-card:active {
  background-color: #f3f4f6;
}

.menu-item__icon {
  font-size: 75px;
  line-height: var(--line-height-tight);
}

.menu-item__price {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  color: var(--navy);
  margin-top: 0.25rem;
}

/* Cart bar */
.cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: var(--border-navy);
  box-shadow: 0 -4px 6px -1px rgba(0,0,0,0.1);
  z-index: 40;
}


.cart-inner {
  padding: var(--spacing-sm) var(--spacing-lg);
  max-width: var(--max-width-narrow);
  margin: 0 auto;
}

.cart-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--spacing-sm);
  justify-content: center;
}

.cart-item {
  display: flex;
  align-items: center;
  background-color: #f3f4f6;
  border-radius: var(--radius-pill);
  padding: 0.5rem var(--spacing-sm);
}

.cart-item__icon {
  font-size: var(--text-xl);
}

.cart-item__qty {
  margin-left: 0.25rem;
  font-size: var(--text-md);
  font-weight: var(--font-weight-bold);
  color: var(--navy);
}

.cart-item__remove {
  margin-left: 0.5rem;
  width: 2rem;
  height: 2rem;
  background-color: #fecaca;
  border-radius: var(--radius-pill);
  color: #dc2626;
  font-weight: var(--font-weight-bold);
  font-size: var(--text-md);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item__remove:hover {
  background-color: #fca5a5;
}

.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
}

.cart-total {
  font-size: var(--text-xl);
  color: var(--navy);
}

.cart-total__label {
  font-size: var(--text-xl);
}

.cart-order-btn {
  background-color: var(--green);
  color: white;
  padding: var(--spacing-md) 2rem;
  border-radius: var(--radius-lg);
  font-size: var(--text-xl);
  border: none;
  cursor: pointer;
}

.cart-order-btn:hover {
  background-color: var(--green-dark);
}

.cart-order-btn:disabled {
  opacity: var(--opacity-disabled);
  cursor: not-allowed;
}

.cart-empty {
  padding: var(--spacing-md);
  text-align: center;
  font-size: 3rem;
}

/* ============================================================================
   KITCHEN VIEW
   ============================================================================ */

.kitchen-page {
  min-height: 100vh;
  padding: var(--spacing-md);
}

.kitchen-header {
  max-width: var(--max-width-wide);
  margin: 0 auto var(--spacing-lg);
}

.kitchen-header__box {
}

.kitchen-header__inner {
  display: flex;
  align-items: center;
}

.kitchen-header__brand {
  width: 50%;
}

.kitchen-header__title {
  font-size: var(--text-2xl);
  letter-spacing: var(--letter-spacing-wide);
  margin: 0;
  line-height: var(--line-height-tight);
}

.kitchen-header__subtitle {
  font-size: var(--text-xl);
  letter-spacing: var(--letter-spacing-medium);
  opacity: var(--opacity-muted);
  margin: 0.25rem 0 0;
  line-height: var(--line-height-tight);
}

.kitchen-header__controls {
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--spacing-md);
}

.kitchen-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}

.kitchen-pin__label {
  font-size: var(--text-base);
  letter-spacing: var(--letter-spacing-medium);
  opacity: var(--opacity-muted);
  margin: 0;
}

.kitchen-pin__code {
  font-size: var(--text-md);
  letter-spacing: var(--letter-spacing-wide);
  background: white;
  color: var(--red);
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  display: inline-block;
  margin: 0;
}

.kitchen-close-btn {
  background-color: var(--red);
  color: white;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  letter-spacing: var(--letter-spacing-medium);
  border: none;
  cursor: pointer;
  transition: var(--transition-bg);
}

.kitchen-close-btn:hover {
  background-color: var(--red-dark);
}

.kitchen-section {
  max-width: var(--max-width-wide);
  margin: 0 auto var(--spacing-lg);
}

.kitchen-guests-title {
  font-size: var(--text-xl);
  color: var(--navy);
  letter-spacing: var(--letter-spacing-wide);
  margin-bottom: var(--spacing-md);
}

.feedback-notification {
  background: white;
  border: var(--border-navy);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.feedback-notification__icon {
  font-size: var(--text-xl);
}

.feedback-notification__title {
  font-size: var(--text-md);
  color: var(--navy);
}

.feedback-notification__guest {
  font-size: var(--text-sm);
  color: var(--text-subtle);
}

.feedback-notification__close {
  margin-left: var(--spacing-md);
  color: var(--text-muted);
  font-size: var(--text-md);
  background: none;
  border: none;
  cursor: pointer;
  line-height: var(--line-height-tight);
}

.feedback-notification__close:hover {
  color: #4b5563;
}

/* Stats bar */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
  padding: var(--spacing-lg);
}

.stat-card--total {
  background-color: var(--green);
  color: white;
}

.stat-card__label {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-tight);
  color: var(--text-subtle);
}

.stat-card--total .stat-card__label {
  color: rgba(255,255,255,0.8);
}

.stat-card__value {
  font-size: var(--text-xl);
  color: var(--navy);
  margin-top: 0.5rem;
}

.stat-card--total .stat-card__value {
  color: white;
}

/* Guests grid */
.guests-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  align-items: start;
}

@media (min-width: 1024px) {
  .guests-grid { grid-template-columns: repeat(2, 1fr); }
}

.guest-card {
  padding: var(--spacing-lg);
  transition: all 0.3s ease;
}

.guest-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.guest-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  border-bottom: var(--border-subtle);
  padding-bottom: var(--spacing-sm);
}

.guest-card__name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guest-card__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--spacing-sm);
  padding-top: var(--spacing-sm);
  border-top: var(--border-subtle);
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-sm);
  color: var(--navy);
}

.guest-card__name {
  font-size: var(--text-lg);
  color: var(--navy);
}

.guest-badge {
  font-size: var(--text-sm);
  padding: 0.5rem var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-weight: var(--font-weight-medium);
}

.guest-badge--carryout {
  background-color: #ffedd5;
  color: #c2410c;
}

.guest-badge--dine-in {
  background-color: #dbeafe;
  color: #1d4ed8;
}


.orders-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.order-card {
  border: 1px solid;
  border-radius: var(--radius-md);
  padding: var(--spacing-sm);
}

.order-card--open {
  border-color: #e5e7eb;
  padding: var(--spacing-md);
}

.order-card--ready {
  background-color: #fefce8;
  border-color: #fde68a;
  padding: var(--spacing-md);
}

.order-card--paid {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
}

.order-card--requested {
  background-color: #eff6ff;
  border-color: #bfdbfe;
}

.order-card--cancelled {
  background-color: #f9fafb;
  border-color: #e5e7eb;
}

.order-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-card__header--mb {
  margin-bottom: var(--spacing-sm);
}

.order-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.order-status__icon--paid { color: #16a34a; }
.order-status__icon--cancelled { color: var(--text-muted); }
.order-status__icon--requested { color: #2563eb; }

.order-status__text--paid { color: #15803d; font-weight: var(--font-weight-medium); }
.order-status__text--cancelled { color: var(--text-subtle); }
.order-status__text--requested { color: #1d4ed8; font-weight: var(--font-weight-medium); }

.order-count { color: var(--text-muted); font-size: var(--text-sm); }

.order-total { font-weight: var(--font-weight-medium); }
.order-card--paid .order-total { color: #15803d; }
.order-card--requested .order-total { color: #1d4ed8; }
.order-card--cancelled .order-total { color: var(--text-muted); text-decoration: line-through; }
.order-card--open .order-total,
.order-card--ready .order-total { font-weight: var(--font-weight-bold); font-size: var(--text-md); }

.order-badge--ready {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  background-color: #fef08a;
  color: #854d0e;
}

.order-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: var(--spacing-sm);
}

.order-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.order-item__checkbox {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--navy);
  cursor: pointer;
}

.item-label { flex: 1; }

.item-icon {
  font-size: var(--text-md);
  margin-right: 0.25rem;
}

.item-price { font-weight: var(--font-weight-medium); }

.order-actions {
  display: flex;
  gap: 0.5rem;
}

/* Shared base for all kitchen action buttons */
.btn-ready,
.btn-payment,
.btn-cancel-order,
.guest-remove-btn {
  padding: 0.5rem var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition-bg);
}

.btn-ready,
.btn-payment {
  flex: 1;
  color: white;
}

.btn-cancel-order,
.guest-remove-btn {
  background-color: #fee2e2;
  color: #dc2626;
}

.btn-cancel-order:hover,
.guest-remove-btn:hover { background-color: #fecaca; }

.btn-ready { background-color: var(--navy); }
.btn-ready:hover { background-color: #2a3b6c; }
.btn-ready:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-payment { background-color: var(--green); }
.btn-payment:hover { background-color: var(--green-dark); }

.no-orders-text {
  color: var(--text-muted);
  text-align: center;
  padding: var(--spacing-md) 0;
}

.no-guests {
  padding: 3rem;
  text-align: center;
}

.no-guests__icon { font-size: 3.75rem; margin-bottom: var(--spacing-md); }
.no-guests__title { font-size: var(--text-lg); color: var(--text-muted); margin-bottom: 0.5rem; }
.no-guests__text { color: var(--text-subtle); }
.no-guests__pin { font-size: var(--text-sm); color: var(--text-muted); margin-top: var(--spacing-md); }
.no-guests__pin-code { font-weight: var(--font-weight-bold); color: var(--red); }

/* JS-toggled utility classes */
.opacity-50 { opacity: var(--opacity-disabled); }
.line-through { text-decoration: line-through; }

/* ============================================================================
   MODALS
   ============================================================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 22rem;
  width: 100%;
  margin: 0 var(--spacing-md);
  overflow: hidden;
}

/* Icon-style confirmation modal */
.modal--icon .modal__icon {
  font-size: 4.5rem;
  line-height: var(--line-height-tight);
  text-align: center;
  padding: 2rem var(--spacing-lg) var(--spacing-sm);
}

.modal--icon .modal__body--centered {
  text-align: center;
  padding: 0 var(--spacing-lg) var(--spacing-lg);
}

.modal--icon .modal__message {
  font-size: var(--text-lg);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--text-body);
  margin-bottom: 1.25rem;
}

/* Edit guest modal keeps the header */
.modal__header {
  background-color: var(--navy);
  color: white;
  padding: var(--spacing-md) var(--spacing-lg);
}

.modal__title {
  font-size: var(--text-lg);
  letter-spacing: var(--letter-spacing-tight);
}

.modal__body {
  padding: var(--spacing-lg);
}

.modal__message {
  color: var(--text-body);
  font-size: var(--text-md);
  margin-bottom: var(--spacing-lg);
}

.modal__actions {
  display: flex;
  gap: var(--spacing-sm);
}

.modal__cancel-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background-color: #e5e7eb;
  color: var(--text-body);
  padding: 0.875rem 0.5rem;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: var(--transition-bg);
  min-height: 5rem;
}

.modal__cancel-btn:hover { background-color: #d1d5db; }

.modal__confirm-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background-color: var(--red);
  color: white;
  padding: 0.875rem 0.5rem;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: var(--transition-bg);
  min-height: 5rem;
}

.modal__confirm-btn:hover { background-color: var(--red-dark); }

.modal__btn-icon {
  font-size: 2rem;
  line-height: var(--line-height-tight);
}

.modal__btn-label {
  font-size: var(--text-sm);
  letter-spacing: var(--letter-spacing-medium);
}

.modal__save-btn {
  flex: 1;
  background-color: var(--navy);
  color: white;
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-bg);
}

.modal__save-btn:hover { background-color: #2a3b6c; }

.modal__form { padding: var(--spacing-lg); }

.form-group { margin-bottom: var(--spacing-md); }
.form-group--lg { margin-bottom: var(--spacing-lg); }

.form-label {
  display: block;
  color: var(--text-body);
  font-weight: var(--font-weight-medium);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: var(--border-input);
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  font-family: inherit;
  box-sizing: border-box;
}

.form-input:focus {
  border-color: var(--navy);
  outline: none;
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-sm);
}

.location-option { cursor: pointer; }

.location-option__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.location-option__box {
  border: var(--border-input);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  text-align: center;
  transition: all 0.15s;
}

.location-option__input:checked + .location-option__box {
  border-color: var(--navy);
  background-color: #eff6ff;
}

.location-option__icon { font-size: var(--text-xl); margin-bottom: 0.25rem; }
.location-option__label { font-size: var(--text-md); }

/* Order confirmation toast */
.order-confirmation {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #dcfce7;
  border: 2px solid #22c55e;
  color: #166534;
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.25rem 0.5rem var(--spacing-sm);
  box-shadow: var(--shadow-sm);
}

.order-confirmation__icon { font-size: var(--text-lg); line-height: var(--line-height-tight); }
.order-confirmation__text {
  font-size: var(--text-md);
  letter-spacing: var(--letter-spacing-tight);
}

/* ============================================================================
   LANDING PAGE
   ============================================================================ */

.landing-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
}

.landing-container {
  max-width: 28rem;
  width: 100%;
}

.landing-header {
  text-align: center;
  margin-bottom: 3rem;
}

.landing-title {
  font-size: var(--text-2xl);
  color: var(--navy);
  letter-spacing: var(--letter-spacing-wide);
  margin-bottom: 0.5rem;
}

.landing-subtitle {
  font-size: var(--text-xl);
  color: var(--navy);
  letter-spacing: var(--letter-spacing-wide);
}

.landing-card {
  padding: 2rem;
  margin-bottom: var(--spacing-lg);
}

.landing-card__title {
  font-size: var(--text-lg);
  color: var(--navy);
  letter-spacing: var(--letter-spacing-tight);
  margin-bottom: var(--spacing-md);
}

.landing-input {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: var(--border-navy);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: var(--text-lg);
  letter-spacing: var(--letter-spacing-wide);
  margin-bottom: var(--spacing-md);
  font-family: inherit;
  box-sizing: border-box;
}

.landing-input:focus {
  outline: none;
  border-color: var(--red);
}

.landing-btn {
  width: 100%;
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  letter-spacing: var(--letter-spacing-wide);
  border: none;
  cursor: pointer;
  transition: var(--transition-bg);
}

.landing-btn--join {
  background-color: var(--red);
  color: white;
}

.landing-btn--join:hover { background-color: var(--red-dark); }

.landing-btn--kitchen {
  background-color: var(--navy);
  color: white;
}

.landing-btn--kitchen:hover { background-color: #2a3b6c; }

.landing-divider {
  position: relative;
  margin: 2rem 0;
  text-align: center;
}

.landing-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: var(--border-navy);
}

.landing-divider__label {
  position: relative;
  background: var(--cream);
  padding: 0 var(--spacing-md);
  color: var(--navy);
  font-weight: var(--font-weight-bold);
  display: inline-block;
}

/* ============================================================================
   ERROR PAGES
   ============================================================================ */

.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
}

.error-card {
  max-width: 28rem;
  width: 100%;
  padding: 2rem;
  text-align: center;
}

.error-icon { font-size: 3.75rem; margin-bottom: var(--spacing-md); }

.error-title {
  font-size: var(--text-xl);
  color: var(--navy);
  margin-bottom: var(--spacing-md);
}

.error-message { color: var(--text-body); margin-bottom: var(--spacing-lg); }

.error-btn {
  display: inline-block;
  background-color: var(--red);
  color: white;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  text-decoration: none;
  transition: var(--transition-bg);
}

.error-btn:hover { background-color: var(--red-dark); }

.error-banner {
  background-color: #fee2e2;
  border: 2px solid #ef4444;
  color: #b91c1c;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
}

/* ============================================================================
   ADMIN PAGE
   ============================================================================ */

.admin-page {
  min-height: 100vh;
  padding: var(--spacing-md);
}

.admin-section {
  max-width: var(--max-width-narrow);
  margin: 0 auto var(--spacing-lg);
}

.admin-section--top { margin-top: var(--spacing-lg); }

.admin-header__box {
}

.admin-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header__title {
  font-size: var(--text-xl);
  letter-spacing: var(--letter-spacing-wide);
}

.admin-header__subtitle {
  font-size: var(--text-sm);
  opacity: 0.8;
  margin-top: 0.25rem;
}

.admin-back-link {
  background: white;
  color: var(--navy);
  padding: 0.5rem var(--spacing-md);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition-bg);
}

.admin-back-link:hover { background-color: #f3f4f6; }

.admin-section-title {
  font-size: var(--text-xl);
  color: var(--navy);
  letter-spacing: var(--letter-spacing-wide);
  margin-bottom: var(--spacing-md);
}

.cleanup-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.cleanup-card {
  padding: var(--spacing-lg);
}

.cleanup-card--danger { border: 2px solid #fca5a5; }

.cleanup-card__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-md);
}

.cleanup-card__title {
  font-size: var(--text-md);
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.cleanup-card--danger .cleanup-card__title { color: var(--red); }

.cleanup-card__desc { font-size: var(--text-sm); color: #4b5563; }

.btn-danger {
  background-color: var(--red);
  color: white;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-bg);
}

.btn-danger:hover { background-color: var(--red-dark); }

.admin-sessions-card {
  padding: var(--spacing-lg);
}

/* Sessions list */
.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.session-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f9fafb;
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
}

.session-row__pin { font-weight: var(--font-weight-bold); color: var(--navy); }
.session-row__count { font-size: var(--text-sm); color: var(--text-subtle); margin-left: var(--spacing-md); }

.session-row__actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.session-link { font-size: var(--text-sm); color: var(--navy); text-decoration: none; }
.session-link:hover { text-decoration: underline; }

.session-delete-btn {
  font-size: var(--text-sm);
  color: #ef4444;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 0.5rem;
}

.session-delete-btn:hover { color: #b91c1c; }
.sessions-empty { color: var(--text-subtle); text-align: center; padding: 1rem 0; }

/* ============================================================================
   SMALL RESPONSE COMPONENTS
   ============================================================================ */

.action-result {
  background-color: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 0.375rem;
  margin-bottom: var(--spacing-md);
}

.action-result__link {
  margin-left: 0.5rem;
  text-decoration: underline;
  color: inherit;
}

.payment-approved {
  text-align: center;
  color: #16a34a;
  font-size: var(--text-md);
  padding: var(--spacing-md);
}

.feedback-sent {
  font-size: var(--text-sm);
  color: #16a34a;
}