/* --- RESET & GLOBAL STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 20px;
}

/* --- HEADER --- */
header {
    background-color: #1a237e;
    color: #ffffff;
    padding: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    text-align: center;
    font-weight: 300;
    font-size: 2rem;
    letter-spacing: 1px;
}
header h3 {
    text-align: center;
    font-weight: 200;
    font-size: 1rem;
    letter-spacing: 1px;
}

/* --- MAIN CONTENT --- */
main {
    padding: 30px 0;
}

/* --- FILTER & SEARCH SECTION --- */
.filter-section {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e0e0e0;
}

.filter-section form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-section label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.filter-section select,
.filter-section input[type="text"] {
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.filter-section select:focus,
.filter-section input[type="text"]:focus {
    outline: none;
    border-color: #3f51b5;
    box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.2);
}

.filter-section input[type="text"] {
    flex-grow: 1;
    min-width: 250px;
}

.filter-section button,
.filter-section a.btn-reset,
.filter-section a.btn-import-link {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s, transform 0.2s;
}

.filter-section button {
    background-color: #3f51b5;
    color: white;
}
.filter-section button:hover {
    background-color: #303f9f;
    transform: translateY(-2px);
}

.filter-section a.btn-reset {
    background-color: #6c757d;
    color: white;
}
.filter-section a.btn-reset:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.filter-section a.btn-import-link {
    background-color: #28a745;
    color: white;
}
.filter-section a.btn-import-link:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* --- TABLE --- */
.table-container {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

/* --- PERUBAHAN PENTING DI SINI --- */
thead {
    background-color: #3949ab;
    color: #ffffff;
    position: sticky;          /* Membuat header menjadi lengket */
    top: 0;                   /* Menempel di bagian paling atas */
    z-index: 10;               /* Memastikan header di atas baris data */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Bayangan untuk pemisah visual */
}

thead th {
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

tbody tr:nth-of-type(even) {
    background-color: #f8f9fa;
}

tbody tr:hover {
    background-color: #e8eaf6;
}

tbody td {
    padding: 16px 15px;
    vertical-align: middle;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    color: #777;
    font-size: 0.9rem;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .filter-section form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-section label,
    .filter-section select,
    .filter-section input[type="text"],
    .filter-section button,
    .filter-section a {
        width: 100%;
        margin-bottom: 10px;
    }

    .table-container {
        overflow-x: auto;
    }

    thead th, tbody td {
        padding: 12px 8px;
        font-size: 0.85rem;
    }
}
