/* File: public/assets/css/dashboard.css */

:root {
    --sm-navy: #001f5b;
    --sm-navy-light: #003399;
    --sm-orange: #f97316;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.6);
}

/* =========================================================
   PANEL KACA (GLASSMORPHISM) UTAMA
   ========================================================= */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.floating-header {
    padding: 1.5rem 2rem;
}

.section-spacer { height: 1.5rem; }
.fw-black { font-weight: 900; }

/* =========================================================
   KARTU KPI (HOVER ANIMATION)
   ========================================================= */
.kpi-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 1.2rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-card:hover {
    transform: translateY(-6px);
    background: #ffffff;
    box-shadow: 0 15px 35px rgba(0, 31, 91, 0.08);
}

.kpi-card .text-content h6 { margin: 0; font-weight: 800; color: #1e293b; font-size: 1rem; }
.kpi-card .text-content small { color: #64748b; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }

.icon-box {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: #ffffff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
.bg-navy-box { background: linear-gradient(135deg, var(--sm-navy-light), var(--sm-navy)); }
.bg-orange-box { background: linear-gradient(135deg, #fb923c, var(--sm-orange)); }
.bg-cyan-box { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.bg-gray-box { background: linear-gradient(135deg, #94a3b8, #475569); }

/* =========================================================
   TIMELINE TRACKER MODERN
   ========================================================= */
.timeline-scroll-wrapper {
    display: flex; overflow-x: auto; padding: 1rem 0 1.5rem 0; gap: 0;
    scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent;
}
.timeline-scroll-wrapper::-webkit-scrollbar { height: 6px; }
.timeline-scroll-wrapper::-webkit-scrollbar-track { background: transparent; }
.timeline-scroll-wrapper::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 10px; }

.timeline-step { 
    min-width: 140px; 
    text-align: center; 
    position: relative; 
    z-index: 2;
}

/* Garis Konektor Antar Step */
.timeline-connector {
    position: absolute;
    top: 23px;
    left: 70px;
    right: -70px;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}
.timeline-step:last-child .timeline-connector { display: none; }

.step-indicator {
    width: 48px; height: 48px; margin: 0 auto 0.75rem;
    background: #ffffff; border: 3px solid #e2e8f0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; font-size: 1.2rem; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 3;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.timeline-step:hover .step-indicator { transform: scale(1.15); }

/* Status Warna Timeline */
.timeline-step.active .step-indicator { background: #10b981; border-color: #059669; color: #ffffff; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.timeline-step.active .timeline-connector { background: #10b981; }

.timeline-step.danger .step-indicator { background: #ef4444; border-color: #dc2626; color: #ffffff; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); }
.timeline-step.danger .timeline-connector { background: #ef4444; }

.timeline-step.warning .step-indicator { background: #f59e0b; border-color: #d97706; color: #ffffff; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3); }
.timeline-step.warning .timeline-connector { background: #f59e0b; }

.step-label { font-size: 0.8rem; font-weight: 800; color: #1e293b; text-transform: uppercase; }
.step-date { font-size: 0.75rem; color: #64748b; font-weight: 500; }
.step-desc { font-size: 0.7rem; margin-top: 0.25rem; font-weight: 600; }

/* =========================================================
   BUTTONS & FILTERS
   ========================================================= */
.btn-solid {
    padding: 0.5rem 1.25rem; border-radius: 50px; font-weight: 700;
    color: #ffffff; border: none; font-size: 0.85rem; display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08); transition: 0.2s;
}
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,0,0,0.12); color: white; }

.filter-wrapper { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; background: rgba(255,255,255,0.5); padding: 0.3rem; border-radius: 50px; border: 1px solid #e2e8f0; }
.filter-btn { background: transparent; border: none; color: #64748b; font-weight: 600; padding: 0.4rem 1.2rem; border-radius: 50px; transition: 0.2s; font-size: 0.85rem;}
.filter-btn:hover:not(.active) { background-color: #ffffff; color: #1e293b; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.filter-btn.active { background: var(--sm-navy); color: #ffffff; box-shadow: 0 4px 10px rgba(0, 31, 91, 0.25); }

/* =========================================================
   DATATABLES, SCROLL HORIZONTAL & FREEZE COLUMN
   ========================================================= */
.table-rounded-wrapper {
    border-radius: 1rem;
    overflow: hidden; 
    background: white;
    border: 1px solid #e2e8f0;
}

.table-responsive-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; 
}

/* Wajib agar 'position: sticky' berjalan mulus tanpa menghilangkan border */
.table-responsive-scroll table {
    border-collapse: separate;
    border-spacing: 0;
}

/* LOGIKA FREEZE KOLOM 1 (JADWAL) */
.table-responsive-scroll th:first-child,
.table-responsive-scroll td:first-child {
    position: sticky;
    left: 0;
    z-index: 5;
    background-color: #ffffff; /* Latar harus solid agar teks yang lewat di bawahnya tidak tembus */
}

.table-responsive-scroll thead th:first-child {
    background-color: #f8fafc; /* Menyesuaikan warna header thead */
    z-index: 6; /* Header harus lebih tinggi dari cell data */
}

/* Menambahkan efek bayangan (shadow) halus sebagai pemisah kolom freeze */
.table-responsive-scroll th:first-child::after,
.table-responsive-scroll td:first-child::after {
    content: '';
    position: absolute;
    top: 0;
    right: -8px; /* Tampil tepat di luar batas kanan kolom */
    bottom: -1px;
    width: 8px;
    background: linear-gradient(to right, rgba(0,0,0,0.08), transparent);
    pointer-events: none; /* Agar tidak mengganggu klik/interaksi tabel */
}

/* Kustomisasi Scrollbar Tabel */
.table-responsive-scroll::-webkit-scrollbar { height: 8px; }
.table-responsive-scroll::-webkit-scrollbar-track { background: #f8fafc; border-radius: 0 0 1rem 1rem; }
.table-responsive-scroll::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 10px; }
.table-responsive-scroll::-webkit-scrollbar-thumb:hover { background-color: #94a3b8; }

/* Penyesuaian Sel Tabel */
.table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; border-bottom: 2px solid #e2e8f0; background: #f8fafc; color: #64748b; padding: 1.2rem 1rem; }
.table tbody td { vertical-align: middle; padding: 1.2rem 1rem; border-bottom: 1px solid #f1f5f9; }

/* Elemen Navigasi DataTables */
.dataTables_wrapper .dataTables_filter input { border: 1px solid #cbd5e1; border-radius: 50rem; padding: 0.4rem 1.2rem; font-size: 0.875rem; outline: none; background: rgba(255,255,255,0.8); }
.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--sm-navy); background: white; box-shadow: 0 0 0 4px rgba(0, 31, 91, 0.1); }
.dataTables_wrapper .dataTables_length select { border-radius: 0.5rem; border-color: #cbd5e1; padding: 0.3rem 1.5rem 0.3rem 0.75rem; outline: none; }

/* Status Badges */
.badge-soft-success { background-color: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-soft-warning { background-color: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-soft-danger  { background-color: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-soft-primary { background-color: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }
.badge-soft-secondary { background-color: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }