/* =============================== */
/* GLOBAL LAYOUT STYLES & VARIABLES */
/* =============================== */

/* Definisi Warna dan Font */
:root {
    /* Perubahan Warna untuk Hijau Muda Dominan */
    --color-primary-light: #c8e6c9; /* Hijau Muda yang lebih terang untuk background */
    --color-primary: #388e3c; /* Hijau Standar/Primer yang sedikit lebih gelap */
    --color-dark: #343a40; /* Biru Gelap/Hitam untuk teks utama */
    --color-light-bg: #ffffff; /* Latar Belakang Putih */
    --color-shadow: rgba(0, 0, 0, 0.08); 
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0;
    background-color: var(--color-light-bg);
    color: var(--color-dark);
    min-height: 100vh;
}

/* =============================== */
/* LOGIN PAGE STYLES (DOMINAN HIJAU MUDA) ðŸ”‘ */
/* =============================== */

.login-page {
    /* Gradien Background: Dominan Hijau Muda */
    /* Hijau Muda 0% (atas) sampai 85%, lalu memudar ke Putih 100% (bawah) */
    background: linear-gradient(180deg, var(--color-primary-light) 0%, var(--color-primary-light) 85%, var(--color-light-bg) 100%);
    position: relative;
    overflow: hidden; 
}

/* Watermark Logo di Halaman Login */
.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background-image: url('logo_pangsoed.png'); 
    background-repeat: repeat; /* Mengulang logo agar menutupi semua */
    background-position: center center;
    background-size: 120px; /* Ukuran logo di watermark sedikit dikecilkan */
    
    opacity: 0.04; /* Opasitas sangat rendah agar tidak mengganggu */
    
    z-index: 0; 
    pointer-events: none;
}

.login-wrapper {
    max-width: 400px; 
    width: 90%;
    position: relative; 
    z-index: 10;
}

/* Logo Kecil di Atas Card */
.logo-login {
    max-width: 80px; 
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); 
}

.login-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--color-shadow); 
    /* Mengurangi transparansi agar form tetap mudah dibaca */
    background-color: var(--color-light-bg); 
}

.text-primary-dark {
    color: var(--color-dark) !important;
    font-size: 1.8rem;
}

/* Input Form Kustom */
.form-control-custom {
    border-radius: 8px;
    height: 48px;
    transition: all 0.2s;
}

.form-control-custom:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.25rem rgba(56, 142, 60, 0.25); /* Menggunakan warna primer baru */
}

/* Tombol Login Kustom yang Elegan (Hijau Primer) */
.btn-elegant-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.1s;
    letter-spacing: 0.5px;
}

.btn-elegant-primary:hover {
    background-color: #2e7d32; /* Sedikit lebih gelap saat hover */
    border-color: #2e7d32;
    transform: translateY(-1px); 
    color: white;
}

/* =============================== */
/* DASHBOARD STYLES (Jika user sudah login) */
/* =============================== */

/* --- Watermark untuk Main Content (Dashboard) --- */
.main-content {
    margin-left: 250px; 
    padding: 30px; 
    position: relative; 
    min-height: 100vh;
    transition: margin-left 0.3s ease-in-out; 
    background-color: #f4f7f6; 
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background-image: url('logo_pangsoed.png'); 
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 400px; 
    background-attachment: fixed; 
    
    opacity: 0.1; 
    
    z-index: 1; 
    pointer-events: none;
}

.main-content > *,
.form-container {
    position: relative;
    z-index: 2; 
}


/* =============================== */
/* SIDEBAR STYLES (Menggunakan Dark Mode) */
/* =============================== */
.sidebar {
    width: 250px;
    background-color: var(--color-dark); 
    color: white;
    padding-top: 20px;
    height: 100vh; 
    position: fixed; 
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2); 
    z-index: 1050; 
    left: 0;
    top: 0;
    transform: translateX(0);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--color-primary); 
    font-weight: 700;
    font-size: 1.5rem;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.sidebar > ul > li {
    border-bottom: 1px solid #495057; 
}

.sidebar a {
    padding: 15px 20px;
    text-decoration: none;
    color: #f8f9fa; 
    display: block;
    transition: background-color 0.3s, color 0.3s;
    font-size: 1.0em;
}

.sidebar a:hover {
    background-color: #495057; 
    color: white;
}

/* Gaya untuk Submenu */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #212529; 
}

.submenu a {
    padding-left: 40px; 
    font-size: 0.9em;
    color: #adb5bd;
}

.submenu a:hover {
    background-color: #343a40; 
}

.submenu.open {
    max-height: 500px; 
    transition: max-height 0.5s ease-in;
}

.arrow {
    float: right;
    transition: transform 0.3s;
    font-size: 0.8em; 
    line-height: 1.5; 
}

.menu-item.active > a .arrow {
    transform: rotate(90deg);
}

.menu-item.active > a {
    background-color: var(--color-primary);
    color: #ffffff;
}

.menu-item.active > a:hover {
    background-color: var(--color-primary); 
}

/* Toggler Button */
.sidebar-toggler {
    display: none; 
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1060; 
    padding: 8px 12px;
    background-color: var(--color-dark);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}


/* =============================== */
/* FORM & TABLE STYLES */
/* =============================== */

/* Gaya Tabel Kustom */
.article-table, .data-table {
    box-shadow: 0 5px 15px var(--color-shadow);
    border-radius: 8px;
    overflow: hidden; 
}

.article-table th, .data-table th {
    background-color: var(--color-primary) !important; 
    color: white;
    border-bottom: none !important;
}

/* Gaya Form Container */
.form-container { 
    background-color: white; 
    padding: 30px; 
    border-radius: 10px; 
    box-shadow: 0 5px 20px var(--color-shadow); 
}

/* Tombol Primary (Non-Login) */
.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    transition: background-color 0.3s;
    border-radius: 6px;
}

.btn-primary:hover {
    background-color: #2e7d32;
    border-color: #2e7d32;
}


/* =============================== */
/* RESPONSIVE MEDIA QUERIES */
/* =============================== */

@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0; 
        padding-top: 60px; 
    }
    
    .sidebar {
        transform: translateX(-250px); 
        box-shadow: none;
    }
    
    .sidebar.toggled {
        transform: translateX(0); 
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.4); 
    }
    
    .sidebar-toggler {
        display: block; 
    }

    .main-content::before {
        background-size: 250px; 
    }
}
 
/* Paksa modal Summernote selalu paling atas dan bisa diklik */
.note-modal,
.note-modal .note-modal-content {
    position: fixed !important;
    z-index: 200000 !important;
}
.note-modal-backdrop {
    position: fixed !important;
    z-index: 199990 !important;
}
/* Kalau tema punya overlay yang menutup layar, matikan kliknya saat modal aktif */
.sidebar-overlay,
.layout-overlay,
.app-overlay,
.offcanvas-backdrop {
    pointer-events: none !important;
}