/* =========================================
   1. VARIABLES & RESET
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Palet Warna */
    --color-primary: #AED9E0; 
    --color-accent: #2C5282; 
    --color-dark-blue: #1A365D;
    --color-bg: #FFB7C5;
    --color-white: #ffffff;
    
    /* Teks */
    --color-text-main: #2D3748;
    --color-text-muted: #718096;
    
    /* Status Colors */
    --color-success: #48BB78;
    --color-success-bg: #C6F6D5;
    --color-warning: #ED8936;
    --color-warning-bg: #FEEBC8;
    --color-danger: #E53E3E;
    --color-danger-bg: #FED7D7;

    /* Utils */
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --border-color: #E2E8F0;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text-main);
    margin: 0;
    line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* =========================================
   2. LAYOUT GLOBAL (Admin & User)
   ========================================= */

/* A. Layout Admin (Sidebar Kiri) */
.admin-body { display: flex; min-height: 100vh; }

.sidebar {
    width: 260px;
    background-color: var(--color-accent);
    color: white;
    display: flex; flex-direction: column;
    position: fixed; height: 100vh; padding: 20px 0; z-index: 100;
}
.sidebar h2 { text-align: center; font-size: 20px; margin-bottom: 30px; }
.nav-links a {
    display: block; padding: 12px 20px; color: rgba(255,255,255,0.8);
    margin-bottom: 5px; transition: 0.3s; font-size: 14px;
}
.nav-links a:hover, .nav-links a.active {
    background-color: var(--color-primary); color: var(--color-accent); font-weight: 600;
}
.main-content { margin-left: 260px; padding: 40px; width: 100%; }

/* B. Layout User (Navbar Atas) */
.user-body { padding-top: 80px; /* Jarak agar tidak tertutup navbar */ }

.navbar {
    background-color: var(--color-white);
    height: 70px;
    padding: 0 5%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between; /* Logo Kiri, Menu Kanan */
    align-items: center;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
}

.logo {
    font-size: 22px; font-weight: 800; color: var(--color-accent); letter-spacing: -0.5px;
}

/* Menu Desktop User */
.nav-links-desktop { display: flex; gap: 30px; align-items: center; }
.nav-links-desktop a {
    font-size: 14px; font-weight: 500; color: var(--color-text-muted); transition: 0.3s;
}
.nav-links-desktop a:hover, .nav-links-desktop a.active {
    color: var(--color-accent); font-weight: 700;
}

/* Posisi nav kanan */
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.profile-link{
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* Avatar Circle */
.avatar {
    width: 36px; height: 36px; background-color: var(--color-accent); color: white;
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-weight: 700; font-size: 14px; flex-shrink: 0;
}

/* =========================================
   3. HAMBURGER MENU & SIDEBAR (MOBILE)
   ========================================= */
.hamburger {
    display: none; /* Sembunyi di Laptop */
    cursor: pointer; font-size: 24px; color: var(--color-accent); margin-right: 15px;
}

.mobile-sidebar {
    position: fixed; top: 0; left: -280px; /* Sembunyi */
    width: 260px; height: 100vh; background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1100; padding: 25px; transition: 0.3s ease;
    display: flex; flex-direction: column;
}
.mobile-sidebar.active { left: 0; /* Muncul */ }

.mobile-menu-item {
    padding: 15px 0; border-bottom: 1px solid #F0F0F0;
    color: var(--color-text-main); font-weight: 500; display: block;
}
.mobile-menu-item:hover { color: var(--color-accent); padding-left: 5px; }

.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1050; display: none;
}
.overlay.active { display: block; }

/* =========================================
   4. DASHBOARD USER COMPONENTS
   ========================================= */
.hero-banner {
    background: linear-gradient(135deg, #2C5282 0%, #4299E1 100%);
    border-radius: var(--border-radius);
    padding: 30px; color: white; margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(44, 82, 130, 0.3);
}
.hero-banner h1 { margin: 0 0 10px 0; font-size: 24px; color: white !important; }
.hero-banner p { margin: 0; color: rgba(255,255,255,0.9); }

.dashboard-widgets {
    display: grid; grid-template-columns: 2fr 1fr; gap: 25px;
}
.widget-title {
    font-size: 16px; font-weight: 700; color: var(--color-text-main); margin-bottom: 15px; display: block;
}

/* =========================================
   5. KOMPONEN UMUM (Card, Btn, Form)
   ========================================= */
.container { max-width: 1000px; margin: 0 auto; padding: 20px; }
.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }

.card {
    background: var(--color-white); padding: 25px;
    border-radius: var(--border-radius); box-shadow: var(--shadow);
    border: 1px solid var(--border-color); margin-bottom: 20px;
}

/* Forms */
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px; }
input, select, textarea {
    width: 100%; padding: 12px; border: 1px solid #CBD5E0; border-radius: 8px;
    font-family: inherit; font-size: 14px; box-sizing: border-box;
}

/* Buttons */
.btn {
    display: inline-block; padding: 10px 20px; border-radius: 8px;
    font-weight: 600; font-size: 14px; cursor: pointer; border: none; text-align: center; text-decoration: none;
    transition: 0.2s;
}
.btn-primary { background: var(--color-accent); color: white; }
.btn-primary:hover { background: var(--color-dark-blue); }

.btn-danger { background: #FFF5F5; color: var(--color-danger); border: 1px solid var(--color-danger-bg); }
.btn-danger:hover { background: var(--color-danger-bg); }

.btn-outline { border: 1px solid #CBD5E0; color: var(--color-text-muted); background: white; }
.btn-outline:hover { color: var(--color-accent); border-color: var(--color-accent); }

/* Table */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border-color); }
thead { background: #F7FAFC; font-weight: 600; color: var(--color-text-muted); }

/* Alerts & Badges */
.alert { padding: 15px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: var(--color-success-bg); color: #22543D; }
.alert-error { background: var(--color-danger-bg); color: #822727; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge-green { background: var(--color-success-bg); color: #22543D; }
.badge-blue { background: #BEE3F8; color: var(--color-accent); }
.badge-red { background: var(--color-danger-bg); color: #C53030; }

/* Login Box */
.login-body { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.login-box {
    width: 100%; max-width: 400px; background: white; padding: 40px;
    border-radius: var(--border-radius); box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}
.brand-logo { text-align: center; font-size: 32px; font-weight: 800; color: var(--color-accent); margin-bottom: 30px; letter-spacing: -1px; }

/* Menu Icon (Circle) */
.menu-icon {
    width: 80px; height: 80px; background: #EBF8FF; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 40px; margin-bottom: 15px;
}

/* =========================================
   6. MEDIA QUERY (HP / TABLET)
   ========================================= */
@media (max-width: 768px) {
    /* Navbar HP */
    .nav-links-desktop { display: none; } /* Sembunyikan menu atas */
    .hamburger { display: block; } /* Tampilkan hamburger */
    .navbar { justify-content: space-between; padding: 0 20px; }

    /* Dashboard HP */
    .dashboard-widgets { grid-template-columns: 1fr; } /* Stack ke bawah */
}

/* =========================================
   7. HERO CAROUSEL (Gaya Halodoc/Traveloka)
   ========================================= */
.hero-wrapper {
    position: relative;
    width: 100%;
    height: 300px; /* Tinggi banner */
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    background: #2C5282; /* Fallback color */
}

/* Container Gambar */
.hero-slides {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out; /* Efek fade halus */
}

.hero-slide.active { opacity: 1; }

.hero-slide img {
    width: 100%; height: 100%;
    object-fit: cover; /* Agar gambar tidak gepeng */
    object-position: center;
}

/* Overlay Gelap (Agar teks terbaca) */
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0) 100%);
    z-index: 10;
}

/* Konten Teks di atas Gambar */
.hero-content {
    position: relative;
    z-index: 20;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 40px;
    color: white;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 28px; margin-bottom: 10px; font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.hero-content p {
    font-size: 16px; margin-bottom: 20px;
    line-height: 1.6; opacity: 0.9;
}

/* Responsif Mobile untuk Hero */
@media (max-width: 768px) {
    .hero-wrapper { height: 350px; } /* Sedikit lebih tinggi di HP untuk teks */
    .hero-overlay { background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 90%); }
    .hero-content { padding: 20px; justify-content: flex-end; padding-bottom: 40px; }
    .hero-content h1 { font-size: 22px; }
}

/* =========================================
   8. FOOTER
   ========================================= */
.site-footer {
    background-color: white;
    border-top: 1px solid var(--border-color);
    padding: 40px 0 20px 0;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; /* Kolom 1 lebar, 2 & 3 kecil */
    gap: 40px;
    margin-bottom: 30px;
}

.footer-brand h3 { color: var(--color-accent); margin: 0 0 10px 0; font-size: 20px; font-weight: 800; }
.footer-brand p { color: var(--color-text-muted); font-size: 14px; line-height: 1.6; max-width: 300px; }

.footer-links h4 { color: var(--color-text-main); margin: 0 0 15px 0; font-size: 16px; }
.footer-links a { display: block; color: var(--color-text-muted); font-size: 14px; margin-bottom: 8px; transition: 0.2s; }
.footer-links a:hover { color: var(--color-accent); padding-left: 5px; }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #F0F0F0;
    color: var(--color-text-muted);
    font-size: 13px;
}

@media (max-width: 768px) {
    .footer-content { grid-template-columns: 1fr; gap: 30px; } /* Stack ke bawah di HP */
}

/* =========================================
   FIX: ADMIN RESPONSIVE (Letakkan di paling bawah style.css)
   ========================================= */

/* Default: Navbar Mobile Admin disembunyikan di Desktop */
.admin-mobile-nav { display: none; }

@media (max-width: 768px) {
    /* 1. Sembunyikan Sidebar Desktop */
    .sidebar { display: none; }

    /* 2. Reset Margin Main Content (agar full width) */
    .main-content { 
        margin-left: 0; 
        padding: 20px; 
        padding-top: 90px; /* Beri jarak untuk navbar atas */
    }

    /* 3. Tampilkan Navbar Atas Mobile */
    .admin-mobile-nav { 
        display: flex !important; 
        background: white;
        height: 70px;
        padding: 0 20px;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0; left: 0; right: 0;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
}

/* =========================================
   LOGO IMAGE STYLING
   ========================================= */

/* Logo di Navbar */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px; /* Tinggi logo menyesuaikan navbar (70px) */
    width: auto;  /* Lebar menyesuaikan proporsi */
    object-fit: contain;
}

/* Logo di Footer */
.footer-logo {
    height: 50px; /* Logo di footer sedikit lebih besar */
    width: auto;
    margin-bottom: 15px;
    display: block;
}

/* Penyesuaian Mobile */
@media (max-width: 768px) {
    .logo img { height: 35px; } /* Sedikit lebih kecil di HP */
}