/* =================================================================
   STYLESHEET FINAL V3 - Desain Profesional, Modern, & Responsif
   Dibuat oleh Coding Partner
   ================================================================= */

/* 1. ROOT VARIABLES & GLOBAL RESETS
   Pusat dari sistem desain kita. Mengubah warna di sini akan mengubah seluruh situs.
----------------------------------------------------------------- */
:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Warna Aksen & Primer */
    --color-primary: #4f46e5; /* Indigo yang modern dan profesional */
    --color-primary-hover: #4338ca;

    /* Warna Latar Belakang */
    --color-bg-body: #f1f5f9;      /* Abu-abu sangat terang (off-white) */
    --color-bg-content: #ffffff;  /* Konten utama putih bersih */
    --color-bg-sidebar: #ffffff;  /* Sidebar juga putih untuk tampilan airy */
    --color-bg-hover: #f8fafc;    /* Warna hover yang sangat halus */

    /* Warna Teks */
    --color-text-header: #1e293b; /* Abu-abu gelap untuk judul */
    --color-text-body: #334155;   /* Abu-abu sedikit lebih terang untuk teks */
    --color-text-muted: #64748b;  /* Abu-abu terang untuk teks sekunder */

    /* Warna Lainnya */
    --color-border: #e2e8f0;
    --color-success: #16a34a;
    --color-error: #dc2626;

    /* Properti Lainnya */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 0.5rem; /* 8px */
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg-body);
    margin: 0;
    padding-top: 60px;
    color: var(--color-text-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 2. LAYOUT UTAMA (NAVBAR, SIDEBAR, KONTEN)
----------------------------------------------------------------- */
.navbar {
    background-color: var(--color-bg-content);
    height: 60px;
    padding: 0 2em;
    border-bottom: 1px solid var(--color-border);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}
.navbar .brand a { font-size: 1.2em; font-weight: 700; color: var(--color-text-header); }
.navbar a { text-decoration: none; font-weight: 500; }
.navbar .user-info { color: var(--color-text-muted); }

.main-container {
    display: flex;
    height: calc(100vh - 60px);
}

.sidebar {
    width: 260px;
    background-color: var(--color-bg-sidebar);
    border-right: 1px solid var(--color-border);
    padding: 1.5rem 0;
    height: 100%;
    flex-shrink: 0;
    overflow-y: auto;
    transition: width 0.3s ease;
}
.sidebar h3 { padding: 0 1.5rem 1rem; margin: 0 0 0.5rem 0; border-bottom: 1px solid var(--color-border); color: var(--color-text-header); font-size: 1rem; font-weight: 600; }
.sidebar ul { list-style-type: none; padding: 0; margin: 0; }
.sidebar ul li a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    margin: 0.25rem 1rem;
    border-radius: var(--radius);
    color: var(--color-text-body);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}
.sidebar ul li a:hover {
    background-color: var(--color-bg-body);
    color: var(--color-text-header);
}
.sidebar ul li a.active {
    background-color: var(--color-primary);
    color: #fff;
    font-weight: 600;
}

.content {
    flex-grow: 1;
    padding: 2.5em;
    overflow-y: auto;
}
.content h1 {
    font-size: 2em;
    font-weight: 700;
    color: var(--color-text-header);
    margin: 0 0 1.5rem 0;
}

/* 3. KOMPONEN (FORM, TABEL, TOMBOL, DLL)
----------------------------------------------------------------- */
.form-container, .detail-container {
    background: var(--color-bg-content);
    padding: 2.5em;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    max-width: 900px;
    margin: 0 auto;
}

fieldset { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
legend { font-weight: 600; color: var(--color-text-header); padding: 0 0.5rem; }

.input-group { margin-bottom: 1.5rem; }
.input-group label { display: block; margin-bottom: 0.5rem; color: var(--color-text-header); font-weight: 500; font-size: 0.9em; }

input[type="text"], input[type="date"], input[type="email"], input[type="number"], textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1em;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.radio-group { display: flex; align-items: center; gap: 1.5rem; }
.radio-label { display: flex; align-items: center; cursor: pointer; font-weight: 500; }
.radio-label input[type="radio"] { margin-right: 0.5rem; }

.btn {
    padding: 0.75rem 1.5rem;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: white;
    background-color: var(--color-primary);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.2s ease;
}
.btn:hover { background-color: var(--color-primary-hover); }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 1rem 1.5rem; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: middle; }
thead th { background-color: #f8fafc; font-weight: 600; color: var(--color-text-muted); font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.5px; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background-color: #f8fafc; }

.notification { padding: 1rem; margin-bottom: 1.5rem; border-radius: var(--radius); color: white; font-weight: 500; }
.notification.success { background-color: var(--color-success); }
.notification.error { background-color: var(--color-error); }
.error-text { color: var(--color-error); font-size: 0.9em; margin-top: 0.25rem; }

.detail-container .detail-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--color-border); padding-bottom: 1.5rem; }
.detail-container .detail-section h3 { font-size: 1.25em; color: var(--color-text-header); margin-bottom: 1.5rem; }
.detail-container .detail-section dl { display: grid; grid-template-columns: 220px 1fr; gap: 1rem 1.5rem; }
.detail-container .detail-section dt { font-weight: 500; color: var(--color-text-muted); }
.detail-container .detail-section dd { margin: 0; font-weight: 500; }

/* 4. RESPONSIVE DESIGN
----------------------------------------------------------------- */
@media (max-width: 768px) {
    .main-container { flex-direction: column; }
    .sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--color-border); }
    .sidebar h3 { display: none; }
    .sidebar ul { display: flex; justify-content: center; }
    .sidebar ul li a { margin: 0; border-radius: 0; }
    .content { padding: 1.5em; }
    .form-container, .detail-container { padding: 1.5em; }
    .detail-container .detail-section dl { grid-template-columns: 1fr; }
    .detail-container .detail-section dt { font-weight: 600; color: var(--color-text-body); }
}

.profile-progress-card {
    background-color: var(--color-bg-content);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.profile-progress-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-text-header);
    font-size: 1.2em;
}

.progress-bar-container {
    background-color: #e9ecef;
    border-radius: var(--radius);
    height: 30px;
    width: 100%;
    overflow: hidden;
}

.progress-bar {
    background-color: var(--color-success);
    height: 100%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9em;
    transition: width 0.8s ease-in-out;
}

.missing-fields {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: var(--radius);
}
.missing-fields p {
    margin: 0 0 0.5rem 0;
}
.missing-fields ul {
    margin: 0;
    padding-left: 20px;
}
.missing-fields li {
    color: var(--color-text-muted);
}
/* =================================================================
   TAMBAHAN CSS - Untuk Progress Bar di dalam Tabel Admin
   ================================================================= */

.progress-bar-container-table {
    background-color: #e9ecef;
    border-radius: 0.25rem; /* 4px */
    height: 20px;
    width: 100%;
    min-width: 80px; /* Lebar minimum agar tidak terlalu kecil */
    overflow: hidden;
}

.progress-bar-table {
    background-color: var(--color-success);
    height: 100%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75em;
    transition: width 0.8s ease-in-out;
    white-space: nowrap;
}

/* Sedikit penyesuaian untuk progress bar di dashboard siswa (opsional) */
.progress-bar {
    background-color: var(--color-success);
}