/* ==========================================================
   BACKGROUND PENUH LAYAR (Seperti Versi Awal)
   ========================================================== */
.bg-img {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    z-index: -3;
}

.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: rgba(12, 20, 38, 0.58);
    pointer-events: none;
}

body {
    background: #F5F5F4;
}

/* Pastikan konten utama selalu di atas background */
.app-header {
    position: relative;
    z-index: 1;
}

.main-content {
    position: relative;
    z-index: 1;
}
/* ==========================================================
   RESET & BASE
   ========================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
    color: #1C1917;
    overflow-x: hidden;
    line-height: 1.6;
    background: #F5F5F4; /* Warna dasar halaman */
}




/* ==========================================================
   HEADER / NAVBAR
   ========================================================== */
.app-header {
    background: rgba(12, 20, 38, 0.72);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: #F5F5F4;
    letter-spacing: -0.03em;
    user-select: none;
}

.app-title span {
    color: #FDE68A;
}

/* ==========================================================
   NAV TABS
   ========================================================== */
.nav-tabs-custom {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 3px;
}

.nav-tab {
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    background: transparent;
    white-space: nowrap;
    font-family: 'DM Sans', sans-serif;
}

.nav-tab:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
    background: #D97706;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(217, 119, 6, 0.45);
}

.nav-tab:focus-visible {
    outline: 2px solid #FDE68A;
    outline-offset: 2px;
}

/* ==========================================================
   MAIN CONTENT
   ========================================================== */
.main-content {
    padding: 2rem 0 1rem;
}

/* ==========================================================
   GLASS CARD
   ========================================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
    animation: fadeUp 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card-header-custom {
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #1C1917;
    display: flex;
    align-items: center;
}

.card-body-custom {
    padding: 1.5rem;
}

/* ==========================================================
   SEARCH INPUT
   ========================================================== */
.search-wrapper {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3.25rem;
    border: 2px solid rgba(0, 0, 0, 0.07);
    border-radius: 14px;
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    color: #1C1917;
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.search-input:focus {
    outline: none;
    border-color: #D97706;
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.25), 0 4px 20px rgba(0, 0, 0, 0.07);
}

.search-input::placeholder {
    color: #A8A29E;
}

.search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #A8A29E;
    font-size: 1.15rem;
    transition: color 0.3s ease;
    pointer-events: none;
}

.search-wrapper:focus-within .search-icon {
    color: #D97706;
}

/* ==========================================================
   TABLE
   ========================================================== */
.table-responsive-custom {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom thead th {
    background: #F5F5F4;
    padding: 0.8rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #78716C;
    border-bottom: 2px solid #E7E5E4;
    white-space: nowrap;
}

.table-custom tbody td {
    padding: 0.8rem 1rem;
    font-size: 0.88rem;
    border-bottom: 1px solid #F5F5F4;
    vertical-align: middle;
}

.table-custom tbody tr {
    transition: background 0.15s ease;
}

.table-custom tbody tr:hover {
    background: #FFFBEB;
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================================
   BUTTONS
   ========================================================== */
.btn-accent {
    display: inline-flex;
    align-items: center;
    background: #D97706;
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    font-family: 'DM Sans', sans-serif;
}

.btn-accent:hover {
    background: #B45309;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
}

.btn-accent:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-accent:focus-visible {
    outline: 2px solid #FDE68;
    outline-offset: 2px;
}

.btn-outline-accent {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: #D97706;
    border: 2px solid #D97706;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
}

.btn-outline-accent:hover {
    background: #D97706;
    color: #fff;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
    transform: translateY(-1px);
}

.btn-outline-accent:active {
    transform: translateY(0);
}

.btn-outline-accent:focus-visible {
    outline: 2px solid #FDE68A;
    outline-offset: 2px;
}

/* ==========================================================
   FORM CONTROLS
   ========================================================== */
.form-label-custom {
    font-size: 0.75rem;
    font-weight: 700;
    color: #78716C;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
    display: block;
}

.form-control-custom {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid #E7E5E4;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'DM Sans', sans-serif;
    color: #1C1917;
    background: #fff;
    transition: all 0.2s ease;
    appearance: auto;
}

.form-control-custom:focus {
    outline: none;
    border-color: #D97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.25);
}

.form-control-custom[readonly] {
    background: #F5F5F4;
    color: #78716C;
    cursor: not-allowed;
    border-color: #D6D3D1;
    border-style: dashed;
}

.form-control-custom.is-invalid {
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* ==========================================================
   MODAL FORM PENERBANGAN
   ========================================================== */
.modal-content-custom {
    border: none;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.modal-header-custom {
    background: linear-gradient(135deg, #D97706, #92400E);
    padding: 1.2rem 1.5rem;
    border: none;
}

.modal-header-custom .modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}

.modal-header-custom .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.75;
    box-shadow: none;
}

.modal-header-custom .btn-close:hover {
    opacity: 1;
}

.modal-body-custom {
    padding: 1.5rem;
}

.modal-footer-custom {
    padding: 1rem 1.5rem;
    border-top: 1px solid #F5F5F4;
    background: #FAFAF9;
}

.form-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: #78716C;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E7E5E4;
}

/* ==========================================================
   MODAL PANDUAN (POP-UP)
   ========================================================== */
.panduan-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.panduan-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.panduan-modal {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.88) translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.panduan-backdrop.show .panduan-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.panduan-header {
    background: linear-gradient(135deg, #1E40AF, #3B82F6, #60A5FA);
    padding: 1.15rem 1.5rem;
    flex-shrink: 0;
}

.panduan-header h5 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.panduan-header p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.8rem;
    margin: 0.35rem 0 0 0;
    padding-left: 1.85rem;
}

.panduan-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    background: #F8FAFC;
    -webkit-overflow-scrolling: touch;
}

.panduan-body::-webkit-scrollbar {
    width: 6px;
}

.panduan-body::-webkit-scrollbar-track {
    background: transparent;
}

.panduan-body::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
}

.panduan-body img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.panduan-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #E2E8F0;
    background: #fff;
    flex-shrink: 0;
}

.btn-panduan-close {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #1E40AF, #3B82F6);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.btn-panduan-close:hover {
    background: linear-gradient(135deg, #1E3A8A, #2563EB);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.btn-panduan-close:active {
    transform: translateY(0);
}

.btn-panduan-close:focus-visible {
    outline: 2px solid #93C5FD;
    outline-offset: 2px;
}

/* ==========================================================
   TOAST NOTIFICATION
   ========================================================== */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}

.custom-toast {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 380px;
    pointer-events: auto;
}

.custom-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.custom-toast-success {
    background: #059669;
}

.custom-toast-error {
    background:  #DC2626;
}

/* ==========================================================
   EMPTY STATE
   ========================================================== */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #78716C;
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.35;
    display: block;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ==========================================================
   DATE FILTER ROW
   ========================================================== */
.date-filter-row {
    display: flex;
    gap: 0.85rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.date-filter-row > .form-group {
    flex: 1;
    min-width: 170px;
}

.date-filter-row > .form-group:last-child {
    flex: 0 0 auto;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 768px) {
    .app-header .container {
        flex-direction: column !important;
        gap: 0.75rem;
        align-items: stretch !important;
    }

    .app-header .nav-tabs-custom {
        align-self: center;
    }

    .main-content {
        padding: 1.25rem 0 0.5rem;
    }

    .card-body-custom {
        padding: 1rem;
    }

    .search-input {
        padding: 0.85rem 1rem 0.85rem 3rem;
        font-size: 0.95rem;
    }

    .date-filter-row {
        flex-direction: column;
    }

    .date-filter-row > .form-group {
        min-width: 100%;
    }

    .table-custom thead th,
    .table-custom tbody td {
        padding: 0.65rem 0.6rem;
        font-size: 0.8rem;
    }

    .nav-tab {
        padding: 0.45rem 0.9rem;
        font-size: 0.78rem;
    }

    .app-title {
        text-align: center;
    }

    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    .custom-toast {
        max-width: 100%;
    }

    .modal-body-custom {
        padding: 1.15rem;
    }

    .panduan-backdrop {
        padding: 0.75rem;
    }

    .panduan-modal {
        max-height: 92vh;
    }

    .panduan-header {
        padding: 1rem 1.15rem;
    }

    .panduan-header h5 {
        font-size: 1rem;
    }

    .panduan-header p {
        padding-left: 1.6rem;
        font-size: 0.75rem;
    }

    .panduan-body {
        padding: 0.85rem;
    }

    .panduan-footer {
        padding: 0.85rem 1.15rem;
    }
}

/* ==========================================================
   PATCH KHUSUS CHROME DESKTOP
   ========================================================== */
.hero-bg {
    /* Chrome terkadang tidak membaca inset: 0 dengan baik di flex */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 380px; /* Samakan dengan min-height hero-section */
}

/* Cegah Chrome memberikan margin bawaan yang mengacaukan layout */
.main-content {
    margin: 0;
}

.hero-section .app-header {
    flex-shrink: 0; /* Cegah header menyusut di Chrome */
}

/* Pastikan konten bawah hero tidak tertarik ke atas oleh margin Chrome */
.content-below-hero {
    clear: both;
}


@media (max-width: 400px) {
    .btn-accent {
        font-size: 0.72rem;
        padding: 0.4rem 0.65rem;
    }
}


/* ==========================================================
   AKSESIBILITAS: reduced motion
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
    .glass-card {
        animation: none !important;
    }
    .custom-toast {
        transition: opacity 0.15s ease !important;
        transform: none !important;
    }
    .custom-toast.show {
        opacity: 1;
    }
    .panduan-modal {
        transition: opacity 0.15s ease !important;
        transform: none !important;
    }
    .panduan-backdrop.show .panduan-modal {
        transform: none !important;
    }
    * {
        transition-duration: 0.01ms !important;
    }
}