@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --font-sans: 'Outfit', sans-serif;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Light Mode Palette */
    --bg-app: #f8fafc;
    --bg-surface: rgba(255, 255, 255, 0.8);
    --bg-sidebar: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: rgba(226, 232, 240, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    --card-shadow: 0 4px 20px -2px rgba(148, 163, 184, 0.12);
    --sidebar-width: 260px;
}

[data-theme="dark"] {
    /* Dark Mode Palette */
    --bg-app: #090d16;
    --bg-surface: rgba(17, 24, 39, 0.8);
    --bg-sidebar: #0f172a;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: rgba(51, 65, 85, 0.5);
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --card-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-app);
    color: var(--text-main);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Glassmorphism Card Style */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.15);
}

/* Form Styling */
.form-control, .form-select {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    transition: all 0.2s ease;
}

[data-theme="dark"] .form-control, [data-theme="dark"] .form-select {
    background-color: rgba(0, 0, 0, 0.2);
}

.form-control:focus, .form-select:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    color: var(--text-main);
}

/* Layout Containers */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar-brand {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
}

.sidebar-nav {
    padding: 1rem;
    list-style: none;
    margin: 0;
}

.nav-item {
    margin-bottom: 0.35rem;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link-custom:hover, .nav-link-custom.active {
    background-color: rgba(99, 102, 241, 0.08);
    color: var(--primary);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    padding: 2rem;
    transition: all 0.3s ease;
}

/* Navbar Top bar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Custom Gradients */
.gradient-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.gradient-dark {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.gradient-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Fintech Quick Wallet Widget */
.wallet-card {
    border-radius: 16px;
    color: white;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -5px rgba(99, 102, 241, 0.3);
}

.wallet-card::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

/* Operator Quick Grid (Mobile Friendly) */
.operator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 1rem;
}

.operator-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 0.5rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-main);
}

.operator-item:hover, .operator-item.active {
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.04);
    transform: scale(1.03);
}

.operator-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    background-color: rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    color: var(--primary);
}

/* Theme Switcher */
.theme-switch-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.theme-switch-btn:hover {
    background-color: rgba(99, 102, 241, 0.08);
}

/* Mobile responsive adjustments */
@media (max-width: 991.98px) {
    .sidebar {
        left: -100%;
    }
    .sidebar.show {
        left: 0;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }
    .topbar {
        margin-bottom: 1.5rem;
    }
}
