/* --- RESET & VARIABEL --- */
:root {
    --primary-color: #27ae60;   /* Hijau khas pesantren */
    --primary-dark: #219150;
    --text-dark: #2c3e50;       /* Warna teks utama */
    --text-light: #7f8c8d;      /* Warna teks sekunder */
    --bg-light: #f4f7f6;        /* Background halaman */
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 10px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Roboto', Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-size: 15px;
}

/* --- HALAMAN LOGIN --- */
.login-page {
    height: 100vh;
    width: 100vw;
    display: flex;
    overflow: hidden;
}

.login-split {
    display: flex;
    width: 100%;
    height: 100%;
    background: var(--white);
}

.login-left {
    flex: 1.2;
    background-image: url('../img/foto-ponpes.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.login-right {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    font-size: 26px;
    color: var(--text-dark);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.login-header p {
    font-size: 16px;
    color: var(--text-light);
}

.login-right form { width: 100%; max-width: 360px; }
.login-right h2 { margin-bottom: 20px; font-size: 20px; color: var(--text-dark); border-bottom: 2px solid var(--primary-color); display: inline-block; padding-bottom: 5px; }
.login-right input, .login-right select { width: 100%; padding: 12px 15px; margin-bottom: 15px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; transition: 0.3s; }
.login-right input:focus, .login-right select:focus { border-color: var(--primary-color); outline: none; box-shadow: 0 0 5px rgba(39, 174, 96, 0.2); }
.login-right button { width: 100%; padding: 12px; background: var(--primary-color); color: white; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 16px; transition: 0.3s; box-shadow: 0 4px 6px rgba(39, 174, 96, 0.2); }
.login-right button:hover { background: var(--primary-dark); transform: translateY(-2px); }


/* --- DASHBOARD LAYOUT --- */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* 1. SIDEBAR (Kiri) */
.sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: 2px 0 10px rgba(0,0,0,0.02);
}

.sidebar-header {
    padding: 30px 20px;
    background: #fdfdfd;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.sidebar-header p {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.sidebar-header small {
    display: inline-block;
    background: #e8f5e9;
    color: var(--primary-dark);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    margin-top: 5px;
    font-weight: bold;
    text-transform: uppercase;
}

.menu-list {
    list-style: none;
    padding: 20px 0;
    flex: 1;
    overflow-y: auto;
}

.menu-list li {
    padding: 0;
    margin-bottom: 2px;
}

.menu-list li a, .menu-list li {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    font-size: 14px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    cursor: pointer;
}

.menu-list li:hover {
    background-color: #f0f7f4;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    padding-left: 30px;
}

.menu-list li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #bdc3c7;
    border-radius: 50%;
    margin-right: 15px;
    transition: 0.3s;
}

.menu-list li:hover::before {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

.menu-list li:last-child {
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
}

.menu-list li:last-child a {
    color: #e74c3c;
    font-weight: bold;
}

.menu-list li:last-child:hover {
    background-color: #fceceb;
    border-left-color: #e74c3c;
    color: #c0392b;
}

/* 2. CONTENT AREA (Kanan) */
.content {
    margin-left: 280px;
    flex: 1;
    background-color: var(--bg-light);
    display: flex;
    flex-direction: column;
}

/* --- UPDATE: TOP BAR HEADER DENGAN LOGO --- */
.top-bar {
    background: var(--white);
    height: 70px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 99;
}

.top-bar h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

/* MENGGANTI IKON BELAH KETUPAT MENJADI LOGO GAMBAR */
.top-bar h2::before {
    content: '';
    display: inline-block;
    width: 40px;  /* Lebar logo */
    height: 40px; /* Tinggi logo */
    background-image: url('../img/logo.png'); /* Memanggil file logo */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 15px; /* Jarak antara logo dan teks */
}

/* 3. INFO BOX / DASHBOARD CARD */
.main-body {
    padding: 30px 40px;
}

.info-box {
    background: var(--white);
    border-radius: 8px;
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--primary-color);
    transition: transform 0.3s;
}

.info-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.info-box h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.info-box p {
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 15px;
}

.info-box hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

/* Responsive dasar */
@media (max-width: 768px) {
    .sidebar { width: 70px; }
    .sidebar-header, .menu-list li span, .sidebar-header h3, .sidebar-header p { display: none; }
    .content { margin-left: 70px; }
    .top-bar { padding: 0 20px; }
    .top-bar h2 { font-size: 14px; }
}