/* Import Font Modern (Poppins) biar tidak kaku */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

:root {
    /* Warna Biru Tua Elegan (Royal Blue) */
    --main-color: #0d47a1;
    --main-color-hover: #082e6b;
    --accent-color: #f4f6f9;
    /* Background abu-abu muda */
    --text-color: #333;
}

html,
body {
    height: 100%;
    /* Pastikan html dan body mengambil tinggi penuh layar */
    margin: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--accent-color);
    color: var(--text-color);

    /* Flexbox Magic buat Footer Sticky */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
}

/* --- Navbar Styling --- */
.navbar-custom {
    background-color: var(--main-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    /* Bayangan halus */
    padding: 15px 0;
    transition: all 0.3s;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
    color: #fff !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    margin-left: 15px;
    transition: all 0.3s ease;
    position: relative;
}

/* Efek Hover Menu */
.nav-link:hover,
.nav-link.active {
    color: #fff !important;
    transform: translateY(-2px);
    /* Naik dikit pas di hover */
}

/* Garis bawah pas hover (opsional, biar cantik) */
.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width .3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Tombol Toggler (Mobile Menu) */
.navbar-toggler {
    border: none;
    outline: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* --- General Styling --- */
.card {
    border: none;
    border-radius: 12px;
    /* Sudut tumpul */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
}

.btn-custom {
    background-color: var(--main-color);
    color: white;
}

.btn-custom:hover {
    background-color: var(--main-color-hover);
    color: white;
}

/* Warna Header Modal & Aksen */
.bg-custom-header {
    background-color: var(--main-color) !important;
    color: white;
}

/* Pastikan footer tidak punya margin aneh-aneh */
footer {
    background-color: white;
    border-top: 1px solid #e9ecef;
    width: 100%;
    margin-top: auto;
    /* Jaga-jaga */
}

#listData tr {
    transition: all 0.2s ease-in-out;
}

/* --- Modern Modal & Form Styling --- */

/* Modal dengan sudut tumpul */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Header Modal dengan Gradient Halus */
.modal-header {
    background: linear-gradient(135deg, var(--main-color), #1565c0);
    color: white;
    border-radius: 16px 16px 0 0;
    padding: 20px 25px;
    border-bottom: none;
}

.modal-title {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Tombol Close Putih */
.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Body Modal */
.modal-body {
    padding: 25px;
    background-color: #fcfcfc;
}

/* Styling Label */
.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-label i {
    color: var(--main-color);
    margin-right: 5px;
    width: 20px;
    text-align: center;
}

/* Styling Input Form */
.form-control,
.form-select {
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    padding: 12px 15px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

/* Efek saat input diklik (Focus) */
.form-control:focus,
.form-select:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 4px rgba(13, 71, 161, 0.1);
    /* Glow biru halus */
    background-color: #fff;
}

/* --- CHECKBOX STYLE --- */
.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.1em;
    border: 2px solid #ccc;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #0d47a1;
    border-color: #0d47a1;
}

.form-check-label {
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    user-select: none;
}

/* Footer Modal */
.modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 15px 25px;
    background-color: #fff;
    border-radius: 0 0 16px 16px;
}

/* --- MODERN TABLE STYLE (COMPACT VERSION) --- */
.card-modern {
    border: none;
    border-radius: 12px; /* Radius dikurangi biar ga terlalu bulat */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
}

.table-modern thead th {
    background-color: #f8f9fa;
    color: #555;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem; /* Font Header Kecil */
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
    padding: 10px 12px; /* Padding Header Rapat */
}

.table-modern tbody td {
    padding: 8px 12px;
    vertical-align: top !important; /* Paksa Rata Atas */
    text-align: left !important;    /* Paksa Rata Kiri */
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    font-size: 0.9rem;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

.table-modern tbody tr:hover {
    background-color: #f1f3f5; /* Hover agak gelap dikit */
}

/* --- MOBILE RESPONSIVE TABLE (COMPACT CARD VIEW) --- */
@media (max-width: 768px) {
    .table-modern, .table-modern tbody, .table-modern tr, .table-modern td {
        display: block;
        width: 100%;
    }

    .table-modern thead { display: none; }

    .table-modern tr {
        margin-bottom: 10px; /* Jarak antar kartu dirapatkan */
        background: #fff;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        padding: 10px; /* Padding dalam kartu dirapatkan */
    }

    .table-modern td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 6px 0; /* Padding antar baris dalam kartu dirapatkan */
        border-bottom: 1px dashed #eee;
        font-size: 0.85rem; /* Font di HP lebih kecil lagi dikit */
    }

    .table-modern td:last-child {
        border-bottom: none;
        justify-content: center;
        margin-top: 5px;
        padding-bottom: 0;
    }

    .table-modern td::before {
        content: attr(data-label);
        float: left;
        font-weight: 700;
        color: #6c757d;
        text-transform: uppercase;
        font-size: 0.7rem;
        margin-right: 10px;
    }
    
    .table-modern td[data-label="#"] { display: none; }
}