/* ==========================================================================
   SISTEM ANTRIAN KEMENTERIAN HAJI & UMRAH KOTA GORONTALO
   Premium UI/UX Edition
   Color Palette: #C78016 (Dominant Gold/Amber)
   Font Family: 'Poppins', sans-serif
   ========================================================================== */

   @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

   :root {
     /* Core Palette */
     --primary: #C78016;
     --primary-dark: #9E620D;
     --primary-light: #F4BA5F;
     --primary-soft: #FFF7EB;
     --primary-border: #F0D1A3;
     
     /* Backgrounds */
     --bg-main: #F4F7F6;
     --bg-card: #FFFFFF;
     --bg-dark: #0B1120;
     --bg-darker: #060913;
     
     /* Typography */
     --text-main: #1E293B;
     --text-muted: #64748B;
     --text-light: #F8FAFC;
     
     /* Status Colors (Premium soft tones) */
     --success: #10B981;
     --success-bg: #ECFDF5;
     --success-border: #A7F3D0;
     
     --warning: #F59E0B;
     --warning-bg: #FFFBEB;
     --warning-border: #FDE68A;
     
     --info: #3B82F6;
     --info-bg: #EFF6FF;
     --info-border: #BFDBFE;
     
     --danger: #EF4444;
     --danger-bg: #FEF2F2;
     --danger-border: #FECACA;
     
     --neutral-bg: #F8FAFC;
     --neutral-border: #E2E8F0;
   
     /* Shadows & Effects */
     --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
     --shadow-md: 0 10px 20px rgba(199, 128, 22, 0.08);
     --shadow-lg: 0 20px 40px rgba(199, 128, 22, 0.12);
     --shadow-glow: 0 0 20px rgba(199, 128, 22, 0.5);
     --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.3);
     
     /* Radii */
     --radius-sm: 8px;
     --radius-md: 16px;
     --radius-lg: 24px;
     --radius-full: 9999px;
     
     --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
     --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
   }
   
   * {
     box-sizing: border-box;
     margin: 0;
     padding: 0;
   }
   
   body {
     font-family: 'Poppins', sans-serif;
     background-color: var(--bg-main);
     background-image: 
       radial-gradient(at 0% 0%, rgba(199, 128, 22, 0.05) 0px, transparent 50%),
       radial-gradient(at 100% 100%, rgba(199, 128, 22, 0.05) 0px, transparent 50%);
     background-attachment: fixed;
     color: var(--text-main);
     line-height: 1.6;
     min-height: 100vh;
     display: flex;
     flex-direction: column;
     overflow-x: hidden;
   }
   
   /* ==========================================================================
      HEADER & NAVIGATION (GLASSMORPHISM)
      ========================================================================== */
   .app-header {
     background: rgba(11, 17, 32, 0.95);
     backdrop-filter: blur(12px);
     -webkit-backdrop-filter: blur(12px);
     border-bottom: 4px solid var(--primary);
     padding: 16px 32px;
     position: sticky;
     top: 0;
     z-index: 100;
     box-shadow: var(--shadow-dark);
   }
   
   .header-container {
     max-width: 1500px;
     margin: 0 auto;
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 20px;
     flex-wrap: wrap;
   }
   
   .brand-section {
     display: flex;
     align-items: center;
     gap: 16px;
   }
   
   .logo-badge {
     width: 52px;
     height: 52px;
     background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
     border-radius: 14px;
     display: flex;
     align-items: center;
     justify-content: center;
     box-shadow: var(--shadow-glow);
     color: #FFFFFF;
     font-size: 26px;
     position: relative;
     overflow: hidden;
   }
   
   .logo-badge::after {
     content: '';
     position: absolute;
     top: -50%; left: -50%;
     width: 200%; height: 200%;
     background: linear-gradient(to bottom right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
     transform: rotate(45deg);
     animation: shimmer 3s infinite;
   }
   
   @keyframes shimmer {
     0% { transform: translateX(-100%) rotate(45deg); }
     100% { transform: translateX(100%) rotate(45deg); }
   }
   
   .brand-text h1 {
     font-size: 1.25rem;
     font-weight: 800;
     letter-spacing: 0.5px;
     color: #FFFFFF;
     line-height: 1.2;
     text-transform: uppercase;
   }
   
   .brand-text p {
     font-size: 0.85rem;
     color: var(--primary-light);
     font-weight: 500;
     letter-spacing: 1px;
   }
   
   .clock-badge {
     background: rgba(255, 255, 255, 0.05);
     border: 1px solid rgba(255, 255, 255, 0.1);
     padding: 8px 16px;
     border-radius: var(--radius-full);
     display: flex;
     align-items: center;
     gap: 10px;
     font-size: 0.95rem;
     font-weight: 600;
     color: #FFFFFF;
     box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
   }
   
   .clock-badge span.tz {
     background: var(--primary);
     color: #FFFFFF;
     padding: 3px 8px;
     border-radius: 6px;
     font-size: 0.75rem;
     font-weight: 800;
     letter-spacing: 0.5px;
   }
   
   /* Nav Tabs */
   .nav-tabs {
     display: flex;
     background: rgba(255, 255, 255, 0.05);
     padding: 6px;
     border-radius: var(--radius-md);
     gap: 6px;
     border: 1px solid rgba(255,255,255,0.05);
   }
   
   .nav-tab-btn {
     background: transparent;
     border: none;
     color: #94A3B8;
     padding: 10px 20px;
     border-radius: 10px;
     font-family: inherit;
     font-size: 0.9rem;
     font-weight: 600;
     cursor: pointer;
     display: flex;
     align-items: center;
     gap: 8px;
     transition: var(--transition-bounce);
   }
   
   .nav-tab-btn:hover {
     color: #FFFFFF;
     background: rgba(255, 255, 255, 0.1);
     transform: translateY(-2px);
   }
   
   .nav-tab-btn.active {
     background: var(--primary);
     color: #FFFFFF;
     box-shadow: var(--shadow-glow);
   }
   
   /* ==========================================================================
      MAIN LAYOUT
      ========================================================================== */
   .main-wrapper {
     flex: 1;
     max-width: 1500px;
     width: 100%;
     margin: 0 auto;
     padding: 32px 24px;
   }
   
   .view-panel {
     display: none;
     opacity: 0;
     transform: translateY(15px);
     transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
   }
   
   .view-panel.active {
     display: block;
     opacity: 1;
     transform: translateY(0);
     animation: fadeSlideUp 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
   }
   
   @keyframes fadeSlideUp {
     from { opacity: 0; transform: translateY(20px); }
     to { opacity: 1; transform: translateY(0); }
   }
   
   /* ==========================================================================
      VIEW 1: KIOSK AMBIL ANTRIAN (GUEST / TAMU)
      ========================================================================== */
   .kiosk-hero {
     background: #FFFFFF;
     border-radius: var(--radius-lg);
     padding: 40px 32px;
     text-align: center;
     margin-bottom: 32px;
     box-shadow: var(--shadow-md);
     position: relative;
     overflow: hidden;
     border: 1px solid rgba(199, 128, 22, 0.15);
   }
   
   .kiosk-hero::before {
     content: '';
     position: absolute;
     top: -100px;
     right: -100px;
     width: 300px;
     height: 300px;
     background: radial-gradient(circle, rgba(199,128,22,0.1) 0%, rgba(255,255,255,0) 70%);
     border-radius: 50%;
     pointer-events: none;
   }
   
   .kiosk-hero h2 {
     color: var(--text-main);
     font-size: 2.2rem;
     font-weight: 800;
     margin-bottom: 12px;
     letter-spacing: -0.5px;
   }
   
   .kiosk-hero p {
     color: var(--text-muted);
     font-size: 1.1rem;
     max-width: 700px;
     margin: 0 auto;
     font-weight: 500;
   }
   
   /* Services Grid with Staggered Animation */
   .services-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
     gap: 24px;
   }
   
   .service-card {
     background: var(--bg-card);
     border: 1px solid var(--neutral-border);
     border-radius: var(--radius-lg);
     padding: 28px;
     display: flex;
     flex-direction: column;
     justify-content: space-between;
     cursor: pointer;
     transition: var(--transition-bounce);
     position: relative;
     overflow: hidden;
     box-shadow: var(--shadow-sm);
   }
   
   /* Staggered entrance for cards */
   .service-card:nth-child(1) { animation: fadeSlideUp 0.5s 0.1s both; }
   .service-card:nth-child(2) { animation: fadeSlideUp 0.5s 0.2s both; }
   .service-card:nth-child(3) { animation: fadeSlideUp 0.5s 0.3s both; }
   .service-card:nth-child(4) { animation: fadeSlideUp 0.5s 0.4s both; }
   .service-card:nth-child(5) { animation: fadeSlideUp 0.5s 0.5s both; }
   .service-card:nth-child(6) { animation: fadeSlideUp 0.5s 0.6s both; }
   
   .service-card:hover {
     border-color: var(--primary);
     transform: translateY(-8px);
     box-shadow: var(--shadow-lg);
   }
   
   .service-card::after {
     content: '';
     position: absolute;
     bottom: 0; left: 0; right: 0;
     height: 4px;
     background: linear-gradient(90deg, var(--primary), var(--primary-light));
     transform: scaleX(0);
     transform-origin: left;
     transition: transform 0.4s ease;
   }
   
   .service-card:hover::after {
     transform: scaleX(1);
   }
   
   .service-card-header {
     display: flex;
     align-items: flex-start;
     justify-content: space-between;
     margin-bottom: 20px;
   }
   
   .service-code {
     width: 56px;
     height: 56px;
     background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
     color: #FFFFFF;
     border-radius: 16px;
     font-size: 1.6rem;
     font-weight: 800;
     display: flex;
     align-items: center;
     justify-content: center;
     box-shadow: var(--shadow-glow);
     transition: transform 0.3s ease;
   }
   
   .service-card:hover .service-code {
     transform: scale(1.1) rotate(5deg);
   }
   
   .service-est {
     background: var(--primary-soft);
     color: var(--primary-dark);
     border: 1px solid var(--primary-border);
     font-size: 0.8rem;
     font-weight: 700;
     padding: 6px 12px;
     border-radius: var(--radius-full);
   }
   
   .service-info h3 {
     font-size: 1.3rem;
     font-weight: 800;
     color: var(--text-main);
     margin-bottom: 8px;
     line-height: 1.3;
   }
   
   .service-info p {
     font-size: 0.95rem;
     color: var(--text-muted);
     margin-bottom: 24px;
     line-height: 1.5;
   }
   
   .btn-take-ticket {
     width: 100%;
     background: var(--neutral-bg);
     color: var(--text-main);
     border: 1px solid var(--neutral-border);
     padding: 14px 24px;
     border-radius: var(--radius-md);
     font-family: inherit;
     font-size: 1rem;
     font-weight: 700;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 10px;
     transition: var(--transition);
   }
   
   .service-card:hover .btn-take-ticket {
     background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
     color: #FFFFFF;
     border-color: transparent;
     box-shadow: var(--shadow-md);
   }
   
   /* ==========================================================================
      MODAL TICKET (GLASSMORPHISM & PERFORATED TICKET STYLE)
      ========================================================================== */
   .modal-overlay {
     position: fixed;
     inset: 0;
     background: rgba(11, 17, 32, 0.6);
     backdrop-filter: blur(8px);
     -webkit-backdrop-filter: blur(8px);
     z-index: 1000;
     display: flex;
     align-items: center;
     justify-content: center;
     padding: 20px;
     opacity: 0;
     pointer-events: none;
     transition: opacity 0.4s ease;
   }
   
   .modal-overlay.active {
     opacity: 1;
     pointer-events: auto;
   }
   
   .ticket-modal-card {
     background: #FFFFFF;
     border-radius: var(--radius-lg);
     width: 100%;
     max-width: 420px;
     box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
     overflow: hidden;
     transform: scale(0.9) translateY(20px);
     opacity: 0;
     transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
     position: relative;
   }
   
   .modal-overlay.active .ticket-modal-card {
     transform: scale(1) translateY(0);
     opacity: 1;
   }
   
   /* Perforated edge effect using radial gradients */
   .ticket-header {
     background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
     color: #FFFFFF;
     padding: 24px 20px 30px;
     text-align: center;
     position: relative;
   }
   
   .ticket-header::after {
     content: '';
     position: absolute;
     bottom: -6px;
     left: 0;
     right: 0;
     height: 12px;
     background-image: radial-gradient(circle at 6px 0, transparent 6px, #FFFFFF 7px);
     background-size: 16px 12px;
     background-repeat: repeat-x;
   }
   
   .ticket-header h4 {
     font-size: 0.85rem;
     text-transform: uppercase;
     letter-spacing: 2px;
     font-weight: 700;
     opacity: 0.9;
     margin-bottom: 4px;
   }
   
   .ticket-header h2 {
     font-size: 1.4rem;
     font-weight: 900;
   }
   
   .ticket-body {
     padding: 32px 24px 24px;
     text-align: center;
   }
   
   .ticket-service-badge {
     display: inline-block;
     background: var(--primary-soft);
     color: var(--primary-dark);
     border: 1px solid var(--primary-border);
     padding: 6px 16px;
     border-radius: var(--radius-full);
     font-weight: 800;
     font-size: 0.95rem;
     margin-bottom: 12px;
   }
   
   .ticket-number-display {
     font-size: 4.5rem;
     font-weight: 900;
     color: var(--text-main);
     letter-spacing: -2px;
     line-height: 1;
     margin: 10px 0;
   }
   
   .ticket-meta-info {
     background: var(--neutral-bg);
     border-radius: var(--radius-md);
     padding: 16px;
     margin: 20px 0;
     font-size: 0.9rem;
     color: var(--text-muted);
     display: flex;
     flex-direction: column;
     gap: 6px;
     border: 1px dashed var(--neutral-border);
   }
   
   .ticket-actions {
     display: flex;
     gap: 12px;
     margin-top: 24px;
   }
   
   .btn-print {
     flex: 1;
     background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
     color: #FFFFFF;
     border: none;
     padding: 14px;
     border-radius: var(--radius-md);
     font-weight: 800;
     font-size: 1rem;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 10px;
     transition: var(--transition);
     box-shadow: var(--shadow-md);
   }
   
   .btn-print:hover {
     box-shadow: var(--shadow-glow);
     transform: translateY(-2px);
   }
   
   .btn-close-modal {
     background: var(--neutral-bg);
     color: var(--text-main);
     border: 1px solid var(--neutral-border);
     padding: 14px 24px;
     border-radius: var(--radius-md);
     font-weight: 700;
     cursor: pointer;
     transition: var(--transition);
   }
   
   .btn-close-modal:hover {
     background: #E2E8F0;
   }
   
   /* ==========================================================================
      VIEW 2: DISPLAY MONITOR (TV WAITING ROOM - DARK THEME)
      ========================================================================== */
   #view-display {
     background: var(--bg-dark);
     margin: -32px -24px;
     padding: 32px 24px;
     min-height: calc(100vh - 85px);
     border-radius: 0;
   }
   
   .display-container {
     display: grid;
     grid-template-columns: 1.2fr 1fr;
     gap: 32px;
   }
   
   @media (max-width: 1200px) {
     .display-container { grid-template-columns: 1fr; }
   }
   
   .active-call-card {
     background: linear-gradient(135deg, #111827 0%, #060913 100%);
     background-image: radial-gradient(circle at 50% 50%, rgba(199, 128, 22, 0.05) 0%, transparent 80%), url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c78016' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
     border: 1px solid rgba(199, 128, 22, 0.15);
     border-radius: var(--radius-lg);
     padding: 40px;
     color: #FFFFFF;
     text-align: center;
     box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5), inset 0 0 60px rgba(199,128,22,0.05);
     display: flex;
     flex-direction: column;
     justify-content: center;
     position: relative;
     overflow: hidden;
     min-height: 500px;
   }
   
   .active-call-card::before {
     content: '';
     position: absolute;
     top: 0; left: 0; right: 0; height: 6px;
     background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
   }
   
   .call-title {
     color: var(--primary-light);
     font-size: 1.3rem;
     font-weight: 800;
     text-transform: uppercase;
     letter-spacing: 4px;
     margin-bottom: 20px;
   }
   
   .big-number-box {
     background: rgba(199, 128, 22, 0.05);
     border: 2px dashed rgba(199, 128, 22, 0.3);
     border-radius: var(--radius-lg);
     padding: 40px 20px;
     margin: 16px 0 32px 0;
     transition: all 0.3s ease;
   }
   
   .big-number-box.calling-animation {
     animation: neonPulse 1s infinite alternate;
     background: rgba(199, 128, 22, 0.15);
     border-style: solid;
     border-color: var(--primary);
   }
   
   @keyframes neonPulse {
     from {
       box-shadow: 0 0 10px rgba(199, 128, 22, 0.2), 0 0 20px rgba(199, 128, 22, 0.2);
       transform: scale(1);
     }
     to {
       box-shadow: 0 0 20px rgba(199, 128, 22, 0.6), 0 0 40px rgba(199, 128, 22, 0.4);
       transform: scale(1.02);
     }
   }
   
   .big-number {
     font-size: clamp(6rem, 10vw, 9.5rem);
     font-weight: 900;
     color: #FFFFFF;
     line-height: 1;
     letter-spacing: -3px;
     text-shadow: 0 10px 30px rgba(199, 128, 22, 0.6);
   }
   
   .big-service {
     font-size: clamp(1.2rem, 2vw, 1.8rem);
     font-weight: 700;
     color: var(--primary-light);
     margin-top: 16px;
     text-transform: uppercase;
     letter-spacing: 1px;
   }
   
   .big-loket {
     background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
     color: #FFFFFF;
     padding: 16px 40px;
     border-radius: var(--radius-full);
     font-size: 2.2rem;
     font-weight: 900;
     display: inline-block;
     box-shadow: var(--shadow-glow);
     letter-spacing: 1px;
   }
   
   /* Loket Grid */
   .loket-grid {
     display: grid;
     grid-template-columns: repeat(2, 1fr);
     grid-template-rows: repeat(2, 1fr);
     gap: 20px;
   }
   
   .loket-card {
     background: rgba(255, 255, 255, 0.03);
     border: 1px solid rgba(255,255,255,0.08);
     border-radius: var(--radius-lg);
     padding: 24px;
     text-align: center;
     display: flex;
     flex-direction: column;
     justify-content: center;
     transition: var(--transition);
     backdrop-filter: blur(10px);
   }
   
   .loket-card.active-serving {
     background: rgba(199, 128, 22, 0.1);
     border-color: var(--primary);
     box-shadow: inset 0 0 20px rgba(199, 128, 22, 0.1);
   }
   
   .loket-header {
     font-size: 1.25rem;
     font-weight: 800;
     color: #94A3B8;
     padding-bottom: 12px;
     border-bottom: 1px solid rgba(255,255,255,0.05);
     margin-bottom: 16px;
     letter-spacing: 2px;
     text-transform: uppercase;
   }
   
   .loket-card.active-serving .loket-header {
     color: var(--primary-light);
     border-color: rgba(199, 128, 22, 0.2);
   }
   
   .loket-ticket {
     font-size: clamp(2.5rem, 4vw, 4rem);
     font-weight: 900;
     color: #475569;
     line-height: 1;
     margin: 10px 0;
     text-shadow: 0 4px 10px rgba(0,0,0,0.5);
   }
   
   .loket-card.active-serving .loket-ticket {
     color: #FFFFFF;
     text-shadow: 0 0 25px rgba(199, 128, 22, 0.6);
   }
   
   .loket-service {
     font-size: 1.05rem;
     font-weight: 600;
     color: #64748B;
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
     margin-top: 8px;
   }
   
   /* Stats Row for Display */
   .stats-summary-row {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
     gap: 20px;
     margin-bottom: 32px;
   }
   
   .stat-box {
     background: rgba(255, 255, 255, 0.03);
     border: 1px solid rgba(255,255,255,0.08);
     border-radius: var(--radius-md);
     padding: 20px 24px;
     display: flex;
     align-items: center;
     justify-content: space-between;
     backdrop-filter: blur(4px);
   }
   
   #view-display .stat-box .title {
     color: #94A3B8;
     font-size: 0.85rem;
   }
   
   #view-display .stat-box .val {
     color: #FFFFFF;
     font-size: 2.2rem;
   }
   
   /* Ticker */
   .display-ticker {
     background: rgba(0,0,0,0.3);
     border-radius: var(--radius-md);
     border-left: 6px solid var(--primary);
     padding: 16px 24px;
     margin-top: 32px;
     display: flex;
     align-items: center;
     gap: 20px;
     overflow: hidden;
   }
   
   .ticker-badge {
     background: var(--primary);
     color: #FFFFFF;
     font-size: 0.85rem;
     font-weight: 800;
     padding: 6px 12px;
     border-radius: 6px;
     white-space: nowrap;
     letter-spacing: 1px;
   }
   
   .marquee-content {
     font-size: 1.1rem;
     font-weight: 500;
     color: #F8FAFC;
     white-space: nowrap;
     animation: marquee 30s linear infinite;
     display: inline-block;
     padding-left: 100%;
   }

   @keyframes marquee {
     0% { transform: translateX(0); }
     100% { transform: translateX(-100%); }
   }
   
   /* ==========================================================================
      VIEW 3: BACKEND ADMINISTRATOR & OPERATOR LOKET
      ========================================================================== */
   .admin-toolbar {
     background: var(--bg-card);
     border-radius: var(--radius-lg);
     padding: 24px;
     border: 1px solid var(--neutral-border);
     box-shadow: var(--shadow-sm);
     margin-bottom: 24px;
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 20px;
     flex-wrap: wrap;
   }
   
   .operator-loket-select {
     display: flex;
     align-items: center;
     gap: 16px;
   }
   
   .operator-loket-select label {
     font-weight: 800;
     font-size: 0.95rem;
     color: var(--text-main);
     text-transform: uppercase;
     letter-spacing: 0.5px;
   }
   
   .form-select, .form-input {
     padding: 12px 16px;
     border: 2px solid var(--neutral-border);
     border-radius: var(--radius-sm);
     font-family: inherit;
     font-size: 0.95rem;
     font-weight: 500;
     color: var(--text-main);
     background-color: #FFFFFF;
     outline: none;
     transition: var(--transition);
   }
   
   .form-select:focus, .form-input:focus {
     border-color: var(--primary);
     box-shadow: 0 0 0 4px rgba(199, 128, 22, 0.1);
   }
   
   .btn-action-primary {
     background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
     color: #FFFFFF;
     border: none;
     padding: 14px 28px;
     border-radius: var(--radius-md);
     font-family: inherit;
     font-size: 1rem;
     font-weight: 800;
     cursor: pointer;
     display: flex;
     align-items: center;
     gap: 10px;
     transition: var(--transition-bounce);
     box-shadow: var(--shadow-md);
   }
   
   .btn-action-primary:hover {
     transform: translateY(-2px);
     box-shadow: var(--shadow-glow);
   }
   
   /* Modern Admin Table */
   .table-card {
     background: var(--bg-card);
     border-radius: var(--radius-lg);
     border: 1px solid var(--neutral-border);
     box-shadow: var(--shadow-md);
     overflow: hidden;
   }
   
   .table-filter-bar {
     padding: 20px 24px;
     border-bottom: 1px solid var(--neutral-border);
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 20px;
     flex-wrap: wrap;
     background: #FAFAFA;
   }
   
   .filter-group {
     display: flex;
     align-items: center;
     gap: 16px;
     flex-wrap: wrap;
   }
   
   .filter-group label {
     font-weight: 700;
     font-size: 0.9rem;
     color: var(--text-muted);
   }
   
   .custom-table {
     width: 100%;
     border-collapse: collapse;
     text-align: left;
     font-size: 0.95rem;
   }
   
   .custom-table th {
     background: #F8FAFC;
     color: var(--text-muted);
     font-weight: 800;
     text-transform: uppercase;
     font-size: 0.8rem;
     letter-spacing: 1px;
     padding: 18px 24px;
     border-bottom: 2px solid var(--neutral-border);
     white-space: nowrap;
   }
   
   .custom-table td {
     padding: 18px 24px;
     border-bottom: 1px solid var(--neutral-border);
     vertical-align: middle;
     font-weight: 500;
   }
   
   .custom-table tbody tr {
     transition: background-color 0.2s ease;
   }
   
   .custom-table tbody tr:hover {
     background: #F8FAFC;
   }
   
   /* Premium Badges */
   .badge-status {
     padding: 6px 14px;
     border-radius: var(--radius-full);
     font-size: 0.8rem;
     font-weight: 800;
     display: inline-block;
     text-transform: uppercase;
     letter-spacing: 0.5px;
   }
   
   .badge-menunggu { background: var(--warning-bg); color: #B45309; border: 1px solid var(--warning-border); }
   .badge-dipanggil { background: var(--info-bg); color: #1D4ED8; border: 1px solid var(--info-border); }
   .badge-dilayani { background: var(--success-bg); color: #047857; border: 1px solid var(--success-border); }
   .badge-selesai { background: var(--neutral-bg); color: #475569; border: 1px solid #CBD5E1; }
   .badge-batal { background: var(--danger-bg); color: #B91C1C; border: 1px solid var(--danger-border); }
   
   /* Table Buttons */
   .action-btn-group {
     display: flex;
     gap: 8px;
     flex-wrap: wrap;
   }
   
   .btn-tbl {
     padding: 8px 14px;
     border-radius: 8px;
     font-family: inherit;
     font-size: 0.85rem;
     font-weight: 700;
     cursor: pointer;
     border: none;
     display: flex;
     align-items: center;
     gap: 6px;
     transition: var(--transition);
   }
   
   .btn-tbl:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
   .btn-tbl:active { transform: translateY(0); }
   
   .btn-tbl-call { background: var(--info-bg); color: #1D4ED8; border: 1px solid var(--info-border); }
   .btn-tbl-call:hover { background: #DBEAFE; }
   
   .btn-tbl-serve { background: var(--success-bg); color: #047857; border: 1px solid var(--success-border); }
   .btn-tbl-serve:hover { background: #D1FAE5; }
   
   .btn-tbl-complete { background: var(--neutral-bg); color: #475569; border: 1px solid #CBD5E1; }
   .btn-tbl-cancel { background: var(--danger-bg); color: #B91C1C; border: 1px solid var(--danger-border); }
   
   /* Pagination */
   .pagination-bar {
     padding: 16px 24px;
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 20px;
     background: #FAFAFA;
     flex-wrap: wrap;
   }
   
   .page-info {
     font-size: 0.9rem;
     color: var(--text-muted);
     font-weight: 600;
   }
   
   .pagination-controls {
     display: flex;
     align-items: center;
     gap: 8px;
   }
   
   .btn-page {
     background: #FFFFFF;
     border: 1px solid var(--neutral-border);
     padding: 8px 14px;
     border-radius: 8px;
     font-family: inherit;
     font-size: 0.9rem;
     font-weight: 700;
     color: var(--text-muted);
     cursor: pointer;
     transition: var(--transition);
   }
   
   .btn-page:hover:not(:disabled) {
     border-color: var(--primary);
     color: var(--primary-dark);
     background: var(--primary-soft);
   }
   
   .btn-page.active {
     background: var(--primary);
     color: #FFFFFF;
     border-color: var(--primary);
   }
   
   .btn-page:disabled {
     opacity: 0.5;
     cursor: not-allowed;
     background: #F1F5F9;
   }
   
   /* Footer */
   .app-footer {
     text-align: center;
     padding: 24px;
     font-size: 0.85rem;
     font-weight: 500;
     color: var(--text-muted);
     margin-top: auto;
   }
   
   /* ==========================================================================
      RESPONSIVE DESIGN (MOBILE & TABLET)
      ========================================================================== */
   
   /* Tablets & Smaller Desktops (Max 1024px) */
   @media (max-width: 1024px) {
     .app-header {
       padding: 12px 20px;
     }
     
     .brand-text h1 {
       font-size: 1.1rem;
     }
     
     .kiosk-hero h2 {
       font-size: 1.8rem;
     }
     
     .admin-toolbar, .table-filter-bar {
       flex-direction: column;
       align-items: stretch;
     }
     
     .operator-loket-select, .filter-group {
       width: 100%;
       justify-content: space-between;
     }
     
     .btn-action-primary {
       width: 100%;
       justify-content: center;
       margin-top: 12px;
     }
   }
   
   /* Mobile Phones (Max 768px) */
   @media (max-width: 768px) {
     .header-container {
       justify-content: center;
       text-align: center;
     }
     
     .brand-section {
       flex-direction: column;
       text-align: center;
     }
     
     .nav-tabs {
       width: 100%;
       justify-content: space-between;
       overflow-x: auto;
       padding-bottom: 4px;
     }
     
     .nav-tab-btn {
       padding: 8px 12px;
       font-size: 0.8rem;
       white-space: nowrap;
     }
     
     .clock-badge {
       width: 100%;
       justify-content: center;
       margin-bottom: 8px;
     }
     
     .main-wrapper {
       padding: 16px;
     }
     
     .services-grid {
       /* Fix overflow on small mobile screens */
       grid-template-columns: 1fr;
     }
     
     .display-container {
       grid-template-columns: 1fr;
       gap: 20px;
     }
     
     .active-call-card {
       min-height: 400px;
       padding: 24px;
     }
     
     .loket-grid {
       grid-template-columns: 1fr;
     }
     
     .stats-summary-row {
       grid-template-columns: 1fr 1fr;
     }
     
     .ticket-modal-card {
       max-width: 100%;
       margin: 16px;
     }
     
     .pagination-bar {
       flex-direction: column;
       text-align: center;
       gap: 12px;
     }
   }
   
   /* Small Mobile Phones (Max 480px) */
   @media (max-width: 480px) {
     .stats-summary-row {
       grid-template-columns: 1fr;
     }
     
     .big-number {
       font-size: 5rem;
     }
     
     .big-loket {
       font-size: 1.5rem;
       padding: 12px 24px;
     }
     
     .ticket-number-display {
       font-size: 3.5rem;
     }
     
     .filter-group {
       flex-direction: column;
       align-items: stretch;
       gap: 12px;
     }
     
     .filter-group select, .filter-group input {
       width: 100% !important;
     }
   }

   /* Hide printable receipt on screens */
   #printable-receipt {
     display: none;
   }

   /* ==========================================================================
      OPTIMIZED THERMAL RECEIPT PRINTING (@media print)
      ========================================================================== */
   @media print {
     @page { margin: 0; size: auto; }
     body * { visibility: hidden !important; }
     #printable-receipt, #printable-receipt * { visibility: visible !important; }
     #printable-receipt { display: block !important; }
     
     #printable-receipt {
       position: absolute !important;
       left: 0 !important;
       top: 0 !important;
       width: 58mm !important;
       max-width: 58mm !important;
       margin: 0 !important;
       padding: 2mm 0mm 0mm 0mm !important; /* Extremely minimal padding */
       font-family: 'Poppins', sans-serif !important;
       color: #000000 !important;
       background: #FFFFFF !important;
       border: none !important;
     }
   
     .receipt-header {
       text-align: center;
       border-bottom: 1px dashed #000;
       padding-bottom: 2mm;
       margin-bottom: 2mm;
     }
   
     .receipt-header h3 {
       font-size: 7.5pt !important;
       font-weight: 900 !important;
       line-height: 1 !important;
       margin-bottom: 0.5mm !important;
     }
   
     .receipt-header p { font-size: 6pt !important; line-height: 1.0 !important; margin: 0 !important; }
   
     .receipt-body { text-align: center; padding: 1mm 0; }
     .receipt-service-title { font-size: 7.5pt !important; font-weight: 800 !important; margin-bottom: 0.5mm !important; }
     .receipt-number { font-size: 24pt !important; font-weight: 900 !important; line-height: 1.0 !important; margin: 1mm 0 !important; letter-spacing: -1px !important; }
     .receipt-date-time { font-size: 6pt !important; margin-bottom: 1mm !important; }
   
     .receipt-waiting {
       font-size: 6.5pt !important;
       font-weight: 700 !important;
       border-top: 1px dashed #000;
       border-bottom: 1px dashed #000;
       padding: 1mm 0;
       margin: 1mm 0;
     }
   
     .receipt-footer { text-align: center; font-size: 5.5pt !important; margin-top: 1mm !important; margin-bottom: 0 !important; line-height: 1.1 !important; }
     .receipt-footer p { margin: 0 !important; }
   }
