/* ═══════════════════════════════════════════════════════
   style.css — GAYA DASHBOARD
   Bagian yang sering diubah ditandai ★.
   Urutan: DASAR → HEADER → MAIN → WATERMARK → KONTEN →
           KARTU → FOOTER → RESPONSIF → TABEL DOKTER
   ═══════════════════════════════════════════════════════ */

/* ============ DASAR ============ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #0d1b1e;
}

::selection {
    background: #5eead4;
    color: #0d1b1e;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0d1b1e;
}

::-webkit-scrollbar-thumb {
    background: #1f4a45;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2dd4bf;
}

/* ============ HEADER (putih, logo + jam + status) ============ */
header {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 32px;
    position: relative;
    z-index: 10;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

/* garis teal berkedip di bawah header */
header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #14b8a6, #5eead4, #14b8a6, transparent);
    background-size: 200% 100%;
    animation: shimmer 5s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ★ ukuran logo header */
header img {
    height: 48px;
    width: auto;
}

.header-text .brand-title {
    font-size: 15px;
    color: #1a1a1a;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.header-text .brand-sub {
    font-size: 10px;
    color: #8a97a3;
    letter-spacing: 1.5px;
    margin-top: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ★ tampilan jam di header */
.header-clock {
    font-size: 11px;
    font-weight: 700;
    color: #0f766e;
    background: #e6fbf5;
    border: 1px solid #b8ece0;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #0f6e56;
    background: #e1f5ee;
    padding: 5px 12px;
    border-radius: 20px;
}

/* ---- titik status berdenyut ---- */
.header-status .dot,
.online-tag .dot,
.footer-center .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.header-status .dot {
    background: #10b981;
    animation: dotPulseGreen 2s ease-out infinite;
}

.online-tag .dot,
.footer-center .dot {
    background: #5eead4;
    animation: dotPulseTeal 2s ease-out infinite;
}

@keyframes dotPulseGreen {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes dotPulseTeal {
    0% {
        box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.55);
    }

    70% {
        box-shadow: 0 0 0 7px rgba(94, 234, 212, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(94, 234, 212, 0);
    }
}

/* ============ MAIN (area gelap grid EKG) ============ */
main {
    background-color: #0d1b1e;
    background-image:
        linear-gradient(#173035 1px, transparent 1px),
        linear-gradient(90deg, #173035 1px, transparent 1px);
    background-size: 22px 22px;
    color: #e6faf5;
    padding: 32px;
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* vignette biar fokus ke tengah */
main::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(4, 10, 12, 0.65) 100%);
    pointer-events: none;
    z-index: 0;
}

/* ============ WATERMARK FOTO (latar foto besar) ============ */
.watermark-foto {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* ★ tingkat keterlihatan foto latar: 0.15 → makin besar makin jelas */
.watermark-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
}

/* ============ KONTEN (kolom utama di dalam main) ============ */
.content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* badge ONLINE kecil di atas panel */
.online-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #5eead4;
    background: #0f2529;
    border: 1px solid #1f4a45;
    padding: 5px 14px;
    border-radius: 20px;
    width: fit-content;
    margin: 0 auto 10px;
    box-shadow: 0 0 16px rgba(94, 234, 212, 0.08);
}

/* panel DIVISI AKTIF */
.status-panel {
    background: linear-gradient(180deg, #10292e, #0f2529);
    border: 1px solid #1f4a45;
    border-radius: 12px;
    padding: 14px 24px;
    max-width: 420px;
    margin: 0 auto 14px;
    text-align: center;
    box-shadow: 0 0 24px rgba(45, 212, 191, 0.08), inset 0 1px 0 rgba(94, 234, 212, 0.06);
}

.status-bar .label {
    font-size: 10px;
    letter-spacing: 2px;
    color: #5eead4;
}

/* ★ ukuran judul divisi besar */
.status-bar h2 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 8px;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #ffffff 30%, #5eead4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* animasi judul saat ganti halaman */
.status-bar h2.flash {
    animation: titleIn 0.5s ease;
}

@keyframes titleIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.status-bar .meta {
    font-size: 11px;
    color: #7fa8a3;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #1f4a45;
}

.switch-info {
    text-align: center;
    padding: 6px 0 4px;
    font-size: 11px;
    color: #7fa8a3;
}

/* ---- progress bar countdown ---- */
.switch-progress {
    width: min(420px, 90%);
    height: 3px;
    margin: 0 auto 12px;
    background: #123338;
    border-radius: 99px;
    overflow: hidden;
}

.switch-progress-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #0d9488, #5eead4);
    border-radius: 99px;
    transition: width 1s linear;
    box-shadow: 0 0 8px rgba(94, 234, 212, 0.6);
}

/* ---- garis EKG dekoratif ---- */
.pulse-line {
    display: block;
    margin: 0 auto 14px;
    max-width: 700px;
    width: 100%;
    height: 16px;
}

.pulse-base {
    fill: none;
    stroke: #5eead4;
    stroke-width: 1.2;
    opacity: 0.25;
}

.pulse-sweep {
    fill: none;
    stroke: #5eead4;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-dasharray: 90 710;
    filter: drop-shadow(0 0 4px rgba(94, 234, 212, 0.9));
    animation: sweep 2.8s linear infinite;
}

@keyframes sweep {
    from {
        stroke-dashoffset: 800;
    }

    to {
        stroke-dashoffset: 0;
    }
}

/* ============ GRID KARTU (halaman kartu) ============ */
.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 18px;
    max-width: 1100px;
    margin: 0 auto;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 2px 6px 10px;
    scrollbar-width: thin;
    scrollbar-color: #1f4a45 transparent;
}

/* ★ ukuran kartu */
.badge-wrap {
    width: 150px;
    text-align: center;
    animation: cardIn 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.92);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* klip lanyard kecil di atas kartu */
.badge-clip {
    width: 28px;
    height: 10px;
    background: linear-gradient(180deg, #5eead4, #14b8a6);
    border-radius: 2px 2px 0 0;
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.4);
}

.card {
    background: linear-gradient(180deg, #10292e, #0f2529);
    border: 1px solid #1f4a45;
    border-radius: 12px;
    padding: 16px 12px 18px;
    text-align: center;
    margin-top: -1px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-6px) scale(1.04);
    border-color: #5eead4;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4), 0 0 18px rgba(94, 234, 212, 0.2);
}

.card .top-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, #5eead4, transparent);
    border-radius: 2px;
    margin: -16px -12px 12px;
}

/* ★ ukuran foto avatar di kartu */
.card img.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 1px solid #2dd4bf;
    object-fit: cover;
    background: #123a38;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover .avatar {
    transform: scale(1.1);
    box-shadow: 0 0 14px rgba(94, 234, 212, 0.45);
}

/* ★ ukuran teks nama di kartu */
.card .name {
    font-size: 12px;
    color: #e6faf5;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* badge role (EMS/EMT/KOOR dst.) */
.card .role {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #0d1b1e;
    background: #5eead4;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(94, 234, 212, 0.35);
}

/* label tambahan (BACKUP EMT / EMT / EMS) di bawah role */
.card .role-extra {
    display: block;
    height: 12px;
    margin-top: 5px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 12px;
    color: #fbbf24;
}

.empty-msg {
    padding: 60px 40px;
    /* lebih tinggi */
    text-align: center;
    color: #7fa8a3;
    font-size: 16px;
    /* teks lebih besar */
    font-weight: 700;
    letter-spacing: 3px;
    /* huruf berjarak biar formal */
    width: 100%;
    border: 1px dashed #1f4a45;
    border-radius: 10px;
    animation: cardIn 0.45s ease backwards;
}

/* ============ FOOTER (biru gelap) ============ */
footer {
    background: #062038;
    color: #7fa8a3;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    border-top: 1px solid #0f3550;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #5eead4, transparent);
    background-size: 200% 100%;
    animation: shimmer 5s linear infinite;
}

footer .footer-left {
    color: #5c7a86;
}

footer .footer-center {
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 1px;
    color: #7fa8a3;
}

footer .footer-right {
    color: #5eead4;
    font-weight: 600;
}

/* ============ RESPONSIF (HP) ============ */
@media (max-width: 640px) {
    header {
        padding: 12px 16px;
    }

    header img {
        height: 38px;
    }

    .header-text .brand-title {
        font-size: 13px;
    }

    .header-right {
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }

    main {
        padding: 20px 12px;
    }

    .status-panel {
        padding: 16px;
        max-width: 100%;
    }

    .status-bar h2 {
        font-size: 19px;
    }

    .badge-wrap {
        width: 130px;
    }

    .card img.avatar {
        width: 52px;
        height: 52px;
    }

    footer {
        padding: 12px 16px;
        flex-direction: column;
        gap: 6px;
    }
}

/* hormati pengaturan "kurangi gerakan" di OS */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* layering: panel & elemen atas tetap di depan latar */
.status-panel,
.online-tag,
.switch-info,
.switch-progress,
.pulse-line {
    position: relative;
}

/* ═══════════════════════════════════════════════════════
   TABEL DOKTER (halaman PROGRAM STASE)
   ═══════════════════════════════════════════════════════ */

.tabel-wrap {
    width: 100%;
    overflow-x: auto;
}

/* banner hijau judul di atas tabel */
.tabel-banner {
    text-align: center;
    background: linear-gradient(180deg, #14532d, #166534);
    border: 1px solid #22c55e;
    color: #e6faf5;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 3px;
    padding: 10px;
}

.tabel-dokter {
    width: 100%;
    border-collapse: collapse;
    background: #0f2529;
    border: 2px solid #2dd4bf;
    font-size: 13px;
    table-layout: fixed;
}

.tabel-dokter th {
    background: #10292e;
    color: #5eead4;
    letter-spacing: 2px;
    font-size: 12px;
    padding: 12px;
    border: 1px solid #2dd4bf;
}

/* ★ tinggi kotak sel (semua baris seragam walau kosong) */
.tabel-dokter td {
    border: 1px solid #1f4a45;
    padding: 10px 12px;
    color: #e6faf5;
    vertical-align: middle;
    text-align: center;
    height: 72px;
    overflow: hidden;
    word-break: break-word;
}

/* ★ LEBAR KOLOM (total harus 100%) */
.tabel-dokter col.c-major {
    width: 8%;
}

.tabel-dokter col.c-stase {
    width: 11%;
}

.tabel-dokter col.c-nama {
    width: 27%;
}

.tabel-dokter col.c-spes {
    width: 17%;
}

.tabel-dokter col.c-res {
    width: 22%;
}

.tabel-dokter col.c-coass {
    width: 18%;
}

/* kolom STASE MAJOR (paling kiri) */
.tabel-dokter .sel-stase-major {
    background: #0a1e22;
    color: #5eead4;
    font-weight: 700;
    font-size: 11px;
}

/* kolom STASE */
.tabel-dokter .sel-stase {
    background: #0d2226;
    color: #5eead4;
    font-weight: 700;
    font-size: 12px;
}

/* kolom KONSULEN (rapat kiri) */
.tabel-dokter .sel-nama {
    font-weight: 700;
    text-align: left;
    padding-left: 16px;
    line-height: 1.8;
}

/* kolom SPESIALISASI */
.tabel-dokter .sel-spes {
    color: #b8d8d2;
}

/* kolom CO.ASS (rapat kiri, latar gelap) */
.tabel-dokter .sel-coass {
    background: #0d2226;
    font-size: 12px;
    line-height: 1.8;
    text-align: left;
    padding-left: 16px;
}

/* kolom RESIDEN (rapat kiri) */
.tabel-dokter .sel-res {
    text-align: left;
    padding-left: 16px;
}

/* baris ekstra (barisEkstra di config) — tone sedikit beda */
.tabel-dokter tr.baris-ekstra td {
    height: auto;
    background: #0d2226;
}

/* ★ NAMA AVAILABLE: warna hijau saat nama terdeteksi di API */
.tabel-dokter .nm-online {
    color: #4ade80;
    font-weight: 700;
}

/* ============ HALAMAN FOTO (dari library) ============ */
/* foto di halaman ini dibuat lebih besar dari kartu biasa */

/* (penanda seksi saja) */


/* ============ HALAMAN PENGUMUMAN ============ */
.pengumuman-box {
    width: 100%;
    background: linear-gradient(180deg, #10292e, #0f2529);
    border: 1px solid #1f4a45;
    border-radius: 12px;
    padding: 28px 36px;
    box-shadow: 0 0 24px rgba(45, 212, 191, 0.08);
    animation: cardIn 0.45s ease backwards;
}

/* ★ ukuran & jarak teks pengumuman */
.pengumuman-item {
    text-align: left;
    font-size: 15px;
    line-height: 1.9;
    color: #e6faf5;
    padding-left: 22px;
    position: relative;
}

/* bullet teal di depan tiap pengumuman */
.pengumuman-item::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #5eead4;
    font-weight: 700;
}


/* ============ HALAMAN FOTO UTAMA ============ */
.foto-utama-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    animation: cardIn 0.6s ease backwards;
}

/* ★ ukuran foto utama — sesuaikan selera */
.foto-utama {
    max-width: 640px;
    /* lebar maksimal */
    max-height: 60vh;
    /* maksimal 60% tinggi layar */
    object-fit: contain;
    /* foto utuh, tidak ter-crop */
    border: 2px solid #2dd4bf;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(45, 212, 191, 0.25), 0 12px 30px rgba(0, 0, 0, 0.4);
    background: #0f2529;
}

/* teks keterangan di bawah foto */
.foto-ket {
    margin-top: 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #5eead4;
    text-align: center;
}