@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700&family=Inter:wght@400;500;600&display=swap');

:root { --primary: #6366f1; --dark: #0f172a; --light: #f8fafc; --border: #e2e8f0; }

/* RESET DASAR */
* { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; overflow-x: hidden; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--light); color: var(--dark); }
h1,h2,h3,h4,h5,h6 { font-family: 'Sora', sans-serif; letter-spacing: -0.02em; }

/* LAYOUT UTAMA */
.wrapper, .d-flex.flex-grow-1 { display: flex; width: 100%; min-height: 100vh; overflow: hidden; }

/* SIDEBAR (DARK PREMIUM) */
.sidebar, .admin-sidebar { width: 260px; background: var(--dark) !important; color: #94a3b8 !important; padding: 24px 16px; position: fixed; height: 100vh; overflow-y: auto; transition: transform 0.3s; z-index: 1000; flex-shrink: 0; }
.sidebar-brand { font-family: 'Sora'; font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.sidebar-brand img { height: 30px; }
.nav-section, .nav-category { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #475569; padding: 16px 16px 6px; margin: 0; }
.nav-item-custom, .admin-sidebar .nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 16px; color: #94a3b8 !important; text-decoration: none; border-radius: 10px; margin-bottom: 2px; font-size: 0.88rem; font-weight: 500; transition: 0.2s; }
.nav-item-custom:hover, .admin-sidebar .nav-link:hover { background: rgba(255,255,255,0.05); color: #fff !important; }
.nav-item-custom.active, .admin-sidebar .nav-link.active { background: var(--primary); color: #fff !important; }
.nav-item-custom i, .admin-sidebar .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; }

/* KONTEN WRAPPER */
.content, .admin-content { flex: 1; min-width: 0; max-width: 100%; min-height: 100vh; background: var(--light); display: flex; flex-direction: column; overflow-x: hidden; margin-left: 260px; padding: 24px; }

/* NAVBAR TOP (GLASSMORPHISM) */
.navbar-top, .admin-content > .navbar { 
    margin: 0 0 24px 0 !important; 
    background: rgba(255, 255, 255, 0.9) !important; 
    backdrop-filter: blur(12px);
    padding: 16px 24px !important; 
    border-radius: 16px !important; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.03) !important; 
    border: 1px solid var(--border) !important; 
    display: flex !important; 
    align-items: center !important;
    justify-content: space-between;
}
.navbar-top h5, .navbar h5 { margin: 0 !important; font-weight: 600 !important; font-size: 1.2rem !important; font-family: 'Sora', sans-serif !important; color: var(--dark) !important; display: flex; align-items: center; gap: 10px; }
.btn-logout { background: #fee2e2; color: #ef4444; padding: 8px 16px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 0.85rem; }
.btn-logout:hover { background: #fecaca; color: #dc2626; }
.menu-toggle { display: none; background: var(--dark); color: #fff; border: none; padding: 8px 12px; border-radius: 8px; font-size: 1.2rem; cursor: pointer; }
.overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 999; }
.overlay.show { display: block; }

/* CARDS & TABLES */
.card, .data-card, .filter-card, .settings-card { background: #fff; border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 2px 10px rgba(0,0,0,0.02); overflow: hidden; margin-bottom: 24px; }
.card-header, .data-card-header, .settings-card-header { background: #fff !important; border-bottom: 1px solid var(--border); padding: 16px 24px; font-weight: 600; font-family: 'Sora'; color: var(--dark); display: flex; justify-content: space-between; align-items: center; }
.card-header h6, .data-card-header h6, .settings-card-header h6 { margin: 0; font-weight: 600; }
.card-body, .settings-card-body { padding: 24px; }

.stat-card { background: #fff; padding: 24px; border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 2px 10px rgba(0,0,0,0.02); height: 100%; transition: all 0.3s; }
.stat-card:hover { transform: translateY(-5px); border-color: transparent; box-shadow: 0 20px 40px rgba(0,0,0,0.06); }
.stat-card.primary { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); color: #fff; border: none; }
.stat-card.primary .text-muted { color: rgba(255,255,255,0.8) !important; }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.icon-indigo { background: #eef2ff; color: #6366f1; }
.icon-green { background: #dcfce7; color: #16a34a; }
.icon-amber { background: #fef3c7; color: #d97706; }

.table, .table-custom { margin: 0; border-collapse: separate; border-spacing: 0; }
.table th, .table-custom th { padding: 12px 24px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; background: #f8fafc; font-family: 'Inter'; font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--border); }
.table td, .table-custom td { padding: 12px 24px; font-size: 0.9rem; vertical-align: middle; border-bottom: 1px solid var(--border); color: #334155; }
.table tbody tr:last-child td, .table-custom tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover, .table-custom tbody tr:hover { background: #f8fafc; }

/* BADGES & STATUS */
.badge, .badge-status { padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.bg-pending, .bg-warning { background: #fef3c7; color: #d97706; }
.bg-success, .bg-settlement, .bg-active, .bg-completed { background: #dcfce7; color: #16a34a; }
.bg-danger, .bg-cancel, .bg-expire, .bg-deny, .bg-inactive, .bg-rejected, .bg-error { background: #fee2e2; color: #ef4444; }
.bg-primary { background: #dbeafe; color: #2563eb; }
.bg-secondary, .bg-processing { background: #eef2ff; color: #6366f1; }

/* FORMS */
.form-control, .form-select { border-radius: 10px; padding: 12px 16px; border: 1px solid var(--border); font-size: 0.9rem; background: #fff; transition: 0.2s; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); background: #fff; }
.form-label { font-size: 0.85rem; font-weight: 500; color: #475569; margin-bottom: 6px; }

/* BUTTONS (MODERN SaaS) */
.btn { border-radius: 10px; font-weight: 600; padding: 10px 20px; transition: 0.2s; border: none; }
.btn:hover { transform: translateY(-1px); opacity: 0.9; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #4f46e5; color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,0.3); }
.btn-outline-primary { color: var(--primary); border: 1px solid var(--primary); background: #fff; }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-warning { background: #f59e0b; color: #fff; }
.btn-warning:hover { background: #d97706; color: #fff; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 8px; }
.btn-action { padding: 5px 10px; border-radius: 8px; font-size: 0.78rem; font-weight: 600; border: none; cursor: pointer; transition: 0.2s; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.btn-action.indigo { background: #eef2ff; color: #6366f1; }
.btn-action.amber { background: #fef3c7; color: #d97706; }
.btn-action.red { background: #fee2e2; color: #ef4444; }
.btn-action.green { background: #dcfce7; color: #16a34a; }
.btn-action.blue { background: #dbeafe; color: #2563eb; }

/* ALERTS */
.alert { border-radius: 12px; border: none; padding: 16px 20px; margin-bottom: 24px; }
.alert-info { background: #eff6ff; color: #2563eb; }
.alert-success { background: #f0fdf4; color: #16a34a; }
.alert-danger { background: #fef2f2; color: #ef4444; }
.alert-warning { background: #fffbeb; color: #d97706; }

/* FOOTER */
footer, .footer-custom { background: var(--dark); color: #94a3b8; padding: 20px; margin-top: auto; text-align: center; width: 100%; border-radius: 16px; }
footer p, .footer-custom p { margin: 0; font-size: 0.9rem; }

/* MODAL */
.modal-content { border-radius: 16px; overflow: hidden; border: none; }
.modal-header { background: var(--primary); color: #fff; border: none; padding: 20px 24px; }
.modal-header h5 { font-family: 'Sora'; font-weight: 700; }
.modal-body { padding: 24px; }
.modal-footer { border-top: 1px solid var(--border); padding: 16px 24px; }

/* RESPONSIVE */
@media (max-width: 992px) {
    .sidebar, .admin-sidebar { transform: translateX(-100%); }
    .sidebar.show, .admin-sidebar.show { transform: translateX(0); }
    .content, .admin-content { margin-left: 0; padding: 16px; }
    .menu-toggle { display: block; }
}