/* =========================================
   SEHATI - MASTER STYLESHEET (FINAL FIX)
   AUTHOR: GEMINI AI (PENEBUS DOSA)
   ========================================= */

/* --- 1. VARIABLES & RESET --- */
:root {
    --kemenkes-blue: #00a29a;
    --kemenkes-green: #96c11f;
    --glass-bg: rgba(15, 25, 30, 0.95);
    --glass-border: rgba(255, 255, 255, 0.15);
    --card-bg: rgba(255, 255, 255, 0.05);
    --font-heading: 'Playfair Display', serif;
    --font-ui: 'Plus Jakarta Sans', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; -webkit-tap-highlight-color: transparent; }

/* FIX LAYAR LAPTOP: KUNCI SCROLL BODY UTAMA */
html, body {
    width: 100%; height: 100vh; /* Kunci Tinggi Layar */
    overflow: hidden; /* DILARANG SCROLL (KECUALI HP) */
    font-family: var(--font-ui); color: #fff;
    background: linear-gradient(135deg, #002b25, #004d40, #0a1f0b);
    background-size: 300% 300%;
    animation: gradientMove 20s ease infinite;
}
@keyframes gradientMove { 0% {background-position: 0% 50%} 50% {background-position: 100% 50%} 100% {background-position: 0% 50%} }
::-webkit-scrollbar { display: none; }

/* =========================================
   2. LANDING PAGE (ANTI RAKSASA FIX)
   ========================================= */
.landing-wrapper {
    width: 100%; height: 100vh;
    display: flex; justify-content: center; align-items: center;
    padding: 20px; position: relative; z-index: 10;
}

.landing-modal-split {
    display: flex; width: 100%; max-width: 1000px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px); border: 1px solid var(--glass-border);
    border-radius: 20px; box-shadow: 0 40px 80px rgba(0,0,0,0.6);
    overflow: hidden; cursor: pointer; transition: transform 0.2s;
}
.landing-modal-split:active { transform: scale(0.99); }

.split-left { flex: 1; padding: 40px; background: rgba(0,0,0,0.3); border-right: 1px solid var(--glass-border); display: flex; flex-direction: column; justify-content: center; }
.split-right { flex: 1.2; padding: 40px; background: rgba(255,255,255,0.02); display: flex; flex-direction: column; justify-content: center; }

/* --- PERBAIKAN LOGO: INI YANG BOSS MINTA --- */
/* KITA PAKSA SEMUA GAMBAR DI DALAM MODAL LANDING MENJADI KECIL */
.landing-modal-split img {
    height: 70px !important;    /* MAKSA TINGGI MAX 70PX */
    width: auto !important;     /* LEBAR NYESUAIKAN */
    max-width: 100% !important; /* JANGAN MELEBIHI CONTAINER */
    object-fit: contain !important;
    margin-right: 15px;
    display: inline-block;
}
.logo-row { margin-bottom: 20px; display: flex; align-items: center; }

/* TYPOGRAPHY */
.title-sehati { font-family: var(--font-heading); font-size: 3rem; line-height: 1; margin-bottom: 10px; }
.text-green { color: var(--kemenkes-green); }
.text-hati { color: var(--kemenkes-blue); }
.kadis-info { border-left: 3px solid var(--kemenkes-green); padding-left: 15px; margin-top: auto; }
.kadis-nama { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; margin: 2px 0; }
.text-content p { font-size: 0.95rem; line-height: 1.6; color: #ddd; margin-bottom: 15px; text-align: justify; }

/* =========================================
   3. DASHBOARD UMUM (CONTAINER)
   ========================================= */
.dashboard-container {
    width: 100%; height: 100vh; /* FULL HEIGHT */
    padding: 10px 15px;
    display: flex; flex-direction: column;
}

/* HEADER SLIM (NO GOYANG) */
.dash-header {
    flex: 0 0 60px; /* TINGGI MATI 60PX */
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px; margin-bottom: 10px;
    background: rgba(0, 162, 154, 0.15);
    border: 1px solid var(--glass-border); border-radius: 10px;
}
.user-name { font-family: var(--font-heading); font-size: 1.4rem; color: #fff; }
.pusk-badge { background: var(--kemenkes-blue); padding: 5px 12px; border-radius: 15px; font-size: 0.7rem; font-weight: 600; }

/* =========================================
   4. DASHBOARD ADMIN PUSKESMAS (3 KOLOM FIX)
   ========================================= */
.admin-grid {
    /* SISA TINGGI LAYAR: 100vh - Header(60px) - Margin(20px) */
    height: calc(100vh - 80px); 
    display: grid;
    grid-template-columns: 240px 1fr 260px; /* Kiri - Tengah - Kanan */
    gap: 15px;
    overflow: hidden; /* GRID NYA DIAM */
}

.panel-glass {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex; flex-direction: column;
    overflow: hidden; /* PANEL NYA DIAM */
    backdrop-filter: blur(10px);
}

.scroll-area {
    flex: 1; overflow-y: auto; /* ISI NYA YANG SCROLL */
    padding: 15px;
}

/* ITEM MENU ADMIN */
.menu-item {
    display: flex; align-items: center; padding: 10px 12px;
    margin-bottom: 5px; border-radius: 8px; color: #ccc; cursor: pointer; transition: 0.2s; font-size: 0.85rem;
}
.menu-item i { width: 25px; font-size: 1rem; color: var(--kemenkes-green); text-align: center; margin-right: 5px; }
.menu-item:hover, .menu-item.active { background: rgba(0, 162, 154, 0.15); color: #fff; }

/* =========================================
   5. DASHBOARD MASYARAKAT (GRID USER)
   ========================================= */
.info-banner {
    padding: 15px 20px; border-radius: 12px; margin-bottom: 20px;
    background: linear-gradient(to right, rgba(150, 193, 31, 0.15), rgba(0, 162, 154, 0.05));
    border-left: 4px solid var(--kemenkes-green);
    display: flex; justify-content: space-between; align-items: center;
}

.menu-grid { display: grid; gap: 15px; padding-bottom: 80px; /* Space Nav Bawah */ }

/* LAPTOP MASYARAKAT */
@media (min-width: 900px) {
    .menu-grid { grid-template-columns: repeat(4, 1fr); }
    .menu-card { padding: 30px; aspect-ratio: 1.2/1; }
}

/* CARD STYLE */
.menu-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border); border-radius: 15px;
    cursor: pointer; display: flex; flex-direction: column; 
    align-items: center; justify-content: center; text-align: center;
    transition: 0.2s;
}
.menu-card:hover { border-color: var(--kemenkes-blue); transform: translateY(-3px); }
.icon-box {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--kemenkes-blue), #004d40);
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 1.5rem; color: #fff; margin-bottom: 10px;
}
.menu-card:nth-child(even) .icon-box { background: linear-gradient(135deg, var(--kemenkes-green), #556b2f); }

/* =========================================
   6. MOBILE RESPONSIVE (HP BERDIRI)
   ========================================= */
@media (max-width: 900px) {
    /* 1. LEPASKAN KUNCIAN SCROLL UTAMA DI HP */
    html, body { 
        height: auto !important; 
        overflow-y: auto !important; 
        display: block; 
    }

    /* 2. LANDING PAGE STACK */
    .landing-modal-split { flex-direction: column; height: auto; border-radius: 0; min-height: 100vh; }
    .split-left { padding: 40px 20px; text-align: center; border-right: none; border-bottom: 1px solid var(--glass-border); }
    .kadis-info { display: inline-block; margin-top: 20px; border-left: none; border-bottom: 3px solid var(--kemenkes-green); padding-left: 0; padding-bottom: 10px; }
    
    /* 3. DASHBOARD CONTAINER STACK */
    .dashboard-container { height: auto; padding: 10px; display: block; }
    .dash-header { margin-bottom: 15px; padding: 15px; height: auto; }

    /* 4. ADMIN GRID JADI TUMPUK */
    .admin-grid {
        display: flex; flex-direction: column;
        height: auto; gap: 20px;
    }
    .panel-glass { height: auto; min-height: 300px; border: 1px solid rgba(255,255,255,0.1); }
    
    /* Workspace (Meja Kerja) Paling Atas di HP */
    .glass-workspace { order: -1; } 

    /* 5. MASYARAKAT GRID JADI 2 KOLOM (KOTAK RAPI) */
    .menu-grid { grid-template-columns: repeat(2, 1fr); }
    .menu-card { padding: 15px; aspect-ratio: 1/1; }
    .icon-box { width: 45px; height: 45px; font-size: 1.2rem; }
    .card-desc { display: none; } /* Sembunyikan deskripsi di HP biar rapi */
}

/* =========================================
   7. EXTRAS (TOAST & NAV)
   ========================================= */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; }
.glass-toast { 
    background: rgba(0,0,0,0.9); border-left: 4px solid var(--kemenkes-green); 
    color: #fff; padding: 12px 20px; margin-bottom: 10px; border-radius: 6px; 
    font-size: 0.85rem; display: flex; align-items: center; gap: 10px; 
}

.bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 70px;
    background: rgba(10, 20, 25, 0.98); backdrop-filter: blur(20px); 
    border-top: 1px solid var(--glass-border);
    display: flex; justify-content: space-around; align-items: center; z-index: 999;
}
.nav-item { display: flex; flex-direction: column; align-items: center; color: #666; font-size: 0.7rem; }
.nav-item.active { color: var(--kemenkes-blue); }
.panic-btn {
    width: 60px; height: 60px; background: linear-gradient(to bottom, #d32f2f, #b71c1c);
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 1.5rem; color: #fff; border: 4px solid #0a1419; margin-top: -30px;
    box-shadow: 0 0 15px rgba(211,47,47,0.5); animation: pulseRed 2s infinite;
}
@keyframes pulseRed { 0% {box-shadow: 0 0 0 0 rgba(211,47,47,0.7);} 70% {box-shadow: 0 0 0 10px rgba(211,47,47,0);} 100% {box-shadow: 0 0 0 0 rgba(211,47,47,0);} }