/* ========== RESET DASAR ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* ========== BACKGROUND BODY DENGAN ANIMASI GRADIENT ========== */
body {
    min-height: 100vh;
    color: #fff;
    background: linear-gradient(-45deg, #1e3c72, #2a5298, #1b6ca8, #00b4db);
    background-size: 400% 400%;
    animation: gradientMove 18s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ========== MODE TERANG (LIGHT MODE) ========== */
body.light-mode {
    background: #f4f4f4;
    color: #222;
}

body.light-mode .header-container {
    background: white;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    color: black;
}

body.light-mode .app-container {
    background-color: #ffffffd9;
    color: black;
}

body.light-mode th {
    background-color: #555;
}

body.light-mode .dash {
    background-color: #bebebe;
    color: #000;
}

body.light-mode .dash:hover {
    background-color: #000;
    color: #fff;
    transition: 0.3s;
}

/* ========== HEADER ========== */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 30px;
    background: linear-gradient(90deg, #008c9e, #00bfa6);
    border-radius: 10px;
    color: white;
    margin: 10px 15px 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.logo {
    border-radius: 80px;
    height: 50px;
    width: auto;
    object-fit: cover;
}

header h1 {
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* ========== LINK DASHBOARD / NAV ========== */
.judul {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.dash {
    background-color: #6d6d6d;
    padding: 6px 10px;
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
}

.dash:hover {
    background-color: #eafaf7;
    color: #000;
}

/* ========== KONTEN UTAMA ========== */
.app-container {
    max-width: 1000px;
    margin: 0 auto 40px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* ========== PENCARIAN ========== */
.search-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 25px auto;
    max-width: 800px;
}

.search-container input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #00bfa6;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-container input[type="text"]:focus {
    border-color: #008c9e;
    box-shadow: 0 0 5px rgba(0, 191, 166, 0.5);
}

.search-container button {
    padding: 12px 18px;
    background: #00bfa6;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.search-container button:hover {
    background: #008c9e;
}

/* ========== TABEL HASIL ========== */
.table {
    width: 100%;
    margin-top: 20px;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.5s ease-in-out;
}

.table thead th {
    background: linear-gradient(90deg, #008c9e, #00bfa6);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    text-align: center;
    padding: 14px 10px;
}

.table tbody td {
    vertical-align: middle;
    text-align: center;
    padding: 12px 10px;
    font-size: 0.95rem;
    color: #222;
    border-bottom: 1px solid #ddd;
    transition: background 0.3s ease;
}

.table tbody tr:nth-child(even) {
    background-color: rgba(245, 245, 245, 0.8);
}

.table tbody tr:hover {
    background: #e7fdf8;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* Kolom teks panjang */
.table td:nth-child(3),
.table td:nth-child(4) {
    text-align: left;
}

/* Nomor kolom */
.table td:first-child {
    font-weight: bold;
    color: #008c9e;
}

/* ========== TOMBOL DALAM TABEL ========== */
.table .btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: 0.2s;
    border: none;
}

.table .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.btn-info { background-color: #17a2b8; color: white; }
.btn-info:hover { background-color: #138496; }

.btn-warning { background-color: #ffc107; color: #000; }
.btn-warning:hover { background-color: #e0a800; }

.btn-danger { background-color: #dc3545; color: #fff; }
.btn-danger:hover { background-color: #c82333; }

.btn-success { background-color: #28a745; color: #fff; }
.btn-success:hover { background-color: #218838; }

.btn-outline-info {
    border: 1px solid #00bfa6;
    color: #00bfa6;
}
.btn-outline-info:hover {
    background: #00bfa6;
    color: #fff;
}

/* ========== RESPONSIF TABEL (LAYAR KECIL) ========== */
@media (max-width: 768px) {
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td {
        display: block;
        width: 100%;
    }
    .table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 10px;
        background: #fff;
        padding: 10px;
    }
    .table td {
        text-align: left;
        padding: 10px 15px;
        border: none;
    }
    .table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #008c9e;
        display: block;
        margin-bottom: 4px;
    }
}

/* ========== HIGHLIGHT TEKS HASIL PENCARIAN ========== */
.highlight {
    background: #ffeb3b;
    color: #d32f2f;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(255, 235, 59, 0.7);
}

/* ========== ALERT & PESAN ========== */
.alert {
    border-radius: 12px;
    font-weight: bold;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.6s ease-in-out;
}

.alert-warning {
    background-color: #ffe4b5;
    color: #663300;
    border: 1px solid #ffcc80;
    font-weight: bold;
    padding: 15px;
    border-radius: 8px;
}

/* ========== ANIMASI UMUM ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== TOMBOL RESET ========== */
.reset-btn {
    background: #f44336 !important;
}

.reset-btn:hover {
    background: #c62828 !important;
}

/* ========== FOOTER COPYRIGHT ========== */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    backdrop-filter: blur(6px);
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.25);
}

/* Footer untuk mode terang */
body.light-mode .footer {
    background: rgba(255, 255, 255, 0.9);
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Responsif */
@media (max-width: 768px) {
    .footer {
        font-size: 0.8rem;
        padding: 15px;
    }
}
