/* ==========================================================================
   Lucky Draw 2026 - Toshiba Crimson & Champagne Gold Luxury Broadcast Theme
   100% Offline Ready (Local Kanit & Prompt via libs/fonts.css)
   ========================================================================== */

#modal-integrity-check.hidden {
  display: none !important;
}

:root {
  --bg-primary: #07090e;
  --bg-secondary: #10141d;
  --bg-card: rgba(16, 20, 30, 0.86);
  --bg-card-hover: rgba(25, 31, 45, 0.94);
  
  /* Toshiba Brand Color Palette (แดงโตชิบา + ทองแชมเปญหรูหรา) */
  --toshiba-red: #e60012;
  --toshiba-red-bright: #ff1a28;
  --toshiba-red-dark: #b8000e;
  --brick-red: #c23616;
  --brick-red-dark: #8c1d07;
  --crimson-red: #990000;
  --toshiba-red-glow: rgba(230, 0, 18, 0.38);
  
  /* Luxury Metallic Accents */
  --silver-100: #f8fafc;
  --silver-300: #cbd5e1;
  --champagne-gold: #f59e0b;
  --champagne-gold-light: #fde047;
  --champagne-gold-glow: rgba(245, 158, 11, 0.32);
  
  /* Borders & Shadows */
  --border-toshiba: rgba(230, 0, 18, 0.45);
  --border-gold-subtle: rgba(245, 158, 11, 0.35);
  --border-glass: rgba(255, 255, 255, 0.09);
  --border-subtle: rgba(230, 0, 18, 0.22);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --shadow-toshiba: 0 12px 38px -6px rgba(0, 0, 0, 0.65), 0 0 32px rgba(230, 0, 18, 0.28);
  --shadow-card: 0 12px 36px -6px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Kanit', 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 50% -10%, rgba(230, 0, 18, 0.32) 0%, transparent 60%),
    radial-gradient(circle at 90% 25%, rgba(194, 54, 22, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 10% 65%, rgba(184, 0, 14, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(18, 22, 31, 0.9) 0%, transparent 100%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Toshiba Corporate Wordmark Tag */
.toshiba-badge {
  font-family: 'Kanit', Arial, sans-serif;
  font-weight: 900;
  letter-spacing: 0.15em;
  background: var(--toshiba-red);
  color: #ffffff;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(230, 0, 18, 0.5);
  display: inline-block;
  line-height: 1;
}

/* Glassmorphism Panels */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 1rem;
  box-shadow: var(--shadow-card);
}

.glass-panel-toshiba {
  background: linear-gradient(135deg, rgba(35, 14, 16, 0.85) 0%, rgba(18, 22, 31, 0.9) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-toshiba);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-toshiba);
}

/* Backwards compatibility for existing class */
.glass-panel-gold {
  background: linear-gradient(135deg, rgba(38, 14, 16, 0.85) 0%, rgba(18, 22, 31, 0.92) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-toshiba);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-toshiba);
}

/* Toshiba Red Gradient Text */
.text-toshiba-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #ff8a80 30%, #e60012 75%, #b8000e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gold-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #ff9e80 30%, #e60012 70%, #ff3d00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-red-gradient {
  background: linear-gradient(135deg, #ffcdd2 0%, #e60012 50%, #8c1d07 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Main Draw Button: Toshiba Brick Red Glossy */
.btn-gold, .btn-toshiba {
  background: linear-gradient(135deg, #ff1a28 0%, #e60012 45%, #c23616 80%, #8c1d07 100%);
  color: #ffffff;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  box-shadow: 0 6px 20px rgba(230, 0, 18, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.btn-gold:hover:not(:disabled), .btn-toshiba:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff3845 0%, #ff1a28 40%, #e60012 75%, #a32205 100%);
  box-shadow: 0 8px 30px rgba(230, 0, 18, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

.btn-gold:active:not(:disabled), .btn-toshiba:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 3px 10px rgba(230, 0, 18, 0.35);
}

.btn-gold:disabled, .btn-toshiba:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.7);
}

/* Red Button */
.btn-red {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #7f1d1d 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.btn-red:hover:not(:disabled) {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
  transform: translateY(-2px);
}

/* Secondary Ghost Button */
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-ghost:hover {
  background: rgba(230, 0, 18, 0.15);
  border-color: rgba(230, 0, 18, 0.4);
  color: #ffffff;
}

/* Stage Spotlight & Toshiba Crimson Glow Animation */
.stage-glow-box {
  position: relative;
  border: 2px solid rgba(230, 0, 18, 0.45);
  box-shadow: 0 0 45px rgba(230, 0, 18, 0.25), inset 0 0 35px rgba(230, 0, 18, 0.08);
  overflow: hidden;
}

.stage-glow-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    transparent, 
    rgba(230, 0, 18, 0.22), 
    transparent 35%
  );
  animation: rotateGlow 8s linear infinite;
  pointer-events: none;
}

@keyframes rotateGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Slot Machine Rolling Text Animation */
@keyframes slotRoll {
  0% { transform: translateY(-20px); opacity: 0.3; filter: blur(3px); }
  50% { transform: translateY(0); opacity: 1; filter: blur(0px); }
  100% { transform: translateY(20px); opacity: 0.3; filter: blur(3px); }
}

.slot-rolling {
  animation: slotRoll 0.08s infinite ease-in-out;
}

.slot-rolling.is-slow-roll {
  animation: none !important;
  filter: none !important;
  transform: translateY(0);
}

/* Winner Card Reveal Animation */
@keyframes winnerReveal {
  0% {
    opacity: 0;
    transform: scale(0.65) rotate(-3deg);
    filter: blur(10px);
  }
  60% {
    transform: scale(1.05) rotate(1deg);
    filter: blur(0px);
  }
  80% {
    transform: scale(0.98) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.winner-animate {
  animation: winnerReveal 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Pulsing Badge with Toshiba Red Glow */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 12px rgba(230, 0, 18, 0.35);
  }
  50% {
    box-shadow: 0 0 28px rgba(230, 0, 18, 0.75);
  }
}

.pulse-glow {
  animation: pulseGlow 2s infinite ease-in-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(18, 22, 31, 0.7);
}
::-webkit-scrollbar-thumb {
  background: rgba(230, 0, 18, 0.35);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(230, 0, 18, 0.65);
}

/* Badge Department Colors */
.badge-dept {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-dept-EXE { background: rgba(168, 85, 247, 0.25); color: #e9d5ff; border: 1px solid rgba(168, 85, 247, 0.4); }
.badge-dept-FIN { background: rgba(59, 130, 246, 0.25); color: #bfdbfe; border: 1px solid rgba(59, 130, 246, 0.4); }
.badge-dept-HRBP { background: rgba(236, 72, 153, 0.25); color: #fbcfe8; border: 1px solid rgba(236, 72, 153, 0.4); }
.badge-dept-SCIS { background: rgba(20, 184, 166, 0.25); color: #99f6e4; border: 1px solid rgba(20, 184, 166, 0.4); }
.badge-dept-MFG { background: rgba(230, 0, 18, 0.22); color: #fca5a5; border: 1px solid rgba(230, 0, 18, 0.45); }
.badge-dept-ENQA { background: rgba(16, 185, 129, 0.25); color: #a7f3d0; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-dept-default { background: rgba(148, 163, 184, 0.25); color: #e2e8f0; border: 1px solid rgba(148, 163, 184, 0.4); }

/* Confetti canvas */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* Card Selection Glow with Toshiba Red */
.prize-card-selected {
  border-color: #e60012 !important;
  background: linear-gradient(135deg, rgba(60, 15, 18, 0.85) 0%, rgba(22, 26, 36, 0.95) 100%) !important;
  box-shadow: 0 0 25px rgba(230, 0, 18, 0.5) !important;
  transform: translateY(-3px);
}

/* Barcode Laser Scanner Animation */
.barcode-scanner-card {
  position: relative;
  z-index: 40;
  overflow: visible;
  border: 2px solid rgba(230, 0, 18, 0.45);
}

.barcode-scanner-card:focus-within {
  z-index: 50;
}

#checkin-feedback-card {
  position: relative;
  z-index: 10;
}

.barcode-laser-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, #ff1a28 20%, #ffffff 50%, #ff1a28 80%, transparent 100%);
  box-shadow: 0 0 15px #e60012, 0 0 25px #ff1a28;
  animation: laserScan 2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes laserScan {
  0% { top: 8%; opacity: 0.8; }
  50% { top: 92%; opacity: 1; }
  100% { top: 8%; opacity: 0.8; }
}

@keyframes checkinPop {
  0% { transform: scale(0.92); opacity: 0; }
  50% { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.checkin-animate {
  animation: checkinPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.scan-recent-row {
  animation: fadeInDown 0.35s ease-out;
}

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

/* Printing Report Styles */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt !important;
  }
  
  header, nav, .no-print, #draw-controls, .tabs-nav, .action-buttons, #confetti-canvas, footer,
  #toast-container, #modal-ui-dialog, .tab-content.hidden, .report-subview.hidden {
    display: none !important;
  }

  main {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .print-expand-table {
    max-height: none !important;
    overflow: visible !important;
  }
  
  .print-only {
    display: block !important;
  }
  
  .glass-panel, .glass-panel-gold, .glass-panel-toshiba {
    background: #fff !important;
    border: none !important;
    box-shadow: none !important;
    color: #000 !important;
    padding: 0 !important;
  }
  
  table {
    width: 100% !important;
    border-collapse: collapse !important;
    color: #000 !important;
    margin-top: 15px;
  }

  thead {
    display: table-header-group !important;
  }

  tr {
    page-break-inside: avoid !important;
  }
  
  th, td {
    border: 1px solid #777 !important;
    padding: 6px 8px !important;
    color: #000 !important;
    font-size: 10pt !important;
  }
  
  th {
    background-color: #f1f5f9 !important;
    font-weight: bold !important;
    text-align: left;
  }

  .badge-dept {
    background: #f1f5f9 !important;
    border: 1px solid #94a3b8 !important;
    color: #0f172a !important;
    font-weight: bold !important;
  }

  .att-badge-in {
    background: #dcfce7 !important;
    border: 1px solid #16a34a !important;
    color: #166534 !important;
    font-weight: bold !important;
  }

  .att-badge-pending {
    background: #f1f5f9 !important;
    border: 1px solid #94a3b8 !important;
    color: #475569 !important;
  }

  .att-badge-won {
    background: #fef3c7 !important;
    border: 1px solid #d97706 !important;
    color: #92400e !important;
    font-weight: bold !important;
  }
  
  .print-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #333;
  }
  
  .signature-section {
    display: flex !important;
    justify-content: space-between;
    margin-top: 50px;
    page-break-inside: avoid;
  }
  
  .signature-box {
    text-align: center;
    width: 28%;
  }
  
  .signature-line {
    border-bottom: 1px dotted #333;
    height: 45px;
    margin-bottom: 8px;
  }
}

/* Prize Showcase Image Glow & Hover */
.prize-photo-glow {
  box-shadow: 0 0 25px rgba(230, 0, 18, 0.4), 0 0 50px rgba(245, 158, 11, 0.2);
  transition: all 0.4s ease;
}

.prize-photo-glow:hover {
  box-shadow: 0 0 35px rgba(230, 0, 18, 0.7), 0 0 70px rgba(245, 158, 11, 0.4);
  transform: scale(1.03);
}

/* ==========================================================================
   Luxury Broadcast Control Deck & Modern UX Components (2026 Pro Upgrade)
   ========================================================================== */

/* Tabular Numbers for Zero-Jitter Live Counters */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Broadcast Control Deck Header */
.broadcast-deck-header {
  background: linear-gradient(180deg, rgba(12, 15, 23, 0.94) 0%, rgba(9, 12, 19, 0.88) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(230, 0, 18, 0.22);
}

/* Segmented KPI Metric Strip */
.kpi-segment-strip {
  display: inline-flex;
  align-items: stretch;
  background: rgba(8, 10, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.85rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 16px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.kpi-segment-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.35rem 0.85rem;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  min-width: 86px;
}

.kpi-segment-item:last-child {
  border-right: none;
}

/* Navigation Tab Pills with Crimson-Gold Active Glow */
.nav-tab-pro {
  position: relative;
  border-radius: 0.75rem 0.75rem 0 0;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.nav-tab-pro.is-active,
.nav-tab-pro.border-\[\#E60012\] {
  background: linear-gradient(180deg, rgba(230, 0, 18, 0.22) 0%, rgba(230, 0, 18, 0.06) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 -4px 18px rgba(230, 0, 18, 0.18);
}

/* Smooth Tab Content Entrance */
@keyframes tabFadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-animate-in {
  animation: tabFadeSlideIn 0.26s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Prize Quota Progress Bar */
.prize-quota-track {
  width: 100%;
  height: 5px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.prize-quota-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #e60012 0%, #f59e0b 65%, #fde047 100%);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.prize-quota-fill.is-complete {
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

/* VIP Check-In Pass Card */
.vip-pass-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.35rem;
  box-shadow: 0 20px 45px -12px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.vip-pass-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 65%;
  height: 100%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.08) 50%, transparent 100%);
  animation: vipPassShimmer 3.8s infinite ease-in-out;
  pointer-events: none;
}

@keyframes vipPassShimmer {
  0% { left: -120%; }
  55%, 100% { left: 160%; }
}

/* Modern Toast Notifications */
@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(36px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(36px) scale(0.95);
  }
}

@keyframes toastProgressShrink {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.toast-item {
  pointer-events: auto;
  min-width: 300px;
  max-width: 430px;
  background: linear-gradient(135deg, rgba(18, 23, 35, 0.96) 0%, rgba(10, 13, 21, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 1rem;
  box-shadow: 0 18px 40px -8px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  animation: toastSlideIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.toast-item.is-leaving {
  animation: toastSlideOut 0.22s ease-in forwards;
}

.toast-progress-bar {
  height: 3px;
  width: 100%;
  transform-origin: left center;
  animation-name: toastProgressShrink;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

/* Custom Glassmorphic UI Dialog Modal */
@keyframes uiDialogPop {
  from {
    opacity: 0;
    transform: scale(0.93) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.ui-dialog-card {
  background: linear-gradient(145deg, rgba(24, 28, 42, 0.97) 0%, rgba(11, 14, 22, 0.99) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 65px -12px rgba(0, 0, 0, 0.85), 0 0 40px rgba(230, 0, 18, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: uiDialogPop 0.22s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ==========================================================================
   Responsive & Multi-Device Enhancements (Mobile, Tablet, Desktop, LED)
   ========================================================================== */

/* Universal Accessible Focus Rings */
:focus-visible {
  outline: 2px solid var(--champagne-gold);
  outline-offset: 2px;
}

/* Mobile Bottom Navigation Bar (< 768px) */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  background: linear-gradient(180deg, rgba(16, 20, 30, 0.96) 0%, rgba(7, 9, 14, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
  padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 767px) {
  body {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  flex: 1;
  padding: 0.25rem 0.2rem;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  transition: all 0.2s ease;
  border-radius: 0.65rem;
  background: transparent;
  border: none;
  cursor: pointer;
}

.mobile-nav-btn svg {
  width: 20px;
  height: 20px;
  margin-bottom: 2px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.mobile-nav-btn.is-active {
  color: #ffffff;
  background: rgba(230, 0, 18, 0.16);
}

.mobile-nav-btn.is-active svg {
  color: #ff4d4d;
  transform: translateY(-1px) scale(1.1);
}

/* Sticky Draw Dock (Floating at bottom of Stage Tab) */
.sticky-draw-dock {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 960px;
  z-index: 35;
  background: linear-gradient(135deg, rgba(20, 24, 38, 0.95) 0%, rgba(10, 12, 19, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 1.25rem;
  padding: 0.65rem 1rem;
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.85), 0 0 25px rgba(230, 0, 18, 0.25);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 767px) {
  .sticky-draw-dock {
    bottom: calc(4.6rem + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 1rem);
    padding: 0.5rem 0.75rem;
    border-radius: 1rem;
  }
}

/* Rehearsal / Demo Mode Banner */
.rehearsal-banner {
  background: linear-gradient(90deg, #b45309 0%, #d97706 50%, #b45309 100%);
  color: #ffffff;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  padding: 0.4rem 1rem;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
}

/* Stage Display Rehearsal Watermark */
.stage-rehearsal-watermark {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 90;
  background: rgba(217, 119, 6, 0.88);
  border: 2px solid #fde047;
  color: #ffffff;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  pointer-events: none;
}

/* Kiosk Fullscreen Mode */
body.kiosk-mode-active {
  overflow: hidden;
}

body.kiosk-mode-active .broadcast-deck-header,
body.kiosk-mode-active .mobile-bottom-nav,
body.kiosk-mode-active footer,
body.kiosk-mode-active #tab-stage,
body.kiosk-mode-active #tab-prizes,
body.kiosk-mode-active #tab-participants,
body.kiosk-mode-active #tab-report,
body.kiosk-mode-active #tab-admin {
  display: none !important;
}

body.kiosk-mode-active #tab-checkin {
  display: block !important;
  max-width: 900px;
  margin: 0 auto;
  min-height: 95vh;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
}

/* Command Palette Backdrop & Styling */
.cmd-palette-backdrop {
  background: rgba(5, 7, 12, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.cmd-palette-box {
  background: linear-gradient(155deg, rgba(22, 27, 40, 0.98) 0%, rgba(10, 13, 20, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.9), 0 0 35px rgba(230, 0, 18, 0.2);
  border-radius: 1.25rem;
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 13px;
  color: var(--text-main);
  transition: all 0.15s ease;
  cursor: pointer;
}

.cmd-item:hover, .cmd-item.is-selected {
  background: rgba(230, 0, 18, 0.2);
  color: #ffffff;
  transform: translateX(3px);
}

/* Admin Subtab Pill Navigation */
.admin-subtab-btn {
  padding: 0.55rem 1.1rem;
  border-radius: 0.75rem;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.admin-subtab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.admin-subtab-btn.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #e60012 0%, #b8000e 100%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(230, 0, 18, 0.4);
}

/* Pre-Show Checklist Items */
.checklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(14, 18, 27, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.85rem;
  transition: all 0.2s ease;
}

.checklist-item:hover {
  border-color: rgba(245, 158, 11, 0.3);
}

/* Responsive Table Helper */
.responsive-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Check-In Name Search High-Contrast Floating Panel */
#checkin-name-search-results {
  background-color: #0b101c !important;
  border: 2px solid rgba(245, 158, 11, 0.85) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(230, 0, 18, 0.25) !important;
  z-index: 999 !important;
}

.search-result-emp-card {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-result-emp-card:hover {
  background-color: rgba(245, 158, 11, 0.12) !important;
}

/* Prefers-reduced-motion Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .stage-particle {
    display: none !important;
  }
}

