/* assets/css/style.css */

:root {
    /* Premium Color Palette */
    --primary-color: #6366f1;
    /* Indigo 500 */
    --primary-hover: #4f46e5;
    /* Indigo 600 */
    --secondary-color: #10b981;
    /* Emerald 500 */
    --accent-color: #f59e0b;
    /* Amber 500 */
    --dark-bg: #111827;
    /* Gray 900 */
    --light-bg: #f9fafb;
    /* Gray 50 */
    --card-bg: #ffffff;
    --text-main: #1f2937;
    /* Gray 800 */
    --text-muted: #6b7280;
    /* Gray 500 */
    --border-color: #e5e7eb;
    /* Gray 200 */
    --glass-bg: rgba(255, 255, 255, 0.95);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    gap: 8px;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--light-bg);
    border-color: var(--text-muted);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 16px;
}

/* Auth Pages - Split Screen */
.auth-container {
    display: flex;
    min-height: 100vh;
    background: white;
}

.auth-sidebar {
    flex: 1;
    background: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.auth-sidebar::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -50px;
    left: -50px;
}

.auth-sidebar::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    bottom: -100px;
    right: -100px;
}

.auth-sidebar-content {
    position: relative;
    z-index: 10;
    max-width: 400px;
    text-align: center;
}

.auth-form-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-form-card {
    width: 100%;
    max-width: 420px;
    animation: fadeIn 0.6s ease-out;
}

.form-floating {
    position: relative;
    margin-bottom: 24px;
}

.form-floating input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    /* Space for icon */
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    transition: var(--transition);
    background: var(--light-bg);
}

.form-floating input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}

/* Landing Page */
.hero-section {
    padding: 120px 0 100px;
    background:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 20%);
    text-align: center;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #1f2937 0%, #4b5563 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.feature-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.2);
}

.feature-icon-wrapper {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: var(--primary-color);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 24px;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.stat-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.icon-blue {
    background: #e0f2fe;
    color: #0284c7;
}

.icon-green {
    background: #d1fae5;
    color: #059669;
}

.icon-purple {
    background: #ede9fe;
    color: #7c3aed;
}

.icon-orange {
    background: #ffedd5;
    color: #ea580c;
}

/* =========================================
   Mobile Optimization & Layout Overhaul
   ========================================= */

/* 1. Mobile Bottom Navigation (Hidden by default) */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--border-color);
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #9ca3af;
    font-size: 11px;
    gap: 4px;
    padding: 5px;
    flex: 1;
}

.mobile-bottom-nav a i {
    font-size: 20px;
    margin-bottom: 2px;
}

.mobile-bottom-nav a.active {
    color: var(--primary-color);
}


/* 2. Responsive Breakpoint (Max Width 768px) */
@media (max-width: 768px) {

    /* --- USER DASHBOARD NAVIGATION (Strict Mode) --- */
    /* Hide Desktop Nav Elements ONLY for User App */
    .user-navbar .nav-menu,
    .user-navbar .menu-toggle,
    .nav-logout,
    .hide-mobile {
        display: none !important;
    }

    /* Show Bottom Nav ONLY if it exists (User Side) */
    .mobile-bottom-nav {
        display: flex !important;
    }

    /* --- LANDING PAGE NAVIGATION (Simple Top Nav) --- */
    /* Ensure Landing Page Nav items are VISIBLE but adjusted */
    .landing-navbar {
        justify-content: center;
        padding: 15px 0;
    }

    .landing-navbar .nav-menu {
        display: flex;
        /* Keep visible */
        gap: 10px;
        margin-top: 10px;
        /* Stack below logo */
    }

    .landing-navbar .nav-container {
        flex-direction: column;
        align-items: center;
    }

    /* Adjust Landing Page Buttons for Mobile */
    .landing-navbar .nav-menu a {
        font-size: 13px;
        padding: 8px 16px;
    }

    /* --- GLOBAL BODY PADDING --- */
    /* Add padding only if bottom nav is present (User Side) */
    body:has(.mobile-bottom-nav) {
        padding-bottom: 80px;
    }

    /* Fallback for older browsers if needed, or stick to generic body padding relative to user-navbar pages?
       For now, let's just apply padding-bottom globally on mobile, it doesn't hurt landing page much */
    body {
        padding-bottom: 80px;
    }

    /* Navbar Header Adjustment */
    .navbar {
        padding: 15px 0;
    }

    /* --- Landing Page Tweaks --- */
    .hero-section {
        padding: 80px 0 60px;
        height: auto !important;
        min-height: auto !important;
    }

    .hero-title {
        font-size: 32px;
    }

    /* Floating Cards Stacking Logic */
    .hero-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-visual {
        display: block !important;
        margin-top: 40px;
        height: auto !important;
    }

    .hero-visual>div {
        height: auto !important;
        position: static !important;
    }

    /* Hide abstract blob on mobile to clean up */
    .hero-visual>div>div:first-child {
        display: none;
    }

    .hero-card-float {
        position: static !important;
        width: 100% !important;
        margin-bottom: 15px;
        animation: none !important;
        transform: none !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        background: white;
    }

    /* --- General Layout Stack --- */
    .container {
        padding: 0 20px;
    }

    /* Force all grids to single column */
    div[style*="display: grid"],
    div[style*="grid-template-columns"],
    .dashboard-grid,
    .withdraw-grid,
    .info-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    /* Full Width Elements */
    .btn {
        width: 100%;
        justify-content: center;
    }

    .feature-card,
    .stat-card {
        text-align: center;
        padding: 24px 20px;
    }

    /* Normalize Stat Card Flex for Stack */
    .stat-card {
        flex-direction: row;
        /* Keep icon and text side-by-side inside card */
        text-align: left;
    }

    /* --- Admin Mobile Specifics --- */
    .admin-container {
        flex-direction: column;
        height: auto !important;
        min-height: auto !important;
    }

    .main-content {
        padding: 15px;
    }
}