/* =========================================================================
   STYLE UTAMA APLIKASI RT DIGITAL (LOGIN & DASHBOARD)
   ========================================================================= */

/* Import Font Modern */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #1a1025; /* Navy Gelap */
    --accent-color: #b31b34;  /* Merah RT Digital */
    --bg-light: #f8f9fa;
    --text-muted: #888;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

* {
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* =========================================================================
   KONTINER UTAMA (FONDASI RESPONSIVE APK)
   ========================================================================= */

/* 1. TAMPILAN DASAR (UNTUK HP & TABLET) -> Mentok 100% */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    height: 100%;
    background-color: #f8f9fa !important; /* Latar dasar di HP */
    overflow: hidden !important; 
}

.app-container, .mobile-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important; /* Mentok dari ujung atas ke bawah layar */
    margin: 0 !important;
    border-radius: 0 !important; /* Tidak ada sudut melengkung di HP/Tablet */
    box-shadow: none !important; /* Hilangkan bayangan */
    background-color: #f8f9fa;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important; 
    position: relative;
}

/* Khusus kontiner Login/Register (mobile-container) */
.mobile-container {
    background-color: #fff;
    overflow-y: auto !important; 
    overflow-x: hidden !important;
}
.mobile-container::-webkit-scrollbar {
    display: none;
}

/* Batasi form login di layar tablet agar tidak terlalu melebar jelek */
.login-card {
    max-width: 500px; /* Di tablet formnya terkunci segini, tapi layar tetap mentok */
    margin: -30px auto 0 auto; 
    width: 100%;
    background: white;
    flex: 1;
    border-radius: 35px 35px 0 0;
    padding: 40px 30px;
    position: relative;
    z-index: 2;
    overflow-y: auto;
}
.login-card::-webkit-scrollbar { display: none; }


/* 2. TAMPILAN KHUSUS LAYAR LEBAR (PC/LAPTOP > 1024px) */
@media screen and (min-width: 1024px) {
    body {
        background-color: #e9ecef !important; /* Meja abu-abu kembali muncul */
        display: flex !important;
        justify-content: center !important;
        align-items: center !important; 
    }

    .app-container, .mobile-container {
        width: 480px !important; /* Kunci ukuran jadi sebesar HP vertikal */
        max-width: 480px !important;
        height: 90vh !important; /* Sisakan jarak atas-bawah */
        margin: auto !important; /* Pastikan melayang di tengah */
        border-radius: 0 !important; /* Beri sudut melengkung estetik lagi */
        box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    }
}


/* =========================================================================
   STYLE HALAMAN LOGIN / REGISTER / RESET
   ========================================================================= */

/* Header Halaman Depan */
.header-section {
    background: linear-gradient(135deg, #6a9d19, #255c10); 
    padding: 60px 30px;
    color: white;
    position: relative;
    flex-shrink: 0;
    /* Agar sudut warna hijaunya ikut melengkung rapi di PC */
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.header-section h1 {
    font-weight: 700;
    font-size: 2.2rem;
    line-height: 1.2;
    margin: 0;
}

.header-section .menu-dots {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 1.5rem;
    opacity: 0.7;
}

.back-btn {
    position: absolute;
    top: 30px;
    left: 25px;
    color: white;
    font-size: 1.6rem;
    text-decoration: none;
    z-index: 10;
    transition: transform 0.2s, opacity 0.2s;
}

.back-btn:active {
    transform: scale(0.9);
    opacity: 0.7;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 1rem !important; 
    font-weight: 600 !important;
    color: var(--primary-color);
    margin-bottom: 8px;
    margin-left: 5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 15px !important;
    background-color: #f1f3f6;
    border: 2px solid transparent;
    border-radius: 15px;
    font-size: 1rem !important;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: white;
    box-shadow: 0 5px 15px rgba(179, 27, 52, 0.1);
}

.input-wrapper i {
    position: absolute;
    right: 20px;
    color: #aaa;
    font-size: 1.1rem;
}

.btn-signin {
    width: 100%;
    padding: 16px !important;
    background: #255c10; 
    color: white;
    border: none;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem !important; 
    letter-spacing: 1px;
    margin-top: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-signin:active { transform: scale(0.98); }

.footer-signup {
    text-align: center;
    margin-top: 30px;
    font-size: 0.95rem !important; 
    color: var(--text-muted);
}

.footer-signup a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
}

/* Notifikasi */
.error-notice, .success-notice {
    padding: 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.error-notice { background: #fff0f0; color: #d63031; border: 1px solid #ff7675; }
.success-notice { background: #f0fff4; color: #27ae60; border: 1px solid #2ecc71; }


/* =========================================================================
   STYLE HALAMAN DASHBOARD & MENU
   ========================================================================= */

/* Header Cover Gambar */
.cover-header {
    flex-shrink: 0;
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #fff; 
}

.btn-logout {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    text-decoration: none;
    box-shadow: var(--shadow);
    z-index: 10;
}

/* --- AREA KONTEN YANG BISA DI-SCROLL TANPA GARIS --- */
.main-content-scroll {
    flex-grow: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 40px;
    background-color: #f8f9fa;
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}
.main-content-scroll::-webkit-scrollbar {
    display: none;
}

/* Area Greeting Dashboard (Dibuat Sticky/Terkunci di Atas) */
.profile-overlay {
    padding: 30px 20px 15px 20px;
    position: sticky;
    top: 0;
    background-color: #fff; 
    z-index: 20; 
    border-radius: 35px 35px 0 0; 
    border-bottom: 1px solid #f1f1f1; 
}

.user-greeting {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary-color);
}

.role-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

/* Section Konten (Pengumuman & Menu) */
.announcement-section {
    padding: 0 20px;
    margin-top: 15px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title span {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-color);
}

.section-title a {
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-color);
}

/* Card Slider Pengumuman */
.card-slide {
    background: white;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 5px;
}

.card-slide .badge {
    padding: 5px 12px;
    font-size: 0.65rem;
    border-radius: 50px;
}

.card-slide h6 {
    margin: 10px 0 5px 0;
    font-weight: 700;
    color: var(--primary-color);
}

.card-slide p {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.4;
}

/* Menu Grid Dashboard */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    background: #fdfdfd;
    padding: 15px 10px;
    border-radius: 18px;
    border: 1px solid #f1f1f1;
    transition: all 0.2s;
}

.menu-item:active { transform: scale(0.95); }

.menu-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.menu-item span {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* =========================================================================
   BOTTOM NAVIGATION
   ========================================================================= */
.bottom-nav {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #f1f1f1;
    display: flex;
    justify-content: space-around;
    padding: 12px 0 25px 0;
    z-index: 1000;
    position: relative; 
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #bbb;
    font-size: 0.65rem;
    font-weight: 600;
    position: relative;
}

.nav-link i { font-size: 1.3rem; margin-bottom: 3px; }
.nav-link.active { color: var(--accent-color); }

.notif-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--accent-color);
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 50px;
    border: 2px solid white;
}

/* --- Kustomisasi Indikator Carousel (Bullets) --- */
.carousel-indicators {
    position: relative !important; 
    bottom: 0 !important;
    margin-top: 15px !important;
    margin-bottom: 20px !important;
}

.carousel-indicators button {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50%;
    background-color: #d1d5db !important; 
    border: none !important;
    margin: 0 4px !important;
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background-color: var(--accent-color) !important; 
    width: 20px !important; 
    border-radius: 10px !important;
}

.carousel-item {
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

/* --- PENGECUALIAN KHUSUS HALAMAN AUTH (Bila diperlukan) --- */
.app-container.auth-page {
    height: auto !important; 
    min-height: auto !important;
    max-width: 400px !important; 
    display: block !important; 
    padding-bottom: 0 !important;
}

/* =========================================================
   PALET WARNA SOFT-UI UNTUK IKON MENU DASHBOARD
   ========================================================= */
.icon-green  { background-color: #dcfce7 !important; color: #16a34a !important; }
.icon-blue   { background-color: #e0f2fe !important; color: #0284c7 !important; }
.icon-orange { background-color: #ffedd5 !important; color: #ea580c !important; }
.icon-purple { background-color: #f3e8ff !important; color: #9333ea !important; }
.icon-teal   { background-color: #ccfbf1 !important; color: #0d9488 !important; }