/* === Variabel Warna Standar Sistem === */
:root {
    --primary: #0A1435;
    --accent: #2563EB;
    --accent-hover: #1D4ED8;
    --text-dark: #111827;
    --text-light: #6B7280;
    --bg-page: #F0F7FF;
    --bg-card: #FFFFFF;
    --border: #E2E8F0;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --purple: #8B5CF6;
    --teal: #14B8A6;
    --amber: #F59E0B;
    --red: #EF4444;
    --sidebar-width: 220px;
    --sidebar-kecil: 0px;
    --shadow-soft: 0 8px 24px rgba(37, 99, 235, 0.08);
    --shadow-hover: 0 12px 32px rgba(37, 99, 235, 0.15);
    --transition-speed: 0.5s;
    --transition-fast: 0.3s;
    --ease-smooth: cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* === Reset Dasar === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background: linear-gradient(180deg, #F0F7FF 0%, #E6EFFC 100%);
    color: var(--text-dark);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    font-size: 14px;
    padding: 0;
}

/* === Layout Utama === */
#app {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.sidebar {
    width: var(--sidebar-width); /* ✅ Menggunakan variabel agar konsisten */
    background: linear-gradient(180deg, #0F2540 0%, #091C33 100%);
    color: #E2E8F0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;

    /* ✅ Pola latar sesuai gambar sudah terpasang */
    background-image: 
        linear-gradient(180deg, rgba(15, 37, 64, 0.92) 0%, rgba(9, 28, 51, 0.95) 100%),
        url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_YTgPjh8yFs573qzCCJvnWJCef0n9e3jxeZtf5mkyDX8tnG1PVRRWVP0YUiwPn40_GtjLU2YjvQwN-iYe6dClkzB_024rRjaeR2667TJgBhyphenhyphenAxd09o7ZfirsJRtPWRIMGeCxfJSCezObVN-GO3wWySJarV_Vu-F_KkivBy2BgSrrCuxVMqKEbSiTWyDY/w225-h400/Pisahkan%20Gambar.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.sidebar.tertutup {
    transform: translateX(-100%);
}

.sidebar-brand {
    padding: 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand-logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-logo-row img {
    height: 42px;
    width: auto;
    object-fit: contain;
}
.brand-text-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.brand-title-main {
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 0.5px;
}
.brand-title-sub {
    font-size: 13px;
    color: #94A3B8;
    font-weight: 500;
}

.brand-description {
    margin-top: 14px;
    padding: 12px 3px 0;
    border-top: 1px solid rgba(255,255,255,0.10);
    text-align: left;
}

.brand-system-name {
    font-size: 8.5px;
    line-height: 1.6;
    font-weight: 600;
    color: #CBD5E1;
    letter-spacing: 0.35px;
}

.brand-location {
    margin-top: 6px;
    font-size: 8px;
    line-height: 1.5;
    color: #64748B;
    font-weight: 500;
}

.sidebar-menu {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}
.sidebar-menu::-webkit-scrollbar {
    width: 3px;
}
.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.menu-section-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748B;
    padding: 12px 8px 8px;
    letter-spacing: 0.8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    margin-bottom: 2px;
    border-radius: 8px;
    color: #CBD5E1;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.menu-item i {
    width: 20px;
    font-size: 17px;
    text-align: center;
    flex-shrink: 0;
}
.menu-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #FFFFFF;
    transform: translateX(3px);
}
.menu-item.active {
    background: rgba(59, 130, 246, 0.18);
    color: #FFFFFF;
    border-left: 3px solid #3B82F6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}
.menu-item-sub {
    font-size: 11px;
    color: #94A3B8;
    margin-top: 1px;
}

.sidebar-footer {
    padding: 16px 12px 20px;
    border-top: 0px solid rgba(255,255,255,0.1);
    text-align: center;
    background: rgba(9, 28, 51, 0);
}
.sidebar-footer-logo img {
    height: 150px;
    width: auto;
    margin-bottom: 8px;
    object-fit: contain;
}
.sidebar-footer-text strong {
    display: block;
    font-size: 12px;
    color: #FFFFFF;
    margin-bottom: 4px;
    font-weight: 600;
}
.sidebar-footer-text div {
    font-size: 10px;
    color: #94A3B8;
    line-height: 1.4;
}

.sidebar-logout {
    padding: 12px 12px 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: auto;
}
.sidebar-logout .menu-item {
    color: #FCA5A5;
}
.sidebar-logout .menu-item:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #FECDD3;
    transform: translateX(3px);
}
.sidebar-logout .menu-item i {
    color: #F87171;
}
.sidebar-logout .menu-item:hover i {
    color: #FCA5A5;
}

.main-content {
    margin-left: var(--sidebar-width);
    width: 100%;
    padding: 2rem;
    transition: margin-left 0.3s ease;
}

.main-content.geser {
    margin-left: var(--sidebar-kecil);
}

.top-header.premium {
    background: linear-gradient(135deg, #0F2540 0%, #2563EB 50%, #0A1435 100%);
    color: white;
    padding: 1.75rem 2rem;
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(15, 37, 64, 0.3);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    border: 1px solid rgba(255,255,255,0.1);
}

.header-left {
    display: flex; 
    align-items: center;
    gap: 12px; 
    flex: 1; 
    min-width: 300px;
}

.header-right {
    text-align: right; 
    display: flex; 
    flex-direction: row;    /* ← Ubah dari column → row */
    align-items: center;   /* ← Sejajar tengah vertikal */
    justify-content: flex-end; /* ← Rata kanan semua elemen */
    gap: 12px;              /* ← Jarak antar elemen */
    flex-wrap: wrap;        /* ← Pindah baris otomatis di layar sempit */
}

/* Tambahkan: Kelompok tanggal+jam tetap tersusun vertikal */
.tanggal-waktu-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toggle-sidebar {
    width: 38px; 
    height: 38px; 
    border-radius: 10px;
    background: rgba(255,255,255,0.2); 
    border: 1px solid rgba(255,255,255,0.3);
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 17px; 
    color: white; 
    transition: all 0.3s ease; 
    flex-shrink: 0;
}
.toggle-sidebar:hover { background: rgba(255,255,255,0.3); transform: scale(1.05); }

.header-text h1 { 
    font-size: 26px; 
    font-weight: 700; 
    color: white; 
    line-height: 1.2; 
    margin: 0;
}
.tanggal-header { 
    font-size: 15px; 
    font-weight: 500; 
    color: rgba(255,255,255,0.95); 
}
.jam-realtime { 
    font-size: 13px; 
    color: rgba(255,255,255,0.75); 
    font-weight: 400; 
}

.stats-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 1.25rem; 
    margin-bottom: 2rem;
}
.stat-card {
    background: rgba(255,255,255,0.92); 
    backdrop-filter: blur(12px); 
    border-radius: 16px;
    padding: 1.25rem; 
    box-shadow: var(--shadow-soft); 
    display: flex; 
    align-items: center; 
    gap: 1rem;
    border: 1px solid rgba(255,255,255,0.7); 
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}
.stat-card.masuk {
    opacity: 1;
    transform: translateY(0);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.stat-card.blue { border-left: 4px solid var(--accent); }
.stat-card.green { border-left: 4px solid var(--success); }
.stat-card.teal { border-left: 4px solid var(--teal); }
.stat-card.amber { border-left: 4px solid var(--amber); }
.stat-card.red { border-left: 4px solid var(--red); }
.stat-card.purple { border-left: 4px solid var(--purple); }
.stat-icon {
    width: 52px; 
    height: 52px; 
    border-radius: 14px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 22px; 
    color: white; 
    flex-shrink: 0;
}
.blue .stat-icon { background: linear-gradient(135deg, var(--accent) 0%, #3B82F6 100%); }
.green .stat-icon { background: linear-gradient(135deg, var(--success) 0%, #34D399 100%); }
.teal .stat-icon { background: linear-gradient(135deg, var(--teal) 0%, #2DD4BF 100%); }
.amber .stat-icon { background: linear-gradient(135deg, var(--amber) 0%, #FBBF24 100%); }
.red .stat-icon { background: linear-gradient(135deg, var(--red) 0%, #F87171 100%); }
.purple .stat-icon { background: linear-gradient(135deg, var(--purple) 0%, #A78BFA 100%); }
.stat-card h3 { font-size: 28px; font-weight: 700; color: var(--primary); margin-bottom: 2px; transition: color 0.3s ease; }
.stat-card p { color: var(--text-light); font-size: 13px; margin: 0; }

.grid-konten { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }

.card {
    background: rgba(255,255,255,0.92); 
    backdrop-filter: blur(12px); 
    border-radius: 16px;
    box-shadow: var(--shadow-soft); 
    border: 1px solid rgba(255,255,255,0.7);
    transition: all 0.3s ease; 
    overflow: hidden;
    min-width: 0;
    opacity: 0;
    transform: translateY(20px);
}
.card.masuk {
    opacity: 1;
    transform: translateY(0);
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-header {
    padding: 1.25rem 1.5rem; 
    border-bottom: 1px solid var(--border); 
    background: rgba(249,250,251,0.6);
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.card-header h3 { font-size: 15px; font-weight: 600; color: var(--primary); display: flex; align-items: center; gap: 8px; margin: 0; }
.card-body { padding: 1.5rem; }

.tabel-terbaru { width: 100%; border-collapse: collapse; }
.tabel-terbaru th, .tabel-terbaru td {
    padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); font-size: 12.5px;
}
.tabel-terbaru th { font-weight: 600; color: var(--text-light); background: #F8FAFC; }
.tabel-terbaru tr:last-child td { border-bottom: none; }
.tabel-terbaru tbody tr {
    opacity: 0;
    transform: translateX(-12px);
    transition: all 0.35s ease;
}
.tabel-terbaru tbody tr.muncul {
    opacity: 1;
    transform: translateX(0);
}
.status-badge { padding: 0.25rem 0.55rem; border-radius: 6px; font-size: 11.5px; font-weight: 500; display: inline-block; }
.status-badge.status-selesai { background: rgba(16,185,129,0.1); color: var(--success); }
.status-badge.status-proses { background: rgba(245,158,11,0.1); color: var(--warning); }
.status-badge.status-menunggu { background: rgba(37,99,235,0.1); color: var(--accent); }
.status-badge.status-tolak { background: rgba(239,68,68,0.1); color: var(--danger); }
.waktu-kosong { color: var(--text-light); font-style: italic; }

.paginasi {
    display: flex; justify-content: flex-start; align-items: center; gap: 0.5rem;
    padding: 1rem 1.5rem; border-top: 1px solid var(--border); background: rgba(249,250,251,0.6); flex-wrap: wrap;
}
.btn-halaman {
    min-width: 34px; height: 34px; border: 1px solid var(--border); background: white; border-radius: 8px;
    cursor: pointer; font-size: 12.5px; font-weight: 500; transition: all 0.25s ease;
    display: flex; align-items: center; justify-content: center; color: var(--text-dark);
}
.btn-halaman:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn-halaman.aktif { background: var(--accent); border-color: var(--accent); color: white; box-shadow: 0 2px 8px rgba(37,99,235,0.2); }
.btn-halaman:disabled { opacity: 0.5; cursor: not-allowed; }
.info-halaman { font-size: 12px; color: var(--text-light); margin-left: auto; font-weight: 500; }

#grafikMingguan {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 0.75rem;
    height: 100%;
    min-height: 320px;
}
#grafikMingguan > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}
#grafikMingguan > div > div {
    width: 100%;
    background: linear-gradient(180deg, #2563eb, #60a5fa);
    border-radius: 6px 6px 0 0;
    transform-origin: bottom center;
    transform: scaleY(0);
    transition: transform 0.8s cubic-bezier(0.17, 0.67, 0.43, 0.99);
}
#grafikMingguan.aktif > div > div {
    transform: scaleY(1);
}
#grafikMingguan span {
    font-size: 11px;
    margin-top: 6px;
    color: var(--text-dark);
}
#grafikMingguan span:last-child {
    color: var(--text-light);
    font-size: 10px;
}

.progress-bar { width: 0%; transition: width 1s cubic-bezier(0.22, 0.61, 0.36, 1); }

.btn-setujui {
    background-color: #10b981;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    margin-right: 4px;
    transition: all 0.2s ease;
    font-size: 12px;
}
.btn-setujui:hover { background-color: #059669; transform: translateY(-1px); }
.btn-tolak {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 12px;
}
.btn-tolak:hover { background-color: #dc2626; transform: translateY(-1px); }
.btn-keluar {
    background-color: #f59e0b;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 12px;
}
.btn-keluar:hover { background-color: #d97706; transform: translateY(-1px); }

.wadah-notifikasi {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    pointer-events: none;
}
.notifikasi {
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.3rem;
    transform: translateX(450px) scale(0.95);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
    border-left: 4px solid transparent;
    backdrop-filter: blur(12px);
    pointer-events: auto;
}
.notifikasi.muncul { transform: translateX(0) scale(1); opacity: 1; }
.notifikasi.hilang { transform: translateX(450px) scale(0.95); opacity: 0; }
.notifikasi.berhasil { border-color: var(--success); }
.notifikasi.gagal { border-color: var(--danger); }
.notifikasi .ikon { font-size: 1.75rem; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.berhasil .ikon { color: var(--success); }
.gagal .ikon { color: var(--danger); }
.isi { flex: 1; }
.isi h4 { font-size: 1rem; font-weight: 600; margin-bottom: 0.2rem; color: var(--text-dark); }
.isi p { font-size: 0.875rem; color: var(--text-light); margin: 0; line-height: 1.4; }
.tombol-tutup {
    background: rgba(0,0,0,0.04);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-light);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
}
.tombol-tutup:hover { background: rgba(0,0,0,0.08); color: var(--text-dark); transform: rotate(90deg); }

/* ================================== */
/* ✅ POPUP KONFIRMASI - SESUAI TAMPILAN FORM */
/* ================================== */
.popup-latar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 20, 53, 0.45);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
}

.popup-latar.aktif {
    opacity: 1;
    visibility: visible;
}

.popup-kotak {
    background: #ffffff;
    border-radius: 20px;
    padding: 2.2rem;
    width: 92%;
    max-width: 440px;
    box-shadow: 
        0 20px 60px rgba(37, 99, 235, 0.18),
        0 8px 24px rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(255,255,255,0.9);
    position: relative;
    overflow: hidden;
}

.popup-kotak::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--accent), var(--purple));
}

.popup-kotak h3 {
    margin: 0 0 1.2rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.popup-kotak h3::before {
    content: '\f2f5';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.3rem;
    color: var(--accent);
}

.popup-kotak p {
    color: var(--text-dark);
    margin-bottom: 2rem;
    line-height: 1.7;
    font-size: 1rem;
    opacity: 0.9;
}

.popup-tombol {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn {
    border: none;
    padding: 0.85rem 1.8rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    min-width: 110px;
}

.btn-batal {
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    color: var(--text-dark);
    border: 1px solid var(--border);
}
.btn-batal:hover {
    background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
}

.btn-ya {
    background: linear-gradient(135deg, var(--accent), #1d4ed8);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.btn-ya:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.modal-detail-latar {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: rgba(10, 20, 53, 0.45);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100001;
}
.modal-detail-latar.aktif { display: flex; }

.modal-detail-kotak {
    background: #ffffff;
    border-radius: 16px;
    width: 95%;
    max-width: 620px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    border: 1px solid var(--border);
}

.modal-detail-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.2rem 1.8rem; border-bottom: 1px solid var(--border);
    background: rgba(249,250,251,0.5);
}
.modal-logo-judul { display: flex; align-items: center; gap: 10px; }
.logo-modal { height: 24px; width: auto; }
.modal-detail-header h3 { margin: 0; font-size: 17px; font-weight: 700; color:var(--primary); }
.tombol-tutup-modal {
    background: none; border: none; font-size: 22px;
    color: var(--text-light); cursor: pointer; transition: color 0.2s;
    padding: 0; line-height: 1;
}
.tombol-tutup-modal:hover { color: var(--danger); }

.modal-detail-isi {
    padding: 1.8rem;
    display: flex; gap: 1.8rem; align-items: flex-start;
}

.foto-tamu-wadah {
    flex-shrink: 0; 
    text-align: center;
    background: var(--bg-page);
    border-radius: 12px;
    padding: 1.2rem 1rem;
    width: 200px;
    border: 1px solid var(--border);
    transition: all 0.25s ease;
}
.foto-tamu-wadah:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}
.foto-tamu {
    width: 150px; 
    height: 160px; 
    border-radius: 8px;
    object-fit: cover; 
    background: white; 
    border: 2px solid var(--border);
    margin-bottom: 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.foto-tamu-wadah h4 { 
    margin: 0; 
    font-size: 16px; 
    font-weight: 700; 
    color:var(--primary);
    letter-spacing: 0.3px;
}
.foto-tamu-wadah span { 
    font-size: 12px; 
    color:var(--text-light); 
    display:block; 
    margin-top: 2px;
    font-weight: 500;
}

.data-tamu-wadah {
    flex:1; 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 1rem;
}
.baris-data {
    display: flex; align-items: flex-start; gap: 8px;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
}
.baris-data:last-child { border-bottom: none; padding-bottom: 0; }
.baris-data i { color: var(--accent); margin-top: 2px; width: 16px; text-align: center; flex-shrink:0; font-size:14px; }
.baris-data label { 
    font-size: 10px; 
    color:var(--text-light); 
    text-transform: uppercase; 
    margin-bottom: 2px; 
    display:block; 
    letter-spacing: 0.4px;
    font-weight: 600;
}
.baris-data span { 
    font-size: 13px; 
    font-weight:600; 
    color:var(--text-dark); 
}

.modal-detail-tombol {
    display: flex; gap: 10px; justify-content: flex-end;
    padding: 0 1.8rem 1.8rem;
    border-top: 1px solid var(--border);
    padding-top: 1.2rem;
}
.btn-tutup {
    padding: 9px 20px; border: none; border-radius: 10px;
    background: var(--accent); color:white; font-weight:600; cursor:pointer;
    display:flex; align-items:center; gap:6px; transition:all 0.2s;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}
.btn-tutup:hover { 
    background: var(--accent-hover); 
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

/* =========================================================
   HEADER + USER PROFILE DROPDOWN
   ========================================================= */
.top-header.premium {
    position: relative;
    z-index: 1000;
    overflow: visible !important;
}

/* =========================
   HEADER KANAN
   ========================= */
.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    position: relative;
    z-index: 1100;
}

/* =========================
   TANGGAL & JAM
   ========================= */
.tanggal-header {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.95);
    line-height: 1.4;
    text-align: right;
}

.jam-realtime {
    font-size: 10px;
    color: rgba(255,255,255,0.65);
    font-weight: 400;
    margin-top: 2px;
}

/* =========================
   USER MENU
   ========================= */
.user-menu {
    position: relative;
    z-index: 1200;
}

/* =========================
   BUTTON PROFILE
   ========================= */
.user-profile-btn {
    height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 6px 8px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    background: rgba(255,255,255,0.10);
    color: #FFFFFF;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.user-profile-btn:hover {
    background: rgba(255,255,255,0.17);
    border-color: rgba(255,255,255,0.20);
}

.user-profile-btn:active {
    transform: scale(0.98);
}

/* =========================
   AVATAR HEADER
   ========================= */
.user-menu .user-avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #2563EB;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  overflow: hidden;
}

/* =========================
   USER INFO HEADER
   ========================= */
.user-menu .user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 60px;
    line-height: 1.25;
}

.user-menu .user-name {
    font-size: 12px;
    font-weight: 600;
    color: #FFFFFF;
}

.user-menu .user-role {
    font-size: 10px;
    color: rgba(255,255,255,0.65);
    margin-top: 2px;
}

/* =========================
   CHEVRON
   ========================= */
.user-profile-btn > .fa-chevron-down {
    font-size: 10px;
    color: rgba(255,255,255,0.75);
    margin-left: 2px;
    transition: transform 0.2s ease;
}

/* =========================================================
   DROPDOWN
   ========================================================= */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;
    min-width: 220px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 8px;
    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.18),
        0 4px 12px rgba(15, 23, 42, 0.08);
    display: none;
    z-index: 999999;
    transform-origin: top right;
}

/* Dropdown tampil */
.user-dropdown.show {
    display: block;
    animation: dropdownMasuk 0.18s ease-out;
}

@keyframes dropdownMasuk {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================
   HEADER USER DI DROPDOWN
   ========================= */
.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 10px 11px;
}

/* Avatar dropdown */
.dropdown-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB, #3B82F6);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(37,99,235,0.20);
  overflow: hidden;
}

/* Nama user */
.dropdown-user-info strong {
    display: block;
    color: #0F172A;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

/* Role */
.dropdown-user-info span {
    display: block;
    margin-top: 2px;
    color: #64748B;
    font-size: 11px;
}

/* =========================
   GARIS PEMISAH
   ========================= */
.dropdown-divider {
    height: 1px;
    background: #E2E8F0;
    margin: 5px 2px;
}

/* =========================
   ITEM MENU
   ========================= */
.dropdown-item {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 10px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #334155;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

/* Icon */
.dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: #64748B;
    flex-shrink: 0;
    transition: color 0.18s ease;
}

/* Hover */
.dropdown-item:hover {
    background: #F1F5F9;
    color: #1D4ED8;
    transform: translateX(2px);
}

.dropdown-item:hover i {
    color: #2563EB;
}

/* =========================
   LOGOUT
   ========================= */
.dropdown-item.logout-item {
    color: #DC2626;
}

.dropdown-item.logout-item i {
    color: #EF4444;
}

.dropdown-item.logout-item:hover {
    background: #FEF2F2;
    color: #B91C1C;
    transform: translateX(2px);
}

.dropdown-item.logout-item:hover i {
    color: #DC2626;
}

@media (max-width: 640px) {
    .header-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .user-profile-btn .user-info {
        display: none;
    }
}

@media (max-width: 992px) {
    .grid-konten { grid-template-columns: 1fr; }
    .main-content { padding: 1.25rem; }
    .sidebar { transform: translateX(-100%); z-index: 999; }
    .sidebar.tertutup { transform: translateX(0); width: 220px; }
    .top-header.premium { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .header-right { width: 100%; text-align: left; margin-top: 0; }
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .paginasi { justify-content: center; }
    .info-halaman { margin-left: 0; width: 100%; text-align: center; margin-top: 0.5rem; }
}

/* ==============================================
✅ MODAL FOTO PENUH — KLIK FOTO UNTUK MEMPERBESAR
============================================== */
.modal-foto-latar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 100002;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-foto-konten {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    width: auto;
    height: auto;
}

.modal-foto-konten img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    object-fit: contain;
}

.tutup-foto {
    position: absolute;
    top: -12px;
    right: -12px;
    font-size: 32px;
    color: #ffffff;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s ease;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    background: rgba(0,0,0,0.4);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.tutup-foto:hover {
    color: #fca5a5;
    background: rgba(0,0,0,0.6);
}

/* ✅ Foto di modal detail bisa diklik */
.foto-tamu {
    cursor: zoom-in;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.foto-tamu:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.15);
}