/* ============================================
   CSS Variables - Standardized Design System
   ============================================ */
:root {
    /* Primary Colors */
    --primary: #1a86ff;
    --primary-dark: #0f6ee6;
    --primary-light: #66adff;
    --primary-glow: rgba(26, 134, 255, 0.3);
    --electric-blue: #2e93ff;
    
    /* Background Layers */
    --bg-base: #000000;
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #0f0f0f;
    --bg-elevated: #141414;
    --bg-surface: #1a1a1a;
    
    /* Glass & Transparency */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.05);
    --glass-bg-active: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.12);
    
    /* Text Hierarchy - STANDARDIZED */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.72);
    --text-tertiary: rgba(255, 255, 255, 0.60); /* 60% opacity for subtitles */
    --text-muted: rgba(255, 255, 255, 0.40);
    
    /* Accent Colors */
    --accent-green: #00d395;
    --accent-red: #ff5f52;
    --accent-yellow: #ffc53d;
    --accent-purple: #5aa6ff;
    --accent-cyan: #00d4ff;
    
    /* Status Colors */
    --success: #00d395;
    --success-bg: rgba(0, 211, 149, 0.1);
    --success-border: rgba(0, 211, 149, 0.2);
    --warning: #ffc53d;
    --warning-bg: rgba(255, 197, 61, 0.1);
    --warning-border: rgba(255, 197, 61, 0.2);
    --danger: #ff5f52;
    --danger-bg: rgba(255, 95, 82, 0.1);
    --danger-border: rgba(255, 95, 82, 0.2);
    --info: #1a86ff;
    --info-bg: rgba(26, 134, 255, 0.1);
    --info-border: rgba(26, 134, 255, 0.2);
    
    /* ========== LAYOUT DIMENSIONS ========== */
    --sidebar-width: 260px;
    --header-height: 64px;
    --bottom-nav-height: 72px; /* FIXED: 72px */
    
    /* ========== SPACING SYSTEM (Consistent) ========== */
    --space-card: 12px;     /* Gap between cards */
    --space-section: 24px;  /* Gap between sections */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 24px;
    --space-2xl: 32px;
    
    /* ========== TYPOGRAPHY (WAJIB KONSISTEN) ========== */
    --font-title: 14px;      /* Title: 14px semibold */
    --font-value: 16px;      /* Value (Rp): 16px bold */
    --font-subtitle: 12px;   /* Subtitle: 12px 60% opacity */
    --font-xs: 10px;
    --font-sm: 12px;
    --font-md: 14px;
    --font-lg: 16px;
    --font-xl: 18px;
    --font-2xl: 20px;
    --font-3xl: 24px;
    
    /* ========== CARD SYSTEM (STANDARDIZED) ========== */
    --card-radius: 16px;     /* WAJIB: 16px */
    --card-padding: 16px;    /* WAJIB: 16px */
    --card-min-height: 72px; /* WAJIB: 72px */
    --card-gap: 12px;        /* WAJIB: 12px */
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;       /* Standard card */
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows - Soft & Consistent */
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.15);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px var(--primary-glow);
    --shadow-glow-sm: 0 0 12px var(--primary-glow);
    
    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 200ms;
}

/* ============================================
   LIGHT THEME - Coinbase Clean Design
   ============================================ */
[data-theme="light"] {
    --primary: #1a86ff;
    --primary-dark: #0f6ee6;
    --primary-light: #66adff;
    --primary-glow: rgba(26, 134, 255, 0.08);
    --electric-blue: #2e93ff;

    --bg-base: #f7f8fa;
    --bg-primary: #f7f8fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eff1f5;
    --bg-elevated: #ffffff;
    --bg-surface: #ffffff;

    --glass-bg: #ffffff;
    --glass-bg-hover: #f7f8fa;
    --glass-bg-active: #eff1f5;
    --glass-border: #e8ecef;
    --glass-border-hover: #d1d5db;

    --text-primary: #0a0b0d;
    --text-secondary: #4b5563;
    --text-tertiary: #5b616e;
    --text-muted: #6b7280;

    --accent-green: #05b169;
    --accent-red: #df5f67;
    --accent-yellow: #cb7d18;
    --accent-purple: #2f7fe6;
    --accent-cyan: #0097a7;

    --success: #05b169;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    --warning: #cb7d18;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    --danger: #df5f67;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --info: #1a86ff;
    --info-bg: #eff6ff;
    --info-border: #bfdbfe;

    --shadow-card: 0 0 0 1px #e8ecef;
    --shadow-card-hover: 0 0 0 1px #d1d5db, 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.10);
    --shadow-glow: none;
    --shadow-glow-sm: none;
}

/* ============================================
   Light Theme - Coinbase Element Overrides
   ============================================ */
[data-theme="light"] body {
    background: #f7f8fa;
    background-image: none;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #d1d5db;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

[data-theme="light"] .sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
}

[data-theme="light"] .sidebar {
    background: #ffffff;
    border-color: #e8ecef;
}

[data-theme="light"] .sidebar-overlay {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(2px);
}

[data-theme="light"] .sidebar-brand {
    color: #0a0b0d;
}

[data-theme="light"] .sidebar-brand i {
    color: #1a86ff;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #1a86ff;
    filter: none;
}

[data-theme="light"] .sidebar-menu a {
    color: #5b616e;
}

[data-theme="light"] .sidebar-menu a:hover {
    background: #f7f8fa;
    color: #0a0b0d;
}

[data-theme="light"] .sidebar-menu a.active {
    background: #eff6ff;
    color: #1a86ff;
    border-color: transparent;
    box-shadow: none;
}

[data-theme="light"] .sidebar-menu a.active i {
    color: #1a86ff;
    filter: none;
}

[data-theme="light"] .sidebar-menu a.active::before {
    background: #1a86ff;
    box-shadow: none;
}

[data-theme="light"] .mobile-header {
    background: #ffffff;
    border-color: #e8ecef;
}

[data-theme="light"] .mobile-header .brand {
    color: #0a0b0d;
}

[data-theme="light"] .mobile-header .brand i {
    color: #1a86ff;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #1a86ff;
}

[data-theme="light"] .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%235b616e' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

[data-theme="light"] .form-control,
[data-theme="light"] .form-select {
    background: #ffffff;
    border-color: #e8ecef;
    color: #0a0b0d;
}

[data-theme="light"] .form-control:focus,
[data-theme="light"] .form-select:focus {
    background: #ffffff;
    border-color: #1a86ff;
    box-shadow: 0 0 0 3px rgba(26, 134, 255, 0.12);
}

[data-theme="light"] .form-control::placeholder {
    color: #9ca3af;
}

[data-theme="light"] .btn-close {
    filter: none;
    opacity: 0.5;
}

[data-theme="light"] .btn-close:hover {
    opacity: 0.75;
}

[data-theme="light"] .loading-overlay {
    background: rgba(247, 248, 250, 0.92);
}

[data-theme="light"] .page-loader {
    background: #f7f8fa;
}

[data-theme="light"] .sidebar.admin-sidebar {
    border-color: #e8ecef;
    background: #ffffff;
}

/* ---- Cards: solid, no glass, no blur, subtle hover ---- */
[data-theme="light"] .balance-card {
    background: #ffffff;
    border: 1px solid #e8ecef;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 0 0 1px #e8ecef;
}

[data-theme="light"] .balance-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px #d1d5db, 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .stat-card,
[data-theme="light"] .admin-stat-card {
    background: #ffffff;
    border: 1px solid #e8ecef;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

[data-theme="light"] .stat-card:hover,
[data-theme="light"] .admin-stat-card:hover {
    transform: translateY(-1px);
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .stat-card:hover h3 {
    color: #1a86ff;
}

[data-theme="light"] .card,
[data-theme="light"] .card-custom,
[data-theme="light"] .card-3d-glass,
[data-theme="light"] .card-glass {
    background: #ffffff;
    border: 1px solid #e8ecef;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

[data-theme="light"] .card:hover,
[data-theme="light"] .card-custom:hover,
[data-theme="light"] .card-3d-glass:hover {
    transform: translateY(-1px);
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .card-header {
    background: #f7f8fa;
    border-bottom: 1px solid #e8ecef;
}

[data-theme="light"] .section-card {
    background: #ffffff;
    border: 1px solid #e8ecef;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

[data-theme="light"] .section-header {
    background: #f7f8fa;
    border-bottom: 1px solid #e8ecef;
}

/* ---- Buttons: flat, no gradient, no shine, clean hover ---- */
[data-theme="light"] .btn {
    box-shadow: none;
}

[data-theme="light"] .btn::before {
    display: none;
}

[data-theme="light"] .btn:hover {
    transform: none;
    box-shadow: none;
}

[data-theme="light"] .btn:active {
    transform: scale(0.98);
}

[data-theme="light"] .btn-primary {
    background: #1a86ff;
    border-color: #1a86ff;
    color: #ffffff;
    box-shadow: none;
}

[data-theme="light"] .btn-primary:hover {
    background: #0f6ee6;
    border-color: #0f6ee6;
    box-shadow: none;
    color: #ffffff;
}

[data-theme="light"] .btn-success {
    background: #05b169;
    border-color: #05b169;
    color: #ffffff;
    box-shadow: none;
}

[data-theme="light"] .btn-success:hover {
    background: #049a5a;
    border-color: #049a5a;
    box-shadow: none;
    color: #ffffff;
}

[data-theme="light"] .btn-danger {
    background: #df5f67;
    border-color: #df5f67;
    color: #ffffff;
    box-shadow: none;
}

[data-theme="light"] .btn-danger:hover {
    background: #c9444d;
    border-color: #c9444d;
    box-shadow: none;
    color: #ffffff;
}

[data-theme="light"] .btn-warning {
    background: #cb7d18;
    border-color: #cb7d18;
    color: #ffffff;
    box-shadow: none;
}

[data-theme="light"] .btn-warning:hover {
    background: #b26d12;
    border-color: #b26d12;
    color: #ffffff;
    box-shadow: none;
}

[data-theme="light"] .btn-create {
    background: #1a86ff;
    border-color: #1a86ff;
    color: #ffffff;
    box-shadow: none;
    border-radius: var(--radius-md);
}

[data-theme="light"] .btn-create:hover {
    background: #0f6ee6;
    border-color: #0f6ee6;
    box-shadow: none;
    color: #ffffff;
    transform: none;
}

[data-theme="light"] .btn-create:hover i {
    transform: none;
}

[data-theme="light"] .btn-light {
    background: #f7f8fa;
    border-color: #e8ecef;
    color: #0a0b0d;
    box-shadow: none;
}

[data-theme="light"] .btn-light:hover {
    background: #eff1f5;
    border-color: #d1d5db;
    color: #0a0b0d;
    box-shadow: none;
}

[data-theme="light"] .btn-outline-primary {
    background: transparent;
    border: 1px solid #1a86ff;
    color: #1a86ff;
    box-shadow: none;
}

[data-theme="light"] .btn-outline-primary:hover {
    background: #1a86ff;
    border-color: #1a86ff;
    color: #ffffff;
    box-shadow: none;
}

[data-theme="light"] .btn-outline-secondary {
    background: transparent;
    border: 1px solid #e8ecef;
    color: #5b616e;
    box-shadow: none;
}

[data-theme="light"] .btn-outline-secondary:hover {
    background: #f7f8fa;
    border-color: #d1d5db;
    color: #0a0b0d;
    box-shadow: none;
}

[data-theme="light"] .btn-outline-danger {
    background: transparent;
    border: 1px solid #df5f67;
    color: #df5f67;
    box-shadow: none;
}

[data-theme="light"] .btn-outline-danger:hover {
    background: #df5f67;
    border-color: #df5f67;
    color: #ffffff;
    box-shadow: none;
}

[data-theme="light"] .btn-outline-success {
    background: transparent;
    border: 1px solid #05b169;
    color: #05b169;
    box-shadow: none;
}

[data-theme="light"] .btn-outline-success:hover {
    background: #05b169;
    border-color: #05b169;
    color: #ffffff;
    box-shadow: none;
}

[data-theme="light"] .btn-outline-light {
    background: transparent;
    border: 1px solid #e8ecef;
    color: #5b616e;
    box-shadow: none;
}

[data-theme="light"] .btn-outline-light:hover {
    background: #f7f8fa;
    border-color: #d1d5db;
    color: #0a0b0d;
    box-shadow: none;
}

[data-theme="light"] .btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 8px;
}

[data-theme="light"] .btn-lg {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 12px;
}

/* Flat badges - Coinbase style */
[data-theme="light"] .badge {
    background: #eff1f5 !important;
    color: #5b616e !important;
    border-color: transparent;
}

[data-theme="light"] .badge.bg-primary, [data-theme="light"] .bg-primary {
    background: #1a86ff !important;
    color: white !important;
}

[data-theme="light"] .badge.bg-success, [data-theme="light"] .bg-success {
    background: #05b169 !important;
    color: white !important;
}

[data-theme="light"] .badge.bg-danger, [data-theme="light"] .bg-danger {
    background: #df5f67 !important;
    color: white !important;
}

[data-theme="light"] .badge.bg-warning, [data-theme="light"] .bg-warning {
    background: #cb7d18 !important;
    color: #ffffff !important;
}

[data-theme="light"] .badge.bg-secondary, [data-theme="light"] .bg-secondary {
    background: #eff1f5 !important;
    color: #5b616e !important;
}

/* Status badges - soft backgrounds */
[data-theme="light"] .badge-pending {
    background: #fffbeb;
    color: #92600a;
    border-color: #fde68a;
}

[data-theme="light"] .badge-paid,
[data-theme="light"] .badge-completed,
[data-theme="light"] .badge-approved {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

[data-theme="light"] .badge-expired,
[data-theme="light"] .badge-rejected {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

/* Clean tables */
[data-theme="light"] table tbody td {
    background: #ffffff !important;
    border-color: #e8ecef !important;
}

[data-theme="light"] table thead th {
    background: #f7f8fa !important;
    color: #5b616e !important;
    border-color: #e8ecef !important;
    font-weight: 600;
}

[data-theme="light"] table tbody tr:hover td {
    background: #f7f8fa !important;
}

[data-theme="light"] .card .table tbody td,
[data-theme="light"] .card-custom .table tbody td {
    background: transparent !important;
    border-bottom-color: #e8ecef !important;
}

[data-theme="light"] .card .table tbody tr:hover td,
[data-theme="light"] .card-custom .table tbody tr:hover td {
    background: #f7f8fa !important;
}

[data-theme="light"] .table-light,
[data-theme="light"] .table-light > th,
[data-theme="light"] .table-light > td {
    background: #f7f8fa !important;
}

/* Clean tabs and pills */
[data-theme="light"] .nav-tabs {
    border-bottom-color: #e8ecef;
}

[data-theme="light"] .nav-tabs .nav-link {
    color: #6b7280;
    border: none;
    border-bottom: 2px solid transparent;
}

[data-theme="light"] .nav-tabs .nav-link:hover {
    color: #0a0b0d;
    background: transparent;
    border-bottom-color: #d1d5db;
}

[data-theme="light"] .nav-tabs .nav-link.active {
    color: #1a86ff;
    background: transparent;
    border-bottom: 2px solid #1a86ff;
}

[data-theme="light"] .nav-pills .nav-link {
    color: #5b616e;
    background: transparent;
    border-radius: 8px;
}

[data-theme="light"] .nav-pills .nav-link:hover {
    background: #f7f8fa;
    color: #0a0b0d;
}

[data-theme="light"] .nav-pills .nav-link.active {
    background: #1a86ff;
    color: #ffffff;
    box-shadow: none;
}

/* Clean filter buttons */
[data-theme="light"] .filter-btn,
[data-theme="light"] .filter-chip {
    background: #ffffff;
    border-color: #e8ecef;
    color: #5b616e;
    box-shadow: none;
}

[data-theme="light"] .filter-btn.active,
[data-theme="light"] .filter-chip.active {
    background: #1a86ff;
    border-color: #1a86ff;
    box-shadow: none;
    color: #ffffff;
}

[data-theme="light"] .filter-btn:hover,
[data-theme="light"] .filter-chip:hover {
    border-color: #1a86ff;
    color: #1a86ff;
    background: #eff6ff;
}

/* Clean pagination */
[data-theme="light"] .pagination .page-item .page-link {
    background: #ffffff;
    border-color: #e8ecef;
    color: #5b616e;
}

[data-theme="light"] .pagination .page-item .page-link:hover {
    background: #f7f8fa;
    border-color: #d1d5db;
    color: #0a0b0d;
}

[data-theme="light"] .pagination .page-item.active .page-link {
    background: #1a86ff;
    border-color: #1a86ff;
    color: #ffffff;
    box-shadow: none;
}

[data-theme="light"] .pagination .page-item.disabled .page-link {
    background: #f7f8fa;
    border-color: #e8ecef;
    color: #9ca3af;
}

/* Clean modals */
[data-theme="light"] .modal-content {
    background: #ffffff;
    border: 1px solid #e8ecef;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

[data-theme="light"] .modal-header {
    background: #ffffff;
    border-bottom: 1px solid #e8ecef;
    padding: 16px 20px;
}

[data-theme="light"] .modal-header .modal-title {
    color: #0a0b0d;
    font-weight: 600;
}

[data-theme="light"] .modal-body {
    background: #ffffff;
    padding: 20px;
}

[data-theme="light"] .modal-footer {
    background: #ffffff;
    border-top: 1px solid #e8ecef;
    padding: 12px 20px;
}

[data-theme="light"] .modal-backdrop.show {
    opacity: 0.4;
}

/* Clean alerts */
[data-theme="light"] .alert-success {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

[data-theme="light"] .alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

[data-theme="light"] .alert-warning {
    background: #fffbeb;
    color: #92600a;
    border-color: #fde68a;
}

[data-theme="light"] .alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

/* Clean dropdowns */
[data-theme="light"] .dropdown-menu {
    background: #ffffff;
    border: 1px solid #e8ecef;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 4px;
}

[data-theme="light"] .dropdown-item {
    color: #5b616e;
    border-radius: 8px;
    padding: 8px 12px;
}

[data-theme="light"] .dropdown-item:hover,
[data-theme="light"] .dropdown-item:focus {
    background: #f7f8fa;
    color: #0a0b0d;
}

[data-theme="light"] .dropdown-item.active,
[data-theme="light"] .dropdown-item:active {
    background: #eff6ff;
    color: #1a86ff;
}

[data-theme="light"] .dropdown-divider {
    border-color: #e8ecef;
}

/* Notif stack light overrides */
[data-theme="light"] .notif-item {
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
}

/* Clean code blocks */
[data-theme="light"] code {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

/* Docs / playground JSON output stays dark — hl-json spans need dark bg */
[data-theme="light"] pre:not(.ac-out):not(.ac-resp-headers) {
    background: #f7f8fa;
    color: #5b616e;
    border-color: #e8ecef;
}

[data-theme="light"] .api-key-box,
[data-theme="light"] .api-key-display {
    background: #f7f8fa;
    color: #047857;
    border-color: #e8ecef;
}

/* Clean bottom nav */
[data-theme="light"] .bottom-nav {
    background: #f7f8fa;
}

[data-theme="light"] .bottom-nav-container,
[data-theme="light"] .bottom-nav-items {
    background: #ffffff;
    border-color: #e8ecef;
}

[data-theme="light"] .bottom-nav-item {
    color: #6b7280;
}

[data-theme="light"] .bottom-nav-item.active {
    color: #1a86ff;
}

[data-theme="light"] .bottom-nav-fab,
[data-theme="light"] .bottom-nav-add {
    background: #1a86ff;
    box-shadow: 0 2px 8px rgba(26, 134, 255, 0.25);
}

/* Clean user avatar */
[data-theme="light"] .user-avatar,
[data-theme="light"] .profile-avatar {
    background: #1a86ff;
    box-shadow: none;
}

[data-theme="light"] .sidebar-user-info .user-avatar-sm {
    box-shadow: none !important;
}

/* Clean quick action cards */
[data-theme="light"] .quick-action-card {
    background: #ffffff;
    border: 1px solid #e8ecef;
    color: #0a0b0d;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

[data-theme="light"] .quick-action-card:hover {
    border-color: #d1d5db;
    color: #0a0b0d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

[data-theme="light"] .quick-action-btn {
    border: 1px solid #e8ecef;
    background: #ffffff;
    color: #5b616e;
    box-shadow: none;
}

[data-theme="light"] .quick-action-btn:hover {
    border-color: #1a86ff;
    background: #eff6ff;
    color: #1a86ff;
    box-shadow: none;
}

[data-theme="light"] .quick-action-btn i {
    filter: none;
}

/* Clean footer */
[data-theme="light"] .main-footer {
    background: #ffffff;
    border-top: 1px solid #e8ecef;
}

/* Clean settings nav */
[data-theme="light"] .settings-nav .nav-link {
    color: #5b616e;
    background: transparent;
    border-radius: 8px;
}

[data-theme="light"] .settings-nav .nav-link:hover {
    background: #f7f8fa;
    color: #0a0b0d;
}

[data-theme="light"] .settings-nav .nav-link.active {
    background: #1a86ff;
    color: #ffffff;
    box-shadow: none;
}

/* Clean bank option */
[data-theme="light"] .bank-option {
    background: #ffffff;
    border: 1px solid #e8ecef;
    color: #5b616e;
}

[data-theme="light"] .bank-option:hover {
    border-color: #d1d5db;
    background: #f7f8fa;
}

[data-theme="light"] .bank-option.selected {
    background: #eff6ff;
    border-color: #1a86ff;
    box-shadow: none;
    color: #1a86ff;
}

/* Clean withdraw card */
[data-theme="light"] .withdraw-balance-card {
    background: #ffffff;
    border: 1px solid #e8ecef;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Clean input-group */
[data-theme="light"] .input-group-text {
    background: #f7f8fa;
    border-color: #e8ecef;
    color: #5b616e;
}

[data-theme="light"] .input-group:focus-within .input-group-text {
    border-color: #1a86ff;
    color: #1a86ff;
}

/* Clean form-check / switches */
[data-theme="light"] .form-check-input {
    background-color: #ffffff;
    border-color: #d1d5db;
}

[data-theme="light"] .form-check-input:checked {
    background-color: #1a86ff;
    border-color: #1a86ff;
}

[data-theme="light"] .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(26, 134, 255, 0.12);
    border-color: #1a86ff;
}

[data-theme="light"] .form-check-label {
    color: #5b616e;
}

/* Clean menu-toggle */
[data-theme="light"] .menu-toggle {
    background: #f7f8fa;
    border-color: #e8ecef;
    color: #5b616e;
    box-shadow: none;
}

[data-theme="light"] .menu-toggle:hover {
    background: #eff1f5;
    border-color: #d1d5db;
    color: #0a0b0d;
    transform: none;
    box-shadow: none;
}

/* Clean mobile-theme-toggle */
[data-theme="light"] .mobile-theme-toggle {
    background: #f7f8fa;
    border-color: #e8ecef;
    color: #5b616e;
}

[data-theme="light"] .mobile-theme-toggle:hover {
    background: #eff1f5;
    border-color: #d1d5db;
    color: #0a0b0d;
}

/* Clean theme-toggle-btn in sidebar */
[data-theme="light"] .theme-toggle-btn {
    color: #5b616e;
}

[data-theme="light"] .theme-toggle-btn:hover {
    background: #f7f8fa;
    border-color: #e8ecef;
    color: #0a0b0d;
}

[data-theme="light"] .theme-toggle-btn:hover i {
    color: #1a86ff;
}

/* Clean top-bar */
[data-theme="light"] .top-bar {
    background: #ffffff;
    border-bottom: 1px solid #e8ecef;
}

[data-theme="light"] .top-bar h4 {
    color: #0a0b0d;
}

/* Clean upload zone */
[data-theme="light"] .upload-zone {
    background: #ffffff;
    border-color: #e8ecef;
}

[data-theme="light"] .upload-zone:hover,
[data-theme="light"] .upload-zone.dragover {
    border-color: #1a86ff;
    background: #eff6ff;
}

/* Clean announcement bar */
[data-theme="light"] .announcement-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

/* Clean empty state */
[data-theme="light"] .empty-state i {
    opacity: 0.3;
}

/* Clean skeleton loading */
[data-theme="light"] .skeleton {
    background: linear-gradient(90deg, #eff1f5 25%, #e8ecef 50%, #eff1f5 75%);
    background-size: 200% 100%;
}

/* Clean loader */
[data-theme="light"] .loader-spinner::before {
    border-color: #e8ecef;
}

[data-theme="light"] .loader-progress {
    background: #eff1f5;
}

/* Clean selection */
[data-theme="light"] ::selection {
    background: rgba(26, 134, 255, 0.15);
    color: #0a0b0d;
}

/* Image card */
[data-theme="light"] .image-card {
    background: #ffffff;
    border-color: #e8ecef;
}

/* Admin badge */
[data-theme="light"] .admin-badge {
    box-shadow: none;
}

/* Info box */
[data-theme="light"] .info-box {
    background: #eff6ff;
    border-color: #bfdbfe;
}

[data-theme="light"] .config-display {
    background: #f7f8fa;
    border-color: #e8ecef;
}

/* Print keeps as-is */

/* Theme Toggle */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-tertiary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: var(--font-sm);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.theme-toggle-btn:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
    border-color: var(--glass-border);
}

.theme-toggle-btn i {
    font-size: var(--font-md);
    width: 20px;
    text-align: center;
    transition: all var(--duration-normal) var(--ease-bounce);
}

.theme-toggle-btn:hover i {
    transform: scale(1.15);
    color: var(--primary-light);
}

.mobile-theme-toggle {
    background: var(--glass-bg-hover);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.mobile-theme-toggle:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============================================
   Base Reset & Global Styles
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-base);
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(26, 134, 255, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(153, 69, 255, 0.08) 0%, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
    letter-spacing: -0.01em;
}

body.menu-open {
    overflow: hidden;
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* ============================================
   Custom Scrollbar - Minimal
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   Sidebar - Floating Glass Panel
   ============================================ */
.sidebar {
    position: fixed;
    left: var(--space-md);
    top: var(--space-md);
    bottom: var(--space-md);
    width: var(--sidebar-width);
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all var(--duration-normal) var(--ease-out);
    box-shadow: var(--shadow-lg);
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
}

/* Admin Sidebar */
.sidebar.admin-sidebar {
    border-color: rgba(255, 95, 82, 0.15);
    background: linear-gradient(180deg, rgba(255, 95, 82, 0.03) 0%, var(--glass-bg) 50%);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
    font-size: var(--font-lg);
    font-weight: 700;
    letter-spacing: -0.03em;
    position: relative;
}

.sidebar-brand i {
    font-size: var(--font-xl);
    background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px var(--primary-glow));
}

.sidebar-brand::after {
    content: '';
    position: absolute;
    bottom: -var(--space-sm);
    left: var(--space-md);
    right: var(--space-md);
    height: 1px;
    background: linear-gradient(90deg, var(--glass-border), transparent);
}

.admin-badge {
    background: linear-gradient(135deg, var(--danger), #ff3d2e);
    color: white;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 20px var(--accent-red-glow);
    animation: adminPulse 3s ease-in-out infinite;
}

@keyframes adminPulse {
    0%, 100% { box-shadow: 0 4px 15px var(--accent-red-glow); }
    50% { box-shadow: 0 4px 30px var(--accent-red-glow), 0 0 40px var(--accent-red-glow); }
}

/* ============================================
   Sidebar Menu - Organic Items
   ============================================ */
.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-tertiary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: var(--font-sm);
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    border: 1px solid transparent;
}

.sidebar-menu a:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
    transform: translateX(4px);
    border-color: var(--glass-border);
}

.sidebar-menu a.active {
    background: linear-gradient(135deg, rgba(26, 134, 255, 0.12), rgba(26, 134, 255, 0.06));
    color: var(--primary-light);
    font-weight: 600;
    border-color: rgba(26, 134, 255, 0.2);
    box-shadow: 0 4px 20px rgba(26, 134, 255, 0.15);
}

.sidebar-menu a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary), var(--accent-cyan));
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    box-shadow: 0 0 20px var(--primary-glow);
}

.sidebar-menu i {
    font-size: var(--font-md);
    width: 20px;
    text-align: center;
    transition: all var(--duration-normal) var(--ease-bounce);
}

.sidebar-menu a:hover i {
    transform: scale(1.15);
    color: var(--primary-light);
}

.sidebar-menu a.active i {
    color: var(--primary-light);
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.sidebar-divider {
    height: 1px;
    background: var(--glass-border);
    margin: var(--space-sm) var(--space-md);
    border: none;
    opacity: .5;
}

.sidebar-section-title {
    padding: var(--space-sm) var(--space-lg);
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.sidebar-search {
    position: relative;
    display: flex;
    align-items: center;
}
.sidebar-search i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: var(--font-sm);
    pointer-events: none;
}
.sidebar-search input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--font-xs);
    outline: none;
    transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.sidebar-search input::placeholder { color: var(--text-muted); }
.sidebar-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26, 134, 255,.15);
}

/* Sidebar User Info */
.sidebar-user-info {
    background: var(--glass-bg-hover) !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--glass-border) !important;
    padding: var(--space-md) !important;
}

.sidebar-user-info .user-avatar-sm {
    background: linear-gradient(135deg, var(--primary), var(--accent-purple)) !important;
    box-shadow: 0 4px 20px var(--primary-glow);
}

/* ============================================
   Mobile Header - Floating Glass
   ============================================ */
.mobile-header {
    display: none;
    position: fixed;
    top: var(--space-sm);
    left: var(--space-sm);
    right: var(--space-sm);
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 0 var(--space-lg);
    z-index: 999;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
}

.mobile-header .brand {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    letter-spacing: -0.02em;
}

.mobile-header .brand i {
    font-size: 1.3rem;
    background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.menu-toggle {
    background: var(--glass-bg-hover);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: var(--shadow-glow-sm);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================
   Main Content - Spacious Layout
   ============================================ */
.main-content {
    margin-left: calc(var(--sidebar-width) + var(--space-md) * 2);
    padding: var(--space-xl);
    min-height: 100vh;
    transition: margin var(--duration-normal) var(--ease-out);
}

/* ============================================
   Top Bar - Hero Section
   ============================================ */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-2xl);
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.top-bar h4 {
    font-size: clamp(1.125rem, 3vw, 1.375rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 2px;
}

.top-bar p {
    color: var(--text-tertiary);
    font-size: var(--font-sm);
    margin: 0;
}

/* ============================================
   Revolut-style Account Hero (global, reusable)
   ============================================ */
.rev-hero {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    padding: 24px 24px 26px;
    margin-bottom: 22px;
    color: #fff;
    background: linear-gradient(135deg, #1a86ff 0%, #0f6ee6 52%, #0a4fb0 100%);
    box-shadow: 0 20px 46px rgba(26, 134, 255, .32);
}
.rev-hero::after {
    content: '';
    position: absolute;
    top: -45%;
    right: -8%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,.20), transparent 70%);
    pointer-events: none;
}
.rev-hero-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.rev-greet { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.rev-hi { font-size: 1.02rem; font-weight: 750; letter-spacing: -.01em; }
.rev-rating { display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,.18); color: #fff; border-radius: 100px; padding: 4px 11px; font-size: .76rem; font-weight: 800; text-decoration: none; border: 1px solid rgba(255,255,255,.22); }
.rev-rating i { color: #ffd24a; }
.rev-rating:hover { color: #fff; background: rgba(255,255,255,.26); }
.rev-avatar { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; background: rgba(255,255,255,.20); border: 1px solid rgba(255,255,255,.32); display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; color: #fff; text-decoration: none; transition: background .2s; }
.rev-avatar:hover { background: rgba(255,255,255,.3); color: #fff; }

/* ---- Avatars (preset) ---- */
.bgg-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.user-avatar-sm, .profile-avatar, .rev-avatar { overflow: hidden; }

/* Avatar picker (settings) */
.avatar-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 12px; margin: 4px 0 18px; }
.avatar-opt { position: relative; aspect-ratio: 1/1; border-radius: 50%; overflow: hidden; cursor: pointer; border: 3px solid transparent; transition: transform .15s ease, border-color .15s ease; background: var(--glass-bg); }
.avatar-opt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-opt:hover { transform: translateY(-2px); }
.avatar-opt input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-opt.is-selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,134,255,.25); }
.avatar-opt .avatar-check { position: absolute; right: 4px; bottom: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff; display: none; align-items: center; justify-content: center; font-size: .7rem; }
.avatar-opt.is-selected .avatar-check { display: flex; }
.avatar-opt.avatar-initial { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary), var(--accent-purple, #7048e8)); color: #fff; font-weight: 800; font-size: 1.3rem; }
.rev-balance { position: relative; z-index: 1; margin: 24px 0 2px; }
.rev-bal-label { font-size: .85rem; opacity: .9; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.rev-bal-amt { font-size: 2.6rem; font-weight: 850; letter-spacing: -.025em; line-height: 1.08; margin-top: 5px; }
.rev-actions { display: flex; gap: 10px; position: relative; z-index: 1; margin-top: 24px; }
.rev-act { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: #fff; }
.rev-act .ic { width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.26); display: grid; place-items: center; font-size: 1.35rem; transition: transform .2s ease, background .2s ease; }
.rev-act:hover .ic { background: rgba(255,255,255,.30); transform: translateY(-3px); }
.rev-act:active .ic { transform: translateY(0) scale(.95); }
.rev-act.is-active .ic { background: rgba(255,255,255,.34); border-color: rgba(255,255,255,.5); }
.rev-act .lb { font-size: .74rem; font-weight: 650; opacity: .95; white-space: nowrap; }

/* Compact variant for subpages (balance left, actions right) */
.rev-hero.rev-compact { display: flex; align-items: center; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap; padding: 18px 22px; }
.rev-hero.rev-compact .rev-compact-main { min-width: 0; }
.rev-hero.rev-compact .rev-bal-amt { font-size: 1.95rem; margin-top: 2px; }
.rev-actions.rev-actions-compact { margin-top: 0; gap: 14px; flex: 0 0 auto; }
.rev-actions.rev-actions-compact .rev-act { flex: 0 0 auto; }
.rev-actions.rev-actions-compact .ic { width: 46px; height: 46px; font-size: 1.15rem; }

@media (min-width: 992px) {
    .rev-hero { padding: 30px 32px 32px; }
    .rev-hero:not(.rev-compact) .rev-bal-amt { font-size: 3.1rem; }
    .rev-hero:not(.rev-compact) .rev-actions { max-width: 540px; }
    .rev-hero.rev-compact { padding: 22px 30px; }
}
@media (max-width: 575px) {
    .rev-hero { padding: 20px 18px 22px; border-radius: 22px; }
    .rev-hero:not(.rev-compact) .rev-bal-amt { font-size: 2.15rem; }
    .rev-hero:not(.rev-compact) .rev-actions { gap: 6px; }
    .rev-hero:not(.rev-compact) .rev-act .ic { width: 48px; height: 48px; font-size: 1.2rem; }
    .rev-act .lb { font-size: .68rem; }
    .rev-hero.rev-compact { flex-direction: column; align-items: flex-start; gap: 16px; }
    .rev-hero.rev-compact .rev-bal-amt { font-size: 1.8rem; }
    .rev-actions.rev-actions-compact { width: 100%; justify-content: space-between; gap: 8px; }
    .rev-actions.rev-actions-compact .rev-act { flex: 1 1 0; }
    .rev-actions.rev-actions-compact .ic { width: 44px; height: 44px; }
}

/* ============================================
   STANDARDIZED CARD COMPONENT
   Border: 16px | Padding: 16px | Min-height: 72px
   ============================================ */

/* Base Card - ONE COMPONENT FOR ALL */
.card,
.card-custom,
.card-3d-glass,
.card-glass {
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: var(--card-padding);
    min-height: var(--card-min-height);
    box-shadow: var(--shadow-card);
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal) var(--ease-out);
}

.card:hover,
.card-custom:hover,
.card-3d-glass:hover {
    transform: translateY(-2px);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-card-hover);
}

/* Card with flexbox layout for content alignment */
.card-flex {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Card Row Layout (icon left, content center, value right) */
.card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.card-row .card-icon {
    flex-shrink: 0;
}

.card-row .card-content {
    flex: 1;
    min-width: 0;
}

.main-content .card-content,
.main-content .text-value,
.main-content .text-subtitle,
.main-content .text-small {
    min-width: 0;
}

.main-content .text-value,
.main-content .text-small {
    overflow-wrap: anywhere;
}

.card-row .card-value {
    flex-shrink: 0;
    text-align: right;
}

/* Card Header - Standardized */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--card-padding);
    margin: calc(var(--card-padding) * -1);
    margin-bottom: var(--space-md);
    background: transparent;
    border-bottom: 1px solid var(--glass-border);
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.card-header-title {
    font-size: var(--font-title);
    font-weight: 600;
    color: var(--text-primary);
}

/* Card Body */
.card-body {
    flex: 1;
    padding: 0;
}

/* Card Footer */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-md);
    margin-top: auto;
    border-top: 1px solid var(--glass-border);
}

/* ============================================
   Balance Card - Hero Card
   ============================================ */
.balance-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: var(--space-xl);
    min-height: var(--card-min-height);
    box-shadow: var(--shadow-card);
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out);
}

.balance-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover), var(--shadow-glow);
}

.balance-card .label {
    font-size: var(--font-subtitle);
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-xs);
}

.balance-card .amount {
    font-size: var(--font-3xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

/* ============================================
   Stat Cards - Grid 2×2 on Mobile
   Equal height, no empty space on right
   ============================================ */
.stat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: var(--card-padding);
    min-height: var(--card-min-height);
    height: 100%;
    box-shadow: var(--shadow-card);
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-card-hover);
}

/* Stat Card - Icon */
.stat-card .icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-lg);
    margin-bottom: var(--space-md);
    background: var(--glass-bg-hover);
    border: 1px solid var(--glass-border);
    flex-shrink: 0;
}

/* Stat Card - Title (14px semibold) */
.stat-card h3,
.stat-card .stat-value {
    font-size: var(--font-value);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    transition: color var(--duration-normal);
}

.stat-card:hover h3 {
    color: var(--primary-light);
}

/* Stat Card - Subtitle (12px, 60% opacity) */
.stat-card p,
.stat-card .stat-label {
    color: var(--text-tertiary);
    font-size: var(--font-subtitle);
    font-weight: 500;
    margin: 0;
}

/* ============================================
   TYPOGRAPHY CLASSES (STANDARDIZED)
   Title: 14px semibold | Value: 16px bold | Subtitle: 12px 60%
   ============================================ */

/* Title - 14px semibold */
.text-title,
.card-title {
    font-size: var(--font-title);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0;
}

/* Value - 16px bold (for Rp amounts) */
.text-value,
.card-value {
    font-size: var(--font-value);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

/* Value aligned right */
.text-value-right {
    font-size: var(--font-value);
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
}

/* Subtitle - 12px 60% opacity */
.text-subtitle,
.card-subtitle {
    font-size: var(--font-subtitle);
    font-weight: 500;
    color: var(--text-tertiary);
    line-height: 1.4;
    margin: 0;
}

/* Small text */
.text-small {
    font-size: var(--font-sm);
    color: var(--text-muted);
}

/* ============================================
   ICON COMPONENT (Standardized)
   ============================================ */
.card-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-lg);
    background: var(--glass-bg-hover);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    margin-right: var(--space-md);
}

.card-icon.icon-primary { 
    background: var(--info-bg); 
    color: var(--primary-light); 
    border-color: var(--info-border);
}
.card-icon.icon-success { 
    background: var(--success-bg); 
    color: var(--success); 
    border-color: var(--success-border);
}
.card-icon.icon-warning { 
    background: var(--warning-bg); 
    color: var(--warning); 
    border-color: var(--warning-border);
}
.card-icon.icon-danger { 
    background: var(--danger-bg); 
    color: var(--danger); 
    border-color: var(--danger-border);
}

/* ============================================
   Tables - Borderless Premium Design
   ============================================ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    margin: calc(var(--space-md) * -1);
    padding: var(--space-md);
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 var(--space-xs);
    color: var(--text-primary);
    margin: 0;
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: var(--font-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: var(--space-sm) var(--space-md);
    border: none !important;
    background: transparent;
    text-align: left;
}

.table td {
    padding: var(--space-sm) var(--space-md);
    border: none !important;
    background: var(--glass-bg);
    vertical-align: middle;
    font-size: var(--font-sm);
    transition: all var(--duration-fast) var(--ease-out);
}

.table tbody tr {
    transition: all var(--duration-fast) var(--ease-out);
}

.table tbody tr td:first-child {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.table tbody tr td:last-child {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.table tbody tr:hover td {
    background: var(--glass-bg-hover);
}

.table tbody tr:hover {
    transform: scale(1.01);
}

/* Remove all Bootstrap table borders */
.table-bordered, .table-bordered th, .table-bordered td,
.table > :not(caption) > * > * {
    border: none !important;
}

/* Table inside card - seamless integration */
.card .table,
.card-custom .table,
.card-3d-glass .table {
    margin: 0;
}

.card .table thead th,
.card-custom .table thead th {
    background: transparent;
    border-bottom: 1px solid var(--glass-border);
}

.card .table tbody td,
.card-custom .table tbody td {
    background: transparent;
    border-bottom: 1px solid var(--glass-border);
}

.card .table tbody tr:hover td,
.card-custom .table tbody tr:hover td {
    background: var(--glass-bg-hover);
}

/* Bootstrap table overrides for dark mode */
.table-light,
.table-light > th,
.table-light > td {
    background: var(--glass-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--glass-border) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background: var(--glass-bg);
    color: var(--text-primary);
}

.table-hover > tbody > tr:hover > * {
    background: var(--glass-bg-hover) !important;
    color: var(--text-primary);
}

/* Force dark table - override any Bootstrap defaults */
table,
table thead,
table tbody,
table tfoot {
    background: transparent !important;
    color: var(--text-primary) !important;
}

table thead th {
    background: transparent !important;
    color: var(--text-muted) !important;
    border-color: var(--glass-border) !important;
}

table tbody td {
    background: var(--glass-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--glass-border) !important;
}

table tbody tr:hover td {
    background: var(--glass-bg-hover) !important;
}

/* Table responsive wrapper */
.table-responsive {
    background: transparent;
    border: none;
}

/* ============================================
   Badges - Soft Pill Design
   ============================================ */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.badge-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.badge-pending {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: var(--warning-border);
}
.badge-pending::before { background: var(--warning); }

.badge-paid, .badge-completed, .badge-approved {
    background: var(--success-bg);
    color: var(--success);
    border-color: var(--success-border);
}
.badge-paid::before, .badge-completed::before, .badge-approved::before { 
    background: var(--success); 
}

.badge-expired, .badge-rejected {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger-border);
}
.badge-expired::before, .badge-rejected::before { background: var(--danger); }

.badge-cancelled {
    background: var(--glass-bg-hover);
    color: var(--text-tertiary);
    border-color: var(--glass-border);
}
.badge-cancelled::before { background: var(--text-tertiary); }

/* Bootstrap Badge Override */
.badge {
    background: var(--glass-bg-hover) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--glass-border);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    font-weight: 600;
}

.badge.bg-primary, .bg-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    border: none;
}
/* Solid colored badges must keep readable text even if a .text-* class is also applied
   (e.g. .text-primary resolves to a light blue → blue-on-blue). Force white text. */
.badge.bg-primary, .badge.bg-success, .badge.bg-danger { color: #fff !important; }
.badge.bg-primary i, .badge.bg-success i, .badge.bg-danger i { color: #fff !important; }

.badge.bg-success, .bg-success {
    background: linear-gradient(135deg, var(--success), #00a676) !important;
    border: none;
}

.badge.bg-danger, .bg-danger {
    background: linear-gradient(135deg, var(--danger), #e8453a) !important;
    border: none;
}

.badge.bg-warning, .bg-warning {
    background: linear-gradient(135deg, var(--warning), #e6a800) !important;
    color: var(--bg-base) !important;
    border: none;
}

.badge.bg-secondary, .bg-secondary {
    background: var(--glass-bg-active) !important;
    color: var(--text-secondary) !important;
}

/* ============================================
   Buttons - Premium Actions
   ============================================ */
.btn {
    font-weight: 600;
    font-size: var(--font-sm);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-lg);
    border: 1px solid transparent;
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: translateX(-100%);
    transition: transform var(--duration-slow) var(--ease-out);
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn:active {
    transform: scale(0.97);
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--electric-blue));
    color: white;
    box-shadow: 0 4px 24px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px var(--primary-glow), var(--shadow-glow-sm);
    color: white;
}

/* Ghost/Outline Button */
.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary-light);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--primary-glow);
}

.btn-outline-secondary {
    background: transparent;
    border: 1px solid var(--glass-border-hover);
    color: var(--text-secondary);
}

.btn-outline-secondary:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-active);
    color: var(--text-primary);
}

.btn-outline-light {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Create Button */
.btn-create {
    background: linear-gradient(135deg, var(--primary), var(--electric-blue));
    border: none;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-lg);
    font-weight: 600;
    color: white;
    box-shadow: 0 4px 24px var(--primary-glow);
}

.btn-create:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 36px var(--primary-glow), var(--shadow-glow);
    color: white;
}

.btn-create:hover i {
    transform: rotate(90deg);
}

.btn-create i {
    transition: transform var(--duration-normal) var(--ease-bounce);
}

/* Success/Danger/Warning Buttons */
.btn-success {
    background: linear-gradient(135deg, var(--success), #00a676);
    border: none;
    color: white;
    box-shadow: 0 4px 20px var(--accent-green-glow);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px var(--accent-green-glow);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #e8453a);
    border: none;
    color: white;
    box-shadow: 0 4px 20px var(--accent-red-glow);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px var(--accent-red-glow);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #e6a800);
    border: none;
    color: var(--bg-base);
    box-shadow: 0 4px 20px var(--accent-yellow-glow);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px var(--accent-yellow-glow);
    color: var(--bg-base);
}

/* Light Button */
.btn-light {
    background: var(--glass-bg-hover);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-light:hover {
    background: var(--glass-bg-active);
    border-color: var(--glass-border-hover);
    color: white;
}

.btn-close {
    filter: invert(1) brightness(0.7);
    opacity: 0.6;
    transition: opacity var(--duration-fast);
}

.btn-close:hover {
    opacity: 1;
}

/* ============================================
   Form Controls - Minimal Elegant Design
   ============================================ */
.form-control, .form-select {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-sm);
    color: var(--text-primary);
    transition: all var(--duration-normal) var(--ease-out);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus, .form-select:focus {
    background: var(--glass-bg-hover);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26, 134, 255, 0.15), var(--shadow-glow-sm);
    outline: none;
    color: var(--text-primary);
}

.form-control:disabled, .form-control[readonly] {
    background: var(--glass-bg);
    color: var(--text-muted);
    opacity: 0.6;
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba(255,255,255,0.5)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
    padding-right: 40px;
    cursor: pointer;
}

.form-select::-ms-expand {
    display: none;
}

.form-select option {
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: var(--space-sm);
}

.form-select optgroup {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: var(--font-xs);
    padding: var(--space-sm);
}

.form-label {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    font-size: var(--font-xs);
}

.input-group-text {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-tertiary);
    padding: var(--space-md) var(--space-md);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.input-group .form-control {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary);
    color: var(--primary-light);
}

.form-check-input {
    width: 20px;
    height: 20px;
    background-color: var(--glass-bg);
    border: 2px solid var(--glass-border-hover);
    border-radius: 6px;
    transition: all var(--duration-fast);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(26, 134, 255, 0.2);
    border-color: var(--primary);
}

.form-check-label {
    color: var(--text-secondary);
    padding-left: var(--space-xs);
}

/* Override bg-light */
.form-control.bg-light, .bg-light {
    background: var(--glass-bg) !important;
    color: var(--text-tertiary) !important;
}

/* ============================================
   API Key Box - Code Display
   ============================================ */
.api-key-box, .api-key-display {
    background: var(--bg-elevated);
    color: var(--accent-green);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-xl);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    word-break: break-all;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.api-key-box::before, .api-key-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent-cyan), var(--primary));
    background-size: 200% 100%;
    animation: shimmerLine 3s linear infinite;
}

@keyframes shimmerLine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Empty State - Minimal Design
   ============================================ */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    color: var(--text-tertiary);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    opacity: 0.3;
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.empty-state p {
    font-size: 1.125rem;
    margin-bottom: var(--space-lg);
    color: var(--text-secondary);
}

/* ============================================
   Notification Stack - Top Right
   ============================================ */
.notif-stack {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: auto;
}

.notif-item {
    width: auto;
    min-width: 220px;
    max-width: min(360px, calc(100vw - 24px));
    background: var(--bg-surface, #fff);
    border-radius: 12px;
    position: relative;
    box-shadow: 0 4px 16px rgba(0,0,0,.1), 0 1px 4px rgba(0,0,0,.05);
    transform: translateX(calc(100% + 20px));
    opacity: 0;
    transition: transform .4s cubic-bezier(.175,.885,.32,1.15), opacity .35s ease, max-height .4s ease .15s, margin-top .4s ease .15s;
    overflow: hidden;
    pointer-events: auto;
    max-height: 200px;
}
.notif-item.show { transform: translateX(0); opacity: 1; }
.notif-item.hide { transform: translateX(calc(100% + 20px)); opacity: 0; max-height: 0; margin-top: -8px; }

.notif-bar { height: 3px; border-radius: 12px 12px 0 0; }
.notif-bar-fill { height: 100%; background: rgba(255,255,255,.45); width: 0; }
@keyframes notifCountdown { from { width: 0; } to { width: 100%; } }

.notif-body { display: flex; align-items: center; gap: 8px; padding: 10px 30px 10px 10px; }
.notif-icon {
    flex-shrink: 0;
    width: 28px; height: 28px;
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 13px;
}
.notif-text { flex: 1; min-width: 0; }
.notif-title { font-size: 12px; font-weight: 700; color: var(--text-primary, #111827); margin: 0; line-height: 1.3; }
.notif-desc { font-size: 10px; color: var(--text-tertiary, #9CA3AF); margin: 2px 0 0; line-height: 1.4; word-break: break-word; }

.notif-close {
    position: absolute; top: 8px; right: 6px;
    width: 18px; height: 18px; border-radius: 5px; border: none;
    background: transparent; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-tertiary, #D1D5DB); font-size: 10px;
    transition: all .15s; padding: 0;
}
.notif-close:hover { background: rgba(128,128,128,.1); color: var(--text-secondary, #9CA3AF); }

.notif-item.t-success { border: 1px solid rgba(34,197,94,.15); }
.notif-item.t-success .notif-bar { background: linear-gradient(90deg,#22c55e,#16a34a); }
.notif-item.t-success .notif-icon { background: linear-gradient(135deg,#22c55e,#16a34a); }

.notif-item.t-error { border: 1px solid rgba(239,68,68,.15); }
.notif-item.t-error .notif-bar { background: linear-gradient(90deg,#ef4444,#dc2626); }
.notif-item.t-error .notif-icon { background: linear-gradient(135deg,#ef4444,#dc2626); }

.notif-item.t-warning { border: 1px solid rgba(245,158,11,.15); }
.notif-item.t-warning .notif-bar { background: linear-gradient(90deg,#f59e0b,#d97706); }
.notif-item.t-warning .notif-icon { background: linear-gradient(135deg,#f59e0b,#d97706); }

.notif-item.t-info { border: 1px solid rgba(59,130,246,.15); }
.notif-item.t-info .notif-bar { background: linear-gradient(90deg,#3b82f6,#2563eb); }
.notif-item.t-info .notif-icon { background: linear-gradient(135deg,#3b82f6,#2563eb); }

.notif-item.t-loading { border: 1px solid rgba(59,130,246,.15); }
.notif-item.t-loading .notif-bar { background: linear-gradient(90deg,#3b82f6,#2563eb); }
.notif-item.t-loading .notif-icon { background: linear-gradient(135deg,#3b82f6,#2563eb); }
.notif-item.t-loading .notif-icon i { animation: notifSpin .8s linear infinite; }
@keyframes notifSpin { to { transform: rotate(360deg); } }

@media(max-width:480px) {
    .notif-stack { top: 8px; right: 8px; }
}

/* ============================================
   Button Loading Effect
   ============================================ */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: .75;
}
.btn-loading .btn-text { visibility: hidden; }
.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px; height: 16px;
    top: 50%; left: 50%;
    margin: -8px 0 0 -8px;
    border: 2.5px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin .6s linear infinite;
}
.btn-loading.btn-outline-primary::after,
.btn-loading.btn-outline-secondary::after,
.btn-loading.btn-outline-danger::after,
.btn-loading.btn-light::after,
.btn-loading.btn-outline-warning::after {
    border-color: rgba(0,0,0,.15);
    border-top-color: var(--primary, #3b82f6);
}
@keyframes btnSpin { to { transform: rotate(360deg); } }

/* Legacy toast compat (hidden, replaced by notif-stack) */
.toast-container { display: none; }
.custom-toast { display: none; }

/* ============================================
   Tabs - Minimal Underline
   ============================================ */
.nav-tabs {
    border-bottom: 1px solid var(--glass-border);
    gap: var(--space-sm);
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1px;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--text-tertiary);
    font-weight: 600;
    padding: var(--space-md) var(--space-lg);
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: all var(--duration-normal) var(--ease-out);
    background: transparent;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.nav-tabs .nav-link:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.nav-tabs .nav-link.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary);
    background: transparent;
}

/* Pills - Rounded Segments */
.nav-pills .nav-link {
    color: var(--text-tertiary);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-xl);
    font-weight: 600;
    transition: all var(--duration-normal) var(--ease-out);
    background: transparent;
}

.nav-pills .nav-link:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--electric-blue));
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

/* ============================================
   Modals - Floating Glass Panel
   ============================================ */
.modal-content {
    background: var(--bg-secondary);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--glass-border);
    padding: var(--space-md) var(--space-md);
    background: var(--glass-bg);
}

.modal-title {
    color: var(--text-primary);
    font-weight: 700;
    font-size: var(--font-md);
}

.modal-body {
    padding: var(--space-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-footer {
    border-top: 1px solid var(--glass-border);
    padding: var(--space-lg) var(--space-xl);
    background: var(--glass-bg);
    gap: var(--space-sm);
}

.modal-backdrop.show {
    opacity: 0.85;
    backdrop-filter: blur(4px);
}

/* ============================================
   Alerts - Soft Notification Bars
   ============================================ */
.alert.alert-dismissible {
    display: none !important;
}
.alert {
    border-radius: var(--radius-md);
    border: none;
    padding: var(--space-sm) var(--space-md);
    font-weight: 500;
    font-size: var(--font-sm);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: alertSlideIn 0.4s var(--ease-out);
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}

@keyframes alertSlideIn {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}
.alert-success::before { background: var(--success); }

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}
.alert-danger::before { background: var(--danger); }

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}
.alert-warning::before { background: var(--warning); }

.alert-info {
    background: var(--info-bg);
    color: var(--primary-light);
    border: 1px solid var(--info-border);
}
.alert-info::before { background: var(--primary); }

.alert i {
    animation: alertIconPop 0.4s var(--ease-bounce) 0.2s both;
}

@keyframes alertIconPop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* ============================================
   Filter Buttons & Chips
   ============================================ */
.filter-btn, .filter-chip {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-tertiary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--duration-normal) var(--ease-out);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.filter-btn:hover, .filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(26, 134, 255, 0.08);
    transform: translateY(-2px);
}

.filter-btn.active, .filter-chip.active {
    background: linear-gradient(135deg, var(--primary), var(--electric-blue));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 16px var(--primary-glow);
    font-weight: 600;
}

.filters, .filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
}

.filter-card {
    background: var(--glass-bg);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    border: 1px solid var(--glass-border);
}

/* ============================================
   Pagination - Minimal Pills
   ============================================ */
.pagination {
    gap: var(--space-xs);
}

.pagination .page-link {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-tertiary);
    font-weight: 600;
    transition: all var(--duration-normal) var(--ease-out);
}

.pagination .page-link:hover {
    background: var(--glass-bg-hover);
    color: var(--primary-light);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary), var(--electric-blue));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.pagination .page-item.disabled .page-link {
    background: var(--glass-bg);
    color: var(--text-muted);
    opacity: 0.5;
}

/* ============================================
   Loading States
   ============================================ */
.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 2px;
    border-color: var(--primary);
    border-right-color: transparent;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--glass-bg) 25%, var(--glass-bg-hover) 50%, var(--glass-bg) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Code Blocks
   ============================================ */
code {
    background: var(--glass-bg-hover);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--primary-light);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    border: 1px solid var(--glass-border);
}

pre {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    font-size: 0.875rem;
    border: 1px solid var(--glass-border);
}

pre code {
    background: transparent;
    padding: 0;
    border: none;
    color: inherit;
}

/* ============================================
   Bottom Navigation - FIXED 72px
   iOS & Android Safe Design
   ============================================ */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    /* iOS safe area - add padding for home indicator */
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: var(--bg-base);
}

.bottom-nav-container,
.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 72px; /* FIXED: 72px */
    margin: 8px;
    padding: 0 8px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-card);
}

/* Navigation Items */
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 64px;
    min-height: 56px;
    padding: 8px 4px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: var(--font-sm);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: color var(--duration-fast) ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.bottom-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.bottom-nav-item span {
    white-space: nowrap;
    font-size: 10px;
}

/* Active State */
.bottom-nav-item.active {
    color: var(--primary-light);
}

.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* Hover State */
.bottom-nav-item:hover,
.bottom-nav-item:focus {
    color: var(--primary-light);
}

/* Center FAB Button (+) */
.bottom-nav-fab,
.bottom-nav-add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--electric-blue));
    color: white !important;
    font-size: 22px;
    text-decoration: none;
    box-shadow: 0 4px 12px var(--primary-glow);
    transition: transform var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
    position: relative;
    top: -12px;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-fab:hover,
.bottom-nav-fab:focus,
.bottom-nav-add:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px var(--primary-glow);
    color: white !important;
}

.bottom-nav-fab:active,
.bottom-nav-add:active {
    transform: scale(0.95);
}

/* WhatsApp Chat Item */
.bottom-nav-whatsapp:hover,
.bottom-nav-whatsapp:focus {
    color: #25d366;
}

/* Legacy support */
.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    padding: 0 var(--space-xs);
}

.bottom-nav-add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--electric-blue));
    color: white !important;
    font-size: 1.25rem;
    text-decoration: none;
    box-shadow: 0 4px 16px var(--primary-glow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    top: -8px;
    flex-shrink: 0;
}

/* ============================================
   Dropdown Menus
   ============================================ */
.dropdown-menu {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: var(--space-sm);
}

.dropdown-item {
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    transition: all var(--duration-fast);
}

.dropdown-item:hover {
    background: var(--glass-bg-hover);
    color: var(--primary-light);
}

.dropdown-item.active {
    background: var(--primary);
    color: white;
}

.dropdown-divider {
    border-color: var(--glass-border);
    margin: var(--space-xs) 0;
}

/* ============================================
   Section Cards
   ============================================ */
.section-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: var(--space-xl);
}

.section-header {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--glass-bg);
}

.section-header h5 {
    margin: 0;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.section-body {
    padding: var(--space-xl);
}

/* ============================================
   User Avatar
   ============================================ */
.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    box-shadow: 0 8px 36px var(--primary-glow);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.status-inactive {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

/* ============================================
   Quick Action Cards
   ============================================ */
.quick-action-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
}

.quick-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.quick-action-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px var(--primary-glow);
    color: white;
}

.quick-action-card.danger {
    background: linear-gradient(135deg, var(--danger), #e8453a);
}

.quick-action-card.danger:hover {
    box-shadow: 0 16px 40px var(--accent-red-glow);
}

.quick-action-card.success {
    background: linear-gradient(135deg, var(--success), #00a676);
}

.quick-action-card.success:hover {
    box-shadow: 0 16px 40px var(--accent-green-glow);
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--duration-normal) var(--ease-out);
    font-weight: 500;
}

.quick-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(26, 134, 255, 0.08);
    transform: translateX(4px);
}

.quick-action-btn i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

/* ============================================
   Settings Navigation
   ============================================ */
.settings-nav {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: var(--space-sm);
    border: 1px solid var(--glass-border);
}

.settings-nav .nav-link {
    color: var(--text-tertiary);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    font-weight: 600;
    transition: all var(--duration-normal) var(--ease-out);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.settings-nav .nav-link:hover {
    background: var(--glass-bg-hover);
    color: var(--primary-light);
}

.settings-nav .nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--electric-blue));
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.settings-nav .nav-link i {
    font-size: 1.2rem;
}

/* ============================================
   Info Box & Config Display
   ============================================ */
.info-box {
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.config-display {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 2;
    border: 1px solid var(--glass-border);
}

.config-display .key {
    color: var(--text-muted);
}

.config-display .value {
    color: var(--primary-light);
    font-weight: 600;
}

.info-table td {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.info-table tr:last-child td {
    border-bottom: none;
}

/* ============================================
   Admin Stats - Same as stat-card (standardized)
   ============================================ */
.admin-stat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: var(--card-padding);
    min-height: var(--card-min-height);
    height: 100%;
    box-shadow: var(--shadow-card);
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out);
}

.admin-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-card-hover);
}

.admin-stat-card .icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-lg);
    background: var(--glass-bg-hover);
    border: 1px solid var(--glass-border);
    flex-shrink: 0;
}

/* Use standardized typography */
.admin-stat-card h3 {
    font-size: var(--font-value);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.admin-stat-card p {
    color: var(--text-tertiary);
    font-size: var(--font-subtitle);
    font-weight: 500;
    margin: 0;
}

.admin-stat-card small {
    font-size: var(--font-xs);
    color: var(--text-muted);
}

/* ============================================
   Withdrawals & Bank Selection
   ============================================ */
.withdraw-balance-card {
    background: linear-gradient(135deg, var(--success) 0%, #00a676 100%);
    color: white;
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl), 0 8px 36px var(--accent-green-glow);
}

.withdraw-balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 100%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(30deg);
}

.withdraw-balance-card h2 {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.bank-select {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.bank-option {
    padding: var(--space-md);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    font-weight: 600;
    font-size: 0.85rem;
    background: var(--glass-bg);
    color: var(--text-secondary);
}

.bank-option:hover {
    border-color: var(--primary);
    background: rgba(26, 134, 255, 0.08);
}

.bank-option.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--electric-blue));
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.bank-option input {
    display: none;
}

/* ============================================
   Image Grid & Upload - Standardized
   ============================================ */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--card-gap);
}

@media (max-width: 575px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.image-card {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--card-radius);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-card);
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal) var(--ease-out);
}

.image-card:hover {
    transform: translateY(-2px);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-card-hover);
}

.image-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    cursor: pointer;
}

.image-card-body {
    padding: var(--space-md);
}

.image-card-title {
    font-size: var(--font-title);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.image-card-meta {
    font-size: var(--font-xs);
    color: var(--text-muted);
}

.image-status {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-xs);
    font-weight: 600;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.image-status.active {
    background: var(--success-bg);
    color: var(--success);
    border-color: var(--success-border);
}

.image-status.inactive {
    background: var(--glass-bg-hover);
    color: var(--text-muted);
}

.image-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.image-card-actions .btn {
    flex: 1;
    font-size: 11px;
    padding: 4px 8px;
    white-space: nowrap;
}

/* Image Preview Overlay */
.preview-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    padding: 20px;
}

.preview-modal.show {
    opacity: 1;
    visibility: visible;
}

.preview-modal img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.preview-modal .close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 1;
}

.preview-modal .close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 575px) {
    .image-card img {
        height: 120px;
    }
    .image-card-body {
        padding: 10px;
    }
    .image-card-title {
        font-size: 11px;
    }
    .image-card-meta {
        font-size: 10px;
    }
    .image-card-actions .btn {
        font-size: 10px;
        padding: 3px 6px;
    }
}

.upload-zone {
    border: 2px dashed var(--glass-border);
    border-radius: var(--card-radius);
    padding: var(--space-2xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    background: var(--glass-bg);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(26, 134, 255, 0.08);
}

.upload-zone i {
    font-size: 3.5rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

/* ============================================
   Announcement Bar
   ============================================ */
.announcement-bar {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.announcement-info {
    background: var(--info-bg);
    border-color: var(--info-border);
    color: var(--primary-light);
}

.announcement-warning {
    background: var(--warning-bg);
    border-color: var(--warning-border);
    color: var(--warning);
}

.announcement-danger {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: var(--danger);
}

.announcement-success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success);
}

.announcement-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    font-size: 1.2rem;
}

.announcement-content {
    flex: 1;
    overflow: hidden;
}

.marquee-wrapper {
    width: 100%;
    overflow: hidden;
}

.marquee-text {
    display: flex;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
}

.marquee-text span {
    padding-right: 100px;
    font-weight: 500;
    font-size: 0.9375rem;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.announcement-bar:hover .marquee-text {
    animation-play-state: paused;
}

/* ============================================
   Footer - Minimal
   ============================================ */
.main-footer {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: var(--space-xl) var(--space-2xl);
    margin-top: var(--space-3xl);
    margin-left: calc(var(--sidebar-width) + var(--space-md) * 2);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-lg);
    max-width: 1400px;
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    color: var(--text-primary);
}

.footer-brand i {
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: var(--font-xs);
    font-weight: 500;
    padding: 4px var(--space-sm);
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast);
    white-space: nowrap;
}

.footer-links a:hover {
    color: var(--primary-light);
    background: var(--glass-bg-hover);
}

.footer-links a i {
    font-size: var(--font-sm);
}

.footer-links .divider {
    color: var(--text-hint);
    margin: 0 2px;
}

/* Floating Widget Stack (bottom-right, Tawk.to style) */
.floating-widget-stack {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.floating-fab {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid var(--glass-border, rgba(255,255,255,.08));
    background: var(--bg-surface, rgba(30,30,50,.9));
    backdrop-filter: blur(12px);
    color: var(--text-tertiary);
    font-size: 17px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 3px 12px rgba(0,0,0,.15);
    transition: all .25s;
    padding: 0;
}
.floating-fab:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,.22);
    transform: scale(1.08);
}

.support-fab { color: var(--accent-cyan, #00d4ff); }
.support-fab:hover { color: #fff; background: var(--accent-cyan, #00d4ff) !important; border-color: var(--accent-cyan, #00d4ff) !important; }
.support-fab.open { background: var(--accent-cyan, #00d4ff) !important; color: #fff; border-color: transparent !important; }
.theme-fab:hover { color: var(--warning, #ffc53d); }
.cache-fab:hover { color: var(--primary-light, #60a5fa); }

.support-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}
.support-widget-panel {
    position: absolute;
    bottom: 54px; right: -10px;
    background: var(--bg-surface, #1e1e2f);
    border: 1px solid var(--glass-border, rgba(255,255,255,.08));
    border-radius: 14px;
    padding: 12px;
    min-width: 170px;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
    transform: translateY(8px) scale(.92);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s cubic-bezier(.175,.885,.32,1.15), opacity .2s;
}
.support-widget-panel.show {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}
.support-widget-header {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: .5px;
    text-align: center;
    margin-bottom: 8px;
}
.support-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
    margin-bottom: 4px;
}
.support-option:last-child { margin-bottom: 0; }
.support-option i { font-size: 18px; }
.support-wa {
    color: #25d366;
    background: rgba(37, 211, 102, .08);
}
.support-wa:hover {
    background: rgba(37, 211, 102, .18);
    color: #25d366;
}
.support-tg {
    color: #0088cc;
    background: rgba(0, 136, 204, .08);
}
.support-tg:hover {
    background: rgba(0, 136, 204, .18);
    color: #0088cc;
}

[data-theme="light"] .support-widget-panel {
    background: #fff;
    border-color: #e5e7eb;
    box-shadow: 0 8px 32px rgba(0,0,0,.1);
}
.cache-fab.open {
    background: var(--primary, #3b82f6);
    color: #fff;
    border-color: transparent;
}

.cache-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}
.cache-widget-panel {
    position: absolute;
    bottom: 54px; right: -10px;
    background: var(--bg-surface, #1e1e2f);
    border: 1px solid var(--glass-border, rgba(255,255,255,.08));
    border-radius: 14px;
    padding: 16px;
    min-width: 180px;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
    text-align: center;
    transform: translateY(8px) scale(.92);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s cubic-bezier(.175,.885,.32,1.15), opacity .2s;
}
.cache-widget-panel.show {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}
.cache-widget-header {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
    display: flex; align-items: center; justify-content: center; gap: 5px;
}
.cache-widget-header i { font-size: 12px; }
.cache-widget-size {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    font-family: monospace;
    line-height: 1.2;
    margin-bottom: 12px;
}
.cache-widget-clear {
    width: 100%;
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    background: rgba(239,68,68,.1);
    color: #ef4444;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.cache-widget-clear:hover { background: rgba(239,68,68,.2); }
.cache-widget-clear i { font-size: 13px; }

[data-theme="light"] .floating-fab {
    background: #fff;
    border-color: #e5e7eb;
    box-shadow: 0 3px 12px rgba(0,0,0,.06);
}
[data-theme="light"] .cache-widget-panel {
    background: #fff;
    border-color: #e5e7eb;
    box-shadow: 0 8px 32px rgba(0,0,0,.1);
}

@media(max-width:768px) {
    .floating-widget-stack { bottom: 80px; right: 12px; }
    .floating-fab { width: 40px; height: 40px; font-size: 15px; }
}

/* ============================================
   Page Loader
   ============================================ */
.page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg-base);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 99999;
    transition: opacity var(--duration-slow) var(--ease-out), visibility var(--duration-slow);
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
}

.loader-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.loader-logo i {
    background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    animation: loaderPulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 20px var(--primary-glow));
}

@keyframes loaderPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.loader-spinner {
    position: relative;
    width: 56px;
    height: 56px;
}

.loader-spinner::before,
.loader-spinner::after {
    content: '';
    position: absolute;
    border-radius: var(--radius-full);
}

.loader-spinner::before {
    inset: 0;
    border: 2px solid var(--glass-border);
}

.loader-spinner::after {
    inset: 0;
    border: 2px solid transparent;
    border-top-color: var(--primary);
    border-right-color: var(--accent-cyan);
    animation: spin 0.8s linear infinite;
}

.loader-progress {
    width: 160px;
    height: 3px;
    background: var(--glass-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
    animation: loaderProgress 1.2s ease-in-out infinite;
}

@keyframes loaderProgress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.loader-text {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ============================================
   Skeleton page loader (dashboard-shaped, native shimmer)
   Used for first load AND soft-navigation between pages.
   ============================================ */
.page-loader.sk-loader {
    justify-content: flex-start;
    overflow: hidden;
}
.page-loader.sk-soft { animation: bggSkFade .18s ease both; }
@keyframes bggSkFade { from { opacity: 0; } to { opacity: 1; } }
.sk-screen {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    padding: 14px 16px 92px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.sk {
    background: linear-gradient(90deg, rgba(148, 197, 255, .07) 0%, rgba(148, 197, 255, .15) 40%, rgba(148, 197, 255, .07) 80%);
    background-size: 800px 100%;
    animation: bggSkShimmer 1.4s linear infinite;
    border-radius: 10px;
}
[data-theme="light"] .sk {
    background: linear-gradient(90deg, rgba(15, 30, 60, .05) 0%, rgba(15, 30, 60, .11) 40%, rgba(15, 30, 60, .05) 80%);
    background-size: 800px 100%;
}
@keyframes bggSkShimmer {
    0% { background-position: -468px 0; }
    100% { background-position: 468px 0; }
}
/* Top header */
.sk-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 2px 2px;
}
.sk-logo { width: 116px; height: 30px; border-radius: 8px; }
.sk-topbar-actions { display: flex; align-items: center; gap: 10px; }
.sk-chip { width: 44px; height: 30px; border-radius: 999px; }
.sk-avatar { width: 38px; height: 38px; border-radius: 50%; }
/* Cards */
.sk-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.sk-greet-head { display: flex; align-items: center; gap: 14px; }
.sk-circle { width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0; }
.sk-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sk-line { height: 11px; border-radius: 6px; }
.sk-line.w35 { width: 35%; }
.sk-line.w40 { width: 40%; }
.sk-line.w50 { width: 50%; }
.sk-line.w55 { width: 55%; }
.sk-line.w70 { width: 70%; }
.sk-line.w80 { width: 80%; }
.sk-btn-wide { height: 48px; border-radius: 14px; }
.sk-label { width: 140px; height: 12px; border-radius: 6px; margin: 2px 2px -6px; }
/* Balance hero (brand-blue card like the real saldo card) */
.sk-hero2 {
    background: linear-gradient(135deg, rgba(26, 134, 255, .92), rgba(15, 110, 230, .92));
    border: none;
    gap: 14px;
}
.sk-hero2 .sk,
[data-theme="light"] .sk-hero2 .sk {
    background: linear-gradient(90deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .34) 40%, rgba(255, 255, 255, .16) 80%);
    background-size: 800px 100%;
}
.sk-bignum { width: 62%; height: 28px; border-radius: 8px; }
.sk-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.sk-pill2 { width: 96px; height: 34px; border-radius: 999px; }
.sk-input { height: 46px; border-radius: 12px; }
/* Recent list */
.sk-list { display: flex; flex-direction: column; gap: 12px; }
.sk-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}
.sk-row-circle { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; }
.sk-pill { width: 60px; height: 24px; border-radius: 999px; flex-shrink: 0; }
/* Mobile bottom nav */
.sk-bottomnav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 14px;
    background: var(--bg-elevated, #161821);
    border-top: 1px solid var(--glass-border);
}
[data-theme="light"] .sk-bottomnav { background: #ffffff; }
.sk-nav-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sk-nav-ic { width: 24px; height: 24px; border-radius: 8px; }
.sk-nav-tx { width: 40px; height: 8px; border-radius: 4px; }
@media (min-width: 992px) {
    .sk-bottomnav { display: none; }
    .sk-screen { padding-bottom: 32px; max-width: 720px; }
}
@media (prefers-reduced-motion: reduce) {
    .sk { animation: none; }
    .page-loader.sk-soft { animation: none; }
}

/* ============================================
   Connection status — offline banner + error overlay (animated)
   ============================================ */
@keyframes netSpin { to { transform: rotate(360deg); } }
@keyframes netPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(251, 106, 114, .5); } 70% { box-shadow: 0 0 0 11px rgba(251, 106, 114, 0); } }
@keyframes netDots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } 100% { content: ''; } }
@keyframes netFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes netRing { 0% { transform: scale(.5); opacity: .5; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes netBlink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* Offline banner (slides up, auto-dismisses when reconnected) */
.net-banner {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%) translateY(180%);
    z-index: 2147483646;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: calc(100vw - 24px);
    padding: 12px 18px;
    border-radius: 16px;
    background: rgba(20, 22, 30, .94);
    border: 1px solid var(--glass-border);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--text-primary, #f3f5fb);
    opacity: 0;
    transition: transform .45s cubic-bezier(.22, 1, .36, 1), opacity .3s ease;
}
[data-theme="light"] .net-banner { background: rgba(255, 255, 255, .96); color: #0b1220; }
.net-banner.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.net-banner.online { border-color: rgba(45, 212, 167, .42); }
@media (max-width: 991px) { .net-banner { bottom: 80px; } }
.net-ico {
    width: 32px; height: 32px; flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 50%;
    font-size: 1rem;
    background: rgba(251, 106, 114, .16);
    color: #fb6a72;
}
.net-banner.online .net-ico { background: rgba(45, 212, 167, .16); color: #2dd4a7; }
.net-ico.pulse { animation: netPulse 1.5s ease-in-out infinite; }
.net-banner-text { display: flex; flex-direction: column; line-height: 1.3; }
.net-banner-title { font-size: .9rem; font-weight: 700; }
.net-banner-sub { font-size: .74rem; font-weight: 500; opacity: .72; }
.net-dots::after { content: ''; animation: netDots 1.5s steps(1, end) infinite; }

/* Full-screen error overlay (server / connection error) */
.net-overlay {
    position: fixed; inset: 0;
    z-index: 2147483645;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background: rgba(8, 9, 12, .78);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0; visibility: hidden;
    transition: opacity .3s ease, visibility .3s;
}
[data-theme="light"] .net-overlay { background: rgba(247, 248, 250, .88); }
.net-overlay.show { opacity: 1; visibility: visible; }
.net-card {
    width: 100%; max-width: 360px;
    text-align: center;
    background: var(--bg-elevated, #161821);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 32px 24px 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
    transform: translateY(16px) scale(.96);
    transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}
[data-theme="light"] .net-card { background: #fff; }
.net-overlay.show .net-card { transform: translateY(0) scale(1); }
.net-illu { position: relative; width: 96px; height: 96px; margin: 0 auto 18px; display: grid; place-items: center; }
.net-illu i { font-size: 2.7rem; color: var(--primary, #1a86ff); animation: netFloat 2.6s ease-in-out infinite; z-index: 2; }
.net-illu::before, .net-illu::after {
    content: ''; position: absolute; inset: 6px;
    border-radius: 50%;
    border: 2px solid var(--primary, #1a86ff);
    opacity: 0;
    animation: netRing 2.4s ease-out infinite;
}
.net-illu::after { animation-delay: 1.2s; }
.net-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 8px; color: var(--text-primary, #f3f5fb); }
[data-theme="light"] .net-title { color: #0b1220; }
.net-desc { font-size: .88rem; color: var(--text-secondary, rgba(243, 245, 251, .66)); margin-bottom: 22px; line-height: 1.55; }
.net-actions { display: flex; flex-direction: column; gap: 10px; }
.net-btn {
    border: none; border-radius: 14px; padding: 13px 18px;
    font-weight: 700; font-size: .92rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: transform .15s ease, filter .2s ease;
}
.net-btn:active { transform: scale(.97); }
.net-btn-primary { background: var(--primary, #1a86ff); color: #fff; }
.net-btn-primary:hover { filter: brightness(1.08); }
.net-btn-ghost { background: transparent; color: var(--text-secondary, #aab); border: 1px solid var(--glass-border); }
.net-btn .spin { animation: netSpin 1s linear infinite; }
.net-status { margin-top: 16px; font-size: .76rem; color: var(--text-muted, #888); display: flex; align-items: center; justify-content: center; gap: 7px; }
.net-status .dot { width: 7px; height: 7px; border-radius: 50%; background: #fb6a72; animation: netBlink 1.2s ease-in-out infinite; }
.net-status.ok .dot { background: #2dd4a7; }

@media (prefers-reduced-motion: reduce) {
    .net-ico.pulse, .net-illu i, .net-illu::before, .net-illu::after, .net-status .dot, .net-dots::after, .net-btn .spin { animation: none; }
    .net-banner, .net-overlay, .net-card { transition: opacity .2s ease; }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--primary-light) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-dark { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
}

.shadow-glow {
    box-shadow: var(--shadow-glow) !important;
}

.hover-lift {
    transition: transform var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal);
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   Animations
   ============================================ */
.fade-in {
    animation: fadeIn 0.6s var(--ease-out);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.scale-in {
    animation: scaleIn 0.4s var(--ease-bounce);
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.slide-up {
    animation: slideUp 0.5s var(--ease-out);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.float {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 var(--primary-glow); }
    50% { box-shadow: 0 0 30px 8px var(--primary-glow); }
}

/* Staggered Animations */
.stagger-item {
    opacity: 0;
    animation: fadeIn 0.5s var(--ease-out) forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(6) { animation-delay: 0.3s; }

/* ============================================
   Modern User UI Refinement Layer
   Shared by dashboard, tables, forms, and menu
   ============================================ */
.main-content {
    max-width: none;
    width: auto;
}

@media (min-width: 992px) {
    .main-content {
        margin-right: calc(44px + 20px + var(--space-xl));
    }
}

#srvStatusCard {
    margin-top: var(--space-section);
}

.top-bar {
    padding: var(--space-lg);
    background: linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.top-bar::before {
    content: '';
    position: absolute;
    inset: -1px auto auto -1px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(26, 134, 255,.16), transparent 62%);
    pointer-events: none;
}

.top-bar > * {
    position: relative;
    z-index: 1;
}

.top-bar h4 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.top-bar h4 i {
    color: var(--primary-light);
}

.sidebar {
    padding: var(--space-md);
}

.sidebar-brand {
    min-height: 44px;
    margin-bottom: var(--space-md);
}

.sidebar-user-info {
    margin-left: 0;
    margin-right: 0;
}

.sidebar-user-info .user-avatar-sm {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: var(--font-sm);
    flex-shrink: 0;
}

.sidebar-menu {
    gap: 3px;
    padding: 0;
    margin: 0;
}

.sidebar-menu a {
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 12px;
}

.sidebar-menu a .badge {
    margin-left: auto;
    border-radius: 999px;
    line-height: 1;
}

.sidebar-menu a:hover {
    transform: translateX(2px);
}

.sidebar-section-title {
    padding: 10px 10px 5px;
    font-size: .64rem;
    letter-spacing: .12em;
}

.sidebar-divider {
    margin: 7px 10px;
}

.sidebar-search input {
    min-height: 38px;
    border-radius: 12px;
}

.mobile-header {
    height: 58px;
    border-radius: 18px;
}

.mobile-header .brand {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bottom-nav {
    background: linear-gradient(180deg, transparent, var(--bg-base) 30%);
}

.bottom-nav-container,
.bottom-nav-items {
    height: 66px;
    border-radius: 22px;
}

.bottom-nav-item {
    min-height: 52px;
    border-radius: 16px;
}

.bottom-nav-item.active {
    background: var(--info-bg);
}

.bottom-nav-fab,
.bottom-nav-add {
    width: 50px;
    height: 50px;
    top: -11px;
}

.card,
.card-custom,
.stat-card,
.balance-card {
    border-color: rgba(255,255,255,.075);
}

.card-custom.p-4,
.card.p-4 {
    padding: clamp(16px, 2.4vw, 22px) !important;
}

.app-section,
.status-section {
    margin-bottom: var(--space-xl);
}

.status-header,
.section-header,
.app-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.status-header h5,
.section-header h5,
.app-section-header h5 {
    margin: 0;
    color: var(--text-primary);
    font-size: var(--font-lg);
    font-weight: 750;
    letter-spacing: -.02em;
}

.status-header .count,
.app-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--glass-bg-hover);
    border: 1px solid var(--glass-border);
    color: var(--text-tertiary);
    font-size: var(--font-xs);
    font-weight: 700;
}

.payment-tabs,
.app-tabs {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 6px;
    gap: 6px;
}

.payment-tab,
.app-tab {
    min-height: 42px;
    border-radius: 14px !important;
    border-color: transparent !important;
    background: transparent !important;
}

.payment-tab.active,
.app-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--electric-blue)) !important;
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(26, 134, 255,.2);
}

.table-responsive {
    border-radius: var(--radius-lg);
}

.table th,
.mini-table thead th {
    white-space: nowrap;
}

.table td,
.mini-table td {
    color: var(--text-secondary);
}

.invoice-code,
.mono-code,
code {
    font-variant-numeric: tabular-nums;
}

.form-control,
.form-select,
.input-group-text {
    border-radius: 12px;
}

.btn {
    border-radius: 12px;
}

.btn-sm {
    border-radius: 10px;
}

/* Input-group: join children flush regardless of order so a trailing
   button (e.g. "Cari") sits attached to the field instead of detaching
   into a separate rounded pill. */
.input-group > .form-control,
.input-group > .form-select,
.input-group > .input-group-text,
.input-group > .btn {
    border-radius: 0;
}
.input-group > .form-control:first-child,
.input-group > .form-select:first-child,
.input-group > .input-group-text:first-child,
.input-group > .btn:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}
.input-group > .form-control:last-child,
.input-group > .form-select:last-child,
.input-group > .input-group-text:last-child,
.input-group > .btn:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.dashboard-balance-card {
    background:
        radial-gradient(circle at top right, rgba(0,212,255,.16), transparent 32%),
        linear-gradient(135deg, rgba(26, 134, 255,.16), rgba(255,255,255,.035)),
        var(--glass-bg);
}

.dashboard-api-card .api-key-box {
    border-radius: 14px;
    border: 1px dashed var(--glass-border-hover);
    background: var(--glass-bg-hover);
    word-break: break-all;
}

.dashboard-recent-card .card-header {
    margin-bottom: 0;
}

.dashboard-recent-card .table-responsive {
    margin-top: var(--space-sm);
}

.app-search-card .input-group {
    min-height: 44px;
}

.app-data-table tbody td {
    vertical-align: middle;
}

.app-data-table .btn-group,
.app-data-table .d-flex {
    justify-content: center;
}

.create-payment-card .form-label,
.card-custom .form-label {
    color: var(--text-primary);
    font-size: var(--font-sm);
}

.payment-methods-grid {
    gap: 10px !important;
}

.payment-method-card {
    border-radius: 16px !important;
    min-height: 118px;
    background: linear-gradient(180deg, var(--glass-bg-hover), var(--glass-bg)) !important;
}

.btn-check:checked + .payment-method-card {
    box-shadow: 0 10px 24px rgba(26, 134, 255,.18);
}

.payment-method-icon {
    margin-bottom: 8px !important;
}

.app-sticky-panel {
    position: sticky;
    top: var(--space-lg);
}

.settings-nav {
    padding: 8px;
    border-radius: var(--radius-xl);
}

.settings-nav .nav-link {
    min-height: 42px;
    border-radius: 14px;
}

.info-box {
    border-radius: var(--radius-lg) !important;
}

.bgg-card,
.request-panel {
    border-radius: var(--radius-xl) !important;
}

.bgg-stat-grid {
    gap: 10px !important;
}

.bgg-stat {
    border-radius: 14px !important;
}

.bgg-tx-table {
    border-collapse: separate;
    border-spacing: 0 6px;
}

[data-theme="light"] .top-bar {
    background: #fff;
    border-color: #e8ecef;
}

[data-theme="light"] .payment-tabs,
[data-theme="light"] .app-tabs {
    background: #fff;
    border-color: #e8ecef;
}

[data-theme="light"] .bottom-nav {
    background: linear-gradient(180deg, transparent, #f7f8fa 30%);
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 991px) {
    .sidebar {
        position: fixed;
        left: 0;
        right: 0;
        top: calc(var(--header-height) + var(--space-md));
        bottom: auto;
        width: auto;
        max-width: calc(100vw - (2 * var(--space-sm, 8px)));
        max-height: 65vh;
        margin: 0 var(--space-sm);
        border-radius: var(--card-radius);
        transform: translateY(-120%);
        opacity: 0;
        z-index: 1001;
    }
    
    .sidebar.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .sidebar .sidebar-brand {
        display: none;
    }
    
    .mobile-header {
        display: flex;
    }
    
    .bottom-nav {
        display: block;
    }
    
    /* IMPORTANT: Content must not be covered by bottom nav (72px + safe area + margin) */
    .main-content {
        margin-left: 0;
        padding: var(--space-lg);
        padding-top: calc(var(--header-height) + var(--space-xl));
        padding-bottom: calc(72px + 24px + env(safe-area-inset-bottom, 0px));
    }
    
    .main-footer {
        margin-left: 0;
        margin-bottom: calc(72px + 16px + env(safe-area-inset-bottom, 0px));
    }
    
    /* Card grid spacing */
    .row {
        gap: var(--card-gap);
    }
}

@media (max-width: 767px) {
    .main-content {
        padding: var(--space-md);
        padding-top: calc(var(--header-height) + var(--space-lg));
        padding-bottom: calc(72px + 24px + env(safe-area-inset-bottom, 0px));
    }
    
    .top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: var(--card-gap);
        margin-bottom: var(--space-section);
    }
    
    .top-bar h4 {
        font-size: var(--font-lg);
    }
    
    .top-bar .btn-create {
        width: 100%;
        justify-content: center;
    }

    /* When the header has more than one action, lay them out as one balanced
       row (compact secondary button + primary button filling the rest)
       instead of letting a 100%-wide create button push the others to a
       lonely row above. */
    .top-bar-actions {
        width: 100%;
        flex-wrap: nowrap;
    }
    .top-bar-actions .btn-create {
        width: auto;
        flex: 1 1 auto;
    }
    .top-bar-actions > .btn:not(.btn-create) {
        flex: 0 0 auto;
    }
    
    /* Cards - maintain 16px padding, 72px min-height */
    .balance-card,
    .stat-card,
    .card,
    .card-custom {
        padding: var(--card-padding);
        min-height: var(--card-min-height);
    }
    
    .balance-card .amount {
        font-size: var(--font-xl);
    }
    
    .stat-card .icon {
        width: 36px;
        height: 36px;
        font-size: var(--font-lg);
    }
    
    .stat-card h3,
    .stat-card .stat-value {
        font-size: var(--font-value);
    }
    
    .stat-card p,
    .stat-card .stat-label {
        font-size: var(--font-subtitle);
    }
    
    .table th, .table td {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--font-sm);
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
    }
    
    .footer-brand {
        margin-bottom: var(--space-sm);
    }
    
    .footer-links {
        gap: var(--space-xs);
    }
    
    .footer-links a {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .footer-links .divider {
        display: none;
    }
    
    .footer-text {
        font-size: 10px;
        margin-top: var(--space-sm);
    }
}

@media (max-width: 575px) {
    /* Base typography */
    body {
        font-size: 13px;
    }

    /* Input 16px: cegah zoom otomatis Safari/iOS saat fokus */
    .form-control:not(.form-control-sm):not(textarea),
    .form-select:not(.form-select-sm) {
        font-size: 1rem;
    }
    
    /* Main content safe area for bottom nav */
    .main-content {
        padding-bottom: calc(72px + 20px + env(safe-area-inset-bottom, 0px));
    }
    
    /* Button groups stack */
    .balance-card .btn-group-custom {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .balance-card .btn-group-custom .btn {
        width: 100%;
    }
    
    /* Cards - keep standardized padding */
    .balance-card,
    .stat-card,
    .card,
    .card-custom {
        padding: var(--card-padding);
        min-height: var(--card-min-height);
    }
    
    /* Typography - STANDARDIZED */
    .balance-card .amount {
        font-size: var(--font-xl);
    }
    
    .balance-card .label {
        font-size: var(--font-subtitle);
    }
    
    .stat-card .icon {
        width: 36px;
        height: 36px;
        font-size: var(--font-lg);
    }
    
    .stat-card h3,
    .stat-card .stat-value,
    .text-value {
        font-size: var(--font-value);
    }
    
    .stat-card p,
    .stat-card .stat-label,
    .text-subtitle {
        font-size: var(--font-subtitle);
    }
    
    .top-bar h4 {
        font-size: var(--font-title);
    }
    
    .top-bar p {
        font-size: var(--font-subtitle);
    }
    
    .badge-status {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    /* Bottom nav - 72px maintained */
    .bottom-nav-container,
    .bottom-nav-items {
        margin: 6px;
        height: 64px;
    }
    
    .bottom-nav-item {
        font-size: 9px;
        max-width: 56px;
        padding: 6px 2px;
    }
    
    .bottom-nav-item i {
        font-size: 18px;
        margin-bottom: 2px;
    }
    
    .bottom-nav-fab,
    .bottom-nav-add {
        width: 44px;
        height: 44px;
        font-size: 18px;
        top: -10px;
    }
    
    /* Buttons */
    .btn {
        font-size: var(--font-title);
        padding: 10px 16px;
    }
    
    /* Forms */
    .form-control, .form-select {
        font-size: var(--font-title);
        padding: 10px 12px;
    }
    
    /* Tables */
    .table th {
        font-size: var(--font-subtitle);
        padding: 8px;
    }
    
    .table td {
        font-size: var(--font-title);
        padding: 10px 8px;
    }
    
    .card-header {
        padding: var(--space-md) var(--card-padding) !important;
        font-size: 0.75rem;
    }
    
    .modal-title {
        font-size: 0.9rem;
    }
    
    .alert {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.75rem;
    }
    
    /* Modal fullscreen on small mobile */
    .modal-dialog {
        margin: var(--space-sm);
    }
    
    .modal-content {
        border-radius: var(--radius-lg);
    }
    
    /* Dropdown menus */
    .dropdown-menu {
        font-size: 0.8rem;
    }
    
    /* Pagination */
    .pagination .page-link {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    /* Hide long text columns on very small screens */
    .hide-mobile {
        display: none !important;
    }
    
    /* Ensure inputs don't zoom on iOS (font-size >= 16px) */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="url"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* ============================================
   UTILITY CLASSES - Reusable Components
   ============================================ */

/* Card Grid - Consistent 12px gap
   Mobile: Always 2×2 grid (no empty space on right)
   Desktop: 3 or 4 columns
   ============================================ */
.card-grid {
    display: grid;
    gap: var(--card-gap);
    width: 100%;
}

/* Desktop: 2 columns */
.card-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Desktop: 3 columns, Mobile: 2 columns */
.card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Desktop: 4 columns, Mobile: 2×2 grid */
.card-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Tablet: 2 columns for all grids */
@media (max-width: 991px) {
    .card-grid-4 { 
        grid-template-columns: repeat(2, 1fr); 
    }
    .card-grid-3 { 
        grid-template-columns: repeat(2, 1fr); 
    }
}

/* Mobile: Keep 2 columns (2×2 grid for 4 items)
   This ensures no empty space on right side */
@media (max-width: 575px) {
    .card-grid-4,
    .card-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .card-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Ensure equal height */
    .card-grid .stat-card {
        min-height: 110px;
    }
}

/* Very small screens: 1 column only */
@media (max-width: 360px) {
    .card-grid-4,
    .card-grid-3,
    .card-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Section Spacing - 24px gap */
.section {
    margin-bottom: var(--space-section);
}

.section-title {
    font-size: var(--font-title);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--card-gap);
}

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-card { gap: var(--card-gap); }
.gap-section { gap: var(--space-section); }

/* Spacing Utilities */
.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-card { margin-bottom: var(--card-gap); }
.mb-section { margin-bottom: var(--space-section); }

.mt-0 { margin-top: 0; }
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-card { margin-top: var(--card-gap); }
.mt-section { margin-top: var(--space-section); }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Currency/Value alignment */
.currency {
    font-size: var(--font-value);
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .sidebar,
    .mobile-header,
    .sidebar-overlay,
    .bottom-nav,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card-custom, .card-3d-glass, .card-glass {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
