/* ==================================== */
/* 1. Global Reset & Typography         */
/* ==================================== */

body {
    font-family: Arial, sans-serif;
    background-color: #f4f7f6; /* Latar belakang abu-abu sangat muda */
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    color: #8b0000; /* Merah marun DTU */
    margin-top: 0;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

/* ==================================== */
/* 2. Halaman Login (index.php)         */
/* ==================================== */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.login-form-container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-form-container .logo {
    width: 120px;
    height: auto;
    margin-bottom: 15px;
}

.login-form-container h1 {
    font-size: 1.5em;
    margin-bottom: 30px;
}

/* ==================================== */
/* 3. Layout Dashboard Umum             */
/* ==================================== */

.main-content-container {
    width: 90%;
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.admin-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    overflow: hidden; /* Clearfix */
}

.admin-header h1 {
    margin: 0;
    font-size: 1.8em;
    display: inline-block;
}

.admin-header p {
    margin: 5px 0 0 0;
    color: #555;
}

.btn-logout {
    float: right;
    background-color: #dc3545;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 5px;
}
.btn-logout:hover {
    background-color: #c82333;
    text-decoration: none;
}

.admin-header a {
    color: #007bff;
    text-decoration: none;
}
.admin-header a:hover {
    text-decoration: underline;
}

/* ==================================== */
/* 4. Form & Input Umum                 */
/* ==================================== */

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
    font-size: 0.9em;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box; /* Agar padding tidak menambah lebar */
    font-size: 1em;
    font-family: Arial, sans-serif;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #aa8455; /* Emas DTU */
    outline: none;
    box-shadow: 0 0 5px rgba(170, 132, 85, 0.5);
}

/* Tombol */
button[type="submit"],
button[type="button"],
.action-button {
    color: white;
    padding: 10px 18px; /* <-- Padding yang sama */
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: bold; /* <-- Font tebal yang sama */
    cursor: pointer;
    margin-top: 10px;
    margin-left: 5px; /* <-- Beri jarak antar tombol */
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

/* WARNA SPESIFIK UNTUK TOMBOL SIMPAN/UTAMA (Merah) */
button[type="submit"],
.action-button {
    background-color: #8b0000; /* Merah marun DTU */
}

/* WARNA SPESIFIK UNTUK TOMBOL BATAL/SEKUNDER (Abu-abu) */
/* (Kita targetkan [type="button"] di dalam modal) */
.modal-content button[type="button"] {
    background-color: #6c757d; /* Abu-abu */
}

/* EFEK HOVER */
button[type="submit"]:hover,
.action-button:hover {
    background-color: #aa8455; /* Emas */
}

.modal-content button[type="button"]:hover {
    background-color: #5a6268; /* Abu-abu tua */
}
/* Tombol Aksi Spesifik */
.btn-edit { background-color: #ffc107; color: #333; }
.btn-delete { background-color: #dc3545; color: white; }
.btn-manage { background-color: #17a2b8; color: white; }
.btn-gate { background-color: #8b0000; color: white; }
.btn-download { background-color: #17a2b8; color: white; }
.btn-detail { background-color: #6c757d; color: white; }
.btn-nilai { background-color: #007bff; color: white; }
.btn-absensi { background-color: #17a2b8; color: white; }

/* ==================================== */
/* 5. Komponen UI (Card, Tabel, Modal)  */
/* ==================================== */

/* Kartu Konten */
.management-card {
    background-color: #ffffff;
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.management-card h3 {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    color: #8b0000;
    margin-top: 0;
}

/* Tabel Data */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.95em;
}

.data-table th,
.data-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

.data-table th {
    background-color: #f2f2f2;
    color: #333;
    font-weight: bold;
}

.data-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Popup Modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.5);
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 25px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 80%;
    max-width: 900px; /* Lebar modal */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-content h3 {
    margin-top: 0;
}

/* ==================================== */
/* 6. Pesan & Status                    */
/* ==================================== */

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
}

.status-sukses { color: #28a745; font-weight: bold; }
.status-gagal { color: #dc3545; font-weight: bold; }
.status-hadir { color: #28a745; font-weight: bold; }
.status-terlambat { color: #fd7e14; font-weight: bold; }

/* ==================================== */
/* 7. Komponen Spesifik Halaman         */
/* ==================================== */

/* Dashboard Super Admin (Grid Menu) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.menu-card {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 5px solid #8b0000;
}
.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
.menu-card a {
    text-decoration: none;
    color: #8b0000;
    font-weight: bold;
    font-size: 1.1em;
    display: block;
    margin-top: 15px;
}
.menu-card p {
    font-size: 0.9em;
    color: #555;
}

/* Dashboard Mahasiswa (Kartu Kelas) */
.class-card {
    border: 1px solid #ddd;
    border-left: 5px solid #8b0000;
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.class-card-info h4 { margin: 0 0 5px 0; color: #333; }
.class-card-info p { margin: 0; color: #666; font-size: 0.9em; }

.btn-masuk-kelas {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}
.btn-masuk-kelas:hover { background-color: #218838; }

.no-schedule {
    text-align: center;
    color: #777;
    font-style: italic;
    padding: 15px;
}