/* =========================================
   1. VARIABLES & THEME SETUP
   ========================================= */
:root {
    /* --- COLOR PALETTE (Dark Luxury) --- */
    --primary-bg: #0b0f19;       /* Background Halaman */
    --secondary-bg: #151a27;     /* Background Card/Panel */
    --sidebar-bg: #0f131e;       /* Background Sidebar */
    --border-color: rgba(255, 255, 255, 0.08);

    /* --- ACCENTS --- */
    --gold-accent: #f1c40f;      /* Emas Utama */
    --gold-hover: #d4ac0d;       /* Emas Gelap (Hover) */
    --gold-glow: 0 0 15px rgba(241, 196, 15, 0.3);

    /* --- TYPOGRAPHY --- */
    --text-white: #ffffff;
    --text-muted: #a0aec0;
    --text-dark: #1a202c;

    /* --- STATUS COLORS --- */
    --success: #2ecc71; 
    --success-bg: rgba(46, 204, 113, 0.15);
    
    --danger: #e74c3c; 
    --danger-bg: rgba(231, 76, 60, 0.15);
    
    --warning: #f39c12; 
    --warning-bg: rgba(243, 156, 18, 0.15);
    
    --info: #3498db; 
    --info-bg: rgba(52, 152, 219, 0.15);

    /* --- SETTINGS --- */
    --font-main: 'Poppins', sans-serif;
    --radius: 12px;
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
}

/* =========================================
   2. GLOBAL RESET & TYPOGRAPHY
   ========================================= */
* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--primary-bg);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 0.95rem;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700; color: var(--text-white); margin-bottom: 0.5rem;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--primary-bg); }
::-webkit-scrollbar-thumb { background: #374151; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-accent); }

/* Utilities */
.text-gold { color: var(--gold-accent) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-center { text-align: center; }
.text-end { text-align: right; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mb-2 { margin-bottom: 10px; }
.mt-3 { margin-top: 15px; }

/* =========================================
   3. LAYOUT (SIDEBAR & CONTENT)
   ========================================= */
.admin-wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column;
    position: fixed; height: 100%; z-index: 100;
    transition: 0.3s;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    background-color: var(--primary-bg);
    width: calc(100% - 260px);
}

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .main-content { margin-left: 0; width: 100%; }
}

/* =========================================
   4. COMPONENTS: CARDS
   ========================================= */
.card {
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

/* Luxury Card (Untuk Paket) */
.paket-card {
    background: linear-gradient(145deg, #1a202c 0%, #111827 100%);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 25px;
    display: flex; flex-direction: column; height: 100%;
    position: relative; transition: all 0.3s ease;
}
.paket-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold-accent);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}
.paket-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
    background: var(--gold-accent); opacity: 0; transition: 0.3s;
}
.paket-card:hover::before { opacity: 1; box-shadow: var(--gold-glow); }

/* =========================================
   5. COMPONENTS: BUTTONS
   ========================================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 20px; border-radius: 8px;
    font-weight: 600; font-size: 0.9rem;
    border: none; cursor: pointer; transition: 0.3s; gap: 8px;
}

.btn-gold {
    background-color: var(--gold-accent); color: #000;
}
.btn-gold:hover {
    background-color: var(--gold-hover);
    box-shadow: var(--gold-glow); transform: translateY(-2px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: #ef4444; color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.w-100 { width: 100%; }

/* Floating Delete Button (Untuk Paket) */
.btn-delete-float {
    position: absolute; top: 15px; right: 15px; z-index: 50;
    width: 32px; height: 32px; border-radius: 8px;
    background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s;
}
.btn-delete-float:hover {
    background: #ef4444; color: #fff; transform: scale(1.1);
}

/* =========================================
   6. COMPONENTS: FORMS
   ========================================= */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; margin-bottom: 8px; color: var(--text-muted);
    font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
}

.form-control {
    width: 100%; padding: 12px 15px;
    background-color: var(--primary-bg);
    border: 1px solid #2d3748;
    border-radius: 10px;
    color: var(--text-white);
    font-size: 0.95rem; transition: 0.3s;
}

.form-control:focus {
    outline: none; border-color: var(--gold-accent);
    box-shadow: 0 0 0 2px rgba(241, 196, 15, 0.1);
}

/* Fix Select Option Background */
select.form-control option { background-color: var(--primary-bg); color: #fff; padding: 10px; }

/* =========================================
   7. COMPONENTS: TABLES
   ========================================= */
.table-responsive { overflow-x: auto; width: 100%; }
.table { width: 100%; border-collapse: collapse; }

.table th {
    text-align: left; padding: 15px;
    background: rgba(255,255,255,0.03); color: var(--gold-accent);
    font-weight: 700; border-bottom: 1px solid var(--border-color);
}
.table td {
    padding: 15px; border-bottom: 1px solid var(--border-color); vertical-align: middle;
}
.table tr:hover td { background: rgba(255,255,255,0.02); }

/* =========================================
   8. COMPONENTS: MODAL & SWEETALERT
   ========================================= */
/* Modal Base */
.modal {
    display: none; position: fixed; z-index: 9999;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    justify-content: center; align-items: center;
}

.modal-content {
    background-color: var(--secondary-bg);
    padding: 0; /* Reset */
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    width: 95%; max-width: 600px;
    max-height: 90vh; display: flex; flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    animation: slideUp 0.3s ease;
}

/* SweetAlert2 Theme Override (GLOBAL FIX) */
div:where(.swal2-container) div:where(.swal2-popup) {
    background: #111827 !important;
    border: 1px solid rgba(241, 196, 15, 0.2);
    border-radius: 16px !important;
}
div:where(.swal2-container) .swal2-title { color: var(--gold-accent) !important; }
div:where(.swal2-container) .swal2-html-container { color: #cbd5e1 !important; }
div:where(.swal2-container) button.swal2-confirm {
    background: var(--gold-accent) !important; color: #000 !important; font-weight: bold !important;
}
div:where(.swal2-container) button.swal2-cancel {
    background: #374151 !important; color: #fff !important;
}

/* =========================================
   9. UTILITIES
   ========================================= */
.badge {
    padding: 5px 10px; border-radius: 50px;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
}
.badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning); }
.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success); }

/* Animations */
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}