/* Import Font Modern (Poppins) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700;900&display=swap');

/* --- Global & Reset --- */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 95vh;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 30px;
}

h1, h2, h3 {
    font-weight: 700;
    text-align: center;
}

/* --- Halaman Pengambil antrean (v_ambil_antrean) --- */
.ambil-container {
    text-align: center;
}

.ambil-container h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 40px;
}

.button-wrapper {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap; /* Responsif di HP */
}

.btn-ambil {
    display: block;
    width: 280px;
    padding: 40px 20px;
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
.btn-ambil:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-ambil.tipe-a { background-color: #3498db; } /* Biru */
.btn-ambil.tipe-b { background-color: #e67e22; } /* Oranye */

.tiket-konfirmasi {
    margin-top: 40px;
    padding: 25px;
    border: 3px dashed #2ecc71;
    background-color: #f0fff4;
    border-radius: 8px;
    display: inline-block;
}
.tiket-konfirmasi h2 {
    color: #27ae60;
    margin: 0 0 10px 0;
    font-size: 1.5rem;
}
.tiket-konfirmasi .nomor-tiket {
    font-size: 3.5rem;
    font-weight: 900;
    color: #2c3e50;
    line-height: 1;
}

/* --- Halaman Operator (v_operator) --- */
.operator-container {
    display: flex;
    gap: 30px;
    justify-content: space-around;
    flex-wrap: wrap;
}

.panel-antrean {
    flex: 1;
    min-width: 300px;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fdfdfd;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.panel-antrean h2 {
    font-size: 2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 0;
}
.panel-antrean.panel-a h2 { color: #3498db; }
.panel-antrean.panel-b h2 { color: #e67e22; }

.nomor-dipanggil-operator {
    font-size: 4.5rem;
    font-weight: 900;
    color: #333;
    margin: 20px 0;
    min-height: 80px; /* Jaga layout stabil */
    line-height: 1;
}

.btn-aksi {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
    box-sizing: border-box; /* Pastikan padding tidak merusak width */
    margin-top: 10px;
}
.btn-panggil { background-color: #27ae60; } /* Hijau */
.btn-panggil:hover { background-color: #229954; }

.btn-lewati { background-color: #f39c12; } /* Kuning */
.btn-lewati:hover { background-color: #e67e22; }
.btn-lewati.disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}


/* --- Halaman Display Publik (v_display_publik) --- */
/* Latar belakang gelap untuk kontras tinggi */
body.display-page {
    background-color: #121212; /* Latar belakang gelap */
    color: #ffffff;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    align-items: stretch; /* Penuhi layar */
    overflow: hidden; /* Sembunyikan scrollbar */
}

.display-container {
    display: flex;
    width: 100%;
    height: 100vh;
    gap: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
}

.display-box {
    flex: 1; /* Bagi layar jadi dua */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    box-sizing: border-box;
    /* Efek visual transisi saat nomor berganti */
    transition: all 0.5s ease-out;
}

/* Efek "highlight" saat nomor baru dipanggil */
.display-box.highlight {
    transform: scale(1.02);
    filter: brightness(1.2);
}

.display-box.tipe-a {
    background-color: #3498db; /* Biru */
}
.display-box.tipe-b {
    background-color: #e67e22; /* Oranye */
}

.display-box h2 {
    font-size: clamp(3rem, 6vw, 5rem); /* Ukuran font responsif */
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    border-bottom: 4px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 15px;
}

.display-nomor {
    font-family: 'Poppins', sans-serif;
    /* Ukuran SANGAT BESAR dan responsif */
    font-size: clamp(12rem, 28vw, 22rem); 
    font-weight: 900; /* Super tebal */
    color: #fff;
    margin: 20px 0;
    line-height: 1;
    /* Bayangan teks agar menonjol */
    text-shadow: 0 10px 25px rgba(0, 0, 0, 0.3); 
    text-align: center;
}


/* --- Tambahan untuk Daftar Tunggu Operator --- */
.daftar-tunggu {
    text-align: left;
    margin: 15px 0 20px 0; /* Jarak antara nomor dipanggil dan tombol */
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
    max-height: 200px; /* Batasi tinggi jika daftar panjang */
    overflow-y: auto;  /* Tambah scroll jika perlu */
}

.daftar-tunggu h4 {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #555;
    margin-top: 0;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

.daftar-tunggu ol {
    list-style: none; /* Hilangkan nomor default */
    padding: 0;
    margin: 0;
}

.daftar-tunggu li {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    background-color: #fff;
    border: 1px solid #eee;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 5px;
    text-align: center;
}

/* Nomor pertama (yg akan dipanggil) dibuat menonjol */
.daftar-tunggu li:first-child {
    font-size: 1.25rem;
    color: #27ae60; /* Hijau (sama dgn tombol panggil) */
    background-color: #f0fff4;
    border-color: #b8e9c9;
}

.daftar-tunggu li.kosong {
    font-style: italic;
    font-weight: 400;
    color: #999;
    text-align: center;
    background: none;
    border: none;
    padding: 10px 0;
}
/* --- Akhir Tambahan --- */


/* --- Tambahan untuk Halaman Menu (v_menu.php) --- */
.menu-container {
    text-align: center;
    max-width: 1000px;
}
.menu-container h1 {
    font-size: 3rem;
    color: #2c3e50;
}
.menu-container > p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 40px;
}

.menu-wrapper {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap; /* Responsif */
}

.btn-menu {
    flex: 1;
    min-width: 260px;
    max-width: 300px;
    padding: 30px 25px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-align: left;
}
.btn-menu:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.btn-menu .menu-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

.btn-menu h3 {
    font-size: 1.8rem;
    margin: 0 0 5px 0;
    text-align: left;
    color: #fff;
    font-weight: 700;
}

.btn-menu p {
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

/* Warna spesifik untuk setiap tombol menu */
.btn-menu-ambil { background-color: #27ae60; } /* Hijau */
.btn-menu-operator { background-color: #2980b9; } /* Biru Tua */
.btn-menu-display { background-color: #8e44ad; } /* Ungu */


/* --- Tambahan untuk Modal Print --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Tampil di atas segalanya */
}

.modal-content {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 340px; /* Lebar umum struk thermal */
    text-align: center;
    color: #333; /* Reset warna teks untuk modal */
}

/* --- Area Cetak di dalam Modal --- */
#print-area {
    border-bottom: 2px dashed #999;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

#print-area h2 {
    font-size: 1.8rem;
    color: #111;
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
}

.print-nomor {
    font-size: 4.5rem;
    font-weight: 900;
    color: #000;
    line-height: 1.1;
    margin: 10px 0;
}

.print-jam {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.print-footer {
    font-size: 0.9rem;
    color: #555;
    margin-top: 20px;
    margin-bottom: 0;
    line-height: 1.4;
}

.modal-actions {
    display: flex;
    gap: 15px;
}
.modal-actions .btn-aksi {
    margin-top: 0;
    font-size: 1rem;
    padding: 12px;
}

/* --- Media Query untuk PRINT (PENTING) --- */
@media print {
    /* Sembunyikan semua elemen di body secara default */
    body * {
        visibility: hidden;
    }
    
    /* Tampilkan HANYA area print dan semua isinya */
    #print-area, #print-area * {
        visibility: visible;
    }
    
    /* Posisikan area print di halaman cetak */
    #print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        border: none;
        color: #000; /* Pastikan teks hitam saat print */
    }

    /* Atur ulang font untuk print agar jelas */
    #print-area h2 {
        font-size: 18pt;
        color: #000;
    }
    .print-nomor {
        font-size: 40pt;
        font-weight: bold;
        color: #000;
    }
    .print-jam, .print-footer {
        font-size: 14pt;
        color: #000;
    }
}



/* --- Tambahan untuk Daftar Tunggu TERLEWAT --- */
.daftar-tunggu.terlewat {
    border-color: #fce1ae; /* Border kuning/oranye */
    background-color: #fffaf0; /* Latar kuning sangat muda */
}

.daftar-tunggu.terlewat h4 {
    color: #e67e22; /* Teks oranye */
    border-bottom-color: #fbe5c4;
}

.daftar-tunggu.terlewat li {
    background-color: #fff;
    border-color: #fce1ae;
    display: flex; /* BARU: untuk mensejajarkan teks dan tombol */
    justify-content: space-between; /* BARU: teks di kiri, tombol di kanan */
    align-items: center; /* BARU: tengahkan secara vertikal */
    padding: 8px 12px;
}

/* Tombol kecil "Panggil" di daftar terlewat */
.btn-panggil-ulang {
    display: inline-block;
    background-color: #e67e22;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s;
}
.btn-panggil-ulang:hover {
    background-color: #d35400;
}

/* Hilangkan style 'menonjol' (hijau) dari item pertama */
.daftar-tunggu.terlewat li:first-child {
    font-size: 1.1rem; /* kembalikan ke normal */
    color: #333; /* kembalikan ke normal */
    background-color: #fff; /* kembalikan ke normal */
    border-color: #fce1ae; /* samakan dengan yg lain */
}

.daftar-tunggu.terlewat li.kosong {
    border-color: transparent;
    background-color: transparent;
    justify-content: center;
}


/* --- Tambahan untuk Tombol Panggil Ulang (Recall) --- */
.btn-aksi.btn-recall {
    background-color: #3498db; /* Biru */
    margin-top: 10px;
}
.btn-aksi.btn-recall:hover {
    background-color: #2980b9;
}
.btn-aksi.btn-recall:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}


/* --- Tambahan untuk Tombol Kembali (Global) --- */
.btn-kembali {
    position: fixed; /* Menempel di layar */
    top: 20px;
    left: 20px;
    z-index: 1001; /* Tampil di atas modal (modal-backdrop = 1000) */
    
    /* Styling (Mirip btn-primary Bootstrap) */
    display: inline-block;
    background-color: #3498db; /* Biru */
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.btn-kembali:hover {
    background-color: #2980b9; /* Biru lebih gelap */
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* --- LOGIKA HOVER UNTUK HALAMAN DISPLAY --- */

/* 1. Sembunyikan tombol secara default HANYA di display-page */
body.display-page .btn-kembali {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    /* Transisi agar muncul mulus */
    transition: all 0.3s ease;
}

/* 2. Tampilkan tombol saat mouse hover di mana saja di display-page */
body.display-page:hover .btn-kembali {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- Tambahan untuk Tombol Unlock Audio (Display) --- */
.audio-unlock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85); /* Latar belakang gelap transparan */
    z-index: 2000; /* Tampil di atas segalanya */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.audio-unlock-button {
    padding: 25px 50px;
    font-size: 5.5rem;
    font-weight: 900;
    color: #333;
    background-color: #fff;
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}
.audio-unlock-button:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}
/* --- Tambahan untuk Halaman Operator Full-Width --- */
/* 
body.operator-page {
    padding: 0;
    margin: 0;
    background-color: #f4f7f6; 
    min-height: 100vh;
    display: block; 
    align-items: normal;
    justify-content: normal;
}

body.operator-page .container {
    width: 100%;
    max-width: none; 
    
    box-shadow: none;
    border-radius: 0;
    
    padding: 20px;
    margin: 0;
    
    min-height: calc(100vh - 40px); 
    box-sizing: border-box; 
    background-color: #ffffff;
}

body.operator-page .container h1 {
    font-size: 2.5rem;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    margin-top: 0;
}

body.operator-page .operator-container {
    justify-content: stretch;
    gap: 20px;
}
body.operator-page .panel-antrean {
    flex-basis: 48%; 
    flex-grow: 1;   
} */