/* =========================================
   PENGATURAN GLOBAL
   ========================================= */
html { 
    scroll-behavior: smooth; 
    scroll-padding-top: 80px; 
}

body { 
    font-family: 'Inter', sans-serif; 
    background-color: #f8f9fa; /* Latar abu-abu sangat terang */
    color: #333; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
    margin: 0;
}

/* Warna Custom untuk Status Ditemukan */
.bg-jingga {
    background-color: #fd7e14 !important; /* Warna jingga standar web */
    color: #ffffff !important;
}

/* =========================================
   1. STYLES UNTUK LANDING PAGE (index.php)
   ========================================= */
.navbar-custom { background-color: #ffffff; box-shadow: 0 2px 15px rgba(0,0,0,0.04); }
.navbar-brand { font-weight: 700; color: #1e293b !important; }
.nav-link { font-weight: 500; color: #64748b; transition: all 0.3s; }
.nav-link:hover, .nav-link.active { color: #0d6efd; }

/* UPDATE HERO SECTION DENGAN BACKGROUND IMAGE BLUR */
.hero-section { 
    position: relative;
    /* Padding atas dikurangi jadi 60px, bawah 100px */
    padding: 60px 0 100px 0; 
    overflow: hidden;
    background-color: #1e1b4b; 
}

/* Pseudo-element ini yang memegang background gambar dan efek blur */
.hero-section::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Ganti URL ini dengan gambar stasiun/kereta yang Anda inginkan */
    background-image: url('../img/bg-kereta.jpg'); 
    background-size: cover;
    background-position: center;
    filter: blur(6px) brightness(0.4); /* Efek Blur dan digelapkan agar teks putih terlihat tajam */
    z-index: 1;
    transform: scale(1.1); /* Scale 1.1 agar pinggiran gambar yang terkena blur tidak memutih */
}

/* Teks Hero diubah menjadi warna cerah agar terlihat jelas di atas background gelap */
.hero-title { font-weight: 800; color: #ffffff; font-size: 3.2rem; letter-spacing: -1.5px; line-height: 1.2; }
.hero-subtitle { color: rgba(255, 255, 255, 0.85); font-size: 1.15rem; line-height: 1.6; }

.card-custom { border: none; border-radius: 16px; transition: transform 0.3s ease, box-shadow 0.3s ease; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.card-custom:hover { transform: translateY(-8px); box-shadow: 0 12px 24px rgba(0,0,0,0.08); }

.icon-box { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 12px; font-size: 1.8rem; margin-bottom: 1.5rem; }
.step-number { width: 40px; height: 40px; background-color: #0d6efd; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.2rem; margin: 0 auto 1rem auto; }

.cta-section { background-color: #e0f2fe; border-radius: 24px; }
.section-title { font-weight: 800; color: #0f172a; letter-spacing: -0.5px; }
.btn-custom { font-weight: 600; border-radius: 10px; padding: 12px 28px; transition: all 0.3s; }

.footer-link { color: #adb5bd; text-decoration: none; transition: color 0.3s ease; }
.footer-link:hover { color: #ffffff; }


/* =========================================
   2. STYLES UNTUK LOGIN PAGE (auth/login.php)
   ========================================= */
.login-container {
    max-width: 1000px;
    width: 100%;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06); 
    overflow: hidden; 
    margin: auto;
}

.login-visual {
    /* Menambahkan background gambar */
    background-image: url('../img/bg-login.jpg'); 
    background-size: cover; /* Agar gambar memenuhi seluruh ruang kiri */
    background-position: center; /* Fokus di tengah gambar */
    padding: 3rem;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 550px;
    position: relative;
    z-index: 1;
}

/* Menambahkan lapisan gelap tipis agar teks putih tetap terbaca di atas gambar KRL */
.login-visual::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(30, 27, 75, 0.6); /* Warna biru gelap transparan */
    z-index: -1;
}

.visual-content { z-index: 2; }
.login-form { padding: 3rem 2rem; display: flex; align-items: center; }

@media (min-width: 992px) {
    .login-form { padding: 4rem 3rem; }
}

.form-wrapper { width: 100%; max-width: 380px; margin: 0 auto; }
.form-control, .input-group-text { border-radius: 8px; padding: 12px 16px; border: 1px solid #e2e8f0; background-color: #ffffff; font-size: 0.95rem; color: #333; }
.form-control:focus { border-color: #4f46e5; box-shadow: none; }
.input-group:focus-within .form-control, .input-group:focus-within .input-group-text { border-color: #4f46e5; }

.btn-primary { background-color: #4f46e5; border: none; border-radius: 8px; padding: 14px; font-weight: 600; transition: all 0.3s; box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4); }
.btn-primary:hover { background-color: #4338ca; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5); }

.form-label { font-weight: 600; font-size: 0.85rem; color: #0f172a; }
.cursor-pointer { cursor: pointer; }
.star-decor { color: #4f46e5; font-size: 2rem; line-height: 1; margin-bottom: 0.5rem; }


/* =========================================
   3. STYLES UNTUK DASHBOARD (GEMINI STYLE)
   ========================================= */
body { overflow-x: hidden; }

/* Sidebar Styling Default (Terbuka) */
#sidebar {
    width: 260px;
    background: #1e1b4b; 
    color: #fff;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    position: fixed;
    z-index: 1000;
    display: flex;
    flex-direction: column; 
    overflow: hidden; /* Mencegah elemen keluar dari area biru */
}

/* Saat Sidebar Menyusut */
#sidebar.active { width: 80px; }
#sidebar.active .sidebar-text { display: none; /* Hilangkan semua teks saat mengecil */ }

/* Hamburger Button (Fixed di Kiri Atas) */
.btn-hamburger {
    position: absolute; top: 18px; left: 18px; z-index: 1050;
    background: transparent; border: none; color: #fff;
    font-size: 1.8rem; cursor: pointer; width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; transition: all 0.3s;
}
.btn-hamburger:hover { background: rgba(255,255,255,0.1); }

/* Header Sidebar */
#sidebar .sidebar-header { 
    padding: 25px 20px 20px 75px; 
    background: rgba(0,0,0,0.15); 
    min-height: 80px; 
    white-space: nowrap; 
}

/* PROFIL PETUGAS (Anti Tumpah / Anti Terpotong) */
.sidebar-profile { 
    padding: 20px; 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
    display: flex; 
    align-items: center; 
    overflow: hidden; 
    width: 100%;
}

.sidebar-profile .avatar { 
    min-width: 45px; width: 45px; height: 45px; 
    border-radius: 50%; background: #4f46e5; 
    display: flex; align-items: center; justify-content: center; 
    font-weight: bold; font-size: 1.2rem; margin-right: 15px; 
    flex-shrink: 0; 
}

.sidebar-profile .sidebar-text {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.sidebar-profile .sidebar-text h6, 
.sidebar-profile .sidebar-text small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; 
    margin: 0;
    width: 100%;
}

#sidebar.active .sidebar-profile { padding: 20px 0; justify-content: center; }
#sidebar.active .sidebar-profile .avatar { margin-right: 0 !important; }

/* Menu List */
#sidebar ul.components { padding: 20px 0; flex-grow: 1; margin-bottom: 0; white-space: nowrap; }
#sidebar ul li a { padding: 12px 20px; font-size: 1rem; display: flex; align-items: center; color: rgba(255,255,255,0.7); text-decoration: none; transition: 0.3s; width: 100%; }
#sidebar ul li a:hover, #sidebar ul li.active > a { color: #fff; background: rgba(255,255,255,0.08); border-left: 4px solid #4f46e5; }
#sidebar ul li a i { margin-right: 15px; font-size: 1.3rem; min-width: 30px; text-align: center; }

#sidebar.active ul li a { justify-content: center; padding: 15px 0; border-left: none; }
#sidebar.active ul li.active > a { border-left: none; background: rgba(255,255,255,0.1); }
#sidebar.active ul li a i { margin-right: 0; font-size: 1.5rem; }

/* Tombol Logout */
.sidebar-footer { padding: 20px; margin-top: auto; border-top: 1px solid rgba(255,255,255,0.05); white-space: nowrap; }
.sidebar-footer a { color: #ef4444; text-decoration: none; display: flex; align-items: center; font-weight: 600; transition: 0.3s; }
.sidebar-footer a i { margin-right: 15px; font-size: 1.3rem; min-width: 30px; text-align: center; }

#sidebar.active .sidebar-footer { padding: 20px 0; display: flex; justify-content: center; }
#sidebar.active .sidebar-footer a i { margin-right: 0; font-size: 1.5rem; }


/* KONTEN UTAMA & RESPONSIVE HP */
#content { width: 100%; margin-left: 260px; transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
#content.active { margin-left: 80px; }
.content-wrapper { padding: 40px; }

.card-stat { border: none; border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); transition: transform 0.3s; }
.card-stat:hover { transform: translateY(-5px); }
.stat-icon { width: 55px; height: 55px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }

@media (max-width: 768px) {
    #sidebar { width: 260px; margin-left: -260px; } 
    #sidebar.active { width: 260px; margin-left: 0; }
    
    #sidebar.active .sidebar-text { display: flex; flex-direction: column; }
    #sidebar.active .sidebar-profile { justify-content: flex-start; padding: 20px; }
    #sidebar.active .sidebar-profile .avatar { margin-right: 15px !important; }
    #sidebar.active ul li a { justify-content: flex-start; padding: 12px 20px; }
    #sidebar.active ul li a i { margin-right: 15px; }
    #sidebar.active .sidebar-footer { padding: 20px; justify-content: flex-start; }
    #sidebar.active .sidebar-footer a i { margin-right: 15px; }
    
    #content { margin-left: 0; }
    #content.active { margin-left: 0; }
    .content-wrapper { padding: 80px 20px 20px 20px; }
    
    .btn-hamburger { position: fixed; color: #1e1b4b; left: 15px; }
    #sidebar.active .btn-hamburger { color: #fff; }
} 

/* =========================================
   4. STYLES UNTUK DATA TEMUAN & TABEL
   ========================================= */
.table-custom th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    padding: 15px;
    white-space: nowrap; 
}

.table-custom td {
    padding: 15px;
    vertical-align: middle;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

.badge-kategori {
    background-color: #e0e7ff;
    color: #4f46e5;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    display: inline-block;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #94a3b8;
}
.empty-state i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
    display: inline-block;
}

/* =========================================
   EFEK HOVER LOGO (TENTANG SECTION)
   ========================================= */
.logo-hover-effect {
    width: 100%;
    max-width: 450px; /* Membatasi agar persegi tidak terlalu raksasa di layar besar */
    border-radius: 24px; /* Membuat sudut persegi sedikit halus/melengkung */
    box-shadow: 0 10px 30px rgba(0,0,0,0.06); /* Memberikan bayangan lembut di sekitar logo */
    transition: all 0.4s ease; /* Membuat animasinya mulus */
}

.logo-hover-effect:hover {
    transform: translateY(-15px) scale(1.02); /* Efek melayang ke atas dan sedikit membesar */
    box-shadow: 0 20px 40px rgba(0,0,0,0.15); /* Bayangan menjadi lebih tegas saat melayang */
}