/* ==============================================================================
   DOLGICONTROL - High-End FinTech & Wealth Design System
   Crafted by Senior Full-Stack & UI/UX Design Engineering
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

:root {
    --bg-main: #060911;
    --bg-surface: rgba(11, 16, 28, 0.72);
    --bg-surface-elevated: rgba(16, 24, 40, 0.88);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(16, 185, 129, 0.4);
    --border-focus: #10b981;
    --emerald-primary: #10b981;
    --emerald-glow: rgba(16, 185, 129, 0.25);
    --rose-debt: #f43f5e;
    --rose-glow: rgba(244, 63, 94, 0.25);
    --amber-gold: #f59e0b;
}

* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

html {
    scroll-padding-top: 85px;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: #f1f5f9;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    padding-bottom: env(safe-area-inset-bottom);
}

/* Background Scene with Photorealistic 3D Ambient Backdrop */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(to bottom, rgba(6, 9, 17, 0.82) 0%, rgba(6, 9, 17, 0.94) 65%, #060911 100%),
        url('/public/img/bg.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    pointer-events: none;
    z-index: -2;
}

/* Ambient Radial Glow Gradients */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(16, 185, 129, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 30%, rgba(20, 184, 166, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 85%, rgba(244, 63, 94, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Glassmorphism Panel with Light-Catch Border */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid var(--border-subtle);
    box-shadow: 
        0 20px 40px -15px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    position: relative;
}

/* Apple-style top highlight sheen on panels */
.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    pointer-events: none;
    border-radius: 9999px;
}

/* Interactive Card Hover Elevate */
.glass-card-hover {
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.glass-card-hover:hover {
    transform: translateY(-3px) scale(1.004);
    background: var(--bg-surface-elevated);
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 
        0 24px 48px -12px rgba(0, 0, 0, 0.75),
        0 0 25px -5px rgba(16, 185, 129, 0.2),
        0 0 0 1px rgba(16, 185, 129, 0.25) inset;
}

/* FinTech Monospace Typography */
.font-money {
    font-family: 'JetBrains Mono', monospace;
    font-feature-settings: 'tnum' on, 'lnum' on;
    letter-spacing: -0.025em;
}

/* Radiant Gradients */
.text-gradient-emerald {
    background: linear-gradient(135deg, #a7f3d0 0%, #34d399 40%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
    background: linear-gradient(135deg, #fef08a 0%, #f59e0b 50%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-rose {
    background: linear-gradient(135deg, #fecdd3 0%, #fb7185 50%, #f43f5e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Mobile Drawer Slide-Down Animation */
@keyframes drawerSlideDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#mobile-nav-drawer:not(.hidden) {
    animation: drawerSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.4);
}

/* Micro-animations */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 15px -3px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 0 28px 2px rgba(16, 185, 129, 0.6);
    }
}

.animate-glow {
    animation: pulseGlow 3s infinite ease-in-out;
}

/* Buttons micro-interaction */
button, a {
    touch-action: manipulation;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active:not(:disabled), a:active {
    transform: scale(0.97);
}

/* Mobile friendly input sizing (Prevent iOS zoom on focus) */
@media (max-width: 640px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Toast Notifications Container */
#toast-container {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    left: 1.25rem;
    max-width: 440px;
    margin-left: auto;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
}

.toast.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}
