/* Layout dua kolom */
.two-column {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* kiri besar, kanan kecil */
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 100px;
    /* beri jarak aman dari banner */
}

/* Panel umum */
.panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
}

/* Kotak pasien dipanggil */
.called-box {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(0, 128, 255, 0.3);
    color: #fff;
    font-size: 16px;
    /* ↓ dari 20px */
    font-weight: bold;
    text-align: center;
    padding: 16px;
    /* ↓ dari 20px */
    border-radius: 12px;
}

.called-box div {
    margin-bottom: 6px;
}

/* Big code (no_resep / no_rawat) */
.big-code {
    font-size: 2.0em;
    /* ↓ dari 2.5em */
    font-weight: bold;
    margin-bottom: 8px;
    display: block;
}

/* Versi ringkas khusus panel PANGGIL SEKARANG */
#panggilSekarang {
    padding: 8px;
    min-height: 60px;
}

#panggilSekarang .big-code {
    font-size: 2.0em;
    /* ↓ dari 1.5em */
    margin: 0;
}

/* Perkecil juga di PANGGILAN TERAKHIR */
#calledLast .big-code {
    font-size: 2.0em;
    /* ↓ dari 1.5em */
    margin-bottom: 6px;
}

/* Blok Bayar */
.penjab {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: bold;
    background: #007BFF;
    /* default biru untuk Umum */
    color: #fff;
}

.penjab.highlight {
    background: #ffc107;
    /* kuning untuk selain Umum */
    color: #000;
}

/* Panel tabel */
.table-panel {
    overflow: hidden;
}

.table-container {
    width: 100%;
}

/* Mode scroll untuk daftar pasien */
.table-container.scrollable,
.poli-box .table-container {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 6px;
}

/* Styling scrollbar */
.poli-box .table-container::-webkit-scrollbar {
    width: 8px;
}

.poli-box .table-container::-webkit-scrollbar-thumb {
    background: rgba(0, 128, 255, 0.5);
    border-radius: 4px;
}

.poli-box .table-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

/* Tabel umum */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 14px;
}

.data-table th {
    background: rgba(0, 128, 255, 0.3);
    font-weight: bold;
    font-size: 15px;
}

.data-table tr:hover {
    background: rgba(0, 128, 255, 0.15);
}

/* Judul panel */
.panel h2 {
    text-align: center;
    font-size: 20px;
    color: #fff;
    margin-bottom: 10px;
}

/* Panggilan terakhir */
.called-box.last {
    background: #28a745;
    /* hijau solid */
    color: #fff;
    font-weight: bold;
}

/* Grid daftar per POLI (default untuk antrian_poli.php) */
.poli-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Override khusus untuk halaman bypass */
.dashboard.bypass .poli-grid {
    display: block;
    /* jangan grid 2 kolom */
    width: 100%;
    /* penuh ke kanan */
}

/* Box daftar poli/pasien */
.poli-box {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #eee;
}

.poli-box h3 {
    margin: 0 0 5px 0;
    color: #fff;
}

.poli-box p {
    margin: 2px 0;
    color: #ddd;
}

/* Info poli */
.poli-info {
    display: flex;
    justify-content: space-between;
    margin: 4px 0 8px 0;
    color: #ddd;
}

.poli-info span {
    font-size: 14px;
}

/* Tabel dalam poli-box */
.poli-box table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.poli-box th,
.poli-box td {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px;
    font-size: 13px;
    color: #fff;
}

.poli-box th {
    background: rgba(0, 128, 255, 0.3);
}

/* Hide panel jika perlu */
.hidden {
    display: none;
}

/* Responsive grid */
@media (max-width: 768px) {
    .two-column {
        grid-template-columns: 1fr;
    }

    .poli-grid {
        grid-template-columns: 1fr;
    }
}

/* === UNIVERSAL LAB & RAD ANTRIAN === */
#panggilSampel.called-box {
    background: rgba(0, 128, 255, 0.5);
    color: #fff;
    font-weight: bold;
}

#panggilHasil.called-box {
    background: rgba(40, 167, 69, 0.5);
    color: #fff;
    font-weight: bold;
}

.lab-grid .data-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.lab-grid .data-table th,
.lab-grid .data-table td {
    padding: 8px 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lab-grid .data-table th {
    background: rgba(0, 128, 255, 0.3);
    font-weight: bold;
    font-size: 15px;
}

.lab-grid .data-table tr:hover {
    background: rgba(0, 128, 255, 0.15);
}

#panggilSampel .big-code,
#panggilHasil .big-code {
    font-size: 2.0em;
    /* ↓ dari 1.8em */
}

#panggilSampel,
#panggilHasil {
    font-size: 15px;
    /* ↓ dari 16px */
}

/* Tabel bypass full width */
.full-table {
    width: 100%;
    border-collapse: collapse;
}

.full-table th,
.full-table td {
    padding: 8px;
    border: 1px solid #444;
    text-align: left;
}

.full-table th {
    background: #333;
    color: #fff;
}

/* Tombol panggil bypass */
.btn-panggil {
    background: #ff5722;
    color: #fff;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-panggil:hover {
    background: #e64a19;
}

/* Notifikasi inline */
#notif {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #4caf50;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    display: none;
    z-index: 9999;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* === FARMASI DASHBOARD: DAFTAR RESEP === */

/* Grid farmasi: NON RACIKAN & RACIKAN sama besar */
.farmasi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* dua kolom sama besar */
    gap: 10px;
    /* jarak antar panel */
}

/* Panel farmasi */
.farmasi-grid .panel {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    min-height: 250px;
    padding: 6px;
    /* kecilkan padding agar isi tabel rata kiri */
}

/* Table container */
.farmasi-grid .table-container {
    flex: 1;
    overflow-x: auto;
    /* scroll horizontal kalau tabel melebar */
    margin-left: 0;
    padding-left: 0;
}

/* Tabel resep */
.farmasi-grid .data-table {
    width: 100%;
    table-layout: fixed;
    /* kolom proporsional */
    border-collapse: collapse;
}

.farmasi-grid .data-table th,
.farmasi-grid .data-table td {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px;
    font-size: 14px;
    color: #fff;
}

/* Kolom No. Resep – diperlebar */
.farmasi-grid .data-table th:nth-child(1),
.farmasi-grid .data-table td:nth-child(1) {
    width: 30%;
    /* diperlebar agar tidak berhimpitan */
    text-align: center;
    padding-right: 6px;
}

/* Kolom Nama Pasien – disesuaikan */
.farmasi-grid .data-table th:nth-child(2),
.farmasi-grid .data-table td:nth-child(2) {
    width: 40%;
    /* disesuaikan supaya tidak bertabrakan */
    white-space: normal;
    word-break: break-word;
    text-align: left;
    padding-left: 6px;
}

/* Kolom Dokter */
.farmasi-grid .data-table th:nth-child(3),
.farmasi-grid .data-table td:nth-child(3) {
    width: 30%;
    text-align: left;
}

/* Pastikan kolom kiri dashboard khusus Farmasi rata kiri */
.dashboard.farmasi .left-column {
    margin-left: 0;
    padding-left: 0;
}

.btn-panggil[disabled] {
    background: #ccc;
    /* abu-abu */
    color: #666;
    /* teks lebih redup */
    cursor: not-allowed;
    /* pointer jadi tanda larangan */
    opacity: 0.7;
    /* sedikit transparan */
}

/* === ANTRIAN LOKET === */
.center-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}

.loket-card {
    max-width: 600px;
    /* lebih lebar */
    text-align: center;
    padding: 40px;
    /* lebih besar */
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.loket-title {
    font-size: 40px;
    /* judul lebih besar */
    font-weight: bold;
    margin-bottom: 25px;
}

.loket-number {
    font-size: 80px;
    /* nomor antrian sangat besar */
    font-weight: bold;
    color: #00c6ff;
    margin-bottom: 30px;
}

.loket-number.empty {
    font-size: 24px;
    /* teks fallback lebih kecil */
    font-weight: bold;
    color: #ff4b2b;
}

.loket-info {
    font-size: 22px;
    /* jam tetap normal */
    margin-bottom: 25px;
}

.loket-info span {
    font-size: 24px;
    font-weight: bold;
}

.loket-footer {
    font-size: 32px;
    /* instruksi lebih besar */
    font-weight: bold;
    color: #28a745;
}

/* === ANTRIAN LOKET PANGGIL === */
.grid-container {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.left-panel {
    flex: 2;
}

.right-panel {
    flex: 1;
}

/* Tabel daftar antrian */
table.antrian-loket {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

table.antrian-loket th,
table.antrian-loket td {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    font-size: 15px;
}

table.antrian-loket th {
    background: linear-gradient(90deg, #0056b3, #007bff);
    color: #fff;
    font-weight: bold;
    letter-spacing: 0.5px;
}

table.antrian-loket tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.04);
}

table.antrian-loket tbody tr:hover {
    background: rgba(0, 123, 255, 0.12);
    transition: background 0.2s ease-in-out;
}

table.antrian-loket .empty-row td {
    text-align: center;
    font-style: italic;
    color: #dc3545;
    /* merah elegan */
}

/* Kotak antrian yang dipanggil (panel kanan) */
.loket-card.small {
    max-width: 100%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.loket-card.small .loket-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #ebeef1;
}

.loket-card.small .loket-number {
    font-size: 58px;
    font-weight: bold;
    color: #00c6ff;
    margin-bottom: 18px;
}

.loket-card.small .loket-footer {
    font-size: 18px;
    font-weight: bold;
    color: #28a745;
}

/* Tombol */
.btn-panggil,
.btn-ulang {
    padding: 6px 14px;
    background: #28a745;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease-in-out;
}

.btn-panggil:hover,
.btn-ulang:hover {
    background: #218838;
}