/* public_html/style.css */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* FLUID SCALING SAAS: seluruh ukuran rem (font, padding, gap, card) mengikuti lebar layar.
   Desktop (>= ~1100px) tetap 16px = tampilan enterprise tidak berubah.
   HP kecil menyusut bertahap hingga 14px agar proporsional & tidak terkesan "stabil gede". */
html {
    font-size: clamp(14px, 12.5px + 0.32vw, 16px);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #0b0f19;
    color: #f3f4f6;
    overflow-x: hidden;
}

/* Premium Glassmorphism */
.glass-panel {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: rgba(31, 41, 55, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.2);
}

/* Custom Premium Input styling */
.premium-input {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transition: all 0.2s ease-in-out;
}
.premium-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    outline: none;
}

/* Fail-safe: kartu & textarea Catatan Daily Target selalu full-width & min-height stabil */
#dailyTargetCard { width: 100%; min-width: 0; }
#dailyTargetInput { width: 100% !important; max-width: 100%; min-height: 74px; }

/* ==========================================================
   ENTERPRISE LIGHT MODE SYSTEM (CLEAN VERCEL/LINEAR STYLE)
   ========================================================== */

html.light-mode body {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

/* Panel & Card Utama */
html.light-mode .glass-panel,
html.light-mode .glass-card {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05) !important;
}

/* Kotak Inner / Sub-section yang tadinya gelap */
html.light-mode div.bg-gray-900\/30,
html.light-mode div.bg-gray-900\/50,
html.light-mode div.bg-gray-900 {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
}

/* Form Inputs & Select */
html.light-mode .premium-input,
html.light-mode select {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* Typography Kontras Tinggi Profesional */
html.light-mode .text-white {
    color: #020617 !important;
}

html.light-mode .text-gray-200,
html.light-mode .text-gray-300 {
    color: #1e293b !important;
}

html.light-mode .text-gray-400,
html.light-mode .text-gray-500 {
    color: #475569 !important;
}

/* Border & Garis Pemisah */
html.light-mode .border-gray-800,
html.light-mode .border-gray-700,
html.light-mode .border-t,
html.light-mode .border-b {
    border-color: #e2e8f0 !important;
}

/* Tabel Hover */
html.light-mode tr:hover {
    background-color: #f1f5f9 !important;
}

/* Adaptasi Logo Putih Menjadi Gelap Otomatis */
html.light-mode img.app-logo {
    filter: brightness(0) !important;
}

/* ==========================================================
   PULL-TO-REFRESH (TARIK KE BAWAH UNTUK MEMUAT ULANG HALAMAN)
   ========================================================== */
.ptr-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9400;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 0 8px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-110px);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
}
.ptr-indicator.ptr-dragging {
    transition: none;
    visibility: visible;
    opacity: 1;
}
.ptr-spinner-wrap {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.ptr-spinner {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2.5px solid rgba(59, 130, 246, 0.25);
    border-top-color: #3b82f6;
    animation: ptr-spin 0.8s linear infinite;
    transition: transform 0.2s ease;
}
.ptr-indicator.ptr-ready .ptr-spinner {
    transform: rotate(180deg) scale(1.15);
    border-top-color: #34d399;
}
.ptr-indicator.ptr-loading .ptr-spinner {
    border-top-color: #34d399;
}
.ptr-indicator.ptr-loading .ptr-spinner-wrap {
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.45);
}
@keyframes ptr-spin {
    to { transform: rotate(360deg); }
}

/* Light Mode Pull-to-Refresh */
html.light-mode .ptr-indicator {
    color: #475569;
}
html.light-mode .ptr-spinner-wrap {
    background: #ffffff;
    border-color: #cbd5e1;
}

/* ==========================================================
   TOGGLE SWITCH AKTIFASI FORM LIBURAN (SISI MUHAFIZH)
   ========================================================== */
.lib-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 9999px;
    background: #374151;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background 0.25s ease;
    flex-shrink: 0;
    padding: 0;
}
.lib-toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s ease, background 0.25s ease;
}
.lib-toggle.lib-toggle-on {
    background: #f59e0b;
    border-color: rgba(245, 158, 11, 0.5);
}
.lib-toggle.lib-toggle-on .lib-toggle-knob {
    transform: translateX(20px);
    background: #ffffff;
}
.lib-toggle:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
html.light-mode .lib-toggle {
    background: #cbd5e1;
    border-color: #94a3b8;
}
html.light-mode .lib-toggle.lib-toggle-on {
    background: #f59e0b;
}
html.light-mode .lib-toggle-knob {
    background: #f8fafc;
}

/* ==========================================================
   DROPDOWN PRIVASI & KUNCI AKSES (AVATAR HEADER - SEMUA ROLE)
   ========================================================== */
.wali-privacy-dd {
    background: #0d101a;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid rgba(245, 158, 11, 0.3);
}
html.light-mode .wali-privacy-dd {
    background: #ffffff;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

/* ==========================================================
   LOG ABSENSI CARD PER STATUS — ENTERPRISE SAAS PREMIUM 3D
   Token warna status: satu sumber kebenaran utk mode gelap & terang
   ========================================================== */
.emkr-st-hadir       { --st: #34d399; --st-soft: rgba(16, 185, 129, .13); --st-border: rgba(16, 185, 129, .38); }
.emkr-st-terlambat   { --st: #fbbf24; --st-soft: rgba(245, 158, 11, .13); --st-border: rgba(245, 158, 11, .38); }
.emkr-st-pulang_awal { --st: #fb923c; --st-soft: rgba(249, 115, 22, .13); --st-border: rgba(249, 115, 22, .38); }
.emkr-st-izin        { --st: #38bdf8; --st-soft: rgba(14, 165, 233, .13); --st-border: rgba(14, 165, 233, .38); }
.emkr-st-sakit       { --st: #c084fc; --st-soft: rgba(168, 85, 247, .13); --st-border: rgba(168, 85, 247, .38); }
.emkr-st-tidak_hadir { --st: #fb7185; --st-soft: rgba(244, 63, 94, .13); --st-border: rgba(244, 63, 94, .38); }
.emkr-st-baru        { --st: #94a3b8; --st-soft: rgba(148, 163, 184, .13); --st-border: rgba(148, 163, 184, .38); }
.emkr-st-belum_masuk { --st: #94a3b8; --st-soft: rgba(148, 163, 184, .13); --st-border: rgba(148, 163, 184, .38); }

html.light-mode .emkr-st-hadir       { --st: #047857; --st-soft: rgba(4, 120, 87, .10);  --st-border: rgba(4, 120, 87, .35); }
html.light-mode .emkr-st-terlambat   { --st: #b45309; --st-soft: rgba(180, 83, 9, .10);  --st-border: rgba(180, 83, 9, .35); }
html.light-mode .emkr-st-pulang_awal { --st: #c2410c; --st-soft: rgba(194, 65, 12, .10); --st-border: rgba(194, 65, 12, .35); }
html.light-mode .emkr-st-izin        { --st: #0369a1; --st-soft: rgba(3, 105, 161, .10); --st-border: rgba(3, 105, 161, .35); }
html.light-mode .emkr-st-sakit       { --st: #7e22ce; --st-soft: rgba(126, 34, 206, .10); --st-border: rgba(126, 34, 206, .35); }
html.light-mode .emkr-st-tidak_hadir { --st: #be123c; --st-soft: rgba(190, 18, 60, .10);  --st-border: rgba(190, 18, 60, .35); }
html.light-mode .emkr-st-baru        { --st: #64748b; --st-soft: rgba(100, 116, 139, .10); --st-border: rgba(100, 116, 139, .35); }
html.light-mode .emkr-st-belum_masuk { --st: #64748b; --st-soft: rgba(100, 116, 139, .10); --st-border: rgba(100, 116, 139, .35); }

.emkr-log-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 1rem;
    background: #0f172a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .4),
                0 14px 32px -20px rgba(0, 0, 0, .7);
    overflow: hidden;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.emkr-log-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--st);
}
.emkr-log-card:hover {
    border-color: var(--st-border);
    box-shadow: 0 0 0 1px var(--st-border),
                0 16px 36px -18px var(--st-border);
}
html.light-mode .emkr-log-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05),
                0 14px 32px -22px rgba(15, 23, 42, .25);
}
html.light-mode .emkr-log-card:hover {
    border-color: var(--st-border);
    box-shadow: 0 0 0 1px var(--st-border),
                0 16px 36px -18px var(--st-border);
}

.emkr-lc-head {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .78rem .9rem;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
html.light-mode .emkr-lc-head { border-bottom-color: #eef2f7; }
.emkr-lc-ic {
    width: 2.3rem;
    height: 2.3rem;
    border-radius: .72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
    color: var(--st);
    background: var(--st-soft);
    border: 1px solid var(--st-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 5px 14px -7px var(--st-border);
}
.emkr-lc-title { font-size: .76rem; font-weight: 800; color: #ffffff; line-height: 1.15; letter-spacing: -.01em; }
.emkr-lc-sub { font-size: .55rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--st); margin-top: .12rem; }
html.light-mode .emkr-lc-title { color: #0f172a; }
.emkr-lc-count {
    flex-shrink: 0;
    font-size: .74rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--st);
    background: var(--st-soft);
    border: 1px solid var(--st-border);
    border-radius: 999px;
    padding: .32rem .62rem;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.emkr-log-item {
    padding: .62rem .9rem;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    transition: background .15s ease;
}
.emkr-log-item:last-child { border-bottom: 0; }
.emkr-log-item:hover { background: rgba(255, 255, 255, .035); }
html.light-mode .emkr-log-item { border-bottom-color: #f1f5f9; }
html.light-mode .emkr-log-item:hover { background: #f8fafc; }

.emkr-lc-top { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.emkr-lc-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .68rem; font-weight: 800; color: #ffffff; line-height: 1.3; }
html.light-mode .emkr-lc-name { color: #0f172a; }
.emkr-lc-mid { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .5rem; }
.emkr-lc-row { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .5rem; }

.emkr-lc-ava {
    width: 2rem;
    height: 2rem;
    border-radius: .62rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--st);
    background: var(--st-soft);
    border: 1px solid var(--st-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}

.emkr-lc-meta {
    display: inline-flex;
    align-items: center;
    gap: .26rem;
    font-size: .62rem;
    font-weight: 700;
    color: #94a3b8;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 999px;
    padding: .16rem .5rem;
    line-height: 1.2;
    white-space: nowrap;
}
html.light-mode .emkr-lc-meta { color: #64748b; background: #f8fafc; border-color: #e2e8f0; }

.emkr-lc-loc { color: #38bdf8; border-color: rgba(56, 189, 248, .35); background: rgba(56, 189, 248, .09); }
html.light-mode .emkr-lc-loc { color: #0369a1; border-color: rgba(3, 105, 161, .32); background: rgba(3, 105, 161, .07); }
.emkr-lc-telat { color: #fbbf24; border-color: rgba(245, 158, 11, .38); background: rgba(245, 158, 11, .09); }
html.light-mode .emkr-lc-telat { color: #b45309; border-color: rgba(180, 83, 9, .32); background: rgba(180, 83, 9, .07); }
.emkr-lc-pulang { color: #fb923c; border-color: rgba(249, 115, 22, .38); background: rgba(249, 115, 22, .09); }
html.light-mode .emkr-lc-pulang { color: #c2410c; border-color: rgba(194, 65, 12, .32); background: rgba(194, 65, 12, .07); }

.emkr-lc-time {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .68rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
    color: #cbd5e1;
    background: rgba(2, 6, 23, .45);
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: .45rem;
    padding: .2rem .45rem;
    line-height: 1.2;
    white-space: nowrap;
}
html.light-mode .emkr-lc-time { color: #334155; background: #f8fafc; border-color: #e2e8f0; }

.emkr-lc-tipe {
    flex-shrink: 0;
    font-size: .55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: .14rem .4rem;
    border-radius: .32rem;
    border: 1px solid;
}
.emkr-lc-tipe-karyawan { color: #a78bfa; background: rgba(139, 92, 246, .12); border-color: rgba(139, 92, 246, .35); }
.emkr-lc-tipe-ustadz { color: #fbbf24; background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .35); }
html.light-mode .emkr-lc-tipe-karyawan { color: #6d28d9; background: rgba(139, 92, 246, .08); border-color: rgba(109, 40, 217, .3); }
html.light-mode .emkr-lc-tipe-ustadz { color: #b45309; background: rgba(245, 158, 11, .08); border-color: rgba(180, 83, 9, .3); }

.emkr-lc-btn {
    font-size: .6rem;
    font-weight: 700;
    padding: .24rem .52rem;
    border-radius: .42rem;
    border: 1px solid;
    cursor: pointer;
    white-space: nowrap;
    transition: filter .15s ease;
    line-height: 1.3;
}
.emkr-lc-btn:hover { filter: brightness(1.25); }
.emkr-lc-btn-fix { color: #93c5fd; background: rgba(59, 130, 246, .12); border-color: rgba(59, 130, 246, .35); }
.emkr-lc-btn-del { color: #fda4af; background: rgba(244, 63, 94, .12); border-color: rgba(244, 63, 94, .35); }
.emkr-lc-btn-detail { color: #a5b4fc; background: rgba(99, 102, 241, .12); border-color: rgba(99, 102, 241, .35); }
html.light-mode .emkr-lc-btn-fix { color: #1d4ed8; background: rgba(37, 99, 235, .07); border-color: rgba(37, 99, 235, .3); }
html.light-mode .emkr-lc-btn-del { color: #be123c; background: rgba(225, 29, 72, .07); border-color: rgba(225, 29, 72, .3); }
html.light-mode .emkr-lc-btn-detail { color: #4338ca; background: rgba(99, 102, 241, .08); border-color: rgba(79, 70, 229, .3); }

#emKrLogDetailModal .emkr-n-amber { background-color: rgba(251, 191, 36, .09); border-color: rgba(245, 158, 11, .55); color: #fcd34d; }
#emKrLogDetailModal .emkr-n-gray { background-color: rgba(148, 163, 184, .09); border-color: rgba(148, 163, 184, .45); color: #cbd5e1; }

/* ===== CARD SANTRI MUHAFIZH (BERANDA): SEKALI KLIK LANGSUNG WORKSTATION =====
   Hover hanya aktif pada perangkat dengan pointer hover (desktop).
   Pada touch device (iPhone/iPad) hover dinetralkan sehingga tap pertama
   langsung memicu klik (tanpa menunggu tap kedua), plus touch-action
   manipulation menghilangkan tap-delay browser. */
.mh-card {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.mh-card-name { color: #ffffff; }
html.light-mode .mh-card-name { color: #0f172a; }
.mh-card-ava { transition: background .15s ease, color .15s ease, border-color .15s ease; }

@media (hover: hover) {
    .mh-card:hover {
        transform: translateY(-2px);
        background: rgba(59, 130, 246, .08);
        border-color: rgba(59, 130, 246, .4);
        box-shadow: 0 12px 32px -12px rgba(59, 130, 246, .35);
    }
    .mh-card:hover .mh-card-name { color: #60a5fa; }
    .mh-card:hover .mh-card-ava { background: rgba(59, 130, 246, .18); color: #60a5fa; border-color: rgba(59, 130, 246, .45); }
    html.light-mode .mh-card:hover {
        background: rgba(37, 99, 235, .06);
        border-color: rgba(37, 99, 235, .35);
        box-shadow: 0 12px 32px -14px rgba(37, 99, 235, .3);
    }
    html.light-mode .mh-card:hover .mh-card-name { color: #1d4ed8; }
    html.light-mode .mh-card:hover .mh-card-ava { background: rgba(37, 99, 235, .1); color: #1d4ed8; border-color: rgba(37, 99, 235, .4); }
}
/* Touch: netralkan efek hover global .glass-card yang menunda tap pertama */
@media (hover: none) {
    .mh-card:hover {
        transform: none;
        background: rgba(31, 41, 55, .4);
        border-color: rgba(255, 255, 255, .05);
        box-shadow: none;
    }
    html.light-mode .mh-card:hover {
        background: #ffffff;
        border-color: #e2e8f0;
        box-shadow: none;
    }
}

/* Tombol Lepas Santri Dari Halaqah (selalu tampak, enterprise premium) */
.mh-release-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: .7rem;
    color: #fca5a5;
    background: rgba(127, 29, 29, .5);
    border: 1px solid rgba(248, 113, 113, .35);
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.mh-release-btn .iconify { pointer-events: none; }
@media (hover: hover) {
    .mh-release-btn:hover {
        background: #dc2626;
        color: #ffffff;
        border-color: #ef4444;
        box-shadow: 0 8px 20px -8px rgba(239, 68, 68, .6);
    }
}
html.light-mode .mh-release-btn {
    color: #dc2626;
    background: rgba(254, 226, 226, .85);
    border-color: rgba(220, 38, 38, .35);
}
@media (hover: hover) {
    html.light-mode .mh-release-btn:hover {
        background: #ef4444;
        color: #ffffff;
        border-color: #ef4444;
    }
}

.emkr-lc-verif { font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; padding: .16rem .42rem; border-radius: 999px; border: 1px solid; display: inline-flex; align-items: center; gap: .24rem; }
.emkr-lc-verif-geo { color: #38bdf8; background: rgba(56, 189, 248, .09); border-color: rgba(56, 189, 248, .35); }
html.light-mode .emkr-lc-verif-geo { color: #0369a1; background: rgba(3, 105, 161, .07); border-color: rgba(3, 105, 161, .3); }
.emkr-lc-verif-manual { color: #fbbf24; background: rgba(245, 158, 11, .09); border-color: rgba(245, 158, 11, .35); }
html.light-mode .emkr-lc-verif-manual { color: #b45309; background: rgba(180, 83, 9, .07); border-color: rgba(180, 83, 9, .3); }
.emkr-lc-verif-o { color: #94a3b8; background: rgba(148, 163, 184, .09); border-color: rgba(148, 163, 184, .3); }
html.light-mode .emkr-lc-verif-o { color: #64748b; background: rgba(100, 116, 139, .07); border-color: rgba(100, 116, 139, .3); }

.emkr-lc-chip {
    display: inline-flex;
    align-items: center;
    gap: .22rem;
    font-size: .62rem;
    font-weight: 800;
    color: var(--st);
    background: var(--st-soft);
    border: 1px solid var(--st-border);
    border-radius: 999px;
    padding: .22rem .5rem;
    line-height: 1.2;
    white-space: nowrap;
}
.emkr-lc-total {
    font-size: .64rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #94a3b8;
    background: rgba(148, 163, 184, .12);
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: 999px;
    padding: .24rem .55rem;
    line-height: 1.2;
}
html.light-mode .emkr-lc-total { color: #475569; background: #f1f5f9; border-color: #cbd5e1; }

.emkr-log-scroll {
    flex: 1 1 auto;
    min-height: 130px;
    max-height: 340px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}
.emkr-log-scroll::-webkit-scrollbar { width: 5px; height: 5px; }
.emkr-log-scroll::-webkit-scrollbar-track { background: transparent; }
.emkr-log-scroll::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .3); border-radius: 9999px; }
.emkr-log-scroll::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, .5); }
html.light-mode .emkr-log-scroll::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, .35); }

/* Tombol aksi antrean lajnah — premium, presisi dark & light */
.emkr-lj-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: 100%;
    min-width: 0;
    padding: .55rem .6rem;
    border-radius: .55rem;
    font-weight: 700;
    font-size: 11px;
    line-height: 1.25;
    text-align: center;
    border: 1px solid transparent;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.emkr-lj-btn:active { transform: scale(.97); }
.emkr-lj-btn .iconify { flex-shrink: 0; }
.emkr-lj-btn span:last-child { flex: 1 1 auto; }
.emkr-lj-btn-primary {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 4px 10px -2px rgba(37, 99, 235, .3);
}
.emkr-lj-btn-primary:hover { background: #3b82f6; border-color: #3b82f6; }
.emkr-lj-btn-continue {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
    box-shadow: 0 4px 10px -2px rgba(5, 150, 105, .3);
}
.emkr-lj-btn-continue:hover { background: #10b981; border-color: #10b981; }
html.light-mode .emkr-lj-btn-continue:hover { background: #10b981; }
.emkr-lj-btn-return {
    background: rgba(245, 158, 11, .10);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, .30);
}
.emkr-lj-btn-return:hover { background: rgba(245, 158, 11, .20); color: #fcd34d; border-color: rgba(245, 158, 11, .45); }
html.light-mode .emkr-lj-btn-return {
    background: rgba(245, 158, 11, .12);
    color: #b45309;
    border-color: rgba(217, 119, 6, .35);
}
html.light-mode .emkr-lj-btn-return:hover { background: rgba(245, 158, 11, .25); color: #92400e; border-color: rgba(217, 119, 6, .5); }
html.light-mode .emkr-lj-btn-primary:hover { background: #3b82f6; }

/* ============================================================
   Dropdown Enterprise (status kepegawaian & lokasi shift template)
   Anti-bug mode gelap & terang
   ============================================================ */

/* Pill status kepegawaian (Aktif / Cuti / Nonaktif) */
.emkr-st-pill {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    border-radius: .5rem;
    border: 1px solid var(--st-bd);
    padding: .375rem .625rem;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    background: var(--st-soft);
    color: var(--st);
    --st: #34d399;
    --st-soft: rgba(52, 211, 153, .10);
    --st-bd: rgba(52, 211, 153, .30);
}
.emkr-st-pill.st-cuti     { --st: #fbbf24; --st-soft: rgba(251, 191, 36, .10); --st-bd: rgba(251, 191, 36, .30); }
.emkr-st-pill.st-nonaktif { --st: #fb7185; --st-soft: rgba(251, 113, 133, .10); --st-bd: rgba(251, 113, 133, .30); }
.emkr-st-pill.st-kp       { --st: #38bdf8; --st-soft: rgba(56, 189, 248, .10); --st-bd: rgba(56, 189, 248, .32); }
.emkr-st-pill.st-role     { --st: #94a3b8; --st-soft: rgba(148, 163, 184, .10); --st-bd: rgba(148, 163, 184, .32); }
.emkr-st-dot {
    display: inline-block;
    width: .375rem;
    height: .375rem;
    border-radius: 9999px;
    background: var(--st);
    flex-shrink: 0;
}
html.light-mode .emkr-st-pill         { --st: #047857; --st-soft: rgba(4, 120, 87, .10);  --st-bd: rgba(4, 120, 87, .32); }
html.light-mode .emkr-st-pill.st-cuti { --st: #b45309; --st-soft: rgba(180, 83, 9, .10);  --st-bd: rgba(180, 83, 9, .32); }
html.light-mode .emkr-st-pill.st-nonaktif { --st: #be123c; --st-soft: rgba(190, 18, 60, .10); --st-bd: rgba(190, 18, 60, .32); }
html.light-mode .emkr-st-pill.st-kp   { --st: #0369a1; --st-soft: rgba(3, 105, 161, .10);  --st-bd: rgba(3, 105, 161, .32); }
html.light-mode .emkr-st-pill.st-role { --st: #475569; --st-soft: rgba(71, 85, 105, .10);  --st-bd: rgba(71, 85, 105, .32); }

/* Ikon status di dalam menu dropdown */
.emkr-st-ic { color: var(--st); --st: #34d399; }
.emkr-st-ic.st-cuti     { --st: #fbbf24; }
.emkr-st-ic.st-nonaktif { --st: #fb7185; }
.emkr-st-ic.st-kp       { --st: #38bdf8; }
html.light-mode .emkr-st-ic         { --st: #047857; }
html.light-mode .emkr-st-ic.st-cuti { --st: #b45309; }
html.light-mode .emkr-st-ic.st-nonaktif { --st: #be123c; }
html.light-mode .emkr-st-ic.st-kp   { --st: #0369a1; }

/* Menu dropdown generic (warna aman di kedua mode) */
.emkr-dd-menu {
    background: rgba(10, 14, 25, .96);
    border: 1px solid rgba(71, 85, 105, .8);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Dropdown popup kanan (status & role karyawan): menyesuaikan lebar layar —
   HP/iPhone sempit dibatasi viewport, PC/desktop melebar sesuai isi. */
.emkr-dd-pop {
    width: max-content;
    min-width: 12.5rem;
    max-width: min(20rem, calc(100vw - 2rem));
}
.emkr-dd-item:hover { background: rgba(255, 255, 255, .06); }
.emkr-dd-title { color: #64748b; }
.emkr-dd-lbl { color: #ffffff; }
.emkr-dd-desc { color: #64748b; }
html.light-mode .emkr-dd-menu { background: #ffffff; border-color: #e2e8f0; box-shadow: 0 12px 32px -12px rgba(15, 23, 42, .22); }
html.light-mode .emkr-dd-item:hover { background: #f1f5f9; }
html.light-mode .emkr-dd-title { color: #64748b; }
html.light-mode .emkr-dd-lbl { color: #0f172a; }
html.light-mode .emkr-dd-desc { color: #475569; }

/* Pill lokasi shift template (kecil, konsisten dengan input jam) */
.emkr-loc-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .375rem;
    width: 100%;
    border-radius: .5rem;
    border: 1px solid rgba(100, 116, 139, .45);
    background: #0f172a;
    color: #cbd5e1;
    padding: .3125rem .5rem;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: border-color .15s ease, color .15s ease;
}
.emkr-loc-pill:hover { border-color: rgba(129, 140, 248, .65); color: #ffffff; }
.emkr-loc-lbl {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
html.light-mode .emkr-loc-pill { background: #ffffff; border-color: #cbd5e1; color: #334155; }
html.light-mode .emkr-loc-pill:hover { border-color: #818cf8; color: #0f172a; }

/* Dropdown surat: layout grid rapi (nama latin + nama Arab) di semua ukuran layar */
/* Dropdown surat: layout dua baris (latin di atas, Arab di bawah) — aman di semua perangkat */
.emkr-dd-item-surah {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1px;
}
.emkr-dd-item-surah .emkr-ar {
    text-align: right;
    font-size: 13px;
    color: #e5e7eb;
    line-height: 1.45;
}
html.light-mode .emkr-dd-item-surah .emkr-ar { color: #1e293b; }

/* Scrollbar tipis & halus untuk menu dropdown */
.emkr-dd-menu { scrollbar-width: thin; scrollbar-color: rgba(148, 163, 184, .4) transparent; }
.emkr-dd-menu::-webkit-scrollbar { width: 4px; }
.emkr-dd-menu::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .35); border-radius: 999px; }

@media (max-width: 380px) {
    .emkr-dd-item-surah .emkr-ar { font-size: 12px; }
}
/* ===== BADGE GPS LIVE DASHBOARD KARYAWAN (role Kepengasuhan) ===== */
.kr-gps-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid;
    line-height: 1.3;
}
.kr-gps-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.kr-gps-badge.is-ok    { background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .4);  color: #6ee7b7; }
.kr-gps-badge.is-out   { background: rgba(244, 63, 94, .12);  border-color: rgba(244, 63, 94, .45);  color: #fda4af; }
.kr-gps-badge.is-err   { background: rgba(244, 63, 94, .12);  border-color: rgba(244, 63, 94, .45);  color: #fda4af; }
.kr-gps-badge.is-wait  { background: rgba(100, 116, 139, .14); border-color: rgba(100, 116, 139, .4); color: #cbd5e1; }
.kr-gps-badge.is-unset { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .45); color: #fcd34d; }

html.light-mode .kr-gps-badge.is-ok    { background: rgba(16, 185, 129, .12); border-color: rgba(4, 120, 87, .45);   color: #047857; }
html.light-mode .kr-gps-badge.is-out   { background: rgba(244, 63, 94, .1);   border-color: rgba(190, 18, 60, .4);   color: #be123c; }
html.light-mode .kr-gps-badge.is-err   { background: rgba(244, 63, 94, .1);   border-color: rgba(190, 18, 60, .4);   color: #be123c; }
html.light-mode .kr-gps-badge.is-wait  { background: #eef2f7;                 border-color: #cbd5e1;                 color: #475569; }
html.light-mode .kr-gps-badge.is-unset { background: rgba(245, 158, 11, .12); border-color: rgba(180, 83, 9, .45);   color: #b45309; }

/* ===== CARD INFO ROLE KEPENGASUHAN (TAB JADWAL SHIFT) — MODE TERANG ===== */
html.light-mode #emKrKpInfo { background: rgba(224, 242, 254, .85) !important; border-color: rgba(56, 189, 248, .5) !important; }
html.light-mode #emKrKpInfo .text-sky-300 { color: #0369a1 !important; }
html.light-mode #emKrKpInfo .text-gray-300 { color: #334155 !important; }
html.light-mode #emKrKpInfo .text-gray-400 { color: #475569 !important; }
html.light-mode #emKrKpInfo .text-rose-300 { color: #be123c !important; }
html.light-mode #emKrKpInfo .text-white { color: #0f172a !important; }