/* ==========================================================================
   SISTEM ANTRIAN PSB DIGITAL - MODERN DESIGN SYSTEM & STYLESHEET
   Tema Utama: Hijau & Putih Islami Modern (Prestisius, Elegan & Bersih)
   ========================================================================== */

:root {
  /* Color Palette - Tema Hijau & Putih (Green & White) */
  --bg-light: #f4faf6;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0fdf4;
  --bg-glass-border: rgba(5, 150, 105, 0.16);
  --bg-glass-border-focus: #059669;

  --text-main: #0f291e;          /* High-contrast charcoal with green tint */
  --text-heading: #064e3b;       /* Islamic Deep Forest Green */
  --text-muted: #374151;         /* Crisp readable dark grey */
  --text-dim: #6b7280;

  /* Islamic Emerald Palette */
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-200: #a7f3d0;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-800: #065f46;
  --emerald-900: #064e3b;

  /* Functional Accents */
  --primary: #059669;            /* Vibrant Emerald Green */
  --primary-hover: #047857;      /* Deep Forest Green */
  --accent: #10b981;             /* Mint / Jade */
  --gold: #f59e0b;               /* Gold accent */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-hover: #dc2626;

  /* Jenjang Tingkat Madrasah */
  --color-zonasi: #059669;        /* MA Putra: Emerald */
  --color-zonasi-glow: rgba(5, 150, 105, 0.25);
  --color-prestasi: #047857;      /* MA Putri: Jade / Deep Teal */
  --color-prestasi-glow: rgba(4, 120, 87, 0.25);
  --color-afirmasi: #0d9488;      /* MTs Putra: Sea Green */
  --color-afirmasi-glow: rgba(13, 148, 136, 0.25);
  --color-mutasi: #15803d;        /* MTs Putri: Forest Green */
  --color-mutasi-glow: rgba(21, 128, 61, 0.25);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows for White & Green Theme */
  --shadow-sm: 0 2px 8px rgba(5, 150, 105, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 20px -2px rgba(5, 150, 105, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 18px 32px -4px rgba(5, 150, 105, 0.12), 0 8px 16px -4px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.28);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   ATURAN TEMA HIJAU & PUTIH (GREEN & WHITE)
   ========================================================================== */
body.theme-green-white,
body {
  font-family: var(--font-sans);
  background-color: #f4faf6;
  background-image: 
    radial-gradient(circle at 12% 10%, rgba(16, 185, 129, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 88% 85%, rgba(5, 150, 105, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, #ffffff 0%, #f0fdf4 100%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Glassmorphism Card in Green & White */
body.theme-green-white .glass-card,
body.theme-green-white .card-glass {
  background: #ffffff !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(5, 150, 105, 0.14) !important;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px -5px rgba(5, 150, 105, 0.07), 0 4px 10px rgba(0, 0, 0, 0.03);
  transition: var(--transition);
}

body.theme-green-white .glass-card:hover {
  border-color: rgba(5, 150, 105, 0.32) !important;
  box-shadow: 0 14px 34px -4px rgba(5, 150, 105, 0.12);
}

/* Navbar */
body.theme-green-white .navbar {
  background: rgba(255, 255, 255, 0.94) !important;
  border-bottom: 1px solid rgba(5, 150, 105, 0.15) !important;
  box-shadow: 0 4px 20px -2px rgba(5, 150, 105, 0.06);
}

body.theme-green-white .brand-logo-icon {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
  color: #ffffff;
}

body.theme-green-white .brand-title {
  color: #064e3b !important;
}

body.theme-green-white .brand-title span {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

body.theme-green-white .brand-subtitle {
  color: #047857 !important;
}

body.theme-green-white .nav-tabs {
  background: #f0fdf4 !important;
  border: 1px solid rgba(5, 150, 105, 0.18) !important;
}

body.theme-green-white .tab-btn {
  color: #374151 !important;
}

body.theme-green-white .tab-btn:hover {
  color: #065f46 !important;
  background: rgba(5, 150, 105, 0.08) !important;
}

body.theme-green-white .tab-btn.active {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 12px rgba(5, 150, 105, 0.35) !important;
  border: none !important;
}

body.theme-green-white .db-status-badge {
  background: #ecfdf5 !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  color: #047857 !important;
}

body.theme-green-white .action-portal-btn {
  background: #ecfdf5 !important;
  border: 1.5px solid #a7f3d0 !important;
  color: #047857 !important;
}

body.theme-green-white .action-portal-btn:hover {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: #ffffff !important;
  border-color: #059669 !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}

body.theme-green-white .action-icon-btn {
  background: #ffffff !important;
  border: 1px solid rgba(5, 150, 105, 0.2) !important;
  color: #065f46 !important;
}

body.theme-green-white .action-icon-btn:hover {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border-color: #059669 !important;
}

body.theme-green-white .digital-clock {
  border-left-color: rgba(5, 150, 105, 0.2) !important;
}

body.theme-green-white .clock-time {
  color: #064e3b !important;
}

body.theme-green-white .clock-date {
  color: #047857 !important;
}

/* Kiosk Hero */
body.theme-green-white .kiosk-hero-badge {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #047857 !important;
}

body.theme-green-white .kiosk-title {
  background: linear-gradient(135deg, #064e3b 30%, #059669) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

body.theme-green-white .kiosk-desc {
  color: #374151 !important;
}

body.theme-green-white .card-header {
  border-bottom: 1px solid rgba(5, 150, 105, 0.12) !important;
}

body.theme-green-white .card-header-icon {
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
}

body.theme-green-white .card-title {
  color: #064e3b !important;
}

body.theme-green-white .card-subtitle {
  color: #4b5563 !important;
}

body.theme-green-white .form-group label {
  color: #064e3b !important;
}

body.theme-green-white .input-icon {
  color: #059669 !important;
}

body.theme-green-white .input-wrap input,
body.theme-green-white .custom-select,
body.theme-green-white .custom-input {
  background: #fcfdfd !important;
  border: 1.5px solid #d1fae5 !important;
  color: #0f291e !important;
}

body.theme-green-white .input-wrap input:focus,
body.theme-green-white .custom-select:focus,
body.theme-green-white .custom-input:focus {
  border-color: #059669 !important;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15) !important;
  background: #ffffff !important;
}

body.theme-green-white .input-wrap input::placeholder {
  color: #9ca3af !important;
}

/* Category Selection */
body.theme-green-white .cat-content {
  background: #ffffff !important;
  border: 1.5px solid #d1fae5 !important;
}

body.theme-green-white .category-card:hover .cat-content {
  border-color: #059669 !important;
  background: #f0fdf4 !important;
}

body.theme-green-white .category-card input[type="radio"]:checked + .cat-content {
  border-color: #059669 !important;
  background: #ecfdf5 !important;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.15) !important;
}

body.theme-green-white .cat-name {
  color: #064e3b !important;
}

body.theme-green-white .cat-sub {
  color: #4b5563 !important;
}

body.theme-green-white .cat-badge {
  background: #f0fdf4 !important;
  color: #047857 !important;
  border: 1px solid #d1fae5 !important;
}

/* Primary Button */
body.theme-green-white .btn-primary {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35) !important;
}

body.theme-green-white .btn-primary:hover {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45) !important;
}

/* Mini Stats & Guide */
body.theme-green-white .mini-title,
body.theme-green-white .guide-title,
body.theme-green-white .panel-section-title {
  color: #064e3b !important;
}

body.theme-green-white .mini-stat-item {
  background: #f0fdf4 !important;
  border: 1px solid #d1fae5 !important;
}

body.theme-green-white .mini-val {
  color: #064e3b !important;
}

body.theme-green-white .mini-est-box {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #047857 !important;
}

body.theme-green-white .guide-list strong {
  color: #064e3b !important;
}

body.theme-green-white .guide-list p {
  color: #4b5563 !important;
}

/* TV Display View */
body.theme-green-white .display-banner {
  background: #ffffff !important;
  border: 1px solid rgba(5, 150, 105, 0.16) !important;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.05) !important;
}

body.theme-green-white .display-headline {
  color: #064e3b !important;
}

body.theme-green-white .display-subheadline {
  color: #4b5563 !important;
}

body.theme-green-white .display-sound-indicator {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}

/* Featured Calling Spotlight (Rich Islamic Emerald Gradient with Gold / White) */
body.theme-green-white .calling-spotlight {
  background: linear-gradient(145deg, #064e3b 0%, #047857 55%, #059669 100%) !important;
  border: 2px solid #a7f3d0 !important;
  box-shadow: 0 16px 40px rgba(5, 150, 105, 0.35) !important;
}

body.theme-green-white .spotlight-prefix-title {
  color: #a7f3d0 !important;
}

body.theme-green-white .spotlight-number {
  color: #ffffff !important;
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.6) !important;
}

body.theme-green-white .spotlight-name {
  color: #f0fdf4 !important;
}

body.theme-green-white .spotlight-counter {
  background: linear-gradient(135deg, #ffffff, #fef08a) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

body.theme-green-white .spotlight-category {
  color: #d1fae5 !important;
}

/* TV Video Card in Green-White Theme */
body.theme-green-white .tv-video-card {
  background: #ffffff !important;
  border: 1px solid #d1fae5 !important;
  box-shadow: 0 16px 40px rgba(5, 150, 105, 0.12) !important;
}

body.theme-green-white .tv-video-badge {
  color: #065f46 !important;
}

body.theme-green-white .tv-video-tag {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}

body.theme-green-white .tv-video-mode-pill {
  background: #f0fdf4 !important;
  color: #047857 !important;
  border-color: #a7f3d0 !important;
}

body.theme-green-white .tv-video-mode-pill.mode-playlist {
  background: #ecfdf5 !important;
  color: #059669 !important;
  border-color: #6ee7b7 !important;
}

body.theme-green-white .tv-video-counter-pill {
  background: #fffbeb !important;
  color: #d97706 !important;
  border-color: #fde68a !important;
}

body.theme-green-white .tv-video-controls-overlay {
  background: rgba(6, 78, 59, 0.88) !important;
  border-color: rgba(167, 243, 208, 0.3) !important;
}

body.theme-green-white .tv-video-empty-state .empty-video-title {
  color: #1f2937 !important;
}

body.theme-green-white .tv-video-empty-state .empty-video-sub {
  color: #6b7280 !important;
}

/* TV Counters Grid */
body.theme-green-white .counter-card {
  background: #ffffff !important;
  border: 1px solid #d1fae5;
  box-shadow: 0 8px 24px -2px rgba(5, 150, 105, 0.08) !important;
}

body.theme-green-white .counter-name {
  color: #064e3b !important;
}

body.theme-green-white .counter-main {
  background: #f0fdf4 !important;
  border: 1px solid #d1fae5 !important;
}

body.theme-green-white .counter-num-label {
  color: #047857 !important;
}

body.theme-green-white .counter-active-num {
  color: #064e3b !important;
}

body.theme-green-white .counter-student-name {
  color: #1f2937 !important;
}

body.theme-green-white .badge-idle {
  background: #f3f4f6 !important;
  color: #4b5563 !important;
}

body.theme-green-white .badge-serving {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}

body.theme-green-white .pill-none {
  background: #f3f4f6 !important;
  color: #4b5563 !important;
  border: 1px solid #d1d5db !important;
}

body.theme-green-white .pill-ma_putra,
body.theme-green-white .pill-maputra {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}

body.theme-green-white .pill-ma_putri,
body.theme-green-white .pill-maputri {
  background: #fdf2f8 !important;
  color: #be185d !important;
  border: 1px solid #fbcfe8 !important;
}

body.theme-green-white .pill-mts_putra,
body.theme-green-white .pill-mtsputra {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}

body.theme-green-white .pill-mts_putri,
body.theme-green-white .pill-mtsputri {
  background: #f5f3ff !important;
  color: #6d28d9 !important;
  border: 1px solid #ddd6fe !important;
}

body.theme-green-white .pill-mi {
  background: #fffbeb !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
}

/* Next Queue Strip */
body.theme-green-white .next-queue-strip {
  background: #ffffff !important;
  border: 1px solid rgba(5, 150, 105, 0.15) !important;
}

body.theme-green-white .next-queue-title {
  color: #064e3b !important;
}

body.theme-green-white .queue-chip {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
}

body.theme-green-white .chip-num {
  color: #059669 !important;
}

body.theme-green-white .chip-name {
  color: #1f2937 !important;
}

/* Marquee Running Text */
body.theme-green-white .display-marquee-container {
  background: #ffffff !important;
  border: 1px solid rgba(5, 150, 105, 0.16) !important;
  border-top: 2.5px solid #059669 !important;
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.06);
}

body.theme-green-white .marquee-badge {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: #ffffff !important;
}

body.theme-green-white .marquee-text {
  color: #1f2937 !important;
}

/* Operator Loket Panel */
body.theme-green-white .active-call-box {
  background: #ffffff !important;
  border: 1.5px solid #a7f3d0 !important;
}

body.theme-green-white .call-number-huge {
  background: #f0fdf4 !important;
  border: 2px solid #059669 !important;
  color: #064e3b !important;
  box-shadow: 0 4px 18px rgba(5, 150, 105, 0.2);
}

body.theme-green-white .call-student-name {
  color: #064e3b !important;
}

body.theme-green-white .meta-tag {
  background: #f0fdf4 !important;
  border: 1px solid #d1fae5 !important;
  color: #047857 !important;
}

body.theme-green-white .check-item {
  background: #ffffff !important;
  border: 1px solid #d1fae5 !important;
  color: #0f291e !important;
}

body.theme-green-white .check-item:hover {
  background: #f0fdf4 !important;
  border-color: #059669 !important;
}

body.theme-green-white .stat-mini {
  background: #f0fdf4 !important;
  border: 1px solid #d1fae5 !important;
}

body.theme-green-white .stat-mini .num-large {
  color: #064e3b !important;
}

/* Rekap Data & Statistics */
body.theme-green-white .metric-card {
  background: #ffffff !important;
  border: 1px solid rgba(5, 150, 105, 0.15) !important;
}

body.theme-green-white .metric-title {
  color: #4b5563 !important;
}

body.theme-green-white .metric-number {
  color: #064e3b !important;
}

body.theme-green-white .cat-stat-card {
  background: #ffffff !important;
  border: 1px solid #d1fae5 !important;
}

body.theme-green-white .cat-stat-count {
  color: #064e3b !important;
}

body.theme-green-white .data-management-card {
  background: #ffffff !important;
  border: 1px solid rgba(5, 150, 105, 0.15) !important;
}

body.theme-green-white .data-search-box input {
  background: #fcfdfd !important;
  border: 1.5px solid #d1fae5 !important;
  color: #0f291e !important;
}

body.theme-green-white .filter-dropdown {
  background: #ffffff !important;
  border: 1.5px solid #d1fae5 !important;
  color: #0f291e !important;
}

body.theme-green-white .data-table thead tr {
  background: #f0fdf4 !important;
  color: #064e3b !important;
}

body.theme-green-white .data-table thead th {
  color: #064e3b !important;
  border-bottom: 1.5px solid #a7f3d0 !important;
}

body.theme-green-white .data-table tbody td {
  border-bottom: 1px solid #ecfdf5 !important;
  color: #1f2937 !important;
}

body.theme-green-white .data-table tbody tr:hover {
  background: #f0fdf4 !important;
}

/* Mobile Fixed Bottom Navigation Bar (Green & White) */
@media (max-width: 768px) {
  body.theme-green-white .nav-tabs {
    background: rgba(255, 255, 255, 0.96) !important;
    border-top: 1.5px solid rgba(5, 150, 105, 0.18) !important;
    box-shadow: 0 -4px 20px rgba(5, 150, 105, 0.08) !important;
  }

  body.theme-green-white .tab-btn {
    color: #4b5563 !important;
  }

  body.theme-green-white .tab-btn.active {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.15) !important;
  }
}


/* CSS Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.5) 0%, transparent 100%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Typography Helpers */
.text-warning { color: var(--warning) !important; }
.text-accent { color: var(--accent) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-center { text-align: center; }

/* Custom Glassmorphism Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2rem;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bg-glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.brand-logo-icon.has-custom-img {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
  display: block;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.1;
  color: #fff;
}

.brand-title span {
  background: linear-gradient(135deg, #60a5fa, #00f2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.6px;
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  gap: 4px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  transition: var(--transition);
  position: relative;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(6, 182, 212, 0.25));
  color: #fff;
  border: 1px solid rgba(59, 130, 246, 0.5);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.25);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.live-dot {
  width: 6px;
  height: 6px;
  background-color: #ef4444;
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.action-portal-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.action-portal-btn:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(139, 92, 246, 0.35));
  color: #fff;
  border-color: #60a5fa;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.db-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  letter-spacing: 0.3px;
  transition: var(--transition);
  cursor: default;
}

.db-status-badge.offline {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.db-status-badge .db-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 1.5s infinite;
}

.db-status-badge.offline .db-dot {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.action-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-glass-border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.action-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.action-icon-btn.active-sound {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.1);
}

/* Digital Clock */
.digital-clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  border-left: 1px solid var(--bg-glass-border);
  padding-left: 1rem;
}

.clock-time {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 1px;
}

.clock-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   MAIN CONTAINER & PANELS
   ========================================================================== */
.main-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.75rem 2rem 3rem 2rem;
  position: relative;
}

.view-panel {
  display: none;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   BUTTONS & INPUTS
   ========================================================================== */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid var(--bg-glass-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-danger-ghost {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger-ghost:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

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

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  pointer-events: none;
  transition: var(--transition);
}

.input-wrap input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  transition: var(--transition);
}

.input-wrap input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background: rgba(15, 23, 42, 0.9);
}

.input-wrap input:focus + .input-icon,
.input-wrap input:focus ~ .input-icon {
  color: var(--primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ==========================================================================
   VIEW 1: KIOSK PENDAFTARAN & AMBIL TIKET
   ========================================================================== */
.kiosk-hero {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2rem auto;
}

.kiosk-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 30px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  margin-bottom: 0.85rem;
}

.kiosk-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 0.6rem;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.kiosk-desc {
  font-size: 1rem;
  color: var(--text-muted);
}

.kiosk-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.75rem;
  align-items: start;
}

.form-card {
  padding: 2rem;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--bg-glass-border);
}

.card-header-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.card-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Category Cards Selector */
.category-selection {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.category-card {
  display: block;
  cursor: pointer;
  position: relative;
}

.category-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cat-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.15rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1.5px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.category-card:hover .cat-content {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.7);
  transform: translateX(4px);
}

.category-card input[type="radio"]:checked + .cat-content {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.2);
}

.cat-code {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-zonasi);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px var(--color-zonasi-glow);
}

.cat-code.cat-b {
  background: var(--color-prestasi);
  box-shadow: 0 4px 10px var(--color-prestasi-glow);
}

.cat-code.cat-c {
  background: var(--color-afirmasi);
  box-shadow: 0 4px 10px var(--color-afirmasi-glow);
}

.cat-code.cat-d {
  background: var(--color-mutasi);
  box-shadow: 0 4px 10px var(--color-mutasi-glow);
}

.cat-info {
  flex-grow: 1;
}

.cat-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.cat-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cat-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  white-space: nowrap;
}

.btn-submit-ticket {
  width: 100%;
  margin-top: 1.5rem;
  padding: 1rem;
  font-size: 1.05rem;
}

/* Kiosk Sidebar */
.kiosk-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.status-mini-card {
  padding: 1.5rem;
}

.mini-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
}

.mini-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.mini-stat-item {
  background: rgba(15, 23, 42, 0.5);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-glass-border);
  display: flex;
  flex-direction: column;
}

.mini-stat-item.highlight {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.05);
}

.mini-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.mini-val {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
}

.mini-est-box {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(59, 130, 246, 0.08);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
  color: #93c5fd;
}

/* Guide Card */
.guide-card {
  padding: 1.5rem;
}

.guide-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.guide-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.guide-list li {
  display: flex;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.guide-bullet {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.guide-list strong {
  display: block;
  color: #fff;
  font-size: 0.875rem;
}

.guide-list p {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.guide-note {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  background: rgba(245, 158, 11, 0.08);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.2);
  font-size: 0.78rem;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ==========================================================================
   VIEW 2: DISPLAY LAYAR BESAR / TV RUANG TUNGGU
   ========================================================================== */
.display-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.display-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.75rem;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-glass-border);
}

.display-banner-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.pulse-indicator {
  position: relative;
  width: 18px;
  height: 18px;
}

.ping-center {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  background-color: #10b981;
  border-radius: 50%;
}

.ping-wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  background-color: #10b981;
  border-radius: 50%;
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.display-headline {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
}

.display-subheadline {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.display-sound-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Dual Hero Section (Spotlight & 16:9 Video) */
.display-hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .display-hero-section {
    grid-template-columns: 1fr;
  }
}

/* Featured Spotlight */
.calling-spotlight {
  padding: 2rem;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.35), rgba(17, 24, 39, 0.95));
  border: 2px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.25);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: var(--radius-lg);
}

.calling-spotlight.highlight-pulse {
  animation: spotlightPulse 2s ease;
  border-color: #38bdf8;
  box-shadow: 0 0 60px rgba(56, 189, 248, 0.6);
}

@keyframes spotlightPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.015); border-color: #00f2fe; }
  100% { transform: scale(1); }
}

.spotlight-badge {
  position: absolute;
  top: 1.25rem;
  left: 2rem;
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4);
}

.spotlight-body {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 1.5rem;
  text-align: center;
  gap: 1rem;
}

.spotlight-number-wrap, .spotlight-target-wrap {
  flex: 1;
}

.spotlight-prefix-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #93c5fd;
  text-transform: uppercase;
}

.spotlight-number {
  font-family: var(--font-mono);
  font-size: clamp(3.5rem, 4.8vw, 5.5rem);
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  margin: 0.25rem 0;
  text-shadow: 0 0 35px rgba(255, 255, 255, 0.4);
  letter-spacing: 2px;
}

.spotlight-name {
  font-size: clamp(1rem, 1.3vw, 1.3rem);
  font-weight: 700;
  color: #e2e8f0;
}

.spotlight-divider {
  width: 2px;
  height: 120px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.25), transparent);
}

.spotlight-counter {
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 3.8vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0.25rem 0;
  letter-spacing: 1px;
}

.spotlight-category {
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  font-weight: 600;
  color: #94a3b8;
}

/* 16:9 TV Video Card */
.tv-video-card {
  padding: 1.25rem;
  background: rgba(18, 24, 38, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tv-video-badge-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tv-video-badge-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tv-video-badge-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tv-video-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #38bdf8;
}

.tv-video-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tv-video-mode-pill.mode-playlist {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.tv-video-counter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.22rem 0.65rem;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 20px;
}

.tv-video-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
}

.tv-live-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  animation: pulseLive 1.5s infinite;
}

@keyframes pulseLive {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.tv-video-wrapper-16-9 {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #090d16;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.6);
}

.tv-video-wrapper-16-9:hover .tv-video-controls-overlay {
  opacity: 1;
  transform: translateY(0);
}

.tv-video-iframe,
.tv-video-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* Floating Mini Controls Overlay */
.tv-video-controls-overlay {
  position: absolute;
  bottom: 0.6rem;
  left: 0.6rem;
  right: 0.6rem;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.45rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.tv-video-info-strip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
}

.tv-video-source-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: rgba(5, 150, 105, 0.35);
  color: #6ee7b7;
  white-space: nowrap;
  border: 1px solid rgba(5, 150, 105, 0.4);
}

.tv-video-title-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.tv-video-btn-cluster {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.btn-tv-ctrl {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-tv-ctrl:hover {
  background: #059669;
  border-color: #10b981;
  color: #ffffff;
  transform: scale(1.08);
}

.tv-video-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  color: #94a3b8;
  gap: 0.4rem;
  z-index: 2;
}

.tv-video-empty-state .empty-video-icon {
  font-size: 3rem;
  color: #059669;
  opacity: 0.85;
}

.tv-video-empty-state .empty-video-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
}

.tv-video-empty-state .empty-video-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  max-width: 320px;
  line-height: 1.4;
}

/* Counters Grid */
.counters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.counter-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  border-top: 4px solid #3b82f6;
  position: relative;
  background: rgba(18, 24, 38, 0.85);
}

.counter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.counter-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.counter-category-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
}

.pill-none { background: rgba(107, 114, 128, 0.2); color: #9ca3af; border: 1px solid rgba(156, 163, 175, 0.3); }
.pill-ma_putra, .pill-maputra { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.pill-ma_putri, .pill-maputri { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.pill-mts_putra, .pill-mtsputra { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.pill-mts_putri, .pill-mtsputri { background: rgba(139, 92, 246, 0.2); color: #c084fc; }
.pill-mi { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.pill-zonasi { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.pill-prestasi { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.pill-afirmasi { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.pill-mutasi { background: rgba(139, 92, 246, 0.2); color: #c084fc; }

.counter-main {
  text-align: center;
  padding: 1rem 0;
  background: rgba(15, 23, 42, 0.45);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.counter-num-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.counter-active-num {
  font-family: var(--font-mono);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  letter-spacing: 1px;
  margin: 0.25rem 0;
}

.counter-student-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.5rem;
}

.counter-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.counter-status-badge {
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  font-weight: 600;
}

.badge-idle { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }
.badge-serving { background: rgba(16, 185, 129, 0.2); color: #34d399; }

.counter-operator-name {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Next Queue Strip */
.next-queue-strip {
  padding: 1.15rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.next-queue-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #93c5fd;
  white-space: nowrap;
}

.next-queue-chips {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow-x: auto;
  flex-grow: 1;
  padding: 0.25rem 0;
}

.queue-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.9rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--bg-glass-border);
  border-radius: 30px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.chip-num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #38bdf8;
}

.chip-name {
  color: #e2e8f0;
}

.empty-hint {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-style: italic;
}

/* Running Marquee */
.display-marquee-container {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 48px;
}

.marquee-badge {
  background: #3b82f6;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  z-index: 2;
}

.marquee-scroll-area {
  flex-grow: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.marquee-text {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 500;
  color: #cbd5e1;
  padding-left: 100%;
  animation: marquee 35s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ==========================================================================
   VIEW 3: PANEL PETUGAS / OPERATOR LOKET
   ========================================================================== */
.operator-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.75rem;
  align-items: start;
}

.operator-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.operator-config-card {
  padding: 1.5rem;
}

.panel-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
}

.custom-select, .custom-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: var(--transition);
}

.custom-select:focus, .custom-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.counter-mode-badge {
  margin-top: 1rem;
  padding: 0.65rem 0.85rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: #93c5fd;
}

.separator {
  border: 0;
  height: 1px;
  background: var(--bg-glass-border);
  margin: 1.25rem 0;
}

.loket-quick-stats {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.stat-mini {
  background: rgba(15, 23, 42, 0.4);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-mini .subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.stat-mini .num-large {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
}

.shortcut-card {
  padding: 1.25rem;
}

.shortcut-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shortcut-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.shortcut-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
}

kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #fff;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}

/* Operator Main */
.operator-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.active-call-box {
  padding: 2rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.call-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.call-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #34d399;
}

.status-pulse-dot {
  width: 10px;
  height: 10px;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.current-counter-tag {
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.35rem 0.85rem;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.call-hero-area {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--bg-glass-border);
  margin-bottom: 1.75rem;
}

.call-number-huge {
  font-family: var(--font-mono);
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  padding: 1.25rem 2rem;
  background: rgba(15, 23, 42, 0.7);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.3);
}

.call-student-details {
  flex-grow: 1;
}

.call-student-name {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: #fff;
}

.call-student-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.meta-tag {
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-glass-border);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

/* Operator Toolbar */
.operator-actions-toolbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.btn-call-next {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-call-next:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  transform: translateY(-2px);
}

.btn-recall {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-recall:hover {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  transform: translateY(-2px);
}

.btn-finish {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid var(--bg-glass-border);
}

.btn-finish:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
}

.btn-skip {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-skip:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
}

/* Document Checklist */
.doc-checklist-card {
  padding: 1.75rem;
}

.checklist-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  transition: var(--transition);
  user-select: none;
}

.check-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.8);
}

.custom-chk {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.chk-box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--text-dim);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.custom-chk:checked + .chk-box {
  background: #10b981;
  border-color: #10b981;
}

.custom-chk:checked + .chk-box::after {
  content: '✓';
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}

.chk-label {
  font-size: 0.85rem;
  color: #cbd5e1;
}

.officer-notes-wrap label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.officer-notes-wrap input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.875rem;
}

.officer-notes-wrap input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Operator Waiting Queue Table */
.table-card {
  padding: 1.5rem;
}

.table-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.counter-queue-count {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.data-table th {
  padding: 0.85rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--bg-glass-border);
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.ticket-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  display: inline-block;
}

.btn-table-action {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--bg-glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
}

.btn-table-action:hover {
  background: var(--primary);
  border-color: var(--primary);
}

/* ==========================================================================
   VIEW 4: DASHBOARD ADMIN & REKAP PSB
   ========================================================================== */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.metric-card {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.metric-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.metric-icon-wrap.blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.metric-icon-wrap.yellow { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.metric-icon-wrap.cyan { background: rgba(6, 182, 212, 0.15); color: #38bdf8; }
.metric-icon-wrap.green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.metric-icon-wrap.red { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.metric-info {
  display: flex;
  flex-direction: column;
}

.metric-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.metric-number {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  margin: 0.15rem 0;
}

.metric-trend {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Category Breakdown Row */
.category-breakdown-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.cat-stat-card {
  padding: 1.25rem;
}

.cat-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.cat-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.cat-pill.ma_putra, .cat-pill.maputra { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.cat-pill.ma_putri, .cat-pill.maputri { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.cat-pill.mts_putra, .cat-pill.mtsputra { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.cat-pill.mts_putri, .cat-pill.mtsputri { background: rgba(139, 92, 246, 0.2); color: #c084fc; }
.cat-pill.mi { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.cat-pill.zonasi { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.cat-pill.prestasi { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.cat-pill.afirmasi { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.cat-pill.mutasi { background: rgba(139, 92, 246, 0.2); color: #c084fc; }
.cat-pill.none { background: rgba(156, 163, 175, 0.2); color: #9ca3af; }

.cat-percent {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.cat-stat-count {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s ease;
}

.fill-ma_putra, .fill-maputra { background: #3b82f6; }
.fill-ma_putri, .fill-maputri { background: #ec4899; }
.fill-mts_putra, .fill-mtsputra { background: #10b981; }
.fill-mts_putri, .fill-mtsputri { background: #8b5cf6; }
.fill-mi { background: #f59e0b; }
.fill-zonasi { background: #3b82f6; }
.fill-prestasi { background: #ec4899; }
.fill-afirmasi { background: #10b981; }
.fill-mutasi { background: #8b5cf6; }

/* Data Management & Master Table */
.data-management-card {
  padding: 1.5rem;
}

.data-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.data-search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 320px;
}

.data-search-box i {
  position: absolute;
  left: 1rem;
  color: var(--text-dim);
}

.data-search-box input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.875rem;
}

.data-search-box input:focus {
  outline: none;
  border-color: var(--primary);
}

.data-filters {
  display: flex;
  gap: 0.75rem;
}

.filter-dropdown {
  padding: 0.7rem 1rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  color: #cbd5e1;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  cursor: pointer;
}

.filter-dropdown:focus {
  outline: none;
  border-color: var(--primary);
}

.data-action-buttons {
  display: flex;
  gap: 0.65rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-waiting { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.status-serving { background: rgba(6, 182, 212, 0.15); color: #38bdf8; border: 1px solid rgba(6, 182, 212, 0.3); }
.status-completed { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-skipped { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

/* ==========================================================================
   MODAL: TIKET DIGITAL / CETAK STRUK THERMAL
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 90vw;
  animation: modalScale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Authentic Thermal Receipt Look */
.ticket-receipt {
  width: 320px;
  background: #ffffff;
  color: #111827;
  padding: 1.75rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  font-family: var(--font-sans);
  text-align: center;
  position: relative;
}

/* Serrated Zigzag Edge Effect on Bottom */
.ticket-receipt::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 8px;
  background: radial-gradient(circle, transparent, transparent 50%, #ffffff 50%, #ffffff 100%);
  background-size: 16px 16px;
}

.ticket-brand-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.5rem;
}

.ticket-header-logo {
  max-width: 55px;
  max-height: 55px;
  object-fit: contain;
  filter: grayscale(100%) contrast(150%);
  display: block;
}

.ticket-school-name {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #000;
}

.ticket-school-sub {
  font-size: 0.72rem;
  font-weight: 700;
  color: #4b5563;
  margin-top: 2px;
}

.ticket-school-address {
  font-size: 0.65rem;
  color: #6b7280;
  margin-top: 2px;
}

.ticket-divider-dash {
  border-top: 1.5px dashed #9ca3af;
  margin: 0.9rem 0;
}

.ticket-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #6b7280;
}

.ticket-big-num {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.1;
  color: #111827;
  margin: 0.2rem 0;
  letter-spacing: 2px;
}

.ticket-jalur {
  font-size: 0.85rem;
  font-weight: 800;
  display: inline-block;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.ticket-meta-grid {
  border-top: 1px dashed #d1d5db;
  border-bottom: 1px dashed #d1d5db;
  padding: 0.75rem 0;
  margin-bottom: 1rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.t-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.t-k { color: #6b7280; }
.t-v { font-weight: 700; color: #111827; }

.barcode-wrap {
  margin-bottom: 0.85rem;
}

.barcode-svg {
  display: block;
  margin: 0 auto;
}

.barcode-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #4b5563;
  letter-spacing: 2px;
  margin-top: 4px;
}

.ticket-footer-note {
  font-size: 0.68rem;
  color: #6b7280;
  line-height: 1.4;
}

.modal-buttons {
  display: flex;
  gap: 1rem;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 5rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 9999;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(18, 24, 38, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--bg-glass-border);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  color: #fff;
  animation: slideToast 0.3s ease;
  min-width: 280px;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-info { border-left: 4px solid var(--primary); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-danger { border-left: 4px solid var(--danger); }

@keyframes slideToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   PRINT STYLES FOR THERMAL RECEIPT
   ========================================================================== */
@media print {
  body * {
    visibility: hidden;
  }

  #printable-ticket, #printable-ticket * {
    visibility: visible;
  }

  #printable-ticket {
    position: absolute;
    left: 0;
    top: 0;
    width: 80mm;
    margin: 0;
    padding: 10px;
    box-shadow: none;
    border: none;
  }

  .no-print {
    display: none !important;
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATION (TABLET & SMARTPHONE)
   ========================================================================== */

/* Tablet & Smaller Laptops */
@media (max-width: 1200px) {
  .counters-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metrics-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .category-breakdown-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .operator-layout {
    grid-template-columns: 1fr;
  }
}

/* Mobile Devices & Tablets (max-width: 768px) */
@media (max-width: 768px) {
  /* Prevent content hiding behind fixed bottom nav */
  body {
    padding-bottom: 74px;
  }

  /* Compact Top Navbar */
  .navbar {
    padding: 0.6rem 1rem;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .nav-brand {
    gap: 0.65rem;
  }

  .brand-logo-icon {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .brand-subtitle {
    display: none; /* Hide subtitle on mobile for cleaner look */
  }

  /* Hide Clock & Fullscreen on Mobile to Eliminate Clutter */
  .digital-clock,
  #btn-fullscreen {
    display: none !important;
  }

  .nav-actions {
    gap: 0.45rem;
  }

  /* Compact MySQL Badge on Mobile */
  .db-status-badge {
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
    gap: 0.35rem;
  }

  /* Compact Portal Admin Button */
  .action-portal-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    gap: 0.35rem;
  }

  /* Mobile App-Style Fixed Bottom Navigation Bar */
  .nav-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(11, 15, 25, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)) 8px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.5);
    margin: 0;
    order: unset;
    width: 100%;
  }

  .tab-btn {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 7px 4px;
    font-size: 0.68rem;
    font-weight: 700;
    gap: 4px;
    border-radius: 10px;
    text-align: center;
    min-height: 48px;
    transition: var(--transition);
  }

  .tab-btn i {
    font-size: 1.2rem;
  }

  .tab-btn .live-pill {
    display: none; /* Hide live badge in bottom nav */
  }

  .tab-btn.active {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
  }

  /* Main Container Padding */
  .main-container {
    padding: 0.85rem 1rem 1.5rem 1rem;
  }

  /* Kiosk View on Mobile */
  .kiosk-hero {
    margin-bottom: 1.25rem;
    text-align: center;
  }

  .kiosk-hero-badge {
    font-size: 0.72rem;
    padding: 0.3rem 0.75rem;
    margin-bottom: 0.5rem;
  }

  .kiosk-title {
    font-size: clamp(1.35rem, 5.5vw, 1.85rem);
    line-height: 1.25;
    margin-bottom: 0.4rem;
  }

  .kiosk-desc {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .kiosk-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .form-card {
    padding: 1.25rem 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Touch-Friendly Inputs (Prevents Auto-Zoom on iOS) */
  .kiosk-form .input-wrap input,
  .kiosk-form .custom-select,
  .kiosk-form textarea {
    font-size: 16px !important;
    min-height: 48px;
  }

  .btn-submit-ticket {
    width: 100%;
    min-height: 52px;
    font-size: 1rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    justify-content: center;
  }

  /* Category Cards on Mobile */
  .category-selection {
    gap: 0.5rem;
  }

  .category-card {
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    min-height: 54px;
  }

  .cat-code {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .cat-name {
    font-size: 0.9rem;
  }

  .cat-sub {
    font-size: 0.72rem;
  }

  .cat-badge {
    font-size: 0.68rem;
    padding: 2px 7px;
  }

  /* Kiosk Sidebar Mini Stats */
  .status-mini-card {
    padding: 1.15rem 1rem;
  }

  .mini-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .mini-stat-item {
    padding: 0.75rem;
    border-radius: var(--radius-sm);
  }

  .mini-val {
    font-size: 1.5rem;
  }

  .guide-card {
    padding: 1.15rem 1rem;
  }

  .guide-list li {
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }

  /* Display View (TV Ruang Tunggu) on Mobile */
  .spotlight-card {
    padding: 1.25rem 1rem;
  }

  .spotlight-body {
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
  }

  .spotlight-number {
    font-size: clamp(2.6rem, 11vw, 3.8rem);
    line-height: 1.1;
  }

  .spotlight-counter {
    font-size: clamp(1.8rem, 7vw, 2.6rem);
    line-height: 1.2;
  }

  .spotlight-divider {
    width: 75%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
  }

  .spotlight-name {
    font-size: 1.1rem;
  }

  .counters-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .counter-box {
    padding: 1rem;
  }

  .tv-next-strip {
    padding: 0.75rem 1rem;
  }

  .tv-next-chips {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .marquee-bar {
    padding: 0.5rem 0.75rem;
    font-size: 0.78rem;
  }

  /* Operator Panel on Mobile */
  .operator-hero-card {
    padding: 1.25rem 1rem;
  }

  .call-hero-area {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .call-number-huge {
    font-size: clamp(2.5rem, 10vw, 3.8rem);
    padding: 0.75rem 1rem;
    text-align: center;
    border-radius: var(--radius-md);
  }

  .operator-actions-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .operator-actions-toolbar .btn {
    min-height: 48px;
    font-size: 0.85rem;
    padding: 0.6rem 0.5rem;
    justify-content: center;
  }

  .checklist-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
  }

  .data-table {
    min-width: 580px;
  }

  /* Admin Dashboard Tab on Mobile */
  .metrics-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .metric-card {
    padding: 0.9rem;
  }

  .metric-val {
    font-size: 1.7rem;
  }

  .category-breakdown-row {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .admin-toolbar-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .admin-search-wrap {
    width: 100%;
  }

  .admin-filter-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .admin-filter-actions .custom-select,
  .admin-filter-actions .btn {
    width: 100%;
    min-height: 44px;
  }

  /* Thermal Printable Modal on Mobile */
  .modal-dialog {
    width: 94vw;
    max-width: 420px;
    max-height: 88vh;
    padding: 1.15rem;
    overflow-y: auto;
    border-radius: var(--radius-lg);
  }

  .ticket-paper {
    width: 100%;
    padding: 1.25rem 1rem;
  }

  .ticket-num {
    font-size: 2.8rem;
  }

  .modal-actions {
    flex-direction: column;
    gap: 0.6rem;
  }

  .modal-actions .btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }
}

/* Extra Small Smartphones (max-width: 480px) */
@media (max-width: 480px) {
  .navbar {
    padding: 0.5rem 0.75rem;
  }

  .brand-logo-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .brand-title {
    font-size: 0.95rem;
  }

  .db-status-badge {
    padding: 0.3rem 0.5rem;
    font-size: 0.68rem;
  }

  .action-portal-btn {
    padding: 0.3rem 0.55rem;
    font-size: 0.72rem;
  }

  .portal-btn-text {
    display: none; /* Icon-only on very small phones to save space */
  }

  .mini-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .mini-val {
    font-size: 1.35rem;
  }

  .metrics-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .metric-val {
    font-size: 1.45rem;
  }

  .tab-btn {
    font-size: 0.64rem;
    padding: 5px 2px;
  }

  .tab-btn i {
    font-size: 1.1rem;
  }
}
