/*
 * Goldbit Finance - Premium CSS Design System
 * Features: Dark/Light Mode, Glassmorphism, Modern Grids, Sleek Neon Accents, Fluid Micro-Animations
 */

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

:root {
    /* Font family */
    --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Theme transition */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Animations */
    --pulse-glow: glow 2s infinite alternate;
}

/* Default Dark Theme Variables - Luxury Gold & Silver Style */
[data-theme="dark"], :root:not([data-theme="light"]) {
    --bg-primary: #0a0a0c;      /* Onyx / Obsidian Black */
    --bg-secondary: #121216;    /* Deep Premium Dark Slate */
    --bg-glass: rgba(18, 18, 22, 0.8);
    --border-glass: rgba(212, 175, 55, 0.08); /* Luxurious Gold border tint */
    --text-primary: #e2e8f0;    /* Silver Off-white */
    --text-secondary: #94a3b8;  /* Silver Slate Grey */
    --text-muted: #64748b;      /* Muted Charcoal */
    
    --primary: #d4af37;         /* Luxury Metallic Gold */
    --primary-glow: rgba(212, 175, 55, 0.15);
    --secondary: #cbd5e1;       /* Sleek Metallic Brushed Silver */
    --secondary-glow: rgba(203, 213, 225, 0.15);
    --accent: #f8fafc;          /* Pure Platinum White */
    --danger: #ef4444;          /* Crimson Warning Red */
    
    --shadow-premium: 0 30px 60px rgba(0, 0, 0, 0.7);
    --card-glow: 0 0 35px rgba(212, 175, 55, 0.04);
}

/* Light Theme Variables - Champagne Luxury Gold & Platinum Style */
[data-theme="light"] {
    --bg-primary: #fcfbfa;      /* Off-white warm alabaster */
    --bg-secondary: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --border-glass: rgba(212, 175, 55, 0.06);
    --text-primary: #1c1917;    /* Slate Onyx */
    --text-secondary: #78716c;  /* Warm Slate */
    --text-muted: #a8a29e;
    
    --primary: #c5a028;         /* Premium Brushed Gold */
    --primary-glow: rgba(197, 160, 40, 0.08);
    --secondary: #94a3b8;       /* Satin Silver */
    --secondary-glow: rgba(148, 163, 184, 0.08);
    --accent: #475569;
    --danger: #ef4444;
    
    --shadow-premium: 0 20px 40px rgba(28, 25, 23, 0.08);
    --card-glow: 0 0 20px rgba(197, 160, 40, 0.02);
}

/* Reset and Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: var(--transition-smooth);
    background-image: 
        radial-gradient(at 0% 0%, rgba(212, 175, 55, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(203, 213, 225, 0.06) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(255, 255, 255, 0.02) 0px, transparent 60%);
}

body.auth-page {
    background-image: 
        linear-gradient(rgba(8, 10, 15, 0.85), rgba(8, 10, 15, 0.85)), 
        url('../images/login_crypto_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Header & Glassmorphic Navigation */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition-smooth);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary) 70%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.6rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

/* Interactive Layout System */
.main-content {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

/* Glassmorphic Premium Cards */
.premium-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-premium), var(--card-glow);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: var(--transition-smooth);
}

.premium-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.premium-card:hover::before {
    opacity: 1;
}

/* Hero Section */
.hero-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
    padding: 4rem 0;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 40%, var(--text-secondary) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text h1 span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-sphere {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--secondary) 100%);
    filter: blur(60px);
    opacity: 0.35;
    animation: float 8s ease-in-out infinite;
}

.visual-foreground {
    position: absolute;
    width: 280px;
    height: 280px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 32px;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-premium);
    animation: float 6s ease-in-out infinite alternate;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.8rem 1.8rem;
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #f97316 100%);
    color: white;
    box-shadow: 0 10px 20px -10px rgba(249, 115, 22, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -8px rgba(249, 115, 22, 0.5);
}

.btn-secondary {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* Stats Counter Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.stat-item {
    text-align: center;
}

.stat-val {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

.stat-lbl {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Form Design & Floating Inputs */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 0.9rem 1.2rem;
    border-radius: 14px;
    font-size: 1rem;
    width: 100%;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(249, 115, 22, 0.02);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Form Selector Packages */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.package-card {
    border: 2px solid var(--border-glass);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.01);
    position: relative;
}

.package-card input[type="radio"] {
    position: absolute;
    top: 1rem;
    right: 1rem;
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.package-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.package-card:hover {
    border-color: rgba(249, 115, 22, 0.5);
    background: rgba(249, 115, 22, 0.01);
}

.package-card.selected, .package-card:has(input[type="radio"]:checked) {
    border-color: var(--primary);
    background: rgba(249, 115, 22, 0.04);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.15);
}

/* User Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .dashboard-grid, .hero-wrapper {
        grid-template-columns: 1fr;
    }
}

.user-metric-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
}

.metric-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
}

.metric-value.accent-primary {
    color: var(--primary);
}

.metric-value.accent-secondary {
    color: var(--secondary);
}

/* Responsive Custom Tables */
.table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 16px;
    border: 1px solid var(--border-glass);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.custom-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-glass);
}

.custom-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-primary);
}

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

.custom-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-approved {
    background: rgba(249, 115, 22, 0.15);
    color: var(--primary);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.badge-rejected {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Alerts and Notifications */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 14px;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: fade-in 0.3s ease-out;
}

.alert-success {
    background: rgba(249, 115, 22, 0.1);
    color: var(--primary);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Tabs Navigation */
.tab-navigation {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 2rem;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Footer Section */
.main-footer {
    border-top: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.15);
    padding: 3rem 2rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

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

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-link:hover {
    color: var(--text-primary);
}

/* Floating copy widget */
.copy-widget {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.copy-widget:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Keyframes */
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(3deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glow {
    from { box-shadow: 0 0 10px rgba(249, 115, 22, 0.1); }
    to { box-shadow: 0 0 25px rgba(249, 115, 22, 0.3); }
}

/* Sidebar Layout & Vertical Navigation System */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    overflow-x: hidden;
}

.app-sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-glass);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition-smooth);
}

.app-main-wrapper {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0; /* Prevents flex children from overflowing */
    transition: var(--transition-smooth);
}

.app-top-header {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 900;
}

.top-header-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-header-welcome {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Sidebar Navigation Links */
.sidebar-nav {
    margin-top: 3rem;
    flex: 1;
}

.app-sidebar .nav-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0;
    width: 100%;
}

.app-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.2rem;
    color: var(--text-secondary);
    font-weight: 600;
    border-radius: 14px;
    transition: var(--transition-smooth);
    width: 100%;
}

.app-sidebar .nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    transition: var(--transition-smooth);
}

.app-sidebar .nav-link:hover, .app-sidebar .nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.app-sidebar .nav-link.active {
    border-left: 3px solid var(--primary);
    border-radius: 0 14px 14px 0;
    background: rgba(249, 115, 22, 0.08);
    color: var(--primary);
}

.sidebar-footer {
    border-top: 1px solid var(--border-glass);
    padding-top: 1.5rem;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--danger);
    font-weight: 700;
    padding: 0.8rem 1.2rem;
    border-radius: 14px;
    transition: var(--transition-smooth);
    background: rgba(239, 68, 68, 0.05);
    border: 1px dashed rgba(239, 68, 68, 0.2);
    width: 100%;
}

.logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: translateY(-2px);
}

/* Adjust Main Layout Content Padding & Width */
.main-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Adjust Responsive Styles - Premium Sliding Drawer Nav */
@media (max-width: 992px) {
    #sidebarToggleBtn {
        display: flex !important; /* Force show hamburger */
    }

    .app-sidebar {
        position: fixed;
        left: -280px; /* Hide drawer completely offscreen */
        width: 280px;
        top: 0;
        bottom: 0;
        z-index: 2500; /* Float over header and main content */
        box-shadow: 15px 0 45px rgba(0, 0, 0, 0.75);
        border-right: 1px solid rgba(255, 255, 255, 0.08);
        transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .app-sidebar.active {
        left: 0; /* Slide in smoothly */
    }
    
    .app-sidebar .logo {
        font-size: 1.55rem !important;
        justify-content: flex-start;
    }
    
    .app-sidebar .nav-link span,
    .sidebar-footer .theme-toggle-lbl,
    .sidebar-footer span {
        display: inline-block !important; /* Keep text visible in drawer */
    }
    
    .app-sidebar .nav-link {
        justify-content: flex-start !important;
        padding: 0.8rem 1.2rem !important;
        border-radius: 14px !important;
    }
    
    .app-sidebar .nav-link.active {
        border-left: 3px solid var(--primary) !important;
        border-bottom: none !important;
        border-radius: 0 14px 14px 0 !important;
    }
    
    .app-main-wrapper {
        margin-left: 0 !important; /* 100% viewport width for max readability */
        width: 100% !important;
        min-width: 0;
    }
    
    .logout-link {
        justify-content: flex-start !important;
        padding: 0.8rem 1.2rem !important;
        border-radius: 14px !important;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 1.5rem 1rem !important;
    }
    
    .app-top-header {
        padding: 1rem 1rem !important;
    }
    
    h1 {
        font-size: 1.8rem !important;
    }
    
    .metric-value {
        font-size: 1.8rem !important;
    }
}

