/* =========================================================
   SinTast - TAMPILAN HP (mobile.css)
   Dimuat PALING AKHIR di semua halaman, jadi menimpa aturan lama.
   Hanya aktif di layar <= 768px; tampilan laptop tidak berubah.
========================================================= */
/* Font Poppins dimuat di semua halaman supaya seragam dengan Beranda */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');


/* ---------- Dasar: tidak boleh geser kiri-kanan ---------- */
@media (max-width: 768px) {
    html, body {
        max-width: 100%;
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    img, video, canvas, svg { max-width: 100% !important; height: auto; }
    /* CSS lama menggeser header dengan translateX(+-60px): matikan di HP */
    .brand-logo, .brand-text, .brand-text h2, .brand-text p, .header nav, nav {
        transform: none !important;
    }
    * { -webkit-tap-highlight-color: transparent; }

    input, select, textarea { max-width: 100%; }
    input[type="checkbox"], input[type="radio"] { font-size: initial !important; }

    /* Tombol mudah disentuh */
    button, .btn, a.btn, [role="button"] { min-height: 40px; }

    /* ---------- Header ringkas ---------- */
    .header { overflow: hidden; }
    .header-container {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 6px 10px;
        padding: 8px 12px !important;
        max-width: 100% !important;
    }
    .header-container::before { display: none !important; }
    .header .brand { gap: 8px !important; min-width: 0; flex: 1 1 100% !important; }
    .header .brand-logo { width: 38px !important; height: 38px !important; flex: 0 0 auto; }
    .header .brand-logo img { width: 100% !important; height: 100% !important; object-fit: contain; }
    .header .brand-text h2 { font-size: 17px !important; line-height: 1.1; margin: 0 !important; }
    .header .brand-text p {
        font-size: 9px !important; line-height: 1.25; margin: 2px 0 0 !important;
        display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .header nav {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 2px 14px !important;
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .header nav a { font-size: 12px !important; padding: 4px 2px !important; margin: 0 !important; white-space: nowrap; }
    .header nav a::after { display: none !important; }
    .active-user-header, .badge-user-login { font-size: 11px !important; max-width: 100% !important; white-space: normal !important; margin: 0 !important; padding: 3px 10px !important; }

    /* ---------- Tombol garis tiga (menu) ---------- */
    html body .sidebar-toggle-btn,
    html body.page-beranda .sidebar-toggle-btn {
        left: 12px !important;
        /* tanpa !important: posisi top dari script.js (saat scroll) boleh menimpa, seperti di laptop */
        top: auto;
        bottom: 16px;
        width: 48px !important;
        height: 48px !important;
        border-radius: 50% !important;
        font-size: 22px !important;
        z-index: 1100 !important;
        background: #006B70 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
        box-shadow: 0 6px 18px rgba(0, 60, 66, .4) !important;
    }

    /* ---------- Isi halaman ---------- */
    .container, main, section { max-width: 100% !important; box-sizing: border-box; }
    main.container, .container { padding-left: 12px !important; padding-right: 12px !important; }
    .section-title h2 { font-size: 20px !important; }

    /* Semua grid/baris form jadi 1 kolom */
    .form-grid, .form-row, .grid-2, .grid-3, .row, .two-col, .three-col,
    .input-row, .field-row, .form-group-row, .filter-row, .filter-grid,
    .dash-grid, .stat-grid, .cards, .card-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    .form-row, .input-row, .field-row, .form-group-row, .filter-row, .row, .two-col, .three-col {
        flex-direction: column !important;
    }
    .form-group, .form-field, .field { width: 100% !important; min-width: 0 !important; }

    /* Kartu data pegawai (Form SPT): 1 kolom */
    html body .employee-grid, html body .employee-grid-fixed,
    html body #form .employee-grid, html body #form .employee-grid-fixed {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
    }
    html body .employee-grid-fixed > .form-group, html body #form .employee-grid-fixed > .form-group { grid-column: auto !important; width: 100% !important; }
    .employee-picker { width: 100%; }

    /* Lebar tetap besar -> boleh mengecil */
    [style*="width:"][style*="px"]:not(img):not(svg):not(.sidebar-toggle-btn) { max-width: 100% !important; }
    form, fieldset, .card, .panel, .box { max-width: 100%; box-sizing: border-box; }
    pre, code { white-space: pre-wrap; word-break: break-word; }

    /* Barisan tombol: turun ke bawah, rata penuh */
    .button-group, .btn-group, .form-actions, .actions, .hasil-action-buttons, .modal-actions,
    .modal-buttons, .modal-footer, .toolbar, .action-bar {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .button-group > *, .btn-group > *, .form-actions > *, .hasil-action-buttons > *,
    .modal-actions > *, .modal-buttons > *, .modal-footer > * {
        flex: 1 1 140px;
    }

    /* ---------- Tabel: geser samping di dalam kotak sendiri ---------- */
    .tbl-scroll {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 10px;
        position: relative;
    }
    .tbl-scroll > table { min-width: 560px; }
    .tbl-scroll th, .tbl-scroll td { font-size: 12px !important; padding: 8px 8px !important; }

    /* ---------- Modal / popup ---------- */
    .modal, .modal-overlay, .modal-kegiatan, .password-modal {
        padding: 10px !important;
        box-sizing: border-box;
    }
    .modal-content, .modal-box, .modal-kegiatan-box, .password-modal-box {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 92vh !important;
        overflow-y: auto !important;
        margin: 0 auto !important;
        box-sizing: border-box;
        border-radius: 14px !important;
    }


    /* Footer */
    footer { padding: 18px 12px !important; font-size: 12px !important; text-align: center; }
    footer * { max-width: 100%; }
}

/* ---------- HP kecil (<= 420px) ---------- */
@media (max-width: 420px) {
    .header .brand-text p { display: none; }
    .header .brand-text h2 { font-size: 16px !important; }
    h1 { font-size: 22px; }
    .minda-card-grid { gap: 8px !important; }
}

/* ---------- Halaman login: hiasan tidak boleh melebar ---------- */
@media (max-width: 768px) {
    body { position: relative; }
    .top-wave, .deco-wave, .deco-circle, .light-line { max-width: 100vw; }
}

/* Cetak tidak ikut terpengaruh */
@media print {
    .tbl-scroll { overflow: visible !important; }
    .tbl-scroll > table { min-width: 0 !important; }
}

/* Kartu data pegawai (Form SPT): 2 kolom di laptop, 1 kolom di HP */
.employee-grid { grid-template-columns: 1fr 1fr !important; }
@media (max-width: 768px) {
    html body .employee-grid { grid-template-columns: minmax(0, 1fr) !important; }
}

/* =========================================================
   VERSI KECIL: huruf form + sidebar lebih ringkas di HP
========================================================= */
@media (max-width: 768px) {

    /* ---------- FORM ---------- */
    html body main.container#form { padding: 28px 14px 50px !important; }
    html body .section-title { margin-bottom: 12px !important; }
    html body .section-title span { font-size: 9px !important; padding: 3px 10px !important; }
    html body .section-title h2 { font-size: 17px !important; margin: 6px 0 2px !important; }
    html body .section-title p { font-size: 11px !important; line-height: 1.4; }

    html body #form .card { padding: 14px 12px !important; margin-bottom: 12px !important; border-radius: 14px !important; }
    html body #form .card-title { gap: 9px !important; margin-bottom: 12px !important; }
    html body #form .card-title h3 { font-size: 13px !important; }
    html body #form .card-title p { font-size: 10px !important; }
    html body #form .number { width: 28px !important; height: 28px !important; font-size: 11px !important; border-radius: 9px !important; }

    html body #form .form-group { gap: 4px !important; }
    html body #form .form-group label { font-size: 10.5px !important; }
    html body #form input,
    html body #form textarea,
    html body #form select {
        font-size: 12px !important;
        padding: 7px 10px !important;
        border-radius: 8px !important;
    }
    html body #form textarea { min-height: 56px !important; }
    html body #form .form-grid,
    html body #form .employee-grid { gap: 10px !important; }
    html body #form .employee-card { padding: 10px !important; margin-bottom: 10px !important; }
    html body #form .employee-card h4,
    html body #form .employee-header h4 { font-size: 12px !important; }
    html body #form .add-button { font-size: 11px !important; padding: 7px 12px !important; }
    html body #form .btn-remove,
    html body #form .employee-header button { font-size: 10px !important; padding: 5px 10px !important; min-height: 0 !important; }
    html body #form .form-actions .btn-cancel,
    html body #form .form-actions .btn-save,
    html body #form .form-actions .btn-submit,
    html body #form .form-actions #backToHome {
        font-size: 12px !important;
        padding: 9px 14px !important;
        min-height: 0 !important;
    }

    /* Halaman lain: form & isian ikut lebih kecil */
    html body input, html body select, html body textarea { font-size: 12.5px; }
    html body label { font-size: 11px; }

    /* ---------- SIDEBAR ---------- */
    html body .sidebar-drawer { width: 72vw !important; max-width: 260px !important; }
    html body .sidebar-drawer .minda-sidebar-header { padding: 12px 12px 6px !important; }
    html body .sidebar-drawer .minda-sidebar-header::before {
        height: 56px !important;
        margin-bottom: 10px !important;
        border-radius: 14px !important;
        background-size: auto 38px, auto 30px, 1px 30px !important;
    }
    html body .sidebar-drawer .minda-brand { padding-left: 24px !important; }
    html body .sidebar-drawer .minda-brand h2 { font-size: 13px !important; }
    html body .sidebar-drawer .minda-brand p { font-size: 8px !important; letter-spacing: .08em !important; }
    html body .sidebar-drawer .sidebar-close-btn { font-size: 20px !important; }

    html body .sidebar-drawer .sidebar-body { padding: 4px 10px 20px !important; }
    html body .sidebar-drawer .minda-card-grid { gap: 3px !important; }
    html body .sidebar-drawer .minda-card-grid::before { font-size: 8.5px !important; padding: 6px 8px 4px !important; }
    html body .sidebar-drawer .minda-card-grid .minda-card:last-child { margin-top: 30px !important; }
    html body .sidebar-drawer .minda-card-grid .minda-card:last-child::before { font-size: 8.5px !important; top: -22px !important; left: 8px !important; }
    html body .sidebar-drawer .minda-card-grid .minda-card,
    html body .sidebar-drawer .minda-card-grid .minda-card:nth-child(n) {
        gap: 10px !important;
        padding: 5px 8px !important;
        border-radius: 10px !important;
        min-height: 0 !important;
    }
    html body .sidebar-drawer .minda-card-grid .minda-icon-circle {
        width: 30px !important;
        height: 30px !important;
        border-radius: 9px !important;
        flex: 0 0 30px !important;
    }
    html body .sidebar-drawer .minda-card-grid .minda-icon-circle::before {
        width: 16px !important;
        height: 16px !important;
        flex: 0 0 16px !important;
    }
    html body .sidebar-drawer .minda-card-grid .minda-card-title { font-size: 12px !important; }
    html body .sidebar-drawer .minda-card-grid .minda-card.is-locked::after { font-size: 10px !important; }

    /* Tombol ☰ disembunyikan saat sidebar terbuka (tidak menimpa menu) */
    body:has(.sidebar-drawer.active) .sidebar-toggle-btn,
    body:has(.sidebar-drawer.open) .sidebar-toggle-btn { display: none !important; }

    /* Tombol ☰ sedikit lebih kecil */
    html body .sidebar-toggle-btn,
    html body.page-beranda .sidebar-toggle-btn {
        width: 42px !important;
        height: 42px !important;
        font-size: 19px !important;
    }
}

/* Ikon untuk menu Kelola Data (sebelumnya kotak putih kosong) */
.sidebar-drawer #cardPengelolaanData .minda-icon-circle::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h8M20 6h0M4 12h2M14 12h6M4 18h10M22 18h0'/%3E%3Ccircle cx='16' cy='6' r='2'/%3E%3Ccircle cx='10' cy='12' r='2'/%3E%3Ccircle cx='18' cy='18' r='2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h8M20 6h0M4 12h2M14 12h6M4 18h10M22 18h0'/%3E%3Ccircle cx='16' cy='6' r='2'/%3E%3Ccircle cx='10' cy='12' r='2'/%3E%3Ccircle cx='18' cy='18' r='2'/%3E%3C/svg%3E");
}

/* =========================================================
   NAVBAR SERAGAM DI SEMUA HALAMAN (HP)
   Baris 1: logo + nama   |   Baris 2: menu berbentuk pil
========================================================= */
@media (max-width: 768px) {
    html body .header-container {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        padding: 10px 12px 10px !important;
        min-height: 0 !important;
        gap: 9px 10px !important;
    }

    /* --- Baris 1: brand --- */
    html body .header .brand { flex: 1 1 100% !important; gap: 10px !important; min-width: 0; }
    html body .header .brand-logo { width: 40px !important; height: 40px !important; flex: 0 0 40px !important; }
    html body .header .brand-text { min-width: 0; }
    html body .header .brand-text h2 {
        font-size: 18px !important;
        font-weight: 800 !important;
        letter-spacing: .2px;
        line-height: 1.1 !important;
    }
    html body .header .brand-text p {
        display: block !important;
        font-size: 9.5px !important;
        font-weight: 500;
        opacity: .9;
        margin: 2px 0 0 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        -webkit-line-clamp: unset;
        line-clamp: unset;
    }

    /* --- Baris 2: menu pil, bisa digeser kalau kepanjangan --- */
    html body .header nav {
        flex: 1 1 100% !important;
        width: 100% !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 4px !important;
        padding: 9px 0 0 !important;
        margin: 0 !important;
        border-top: 1px solid rgba(255, 255, 255, .20);
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    html body .header nav::-webkit-scrollbar { display: none; }

    html body .header nav a:not([style*="display: none"]) {
        display: inline-flex !important;
        align-items: center;
        flex: 0 0 auto;
        gap: 4px;
        padding: 5px 9px !important;
        font-size: 10.5px !important;
        font-weight: 600 !important;
        letter-spacing: 0 !important;
        line-height: 1.2;
        border-radius: 999px;
        background: rgba(255, 255, 255, .13);
        border: 1px solid rgba(255, 255, 255, .24);
        text-shadow: none !important;
        white-space: nowrap;
        min-height: 0 !important;
    }
    html body .header nav a::after { display: none !important; }

    /* halaman yang sedang dibuka */
    html body .header nav a.nav-aktif {
        background: #ffffff !important;
        border-color: #ffffff !important;
        color: #006B70 !important;
        text-shadow: none !important;
        box-shadow: 0 2px 8px rgba(0, 60, 66, .25);
    }

    /* badge akun: didorong ke kanan, diikuti Logout */
    html body .header nav .active-user-header,
    html body .header nav .badge-user-login {
        flex: 0 0 auto;
        margin: 0 0 0 auto !important;
        padding: 5px 8px !important;
        font-size: 10px !important;
        border-radius: 999px !important;
        background: rgba(0, 50, 56, .38) !important;
        border: 1px solid rgba(183, 245, 247, .35) !important;
        box-shadow: none !important;
        white-space: nowrap !important;
        max-width: none !important;
        overflow: visible !important;
    }
    html body .header nav #btnLogoutSinTast {
        background: rgba(255, 96, 96, .30) !important;
        border-color: rgba(255, 190, 190, .60) !important;
    }

    /* Beranda: tinggi navbar jadi 2 baris, isi hero ikut turun */
    html body.page-beranda { --tinggi-header: 108px; }
    html body #btnKembaliHalaman { top: 116px !important; left: 12px !important; }
    html body.page-beranda .hero { padding-top: calc(var(--tinggi-header) + 20px) !important; }
}

/* HP sempit: menu turun ke baris berikutnya, tidak perlu digeser */
@media (max-width: 380px) {
    html body .header nav { flex-wrap: wrap !important; overflow: visible !important; row-gap: 5px !important; }
    html body .header nav .active-user-header,
    html body .header nav .badge-user-login { margin-left: 0 !important; }
    html body.page-beranda { --tinggi-header: 128px; }
    html body #btnKembaliHalaman { top: 136px !important; }
}

/* =========================================================
   FONT SERAGAM: Poppins di semua halaman (sama dengan Beranda)
   Surat/dokumen cetak tetap memakai font aslinya (aturan .surat dll).
========================================================= */
html body,
html body input,
html body textarea,
html body select,
html body button,
html body table {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}
html body .header,
html body .header * {
    font-family: 'Poppins', 'Segoe UI', sans-serif !important;
}
/* Tabel di dalam surat (halaman 1 & Lampiran) tetap Calibri seperti surat aslinya */
html body .surat table,
html body .halaman-kedua table,
html body #suratOutput table {
    font-family: Calibri, 'Segoe UI', sans-serif;
}

/* =========================================================
   TOMBOL KEMBALI: ukuran biasa (tidak memanjang) di semua halaman
========================================================= */
@media (max-width: 768px) {
    html body #btnKembaliHalaman,
    html body .back-menu-btn,
    html body .btn-kembali,
    html body .btn-kembali-pill,
    html body #btnKembaliRekap,
    html body #backToHome,
    html body [data-kembali],
    html body #form .form-actions #backToHome {
        width: auto !important;
        min-width: 0 !important;
        max-width: max-content !important;
        flex: 0 0 auto !important;
        right: auto !important;
        padding: 7px 16px !important;
        height: auto !important;
        min-height: 0 !important;
        font-size: 12px !important;
        gap: 6px !important;
        line-height: 1.3 !important;
        align-self: flex-start;
    }
    html body #btnKembaliHalaman .panah { font-size: 14px !important; }
}

@media (max-width: 768px) {
    html body #btnKembaliHalaman#btnKembaliHalaman {
        padding: 7px 16px !important;
        height: auto !important;
        min-height: 0 !important;
        font-size: 12px !important;
    }
}

/* =========================================================
   NAVBAR LAPTOP SERAGAM (halaman selain Dashboard)
   Ukuran mengikuti navbar Dashboard. Dashboard sendiri (body.page-beranda)
   tidak disentuh, jadi tampilannya tetap seperti semula.
========================================================= */
@media (min-width: 769px) {
    html body:not(.page-beranda) .header .header-container {
        max-width: none !important;
        min-height: 58px !important;
        margin: 0 !important;
        padding: 0 28px !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0 !important;
    }
    html body:not(.page-beranda) .header .brand {
        display: flex !important;
        align-items: center !important;
        flex: 0 1 auto !important;
        gap: 10px !important;
    }
    html body:not(.page-beranda) .header .brand-logo {
        width: 34px !important;
        height: 34px !important;
        flex: 0 0 34px !important;
        transform: none !important;
    }
    html body:not(.page-beranda) .header .brand-logo img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
    }
    html body:not(.page-beranda) .header .brand-text h2 {
        font-size: 16px !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        transform: none !important;
    }
    html body:not(.page-beranda) .header .brand-text p {
        display: block !important;
        font-size: 11px !important;
        font-weight: 500 !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        transform: none !important;
    }
    html body:not(.page-beranda) .header nav {
        display: flex !important;
        flex: 0 0 auto !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        width: auto !important;
        gap: 20px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        transform: none !important;
    }
    html body:not(.page-beranda) .header nav a {
        font-size: 12.5px !important;
        font-weight: 600 !important;
        letter-spacing: .3px !important;
        line-height: 1.2 !important;
        white-space: nowrap;
    }
    html body:not(.page-beranda) .header nav a::after { bottom: -6px !important; height: 2px !important; }
    html body:not(.page-beranda) .header nav .active-user-header,
    html body:not(.page-beranda) .header nav .badge-user-login {
        margin-left: 0 !important;
        padding: 5px 11px !important;
        font-size: 12px !important;
        background: rgba(0, 60, 68, .35) !important;
        border: 1px solid rgba(183, 245, 247, .35) !important;
        box-shadow: none !important;
    }
    html body:not(.page-beranda) .header .header-container::before { top: 4px !important; font-size: 11px !important; }
}

/* =========================================================
   TOMBOL SIDEBAR BERBENTUK PANAH (semua halaman)
   - Tutup sidebar : tombol garis tiga -> panah ke KANAN
   - Sidebar terbuka: tombol X dihapus, diganti panah ke KIRI
     yang menempel di sisi kanan sidebar
========================================================= */
html body #openSidebarBtn,
html body .sidebar-toggle-btn {
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
    text-indent: 0 !important;
    position: fixed !important;
}
html body #openSidebarBtn::after,
html body .sidebar-toggle-btn::after {
    content: "" !important;
    display: block !important;
    position: static !important;
    width: 24px !important;
    height: 24px !important;
    background: #ffffff !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4.5l7.5 7.5L9 19.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4.5l7.5 7.5L9 19.5'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .25s ease;
}
html body #openSidebarBtn:hover::after { transform: translateX(3px); }

/* tombol tutup: panah kiri, di luar sisi kanan sidebar */
html body .sidebar-drawer #closeSidebarBtn,
html body .sidebar-drawer .sidebar-close-btn {
    position: absolute !important;
    top: 100px !important;
    right: -58px !important;
    left: auto !important;
    width: 45px !important;
    height: 45px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 12px !important;
    background: #008C91 !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    /* tersembunyi selama sidebar tertutup */
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity .35s ease, visibility .35s ease, background-color .2s ease, transform .2s ease !important;
}
html body .sidebar-drawer.active #closeSidebarBtn,
html body .sidebar-drawer.open #closeSidebarBtn,
html body .sidebar-drawer.active .sidebar-close-btn,
html body .sidebar-drawer.open .sidebar-close-btn {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition-delay: .55s, .55s, 0s, 0s !important;
}
html body .sidebar-drawer #closeSidebarBtn::after,
html body .sidebar-drawer .sidebar-close-btn::after {
    content: "" !important;
    display: block !important;
    width: 24px;
    height: 24px;
    background: #ffffff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 4.5L7.5 12 15 19.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 4.5L7.5 12 15 19.5'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .25s ease;
}
html body .sidebar-drawer #closeSidebarBtn:hover,
html body .sidebar-drawer .sidebar-close-btn:hover {
    background: #14B0B5 !important;
    transform: translateY(-2px) !important;
}
html body .sidebar-drawer #closeSidebarBtn:hover::after { transform: translateX(-3px); }

/* tanpa tombol X di kepala sidebar, judul kembali ke tengah penuh */
html body .sidebar-drawer .minda-brand { padding-left: 0 !important; }

/* Beranda: tombol tutup sama persis dengan halaman lain (top 100px) */

/* HP: tombol buka ada di kiri bawah, panah tutup mengikuti di kanan sidebar */
@media (max-width: 768px) {
    html body .sidebar-drawer #closeSidebarBtn,
    html body .sidebar-drawer .sidebar-close-btn {
        top: calc(100vh - 58px) !important;
        top: calc(100dvh - 58px) !important;
        right: -54px !important;
        width: 42px !important;
        height: 42px !important;
    }
    html body.page-beranda .sidebar-drawer #closeSidebarBtn { top: calc(100vh - 58px) !important; top: calc(100dvh - 58px) !important; }
}
/* =========================================================
   TOMBOL CANCEL & SIMPAN (Form SPT / Form Kegiatan) di HP:
   ukuran kecil, tidak memanjang penuh. Sejajar dengan tombol Kembali.
========================================================= */
@media (max-width: 768px) {
    html body #form .form-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
    }
    html body #form .form-actions .btn-cancel,
    html body #form .form-actions .btn-save,
    html body #form .form-actions .btn-submit,
    html body #form .form-actions button[type="submit"],
    html body #form .form-actions #btnCancel,
    html body #form .form-actions #btnSimpan {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: max-content !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 7px 18px !important;
        font-size: 12px !important;
        line-height: 1.3 !important;
        border-radius: 999px !important;
        align-self: center !important;
    }
}

/* =========================================================
   RPK (HP): banner judul menampilkan logo Kemenkes di kanan,
   logo & tulisan dikecilkan. (rpk.html menyembunyikan .kanan di HP)
========================================================= */
@media screen and (max-width: 800px) {
    html body .rpk-banner {
        display: grid !important;
        grid-template-columns: 38px minmax(0, 1fr) 38px !important;   /* kolom kiri & kanan sama lebar -> judul tepat di tengah */
        align-items: center !important;
        gap: 8px !important;
        padding: 10px 12px !important;
        border-radius: 16px !important;
        margin-bottom: 14px !important;
    }
    html body .rpk-banner .logo-kiri {
        height: 34px !important;
        width: auto !important;
        max-width: none !important;
        margin-left: 0 !important;
        flex: 0 0 auto !important;
        justify-self: start !important;
    }
    html body .rpk-banner .judul {
        flex: 1 1 auto !important;
        min-width: 0;
        text-align: center;
    }
    html body .rpk-banner .judul h1 {
        font-size: 15px !important;
        line-height: 1.2 !important;
        letter-spacing: 0 !important;
    }
    html body .rpk-banner .judul .tahun-baris {
        gap: 6px !important;
        margin-top: 2px !important;
    }
    html body .rpk-banner .judul .tahun-baris::before,
    html body .rpk-banner .judul .tahun-baris::after {
        width: 10px !important;
        height: 1.5px !important;
        flex: 0 0 auto;
    }
    html body .rpk-banner .judul p {
        font-size: 10.5px !important;
        line-height: 1.3 !important;
    }
    html body .rpk-banner .tahun-pilih { font-size: 11px !important; padding: 2px 6px !important; }

    /* logo Kemenkes: tampil lagi, di kanan banner (tanpa lengkung hijau) */
    html body .rpk-banner .kanan {
        display: flex !important;
        position: static !important;
        width: auto !important;
        flex: 0 0 auto !important;
        align-items: center;
        justify-content: flex-end;
        justify-self: end !important;
    }
    html body .rpk-banner .kanan::before,
    html body .rpk-banner .kanan::after { display: none !important; }
    html body .rpk-banner .kanan img {
        height: 34px !important;
        width: auto !important;
        max-width: none !important;
        padding: 0 !important;
        background: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
}

/* =========================================================
   FORM SPT: tulisan isian yang sudah diisi dibuat gelap & jelas
   (placeholder "Masukkan ..." tetap abu-abu muda).
   Berlaku di laptop dan HP. Termasuk isian yang diisi otomatis
   oleh browser (autofill, latar biru keunguan).
========================================================= */
html body #form input:not([type="checkbox"]):not([type="radio"]),
html body #form textarea,
html body #form select {
    color: #05323D !important;
    -webkit-text-fill-color: #05323D !important;
    font-weight: 500;
}
html body #form input::placeholder,
html body #form textarea::placeholder {
    color: #8FB1B6 !important;
    -webkit-text-fill-color: #8FB1B6 !important;
    font-weight: 400;
}
html body #form input[readonly],
html body #form textarea[readonly] {
    color: #05323D !important;
    -webkit-text-fill-color: #05323D !important;
    background: #EEF6F7 !important;
}
html body #form input:-webkit-autofill,
html body #form input:-webkit-autofill:hover,
html body #form input:-webkit-autofill:focus,
html body #form textarea:-webkit-autofill,
html body #form select:-webkit-autofill {
    -webkit-text-fill-color: #05323D !important;
    caret-color: #05323D;
    -webkit-box-shadow: 0 0 0 1000px #F9FDFD inset !important;
    box-shadow: 0 0 0 1000px #F9FDFD inset !important;
    transition: background-color 9999s ease-out 0s;
}

/* =========================================================
   TOMBOL SIDEBAR (panah) DI LAPTOP: ukuran disamakan dengan Dashboard
   di semua halaman. Dashboard (body.page-beranda) tidak disentuh.
   HP tetap memakai aturan HP di atas.
========================================================= */
@media (min-width: 769px) {
    html body:not(.page-beranda) #openSidebarBtn,
    html body:not(.page-beranda) .sidebar-toggle-btn {
        width: 39px !important;
        height: 39px !important;
        border-radius: 10px !important;
    }
    html body:not(.page-beranda) #openSidebarBtn::after,
    html body:not(.page-beranda) .sidebar-toggle-btn::after {
        width: 21px !important;
        height: 21px !important;
    }
}

/* =========================================================
   TOMBOL TUTUP SIDEBAR (panah kiri, saat sidebar terbuka) DI LAPTOP:
   ikut diperkecil supaya sama dengan tombol bukanya (39px).
========================================================= */
@media (min-width: 769px) {
    html body .sidebar-drawer #closeSidebarBtn,
    html body .sidebar-drawer .sidebar-close-btn {
        width: 39px !important;
        height: 39px !important;
        right: -52px !important;
        border-radius: 10px !important;
    }
    html body .sidebar-drawer #closeSidebarBtn::after,
    html body .sidebar-drawer .sidebar-close-btn::after {
        width: 21px !important;
        height: 21px !important;
    }
}

/* =========================================================
   SIDEBAR LEBIH KECIL + LOGO MENYALA (semua halaman)
   - Laptop: lebar 270px -> 250px, kartu menu & ikon dikecilkan sedikit.
   - Logo di kepala sidebar digambar ulang lewat ::after supaya bisa
     diberi cahaya sendiri; kartu putih (::before) tinggal garis pemisah.
   - Tombol tutup tidak terpengaruh (posisinya tetap ikut sidebar).
========================================================= */
html body .sidebar-drawer .minda-sidebar-header::before {
    background-image: linear-gradient(#dfe5e7, #dfe5e7) !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
}
html body .sidebar-drawer .minda-sidebar-header::after {
    content: "" !important;
    position: absolute !important;
    left: 12px; right: 12px;
    pointer-events: none;
    background-image: url("assets/karantina.png"), url("assets/logo-kementerian-kesehatan.png") !important;
    background-repeat: no-repeat !important;
    background-position: 22% center, 78% center !important;
    filter: drop-shadow(0 0 1.5px rgba(255,255,255,.95)) drop-shadow(0 0 6px rgba(20,176,181,.95)) drop-shadow(0 0 13px rgba(32,196,199,.55));
}

@media (min-width: 769px) {
    html body .sidebar-drawer { width: 250px !important; }
    html body .sidebar-drawer .minda-sidebar-header { padding: 12px 12px 6px !important; }
    html body .sidebar-drawer .minda-sidebar-header::before {
        height: 66px !important;
        margin-bottom: 8px !important;
        border-radius: 15px !important;
        background-size: 1px 36px !important;
    }
    html body .sidebar-drawer .minda-sidebar-header::after {
        top: 12px; height: 66px;
        background-size: auto 48px, auto 44px !important;
    }
    html body .sidebar-drawer .minda-brand h2 { font-size: 13px !important; }
    html body .sidebar-drawer .minda-brand p { font-size: 8px !important; letter-spacing: .09em !important; }

    html body .sidebar-drawer .sidebar-body { padding: 0 9px 14px !important; }
    html body .sidebar-drawer .minda-card-grid { gap: 2px !important; }
    html body .sidebar-drawer .minda-card-grid::before { font-size: 8.5px !important; padding: 7px 7px 3px !important; }
    html body .sidebar-drawer .minda-card-grid .minda-card,
    html body .sidebar-drawer .minda-card-grid .minda-card:nth-child(n) {
        gap: 9px !important;
        padding: 4px 7px !important;
        border-radius: 10px !important;
    }
    html body .sidebar-drawer .minda-card-grid .minda-icon-circle {
        width: 30px !important;
        height: 30px !important;
        border-radius: 9px !important;
    }
    html body .sidebar-drawer .minda-card-grid .minda-icon-circle::before { width: 15px !important; height: 15px !important; }
    html body .sidebar-drawer .minda-card-grid .minda-card-title { font-size: 12px !important; }
    html body .sidebar-drawer .minda-card-grid .minda-card:last-child { margin-top: 26px !important; }
    html body .sidebar-drawer .minda-card-grid .minda-card:last-child::before { font-size: 8.5px !important; top: -20px !important; left: 7px !important; }
    html body .sidebar-drawer .minda-card-grid .minda-card.is-locked::after { width: 12px !important; height: 12px !important; }
}

/* HP: ukuran kartu logo mengikuti aturan HP di atas (tinggi 56px) */
@media (max-width: 768px) {
    html body .sidebar-drawer .minda-sidebar-header::before { background-size: 1px 30px !important; }
    html body .sidebar-drawer .minda-sidebar-header::after {
        top: 12px; height: 56px;
        background-size: auto 42px, auto 36px !important;
    }
}

/* =========================================================
   SIDEBAR TERBUKA: halaman di belakang (yang blur) dikunci
   Supaya saat di-scroll isi halaman tidak bergeser / berserakan.
   Kelasnya dipasang oleh mobile.js. Menu sidebar sendiri tetap bisa di-scroll.
========================================================= */
html.sidebar-terbuka { overflow: hidden !important; }
html body.sidebar-terbuka { overflow: hidden !important; }
/* (body TIDAK lagi dijadikan position:fixed: itu penyebab isi halaman berserakan) */
html body .sidebar-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overscroll-behavior: contain;
    touch-action: none;
}
html body .sidebar-drawer {
    height: 100vh !important;
    height: 100dvh !important;
    overscroll-behavior: contain;
}
html body .sidebar-drawer .sidebar-body {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

/* =========================================================
   REKAP SPT (HP):
   - "Filter Data Rekap" (kiri) + tombol Reset Filter (kanan) satu baris
   - "Total Berkas" turun ke baris bawahnya
   - tombol Buka / Edit / Hapus di tabel ukurannya seragam
========================================================= */
@media (max-width: 768px) {
    html body .rekap-card .rekap-head {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 6px 8px !important;
        margin-bottom: 10px !important;
    }
    html body .rekap-card .rekap-head .rekap-judul { order: 1; flex: 1 1 auto; min-width: 0; font-size: 14px !important; }
    html body .rekap-card .rekap-head #btnResetFilterFull { order: 2; margin-left: auto !important; }
    html body .rekap-card .rekap-head .rekap-total { order: 3; flex: 1 1 100%; font-size: 11px !important; display: flex; align-items: center; gap: 6px; }
    html body .rekap-card .badge-total {
        font-size: 10.5px !important;
        padding: 4px 10px !important;
        line-height: 1.2 !important;
        border-radius: 999px !important;
    }
    html body .rekap-card #btnResetFilterFull,
    html body .rekap-card .btn-tab-user {
        display: inline-flex !important;
        align-items: center;
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0 !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 5px 10px !important;
        font-size: 10.5px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        letter-spacing: 0 !important;
        border-radius: 999px !important;
        white-space: nowrap;
        box-shadow: none !important;
        gap: 4px;
    }
    html body .rekap-card #btnResetFilterFull { margin-left: auto !important; }
    html body .rekap-card #adminUserTabs { margin-bottom: 12px !important; padding-bottom: 8px !important; }
    html body .rekap-card #adminUserTabs > div:first-child { font-size: 11px !important; margin-bottom: 6px !important; }
    html body .rekap-card #userTabsContainer { gap: 5px !important; }

    /* Tombol Buka / Edit / Hapus di tabel: sama besar, bentuk pil seperti tombol lain */
    html body .action-group { gap: 5px !important; justify-content: center !important; }
    html body .action-group .btn-action {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 auto !important;
        width: 62px !important;
        min-width: 62px !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 5px 0 !important;
        font-size: 10.5px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        letter-spacing: 0 !important;
        border-radius: 999px !important;
        white-space: nowrap;
        box-shadow: none !important;
        gap: 3px !important;
    }
}

/* =========================================================
   RPK (HP): Pilih Tahun, Cetak PDF, Cetak Tabel -> 1 baris
========================================================= */
@media screen and (max-width: 800px) {
    html body .rpk-card-head .kiri { flex: 1 1 100%; }
    html body .rpk-card-head .rpk-aksi {
        flex: 1 1 100% !important;
        width: 100%;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 6px !important;
    }
    html body .rpk-aksi .pilih-tahun {
        flex: 0 0 auto !important;
        height: 32px !important;
        padding: 0 4px 0 10px !important;
        gap: 2px !important;
        font-size: 10.5px !important;
        border-radius: 999px !important;
        box-shadow: none !important;
        width: auto !important;
    }
    html body .rpk-aksi .pilih-tahun select {
        font-size: 10.5px !important;
        padding: 0 !important;
        height: 100% !important;
        min-height: 0 !important;
    }
    html body .rpk-aksi .rpk-btn {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        width: auto !important;
        height: 32px !important;
        min-height: 0 !important;
        justify-content: center;
        gap: 4px !important;
        padding: 0 6px !important;
        font-size: 10.5px !important;
        font-weight: 600 !important;
        line-height: 1 !important;
        white-space: nowrap;
        border-radius: 999px !important;
        box-shadow: none !important;
    }
    html body .rpk-aksi .rpk-btn svg { width: 14px !important; height: 14px !important; flex: 0 0 14px; }
}
@media screen and (max-width: 360px) {
    html body .rpk-aksi .rpk-btn { font-size: 9.5px !important; padding: 0 6px !important; gap: 3px !important; }
    html body .rpk-aksi .rpk-btn svg { width: 12px !important; height: 12px !important; flex-basis: 12px; }
    html body .rpk-aksi .pilih-tahun, html body .rpk-aksi .pilih-tahun select { font-size: 10px !important; }
}

/* =========================================================
   CETAK TABEL RPK: banner/judul layar tidak ikut tercetak (HP & laptop)
========================================================= */
@media print {
    html body .rpk-banner,
    html body .rpk-card-head,
    html body .rpk-ket,
    html body .bar-kembali-halaman,
    html body #btnKembaliHalaman,
    html body .header,
    html body .sidebar-toggle-btn { display: none !important; }
}

/* =========================================================
   TOMBOL KECIL SERAGAM DI HP (ukuran seperti tombol navbar)
   Kalender (modal), Data Pegawai & Pejabat, Formulir Kegiatan (LPK:
   Daftar Hadir / Notulen / Foto Kegiatan), Kelola Data, Tambah User.
========================================================= */
@media screen and (max-width: 768px) {
    html body #eventModal .modal-buttons button,
    html body .calendar-controls button,
    html body .aksi-form button,
    html body #btnViewPegawai, html body #btnViewPejabat,
    html body .btn-buka-pejabat, html body .btn-hapus-pejabat,
    html body .btn-buka-surat-pegawai, html body .btn-hapus-rekap-pegawai,
    html body .btn-modal-cancel, html body .btn-modal-confirm,
    html body .tab-btn,
    html body .btn-kehadiran,
    html body .btn-action-primary, html body .btn-action-secondary,
    html body .btn-simpan, html body .btn-batal,
    html body .btn-tambah-baris, html body .btn-hapus-ttd, html body .btn-clear-canvas,
    html body .btn-tambah-user, html body .btn-ubah-password, html body .btn-hapus-user,
    html body .btn-simpan-password, html body #btnTutupNotifikasiBerhasil,
    html body #btnSimpanUserBaru, html body #modalBtnOk,
    html body .hasil-action-buttons button {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 6px 12px !important;
        font-size: 10.5px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        letter-spacing: 0 !important;
        border-radius: 999px !important;
        white-space: nowrap;
        gap: 5px !important;
        box-shadow: none !important;
    }
    /* barisan tombol: sejajar, rata kiri, tidak melebar */
    html body .aksi-form,
    html body #eventModal .modal-buttons,
    html body .modal-actions, html body .modal-buttons, html body .modal-footer {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 6px !important;
    }
    html body .aksi-form > *, html body .modal-actions > *, html body .modal-buttons > *, html body .modal-footer > * {
        flex: 0 0 auto !important;
    }
    html body #eventModal .modal-buttons { justify-content: flex-end !important; }
    /* tombol tab (Data Pegawai/Pejabat & Daftar Hadir/Notulen/Foto): 1 baris */
    html body .tab-btn { flex: 1 1 0 !important; padding: 7px 6px !important; }
    html body .tab-nav, html body .tabs, html body .tab-menu, html body .lpk-tabs {
        display: flex !important; flex-wrap: nowrap !important; gap: 6px !important;
    }
    /* ikon aksi di tabel */
    html body .btn-icon-action { padding: 4px 8px !important; font-size: 11px !important; min-height: 0 !important; border-radius: 8px !important; }
    html body .btn-delete-foto { min-height: 0 !important; width: 22px !important; height: 22px !important; padding: 0 !important; font-size: 11px !important; }
    html body .modal-close { min-height: 0 !important; }
    /* tombol kecil di dalam tabel (Buka / Hapus) */
    html body .tbl-scroll td button, html body .tbl-scroll td a.btn-action { padding: 4px 9px !important; font-size: 10px !important; }
}

/* =========================================================
   KALENDER (HP): isi kotak tanggal tampil dengan tulisan (judul),
   bukan hanya garis berwarna. Ketuk tanggal untuk detail lengkap.
========================================================= */
@media screen and (max-width: 800px) {
    html body #calendar {
        --spt-bar: 3px;
        --spt-rad: 4px;
        --spt-h: 13px;
        --spt-pad: 0 2px 0 6px;
        --keg-h: 13px;
        gap: 3px;
    }
    html body #calendar .day { height: 96px !important; min-height: 96px !important; padding: 3px 2px 2px !important; overflow: hidden; }
    html body #calendar .day .day-events { gap: 2px !important; overflow-y: auto !important; min-height: 0; }
    /* SPT: hanya baris judul, tanpa lencana & baris status */
    html body #calendar .day .event-spt > div:first-child { display: flex !important; }
    html body #calendar .day .event-spt > div:first-child > span:first-child { display: none !important; }
    html body #calendar .day .event-spt > div:first-child > span:last-child {
        display: block !important;
        font-size: 8px !important; line-height: 13px !important; font-weight: 700 !important;
    }
    html body #calendar .day .event-spt > div:nth-child(2) { display: none !important; }
    /* Kegiatan */
    html body #calendar .day .event-kegiatan {
        height: 13px !important; min-height: 13px !important;
        padding: 0 4px !important;
        font-size: 8px !important; line-height: 13px !important; font-weight: 600 !important;
        border-radius: 4px !important;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    /* Event/Libur biasa */
    html body #calendar .day .event:not(.event-spt):not(.event-kegiatan) {
        font-size: 8px !important; line-height: 13px !important;
        padding: 0 4px !important; height: 13px !important; min-height: 13px !important;
        overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin: 0 !important;
    }
    html body #calendar .day .event:not(.event-spt):not(.event-kegiatan) strong { font-size: 8px !important; font-weight: 600 !important; }
    html body #calendar .day .day-events > div:not(.event) { font-size: 8px !important; line-height: 1.1; }
}

/* =========================================================
   HASIL SURAT (HP): kertas A4 diperkecil agar muat layar,
   tombol cetak/PDF/Word dibuat rapi 1 baris.
========================================================= */
@media screen and (max-width: 768px) {
    html body .result-section { padding: 18px 8px 30px !important; }
    html body .result-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        margin: 0 auto 14px !important;
        padding: 0 4px;
    }
    html body .result-header h2 { font-size: 20px !important; margin: 2px 0 0 !important; }
    html body .result-header span { font-size: 9.5px !important; }
    html body .hasil-action-buttons {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        gap: 6px !important;
        width: 100% !important;
        margin: 0 !important;
    }
    html body .hasil-action-buttons button { flex: 1 1 0 !important; padding: 7px 6px !important; gap: 4px !important; }
    html body .print-button { background: #008C91 !important; color: #fff !important; }
    html body .pdf-button { background: #b42318 !important; color: #fff !important; }
    html body .word-button { background: #2b579a !important; color: #fff !important; }
    /* kertas: skala dihitung oleh mobile.js (zoom), di sini hanya pengaman */
    html body #suratOutput { align-items: flex-start; overflow-x: hidden; }
    html body #suratOutput .surat, html body #suratOutput .halaman-kedua { margin: 0 auto 14px !important; box-shadow: 0 4px 16px rgba(0,60,66,.18) !important; }
    html body #suratOutput .halaman-kedua { margin-top: 0 !important; }
}
@media print { html body #suratOutput { zoom: 1 !important; } }

/* =========================================================
   HP - Data Pegawai: Batal/Simpan di kanan, Edit/Hapus di tabel dikecilkan
========================================================= */
@media screen and (max-width: 768px) {
    html body #formTambahMasterPegawai .aksi-form { justify-content: flex-end !important; }
    html body #tabelMasterPegawaiView td:last-child button,
    html body .data-pegawai-table-card td .btn.btn-sm,
    html body .data-pegawai-table-card td button.btn-sm {
        min-height: 0 !important;
        height: auto !important;
        padding: 3px 8px !important;
        font-size: 9.5px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        border-radius: 999px !important;
        margin: 0 2px !important;
    }
    html body #tabelMasterPegawaiView th:nth-child(9),
    html body #tabelMasterPegawaiView td:nth-child(9) { width: 96px !important; min-width: 96px !important; max-width: 96px !important; }
}

/* =========================================================
   HP - Kelola Data: tombol-tombol diarahkan ke kanan
========================================================= */
@media screen and (max-width: 768px) {
    html body .user-row > div:last-child { justify-content: flex-end !important; width: 100%; }
    html body .user-row .btn-ubah-password { width: auto !important; }
    html body .password-modal-actions,
    html body .password-modal-buttons { justify-content: flex-end !important; }
}

/* =========================================================
   HP - Kelola Tahun (pop-up): isi dibuat lebih kecil
========================================================= */
@media screen and (max-width: 768px) {
    html body #kelolaTahunOverlay { padding: 14px !important; }
    html body #kelolaTahunBox { max-width: 340px !important; padding: 22px 18px 18px !important; border-radius: 18px !important; }
    html body #kelolaTahunBox .kt-tutup { width: 26px !important; height: 26px !important; min-height: 0 !important; top: 10px !important; right: 10px !important; font-size: 15px !important; padding: 0 !important; }
    html body #kelolaTahunBox .kt-ikon { width: 42px !important; height: 42px !important; margin-bottom: 8px !important; font-size: 19px !important; }
    html body #kelolaTahunBox h3 { font-size: 16.5px !important; margin-bottom: 6px !important; }
    html body #kelolaTahunBox .kt-desk { font-size: 11px !important; margin-bottom: 12px !important; line-height: 1.5 !important; }
    html body #kelolaTahunBox .kt-daftar { gap: 8px !important; }
    html body #kelolaTahunBox .kt-baris { padding: 9px 11px !important; border-radius: 10px !important; }
    html body #kelolaTahunBox .kt-judul strong { font-size: 13px !important; }
    html body #kelolaTahunBox .kt-lencana { font-size: 9.5px !important; padding: 1px 6px !important; }
    html body #kelolaTahunBox .kt-jumlah { font-size: 10.5px !important; }
    html body #kelolaTahunBox .kt-lihat { font-size: 11.5px !important; min-height: 0 !important; padding: 4px 2px !important; }
    html body #kelolaTahunBox .kt-semua { font-size: 11px !important; min-height: 0 !important; padding: 8px !important; margin-top: 10px !important; border-radius: 10px !important; }
    html body #kelolaTahunBox .kt-catatan { font-size: 10px !important; margin-top: 10px !important; }
}

/* =========================================================
   HP - Tambah Kegiatan: tombol dikecilkan, label user di samping judul
========================================================= */
@media screen and (max-width: 768px) {
    html body .kg-header { padding: 16px 18px !important; }
    html body .kg-header h1 { font-size: 20px !important; }
    html body .kg-title-row { gap: 8px !important; margin-bottom: 6px !important; }
    html body .kg-save, html body .kg-cancel {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        min-height: 0 !important;
        padding: 7px 16px !important;
        font-size: 11.5px !important;
        font-weight: 600 !important;
        border-radius: 999px !important;
        margin: 4px 6px 0 0 !important;
        box-shadow: none !important;
    }
    html body .kg-back {
        min-height: 0 !important;
        padding: 6px 14px !important;
        font-size: 11px !important;
        font-weight: 600 !important;
    }
}

/* HP - Tambah Kegiatan: tombol Simpan di sisi kanan */
@media screen and (max-width: 768px) {
    html body .kg-save {
        display: flex !important;
        width: fit-content !important;
        margin: 6px 0 0 auto !important;
    }
}
/* =========================================================
   TOMBOL KEMBALI DI HP: naikkan, jangan menutupi judul halaman
   Navbar baru hanya 1 baris (~46px), jadi tombol cukup di bawahnya.
   (Aturan lama top:116px / 136px dibuat untuk navbar 2 baris.)
========================================================= */
@media screen and (max-width: 768px) {
    html body #btnKembaliHalaman,
    html body .bar-kembali-halaman.melayang {
        top: 62px !important;
        left: 12px !important;
        right: auto !important;
    }
}