/**
 * Kiosk Modern - Component Styles
 * Dark "Mission Control" theme for Trailhead Event Kiosk usher interface
 * 
 * Requires: design-system.css (must be loaded first)
 * 
 * Components:
 * - Page background (animated gradients)
 * - Status bar (glassmorphism, collapsible)
 * - Primary action button (gradient + glow)
 * - Last assignment display
 * - Table cards grid
 * - Metrics panel
 * - Responsive breakpoints
 */

/* ============================================================================
   PAGE LAYOUT & BACKGROUND
   ============================================================================ */

body {
  /* Dark gradient base */
  background: linear-gradient(
    180deg,
    var(--primary-950) 0%,
    var(--primary-900) 100%
  );

  /* Radial glows for depth */
  background-image:
    radial-gradient(
      circle at 20% 30%,
      rgba(99, 102, 241, 0.10) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(6, 182, 212, 0.08) 0%,
      transparent 50%
    ),
    linear-gradient(
      180deg,
      var(--primary-950) 0%,
      var(--primary-900) 100%
    );

  /* Base styles */
  min-height: 100vh;
  color: var(--neutral-50);
  font-family: var(--font-sans);
  margin: 0;
  padding: 0;
}

/* Animated ambient gradient overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(99, 102, 241, 0.05),
    rgba(6, 182, 212, 0.05),
    rgba(16, 185, 129, 0.03),
    rgba(99, 102, 241, 0.05)
  );
  background-size: 400% 400%;
  animation: gradient-ambient 25s ease infinite;
  pointer-events: none;
  z-index: -1;
  opacity: 0.5;
}

.kiosk-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: var(--space-8);
}

/* ============================================================================
   HEADER
   ============================================================================ */

.kiosk-header {
  text-align: center;
  animation: fade-in-up 0.6s var(--ease-out);
}

.kiosk-logo {
  display: block;
  margin: 0 auto var(--space-4);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   STATUS BAR (Top-Left Corner)
   ============================================================================ */

.status-bar {
  /* Position */
  position: fixed;
  top: var(--space-4);
  left: var(--space-4);
  z-index: var(--z-fixed);

  /* Glassmorphism effect */
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);

  /* Shadows */
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  /* Transitions */
  transition: all 0.3s var(--ease-in-out);
  cursor: pointer;
}

/* Collapsed state - just icon */
.status-bar.collapsed {
  width: 56px;
  height: 56px;
  padding: 0;
}

/* Expanded state - icon + text */
.status-bar.expanded {
  width: auto;
  min-width: 280px;
  height: 56px;
  padding: 0 var(--space-4);
}

.status-bar:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow:
    0 6px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Status bar content layout */
.status-bar__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.status-bar__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: all 0.3s var(--ease-in-out);
}

.status-bar.expanded .status-bar__content {
  opacity: 1;
  width: auto;
  margin-left: var(--space-2);
}

.status-bar__text {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--neutral-50);
  line-height: 1.2;
}

.status-bar__time {
  font-size: var(--text-xs);
  color: var(--neutral-400);
  margin-top: 2px;
}

/* Connection state colors with glow */
.status-bar--connected {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow:
    0 0 32px rgba(16, 185, 129, 0.25),
    0 4px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(16, 185, 129, 0.1);
}

.status-bar--connected .status-bar__icon {
  color: var(--status-available);
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.6));
}

.status-bar--disconnected {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow:
    0 0 32px rgba(239, 68, 68, 0.25),
    0 4px 24px rgba(0, 0, 0, 0.4);
  animation: pulse-error 2s ease-in-out infinite;
}

.status-bar--disconnected .status-bar__icon {
  color: var(--status-busy);
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.6));
}

.status-bar--stale {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow:
    0 0 32px rgba(245, 158, 11, 0.25),
    0 4px 24px rgba(0, 0, 0, 0.4);
}

.status-bar--stale .status-bar__icon {
  color: var(--status-pending);
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
}

/* ============================================================================
   MAINTENANCE BANNER
   ============================================================================ */

.maintenance-banner {
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid var(--status-busy);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--neutral-50);
}

.maintenance-banner svg {
  color: var(--status-busy);
  flex-shrink: 0;
}

/* ============================================================================
   PRIMARY ACTION BUTTON ("Assign Next")
   ============================================================================ */

.btn-assign-next {
  /* Size & spacing */
  min-height: 96px;
  padding: var(--space-6) var(--space-12);
  width: 100%;
  max-width: 600px;
  margin: 0 auto var(--space-8);
  display: block;

  /* Typography */
  font-size: var(--text-2xl);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);

  /* Gradient background */
  background: linear-gradient(
    135deg,
    var(--brand-700) 0%,
    var(--brand-600) 25%,
    var(--accent-500) 100%
  );
  background-size: 200% 100%;
  background-position: 0% 0%;

  /* Glass layer */
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: var(--radius-xl);

  /* Glow effect */
  box-shadow:
    0 0 48px rgba(99, 102, 241, 0.4),
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);

  /* Transitions */
  transition: all 0.3s var(--ease-in-out);
  cursor: pointer;
}

/* Shimmer effect layer */
.btn-assign-next::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.6s ease;
}

/* Hover state */
.btn-assign-next:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.01);
  background-position: 100% 0%;
  box-shadow:
    0 0 64px rgba(99, 102, 241, 0.6),
    0 12px 48px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-assign-next:hover::before {
  left: 100%;
}

/* Active/press state */
.btn-assign-next:active:not(:disabled) {
  transform: translateY(-1px) scale(0.99);
  box-shadow:
    0 0 32px rgba(99, 102, 241, 0.5),
    0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Disabled state */
.btn-assign-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow:
    0 0 24px rgba(99, 102, 241, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.3);
  filter: grayscale(0.3);
}

/* ============================================================================
   LAST ASSIGNMENT DISPLAY
   ============================================================================ */

.last-assigned {
  background: linear-gradient(
    135deg,
    rgba(31, 41, 55, 0.8) 0%,
    rgba(17, 24, 39, 0.95) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-8);
}

/* Animated glow background */
.last-assigned::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300%;
  height: 300%;
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.08) 0%,
    transparent 60%
  );
  transform: translate(-50%, -50%);
  animation: pulse-ambient 4s ease-in-out infinite;
  pointer-events: none;
}

.last-assigned-label {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--neutral-400);
  margin-bottom: var(--space-3);
  position: relative;
  z-index: 1;
}

.last-assigned-number {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(
    135deg,
    white 0%,
    var(--accent-400) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Flip animation */
.last-assigned-number.updating {
  animation: flip-number 0.6s ease-in-out;
}

.last-assigned-empty {
  font-size: var(--text-lg);
  color: var(--neutral-500);
  font-style: italic;
  position: relative;
  z-index: 1;
}

/* ============================================================================
   TABLE CARDS GRID
   ============================================================================ */

.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
  padding: var(--space-6);
}

.table-card {
  /* Glass panel */
  background: linear-gradient(
    135deg,
    rgba(49, 46, 129, 0.3) 0%,
    rgba(30, 27, 75, 0.5) 100%
  );
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;

  /* Border with gradient */
  border: 2px solid transparent;
  background-clip: padding-box;

  /* Shadows */
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);

  /* Transitions */
  transition: all 0.3s var(--ease-in-out);
  cursor: pointer;

  /* Staggered entrance animation */
  opacity: 0;
  transform: translateY(30px);
  animation: fade-in-up 0.6s var(--ease-in-out) forwards;
}

/* Staggered animation delays */
.table-card:nth-child(1) { animation-delay: 0.05s; }
.table-card:nth-child(2) { animation-delay: 0.1s; }
.table-card:nth-child(3) { animation-delay: 0.15s; }
.table-card:nth-child(4) { animation-delay: 0.2s; }
.table-card:nth-child(5) { animation-delay: 0.25s; }
.table-card:nth-child(6) { animation-delay: 0.3s; }
.table-card:nth-child(7) { animation-delay: 0.35s; }
.table-card:nth-child(8) { animation-delay: 0.4s; }

/* Gradient border effect */
.table-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(
    135deg,
    var(--border-from),
    var(--border-to)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@supports not ((-webkit-mask-composite: xor) and (-webkit-mask: linear-gradient(#fff 0 0))) {
  .table-card::before {
    display: none;
  }

  .table-card {
    border-color: var(--border-from);
  }
}

/* AVAILABLE STATE - Green glow */
.table-card--available {
  --border-from: rgba(16, 185, 129, 0.6);
  --border-to: rgba(16, 185, 129, 0.2);
  box-shadow:
    0 0 24px rgba(16, 185, 129, 0.2),
    0 4px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(16, 185, 129, 0.1);
}

.table-card--available:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow:
    0 0 40px rgba(16, 185, 129, 0.35),
    0 12px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(16, 185, 129, 0.15);
}

/* PENDING STATE - Animated gradient border */
.table-card--pending {
  --border-from: var(--status-available);
  --border-to: var(--status-pending);
}

.table-card--pending::before {
  background: linear-gradient(
    90deg,
    var(--status-available),
    var(--status-pending),
    var(--status-available)
  );
  background-size: 200% 100%;
  animation: gradient-flow 2.5s ease-in-out infinite;
}

/* BUSY STATE - Red tint, reduced opacity */
.table-card--busy {
  --border-from: rgba(239, 68, 68, 0.3);
  --border-to: rgba(239, 68, 68, 0.1);
  opacity: 0.5;
  cursor: not-allowed;
}

/* OFFLINE STATE - Grayscale, minimal opacity */
.table-card--offline {
  --border-from: rgba(107, 114, 128, 0.3);
  --border-to: rgba(107, 114, 128, 0.1);
  opacity: 0.35;
  filter: grayscale(0.6);
  cursor: not-allowed;
}

/* Card content */
.table-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-5);
}

.table-card__number {
  font-size: var(--text-4xl);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(
    135deg,
    white 0%,
    var(--accent-400) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Main card header - reduce size for more space */
.card__header {
  padding: var(--space-3) var(--space-4);
}

.card__title {
  font-size: var(--text-base);
  gap: var(--space-2);
}

.card__title .icon {
  width: 18px;
  height: 18px;
}

/* Card header - SLDS classes */
.slds-card__header {
  margin-bottom: var(--space-4);
}

.slds-card__header h3 {
  margin: 0;
}

/* Card body */
.slds-card__body {
  padding: 0;
}

/* Table number styling */
.table-number-large {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fff 0%, var(--accent-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  text-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.table-card__badges {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-end;
}

.table-card__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.table-card__badge--available {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--status-available);
}

.table-card__badge--pending {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--status-pending);
}

.table-card__badge--busy {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--status-busy);
}

/* Count badges grid - equal width containers */
.count-badges-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: var(--space-4) 0;
  margin: 0 auto var(--space-2);
  max-width: 360px;
}

.count-badge-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 120px;
  max-width: 160px;
}

/* Count badges - make them much more prominent for kiosk view */
.count-badge-large {
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  margin-bottom: var(--space-3);
  text-align: center;
  width: 100%;
}

.count-badge-container .slds-text-body_small {
  text-align: center;
  width: 100%;
  display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .count-badges-grid {
    gap: 1.5rem;
    max-width: 320px;
  }

  .count-badge-container {
    min-width: 100px;
    max-width: 140px;
  }

  .count-badge-large {
    font-size: 3.5rem;
  }
}

@media (max-width: 480px) {
  .count-badges-grid {
    gap: 1rem;
    max-width: 260px;
  }

  .count-badge-container {
    min-width: 80px;
    max-width: 120px;
  }

  .count-badge-large {
    font-size: 2.5rem;
  }

  .count-badge-container .slds-text-body_small {
    font-size: 0.75rem;
  }
}

/* Grid layout utilities for stats display */
.slds-grid {
  display: flex;
  align-items: center;
}

.slds-grid_align-center {
  justify-content: center;
}

.slds-m-bottom_small {
  margin-bottom: var(--space-6);
}

.slds-m-top_small {
  margin-top: var(--space-4);
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--neutral-400);
}

.slds-text-body_small {
  font-size: var(--text-base);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.slds-text-color_success {
  color: #6ee7b7;
}

.slds-text-color_error {
  color: #c86363;
}

/* Accessibility Icons - Top right corner (icon only) */
.accessibility-icons {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: 10;
  pointer-events: none;
}

.accessibility-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.accessibility-icon svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.accessibility-icon--accessible {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.accessibility-icon--service-animal {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.slds-card:hover .accessibility-icon {
  transform: scale(1.1);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Pending Counter - Bottom row with text */
.table-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  align-items: center;
  margin-top: var(--space-4);
  margin-bottom: 0;
  padding: var(--space-3) var(--space-4) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.feature-badge__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.feature-badge__text {
  line-height: 1;
}

/* Pending badge - amber/warning colors with pulse */
.feature-badge--pending {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fcd34d;
  animation: pulse-feature 2s ease-in-out infinite;
}

.feature-badge--pending .feature-badge__icon {
  color: #fcd34d;
}

@keyframes pulse-feature {
  0%, 100% {
    opacity: 0.95;
    box-shadow:
      0 0 12px rgba(245, 158, 11, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  50% {
    opacity: 1;
    box-shadow:
      0 0 20px rgba(245, 158, 11, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
}

/* Accessible badge - blue/info colors */
.feature-badge--accessible {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  color: #60a5fa;
}

.feature-badge--accessible .feature-badge__icon {
  color: #60a5fa;
}

/* Service animal badge - green/success colors */
.feature-badge--service-animal {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.feature-badge--service-animal .feature-badge__icon {
  color: #34d399;
}

/* Hover effects */
.table-card:hover .feature-badge {
  transform: translateY(-1px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.table-card:hover .feature-badge--pending {
  animation: pulse-feature 1.5s ease-in-out infinite;
}

/* ============================================================================
   METRICS PANEL (Wait Time)
   ============================================================================ */

.metrics-panel {
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.metrics-panel__icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(
    135deg,
    var(--brand-600),
    var(--accent-500)
  );
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.3);
}

.metrics-panel__content {
  flex: 1;
}

.metrics-panel__label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--neutral-400);
  margin-bottom: var(--space-1);
}

.metrics-panel__value {
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(
    135deg,
    white,
    var(--accent-400)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metrics-panel__details {
  font-size: var(--text-sm);
  color: var(--neutral-500);
  margin-top: var(--space-1);
}

/* ============================================================================
   BUTTONS (Secondary actions)
   ============================================================================ */

.button-group {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-6);
  justify-content: center;
}

.btn-secondary {
  padding: var(--space-4) var(--space-6);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px) saturate(150%);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  color: var(--neutral-200);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.3s var(--ease-in-out);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--neutral-50);
  transform: translateY(-2px);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.3),
    0 0 24px rgba(99, 102, 241, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover::before {
  left: 100%;
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-secondary .icon {
  transition: transform 0.3s ease;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .status-bar,
  .last-assigned,
  .table-card,
  .table-card__badge,
  .feature-badge,
  .metrics-panel,
  .btn-secondary {
    background: rgba(15, 23, 42, 0.95);
  }
}

.btn-secondary:hover .icon {
  transform: scale(1.1);
}

/* Table action buttons */
.btn-table-action {
  margin-top: 20px;
  width: 80%;
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%);
  border: 2px solid var(--brand-500);
  border-radius: var(--radius-lg);
  color: white;
  font-size: var(--text-base);
  font-weight: 700;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s var(--ease-in-out);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  box-shadow:
    0 4px 12px rgba(99, 102, 241, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-table-action::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-table-action:hover {
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 100%);
  border-color: var(--brand-400);
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 6px 20px rgba(99, 102, 241, 0.5),
    0 0 32px rgba(99, 102, 241, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-table-action:hover::before {
  width: 300px;
  height: 300px;
}

.btn-table-action:active {
  transform: translateY(0) scale(1);
  box-shadow:
    0 2px 8px rgba(99, 102, 241, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-table-action .icon {
  transition: transform 0.3s ease;
}

.btn-table-action:hover .icon {
  transform: rotate(90deg) scale(1.2);
}

/* Disabled state */
.btn-table-action--disabled,
.btn-table-action:disabled {
  background: rgba(107, 114, 128, 0.2);
  border-color: rgba(107, 114, 128, 0.3);
  color: var(--neutral-400);
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.btn-table-action--disabled:hover,
.btn-table-action:disabled:hover {
  transform: none;
  box-shadow: none;
  background: rgba(107, 114, 128, 0.2);
}

.btn-table-action--disabled::before,
.btn-table-action:disabled::before {
  display: none;
}

.btn-table-action--disabled .icon,
.btn-table-action:disabled .icon {
  opacity: 0.5;
}

.btn-table-action--disabled:hover .icon,
.btn-table-action:disabled:hover .icon {
  transform: none;
}

/* Busy state - uses error/busy colors */
.btn-table-action--busy {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.2) 100%);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fca5a5;
  cursor: not-allowed;
  opacity: 1;
  transform: none;
  box-shadow:
    0 0 16px rgba(239, 68, 68, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-table-action--busy:hover {
  transform: none;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.2) 100%);
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow:
    0 0 16px rgba(239, 68, 68, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-table-action--busy::before {
  display: none;
}

.btn-table-action--busy .icon {
  opacity: 0.8;
}

.btn-table-action--busy:hover .icon {
  transform: none;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 1024px) {
  .kiosk-container {
    padding: var(--space-6);
  }

  .btn-assign-next {
    font-size: var(--text-xl);
    min-height: 80px;
  }

  .tables-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-4);
  }

  .count-badges-grid {
    gap: 1.25rem;
    max-width: 300px;
    padding: var(--space-3) 0;
  }

  .count-badge-container {
    min-width: 90px;
    max-width: 130px;
  }

  .count-badge-large {
    font-size: 3.75rem;
  }
}

@media (max-width: 920px) {
  .count-badges-grid {
    gap: 0.75rem;
    max-width: 240px;
    padding: var(--space-2) var(--space-4);
  }

  .count-badge-container {
    min-width: 70px;
    max-width: 105px;
    flex: 0 1 auto;
  }

  .count-badge-large {
    font-size: 2.75rem;
  }

  .table-card {
    padding: var(--space-5) var(--space-4);
  }

  .count-badge-container .slds-text-body_small {
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .kiosk-container {
    padding: var(--space-4);
  }

  .kiosk-header {
    margin-bottom: var(--space-6);
  }

  .btn-assign-next {
    font-size: var(--text-lg);
    /* min-height: 72px; */
    padding: var(--space-4) var(--space-8);
  }

  .last-assigned {
    padding: var(--space-6);
  }

  .last-assigned-number {
    font-size: 3rem;
  }

  .tables-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    padding: var(--space-4);
  }

  .table-card__number {
    font-size: var(--text-3xl);
  }

  .count-badge-large {
    font-size: 3.5rem;
  }

  .btn-table-action {
    width: 85%;
    font-size: var(--text-sm);
    padding: var(--space-2) var(--space-3);
  }

  .metrics-panel {
    flex-direction: column;
    text-align: center;
  }

  .metrics-panel__value {
    font-size: var(--text-2xl);
  }
}

@media (max-width: 480px) {
  .status-bar {
    top: var(--space-2);
    left: var(--space-2);
  }

  .status-bar.expanded {
    min-width: 240px;
  }

  .btn-assign-next {
    font-size: var(--text-base);
    min-height: 64px;
  }

  .table-card {
    padding: var(--space-4);
  }

  .count-badge-large {
    font-size: 3rem;
  }

  .button-group {
    flex-direction: column;
  }

  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .feature-badge {
    font-size: 0.65rem;
    padding: var(--space-1) var(--space-2);
  }

  .feature-badge__icon {
    width: 16px;
    height: 16px;
  }

  .btn-table-action {
    width: 90%;
    font-size: var(--text-sm);
    padding: var(--space-2) var(--space-3);
  }
}
