/* ===================================================================
   VMS Kiosk — Android Kiosk Mode Stylesheet
   Premium glassmorphism LIGHT theme, touch-optimized for tablets
   =================================================================== */

/* ---------- CSS Reset & Custom Properties ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* Core Palette */
  --primary: #0066FF;
  --primary-light: #3d8bff;
  --primary-dark: #0050cc;
  --primary-glow: rgba(0, 102, 255, 0.2);
  --accent: #00C2FF;
  --accent-glow: rgba(0, 194, 255, 0.15);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --danger: #ef4444;
  --warning: #f59e0b;

  /* Light Surfaces */
  --bg-deep: #f0f4f8;
  --bg-base: #f5f7fb;
  --bg-surface: rgba(255, 255, 255, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.55);
  --bg-glass-hover: rgba(255, 255, 255, 0.8);
  --bg-card: rgba(255, 255, 255, 0.65);
  --bg-input: rgba(255, 255, 255, 0.7);

  /* Borders */
  --border-glass: rgba(0, 0, 0, 0.06);
  --border-glass-hover: rgba(0, 102, 255, 0.25);
  --border-input: rgba(0, 0, 0, 0.08);
  --border-input-focus: rgba(0, 102, 255, 0.45);

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-accent: #0066FF;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 60px rgba(0, 102, 255, 0.08);
  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.03);

  /* Spacing — fluid */
  --shell-pad: clamp(0.5rem, 1.5vmin, 1.5rem);
  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --radius-2xl: 2.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.165, 0.84, 0.44, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 200ms;
  --duration-normal: 400ms;
  --duration-slow: 600ms;

  /* Viewport — JS-driven fallback for 100dvh bugs */
  --app-height: 100dvh;

  /* Safe-area insets (notch, rounded corners) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

/* ---------- Base ---------- */
html {
  height: 100%;
  height: -webkit-fill-available;
}

body {
  width: 100%;
  height: 100%;
  height: -webkit-fill-available;
  min-height: var(--app-height, 100dvh);
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(14px, 1.6vmin, 18px);
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

/* ---------- Animated Background ---------- */
.kiosk-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(0, 102, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(0, 194, 255, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, #ffffff 0%, #f5f7fb 100%);
  overflow: hidden;
}

.kiosk-bg::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(0, 102, 255, 0.06) 0%, transparent 70%);
  animation: bgOrb1 20s ease-in-out infinite;
}

.kiosk-bg::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(0, 194, 255, 0.06) 0%, transparent 70%);
  animation: bgOrb2 25s ease-in-out infinite;
}

.bg-orb-3 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40%;
  height: 40%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.04) 0%, transparent 70%);
  animation: bgOrb3 18s ease-in-out infinite;
}

@keyframes bgOrb1 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(10%, 5%) scale(1.1);
  }

  66% {
    transform: translate(-5%, 10%) scale(0.95);
  }
}

@keyframes bgOrb2 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(-8%, -5%) scale(1.15);
  }

  66% {
    transform: translate(5%, -8%) scale(0.9);
  }
}

@keyframes bgOrb3 {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.2);
  }
}

/* ---------- Layout Shell ---------- */
.kiosk-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: var(--app-height, 100dvh);
  width: 100vw;
  padding: var(--shell-pad);
  padding-top: calc(var(--shell-pad) + var(--safe-top));
  padding-bottom: calc(var(--shell-pad) + var(--safe-bottom));
  padding-left: calc(var(--shell-pad) + var(--safe-left));
  padding-right: calc(var(--shell-pad) + var(--safe-right));
  gap: clamp(0.25rem, 0.8vmin, 0.75rem);
  transition: height 0.3s var(--ease-out);
  will-change: height;
  contain: layout style;
}

/* ---------- Top Bar ---------- */
.kiosk-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(0.5rem, 1vmin, 0.875rem) clamp(0.75rem, 1.5vmin, 1.25rem);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.topbar-brand-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px var(--primary-glow);
}

.topbar-brand-icon .material-symbols-outlined {
  font-size: 24px;
  color: #fff;
}

.topbar-brand-logo {
  max-height: 64px;
  width: auto;
  object-fit: contain;
}

.topbar-brand-name {
  font-size: clamp(1rem, 2.5vmin, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.topbar-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  background: rgba(0, 102, 255, 0.06);
  border: 1px solid rgba(0, 102, 255, 0.1);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
}

.topbar-location .material-symbols-outlined {
  font-size: 14px;
  color: var(--primary);
}

.topbar-datetime {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar-dt-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.topbar-dt-item .material-symbols-outlined {
  font-size: 16px;
  color: var(--primary);
}

.topbar-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(0, 0, 0, 0.03);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.topbar-btn:hover,
.topbar-btn:active {
  background: rgba(0, 102, 255, 0.08);
  color: var(--primary);
}

/* ---------- Main Content ---------- */
.kiosk-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: clamp(0.25rem, 0.5vmin, 1rem) 0;
  transition: flex 0.3s var(--ease-out);
}

/* ---------- Screen Transitions ---------- */
.screen {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.screen.active {
  display: flex;
  animation: screenIn var(--duration-normal) var(--ease-out) forwards;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

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

@keyframes screenOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.98);
  }
}

/* ---------- Home Screen ---------- */
.home-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.75rem, 2vmin, 2rem);
  max-width: min(900px, 95vw);
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 100%;
  -webkit-overflow-scrolling: touch;
}

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

.home-greeting h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #0f172a 0%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.home-greeting p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Action Cards Grid */
.home-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.5rem, 1.2vmin, 1.25rem);
  width: 100%;
}

.action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 1vmin, 1rem);
  padding: clamp(1rem, 2.5vmin, 2rem) clamp(0.75rem, 1.5vmin, 1.5rem);
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  box-shadow: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  overflow: hidden;
}

.action-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(0, 102, 255, 0.03) 100%);
  opacity: 0;
  transition: opacity var(--duration-normal) ease;
}

.action-card:hover,
.action-card:active {
  transform: translateY(-4px);
  border-color: var(--border-glass-hover);
  box-shadow: none;
  background: rgba(255, 255, 255, 0.85);
}

.action-card:hover::before,
.action-card:active::before {
  opacity: 1;
}

.action-card.primary-action {
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.06) 0%, rgba(0, 194, 255, 0.04) 100%);
  border-color: rgba(0, 102, 255, 0.12);
}

.action-card.primary-action:hover {
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.1) 0%, rgba(0, 194, 255, 0.06) 100%);
  border-color: rgba(0, 102, 255, 0.25);
  box-shadow: 0 20px 50px rgba(0, 102, 255, 0.1);
}

.action-icon {
  width: clamp(40px, 7vmin, 64px);
  height: clamp(40px, 7vmin, 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  transition: transform var(--duration-normal) var(--ease-spring);
}

.action-card:hover .action-icon,
.action-card:active .action-icon {
  transform: scale(1.12);
}

.action-icon.icon-checkin {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  box-shadow: 0 8px 30px var(--primary-glow);
}

.action-icon.icon-qr {
  background: rgba(0, 102, 255, 0.08);
  border: 2px solid rgba(0, 102, 255, 0.12);
  box-shadow: 0 8px 30px rgba(0, 102, 255, 0.06);
}

.action-icon.icon-checkout {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.12);
}

.action-icon.icon-delivery {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.12);
}

.action-icon .material-symbols-outlined {
  font-size: clamp(20px, 3.5vmin, 32px);
  color: #fff;
}

.action-icon.icon-qr .material-symbols-outlined {
  color: var(--primary);
}

.action-icon.icon-checkout .material-symbols-outlined {
  color: var(--danger);
}

.action-icon.icon-delivery .material-symbols-outlined {
  color: var(--warning);
}

.action-card h3 {
  font-size: clamp(0.85rem, 1.8vmin, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.action-card p {
  font-size: clamp(0.65rem, 1.1vmin, 0.8rem);
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 200px;
  position: relative;
  z-index: 1;
}

/* ---------- Bottom Bar ---------- */
.kiosk-bottombar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  flex-shrink: 0;
}

.bottombar-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.bottombar-pill .material-symbols-outlined {
  font-size: 18px;
  color: var(--primary);
  animation: pulseTouch 2.5s ease-in-out infinite;
}

@keyframes pulseTouch {

  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

/* ---------- Glass Panel (Shared for Forms) ---------- */
.glass-panel {
  width: 100%;
  max-width: min(680px, 95vw);
  max-height: calc(var(--app-height, 100dvh) - 10rem);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-2xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
  padding: clamp(1rem, 2.5vmin, 2rem) clamp(1.25rem, 3vmin, 2.5rem);
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.08) transparent;
  transition: max-height 0.3s var(--ease-out);
}

.glass-panel::-webkit-scrollbar {
  width: 4px;
}

.glass-panel::-webkit-scrollbar-track {
  background: transparent;
}

.glass-panel::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
}

/* ---------- Panel Header ---------- */
.panel-back {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  z-index: 10;
}

.panel-back:hover,
.panel-back:active {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}

.panel-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.panel-header h2 {
  font-size: clamp(1.1rem, 2.5vmin, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.panel-header p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ---------- Progress Dots ---------- */
.progress-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.progress-dot {
  width: 2rem;
  height: 0.375rem;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.08);
  transition: all var(--duration-normal) var(--ease-out);
}

.progress-dot.active {
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.progress-dot.completed {
  background: var(--success);
}

/* ---------- Form Inputs ---------- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  padding-left: 0.25rem;
}

.form-label .required {
  color: var(--danger);
}

.form-input {
  width: 100%;
  height: clamp(40px, 6vmin, 52px);
  padding: 0 1rem;
  font-size: clamp(0.875rem, 1.4vmin, 1rem);
  font-family: inherit;
  font-weight: 500;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--duration-fast) ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.form-input:focus {
  border-color: var(--border-input-focus);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.08), 0 4px 16px rgba(0, 0, 0, 0.04);
  background: rgba(255, 255, 255, 0.9);
}

.form-input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: clamp(40px, 6vmin, 52px);
  padding: 0 clamp(1rem, 2vmin, 1.75rem);
  font-size: clamp(0.875rem, 1.4vmin, 1rem);
  font-family: inherit;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 24px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 8px 32px var(--primary-glow);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-secondary);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.12);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

.btn-dark {
  background: #0f172a;
  color: #fff;
  border: none;
}

.btn-dark:hover {
  background: #1e293b;
}

.btn-full {
  width: 100%;
}

.btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* ---------- Host List ---------- */
.host-search-box {
  position: relative;
  margin-bottom: 1rem;
}

.host-search-box .material-symbols-outlined {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--text-muted);
}

.host-search-box .form-input {
  padding-left: 2.75rem;
}

.host-list {
  max-height: clamp(150px, 25vmin, 220px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-right: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.08) transparent;
}

.host-list::-webkit-scrollbar {
  width: 4px;
}

.host-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
}

.host-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.host-item:hover,
.host-item:active {
  background: rgba(0, 102, 255, 0.04);
  border-color: rgba(0, 102, 255, 0.15);
}

.host-item.selected {
  background: rgba(0, 102, 255, 0.06);
  border-color: rgba(0, 102, 255, 0.25);
  box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.08);
}

.host-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  background: rgba(0, 102, 255, 0.08);
  color: var(--primary);
  flex-shrink: 0;
  transition: all var(--duration-fast) ease;
}

.host-item.selected .host-avatar,
.host-item:hover .host-avatar {
  background: var(--primary);
  color: #fff;
}

.host-info {
  flex: 1;
  text-align: left;
}

.host-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.host-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.host-check {
  font-size: 22px;
  color: transparent;
  transition: color var(--duration-fast) ease;
}

.host-item.selected .host-check {
  color: var(--primary);
}

/* ---------- Checkout Results ---------- */
.checkout-results {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.checkout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) ease;
}

.checkout-row:hover {
  background: rgba(255, 255, 255, 0.8);
}

.checkout-visitor-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.checkout-visitor-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.checkout-visitor-info .checkout-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.btn-checkout-action {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

/* ---------- Success Screen ---------- */
.success-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  max-width: 480px;
}

.success-icon-ring {
  width: clamp(60px, 12vmin, 100px);
  height: clamp(60px, 12vmin, 100px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.1);
  border: 2px solid rgba(16, 185, 129, 0.2);
  box-shadow: 0 0 60px var(--success-glow);
  animation: successPop 0.6s var(--ease-spring) forwards;
}

.success-icon-ring .material-symbols-outlined {
  font-size: clamp(28px, 6vmin, 52px);
  color: var(--success);
}

@keyframes successPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-container h2 {
  font-size: clamp(1.3rem, 3vmin, 2rem);
  font-weight: 800;
  color: var(--text-primary);
}

.success-container p {
  font-size: clamp(0.85rem, 1.5vmin, 1.1rem);
  color: var(--text-secondary);
  line-height: 1.6;
}

.success-countdown {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ---------- QR Scanner Mockup ---------- */
.qr-scanner-area {
  width: 100%;
  max-width: min(280px, 50vmin);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(0, 102, 255, 0.2);
  border-radius: var(--radius-xl);
  background: rgba(0, 102, 255, 0.03);
  margin: 0 auto clamp(0.75rem, 1.5vmin, 1.5rem);
  position: relative;
  overflow: hidden;
}

.qr-scanner-area video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl);
}

.qr-scanner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-scanner-crosshair {
  width: 160px;
  height: 160px;
  border: 3px solid rgba(0, 102, 255, 0.35);
  border-radius: var(--radius-md);
  animation: scanPulse 2s ease-in-out infinite;
}

@keyframes scanPulse {

  0%,
  100% {
    transform: scale(1);
    border-color: rgba(0, 102, 255, 0.25);
  }

  50% {
    transform: scale(1.05);
    border-color: rgba(0, 102, 255, 0.5);
  }
}

.qr-manual-input {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.qr-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin: 0.75rem 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.qr-divider::before,
.qr-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

/* ---------- Empty State ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem;
  text-align: center;
}

.empty-state .material-symbols-outlined {
  font-size: 40px;
  color: var(--text-muted);
  opacity: 0.4;
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Loading Spinner ---------- */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0, 102, 255, 0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-2xl);
  z-index: 50;
}

/* ---------- Toast Notifications ---------- */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  animation: toastIn 0.4s var(--ease-out) forwards;
  min-width: 280px;
}

.toast.success .material-symbols-outlined {
  color: var(--success);
}

.toast.error .material-symbols-outlined {
  color: var(--danger);
}

.toast.warning .material-symbols-outlined {
  color: var(--warning);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

/* ---------- Step Content ---------- */
.step-content {
  display: none;
  opacity: 0;
}

.step-content.active {
  display: block;
  animation: stepFadeIn 0.35s var(--ease-out) forwards;
}

.step-content .form-group,
.step-content .panel-header,
.step-content .step-form-footer {
  transform: translateZ(0);
  /* promote to own compositing layer to avoid repaint jitter */
}

@keyframes stepFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rvBannerIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.step-form-footer {
  padding-top: 1rem;
}

/* ---------- Kiosk Lock Overlay (for settings/pin) ---------- */
.lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px);
}

.lock-overlay.active {
  display: flex;
}

/* ---------- Compact portrait (narrow tablets/phones) ---------- */
@media (max-width: 600px) {
  .topbar-datetime {
    display: none;
  }

  .topbar-location {
    display: none;
  }

  .kiosk-bottombar {
    display: none;
  }

  .action-card p {
    display: none;
  }

  .kiosk-main {
    align-items: flex-start;
    padding-top: 0;
  }

  .screen {
    align-items: flex-start;
  }
}

/* ---------- Short landscape (height-constrained) ---------- */
@media (orientation: landscape) and (max-height: 500px) {
  .kiosk-bottombar {
    display: none;
  }

  .home-greeting p {
    display: none;
  }

  .home-actions {
    grid-template-columns: repeat(4, 1fr);
  }

  .action-card p {
    display: none;
  }

  .glass-panel {
    max-height: calc(var(--app-height, 100dvh) - 6rem);
  }
}

/* ---------- Wide landscape (large tablets/desktop) ---------- */
@media (min-width: 1024px) and (orientation: landscape) {
  .home-actions {
    grid-template-columns: repeat(4, 1fr);
  }

  .home-container {
    max-width: min(1100px, 90vw);
  }

  .glass-panel {
    max-width: min(600px, 50vw);
  }
}

/* ---------- Large screens (kiosk monitors) ---------- */
@media (min-width: 1200px) {
  .home-actions {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Portrait tablets (typical kiosk) ---------- */
@media (orientation: portrait) and (min-height: 800px) {
  .home-container {
    gap: clamp(1.5rem, 3vmin, 3rem);
  }

  .home-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Portrait form stability ---------- */
@media (orientation: portrait) {
  .glass-panel {
    max-height: calc(var(--app-height, 100dvh) - 8rem);
  }

  /* Reduce form spacing so content fits without needing to resize */
  .form-group {
    margin-bottom: 1rem;
  }

  .panel-header {
    margin-bottom: 1rem;
  }

  .panel-header h2 {
    font-size: clamp(1rem, 2.2vmin, 1.5rem);
  }

  /* Prevent step content from causing layout jumps */
  .step-content.active {
    animation-duration: 0.25s;
  }
}

/* ---------- Utilities ---------- */
.hidden {
  display: none !important;
}

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

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

/* ========== Enrollment Screen ========== */
.enrollment-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8edf8 50%, #dbe4f5 100%);
  padding: 2rem;
}

.enrollment-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 2rem;
  padding: 3rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 20px 60px rgba(0, 102, 255, 0.08),
    0 4px 20px rgba(0, 0, 0, 0.04);
  animation: enrollFadeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes enrollFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

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

.enrollment-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 102, 255, 0.25);
}

.enrollment-icon .material-symbols-outlined {
  font-size: 2.2rem;
  color: white;
}

.enrollment-card h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.enrollment-card p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.enrollment-input-group {
  margin-bottom: 1rem;
}

.enrollment-input-group input {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 2px solid var(--border-color, #e2e8f0);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.8);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

.enrollment-input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.12);
}

.enrollment-input-group input::placeholder {
  color: #b0b8c4;
  font-weight: 400;
}

.enrollment-error {
  font-size: 0.85rem;
  color: #ef4444;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.75rem;
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
}

.enrollment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(0, 102, 255, 0.3);
}

.enrollment-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0, 102, 255, 0.4);
}

.enrollment-btn:active {
  transform: translateY(0);
}

.enrollment-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-light);
  font-size: 1rem;
  padding: 1rem;
}

.enrollment-spinner .spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── Enrollment Tabs ── */
.enrollment-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 0.75rem;
  padding: 4px;
  margin-bottom: 1.25rem;
  gap: 4px;
}

.enrollment-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 0.75rem;
  border: none;
  border-radius: 0.6rem;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.enrollment-tab.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.enrollment-tab:not(.active):hover {
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.5);
}

/* ── Enrollment QR Scanner ── */
.enrollment-scanner-area {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 1.25rem;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.enrollment-scanner-area video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.enrollment-scanner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.enrollment-scanner-crosshair {
  width: 60%;
  height: 60%;
  border: 3px solid rgba(255, 255, 255, 0.7);
  border-radius: 1rem;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
  animation: enrollScanPulse 2s ease-in-out infinite;
}

@keyframes enrollScanPulse {

  0%,
  100% {
    border-color: rgba(255, 255, 255, 0.5);
  }

  50% {
    border-color: rgba(0, 200, 120, 0.9);
  }
}