@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h2 {
    color: #1e3a8a;
    font-weight: 700;
    margin-bottom: 5px;
}

.header p {
    color: #64748b;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    color: #334155;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 38px;
    cursor: pointer;
    color: #94a3b8;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: #1e3a8a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-submit:hover {
    background: #1e40af;
}

.footer-text {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #475569;
}

.footer-text a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.footer-text a:hover {
    text-decoration: underline;
}

.alert {
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.alert-error { background: #fee2e2; color: #b91c1c; }
.alert-success { background: #dcfce3; color: #15803d; }

/* --- TAMPILAN DASHBOARD & NAVBAR --- */
.navbar {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navbar-brand {
    font-size: 20px;
    font-weight: 700;
    color: #1e3a8a;
}

.navbar-menu a {
    color: #ef4444;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 15px;
    border: 1px solid #ef4444;
    border-radius: 6px;
    transition: all 0.3s;
}

.navbar-menu a:hover {
    background: #ef4444;
    color: white;
}

/* --- KONTEN DASHBOARD --- */
.dashboard-wrapper {
    margin-top: 0px; /* Jarak untuk navbar */
    padding: 20px;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    min-height: calc(100vh - 80px);
    flex-direction: column; /* Mengubah susunan menjadi dari atas ke bawah */
    gap: 20px;              /* Jarak antara grid kartu dan tabel */
    width: 100%;
    box-sizing: border-box;
}

.dashboard-card {
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.dashboard-title {
    color: #1e3a8a;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

/* --- GRID LAYOUT UNTUK FORM BIODATA --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dua Kolom */
    gap: 20px;
}

/* Form Group yang memakan lebar penuh (2 kolom) */
.full-width {
    grid-column: span 2;
}

textarea.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    font-family: 'Poppins', sans-serif;
}

select.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* --- OVERRIDE UNTUK HALAMAN DASHBOARD --- */
body.dashboard-layout {
    background: #f8fafc; /* Latar belakang abu-abu sangat terang */
    display: block; /* Mematikan flex bawaan halaman login */
}

/* --- SIDEBAR --- */
.sidebar {
    width: 260px;
    background: #1e3a8a;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    color: white;
    z-index: 1000;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-menu li a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 18px;
}

.sidebar-menu li a:hover, 
.sidebar-menu li a.active {
    background: #3b82f6;
    color: white;
    border-left: 5px solid #ef4444; /* Garis aksen merah */
}

/* --- MAIN CONTENT & NAVBAR --- */
.main-content {
    margin-left: 260px; /* Menyediakan ruang untuk sidebar */
    width: calc(100% - 260px);
    min-height: 100vh;
}

.navbar {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    display: flex;
    justify-content: flex-end; /* Menu digeser ke kanan */
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-menu a {
    color: #ef4444;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 15px;
    border: 1px solid #ef4444;
    border-radius: 6px;
    transition: all 0.3s;
}

.navbar-menu a:hover {
    background: #ef4444;
    color: white;
}

/* --- KONTEN DASHBOARD --- */
.dashboard-wrapper {
    padding: 30px; /* Tetap ada jarak 30px di semua sisi */
    animation: fadeIn 0.6s ease forwards;
    margin-top: 0px;
}

.dashboard-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 100%;
}

.dashboard-title {
    color: #1e3a8a;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 25px;
}


/* Responsif untuk layar HP: ubah jadi 1 kolom */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .full-width {
        grid-column: span 1;
    }
}

@media (max-width: 1024px) {
            .stats-grid {
                grid-template-columns: repeat(2, 1fr); /* Menjadi 2x2 pada layar tablet */
            }
        }

        @media (max-width: 640px) {
            .stats-grid {
                grid-template-columns: 1fr;            /* Menjadi 1 kolom pada layar HP */
            }
        }

.stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;                             /* Jarak antar kartu */
            width: 100%;
            box-sizing: border-box;
        }
        .stat-card {
            background: #ffffff;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-left: 5px solid #3b82f6;
        }
        .stat-card.success { border-left-color: #10b981; }
        .stat-card.warning { border-left-color: #f59e0b; }
        .stat-card.purple  { border-left-color: #8b5cf6; }
        .stat-card h3 { font-size: 24px; color: #1e293b; margin: 0; }
        .stat-card p { font-size: 13px; color: #64748b; margin: 0; }
        .stat-icon { font-size: 28px; color: #94a3b8; }

        .table-responsive { overflow-x: auto; margin-top: 15px; }
        .table-admin { width: 100%; border-collapse: collapse; font-size: 13px; }
        .table-admin th, .table-admin td { padding: 12px 15px; border-bottom: 1px solid #e2e8f0; text-align: left; }
        .table-admin th { background: #f8fafc; color: #475569; font-weight: 600; }
        .table-admin tr:hover { background: #f1f5f9; }

        .form-inline { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; background: #f8fafc; padding: 15px; border-radius: 8px; border: 1px solid #e2e8f0; align-items: flex-end; }
        .form-group { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 200px; }
        .form-group label { font-size: 12px; font-weight: 600; color: #475569; }
        .form-group input, .form-group select { padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; }
        
        .btn-add { background: #3b82f6; color: white; border: none; padding: 9px 16px; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 13px; }
        .btn-add:hover { background: #2563eb; }
        .btn-delete { color: #ef4444; background: #fee2e2; padding: 5px 10px; border-radius: 4px; text-decoration: none; font-size: 12px; font-weight: 600; }
        .btn-delete:hover { background: #fca5a5; }

        .badge-status { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
        .badge-lulus { background: #dcfce7; color: #15803d; }
        .badge-pending { background: #fef9c3; color: #a16207; }
        .badge-gagal { background: #fee2e2; color: #b91c1c; }

        .filter-box {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            background: #f8fafc;
            padding: 16px;
            border-radius: 8px;
            border: 1px solid #e2e8f0;
            margin-bottom: 20px;
            align-items: flex-end;
        }

        .filter-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
            flex: 1;
            min-width: 180px;
        }

        .filter-group label {
            font-size: 12px;
            font-weight: 600;
            color: #475569;
        }

        .filter-group select {
            padding: 8px 12px;
            border: 1px solid #cbd5e1;
            border-radius: 6px;
            font-size: 13px;
            background-color: #ffffff;
        }

        .filter-actions {
            display: flex;
            gap: 8px;
        }

        .btn-filter {
            background: #3b82f6;
            color: #ffffff;
            border: none;
            padding: 9px 16px;
            border-radius: 6px;
            font-weight: 600;
            font-size: 13px;
            cursor: pointer;
        }

        .btn-filter:hover {
            background: #2563eb;
        }

        .btn-reset {
            background: #e2e8f0;
            color: #475569;
            padding: 9px 16px;
            border-radius: 6px;
            font-weight: 600;
            font-size: 13px;
            text-decoration: none;
            display: inline-block;
        }

        .btn-reset:hover {
            background: #cbd5e1;
        }

.table-responsive { overflow-x: auto; margin-top: 20px; }
.table-op { width: 100%; border-collapse: collapse; min-width: 900px; }
.table-op th, .table-op td { padding: 12px; border-bottom: 1px solid #e2e8f0; text-align: left; font-size: 13px; }
.table-op th { background: #f8fafc; color: #334155; }
.doc-link { display: inline-block; padding: 4px 8px; margin: 2px; background: #e0f2fe; color: #0369a1; border-radius: 4px; text-decoration: none; font-size: 11px; font-weight: 600; }
.doc-link:hover { background: #0284c7; color: white; }
.form-status { display: flex; flex-direction: column; gap: 6px; }
.form-status select, .form-status input { font-size: 12px; padding: 6px; border: 1px solid #cbd5e1; border-radius: 4px; }


.table-responsive {
            overflow-x: auto;
            margin-top: 20px;
        }
        .table-history {
            width: 100%;
            border-collapse: collapse;
            min-width: 700px;
        }
        .table-history th, .table-history td {
            padding: 15px;
            border-bottom: 1px solid #e2e8f0;
            text-align: left;
        }
        .table-history th {
            background-color: #f8fafc;
            color: #475569;
            font-weight: 600;
            font-size: 14px;
        }
        .table-history td {
            font-size: 14px;
            color: #334155;
            vertical-align: top;
        }
        .table-history tr:hover {
            background-color: #f1f5f9;
        }
        
        /* Desain Status Badges */
        .badge {
            display: inline-block;
            padding: 6px 12px;
            border-radius: 50px;
            font-size: 12px;
            font-weight: 600;
        }
        .badge-menunggu { background: #fef08a; color: #854d0e; }
        .badge-proses { background: #bfdbfe; color: #1e40af; }
        .badge-revisi { background: #fed7aa; color: #9a3412; }
        .badge-lulus { background: #bbf7d0; color: #166534; }
        .badge-gagal { background: #fecaca; color: #991b1b; }
        
        .catatan-box {
            margin-top: 8px;
            padding: 8px 12px;
            background: #fff1f2;
            border-left: 3px solid #e11d48;
            font-size: 12px;
            border-radius: 4px;
            color: #be123c;
        }


/* Styling Link Nama Mahasiswa */
.student-name-link {
    color: #0284c7;
    text-decoration: none;
    cursor: pointer;
}
.student-name-link:hover {
    text-decoration: underline;
    color: #0369a1;
}

/* Modal Overlay & Box */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-box {
    background: #ffffff;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: #0f172a;
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-close { font-size: 24px; cursor: pointer; color: #94a3b8; }
.modal-close:hover { color: #ffffff; }

.modal-body { padding: 20px; }

.biodata-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 15px;
}

.profile-img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
}

.text-sub { margin: 4px 0 0 0; color: #64748b; font-size: 13px; }

/* Table Detail */
.table-detail { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-detail th { width: 35%; text-align: left; padding: 8px 0; color: #64748b; font-weight: 600; }
.table-detail td { padding: 8px 0; color: #1e293b; font-weight: 500; }