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

/* ==========================================================================
   FOREX PREMIUM DESIGN SYSTEM 
   Modern, Ultra-Professional, High-Performance UI
   ========================================================================== */

:root {
    /* Color Palette */
    --color-primary: #0a192f; /* Deep Corporate Navy */
    --color-primary-light: #112240;
    --color-primary-dark: #020c1b;
    --color-accent: #f5a623; /* Premium Gold */
    --color-accent-hover: #d48a12;
    --color-accent-blue: #0d6efd; /* Action Blue */
    --color-accent-blue-hover: #0b5ed7;
    
    /* Light Mode Backgrounds */
    --bg-main: #f8f9fa;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f1f5f9;
    --bg-dark: #0a192f;
    --bg-dark-surface: #112240;

    /* Light Mode Typography */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-light: #f8fafc;
    --text-light-muted: #cbd5e1;

    /* Borders & Shadows */
    --border-color: rgba(15, 23, 42, 0.08);
    --border-color-dark: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(245, 166, 35, 0.2);
    
    /* Radii */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

[data-bs-theme="dark"], [data-theme="dark"] {
    --bg-main: #0b1220;
    --bg-surface: #111827;
    --bg-surface-alt: #1f2937;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --border-color: rgba(255, 255, 255, 0.1);
    --border-color-dark: rgba(255, 255, 255, 0.15);
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   GLOBAL RESET & TYPOGRAPHY
   ========================================================================== */
html, body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

h1, h2, h3, h4, h5, h6, .heading-font {
    font-family: 'Outfit', 'Manrope', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

a {
    color: var(--color-accent-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent-blue-hover);
}

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark-glass-panel {
    background: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.premium-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    overflow: hidden;
}

.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Utilities */
.transition-fast {
    transition: all var(--transition-fast) !important;
}

.hover-primary:hover {
    color: var(--color-primary) !important;
}

.hover-bg-light:hover {
    background-color: var(--bg-surface-alt) !important;
}

/* Dropdown Hover */
@media (min-width: 1200px) {
    .dropdown-hover:hover > .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        margin-top: 0;
    }
    .dropdown-menu-center {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
    }
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
body {
    padding-top: 110px; /* Prevent header overlap for 2-layer header */
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

/* Theme Switcher Button */
.theme-switcher button {
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05), -2px -2px 5px #ffffff;
    transition: all 0.3s ease;
    color: #444;
}

.theme-switcher button:hover {
    transform: translateY(-2px);
    box-shadow: 3px 3px 6px rgba(0,0,0,0.1), -3px -3px 6px #ffffff;
    color: var(--color-primary);
}

[data-theme="dark"] .theme-switcher button {
    border-color: rgba(255, 255, 255, 0.1);
    background: linear-gradient(145deg, #1f2937, #111827);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3), -2px -2px 5px rgba(255,255,255,0.02);
    color: #e5e7eb;
}

[data-theme="dark"] .theme-switcher button:hover {
    transform: translateY(-2px);
    box-shadow: 3px 3px 6px rgba(0,0,0,0.4), -3px -3px 6px rgba(255,255,255,0.03);
    color: var(--color-warning);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
    padding-top: 5px;
    padding-bottom: 5px;
}

.navbar-brand-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand-logo span {
    color: var(--color-accent);
}

.nav-link-custom {
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link-custom:hover, .nav-link-custom.active {
    color: var(--color-primary);
    background: var(--bg-surface-alt);
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-normal), left var(--transition-normal);
}

.nav-link-custom:hover::after, .nav-link-custom.active::after {
    width: 100%;
    left: 0;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-premium {
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    z-index: -1;
    transition: opacity var(--transition-normal);
    opacity: 0;
}

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

.btn-premium:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(10, 25, 47, 0.2);
}

.btn-accent {
    background: var(--color-accent);
    color: var(--color-primary-dark);
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    transition: all var(--transition-normal);
}

.btn-accent:hover {
    background: var(--color-accent-hover);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    padding: 160px 0 100px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(245, 166, 35, 0.1) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #fff;
}

.hero-title span {
    background: linear-gradient(135deg, var(--color-accent), #ffd166);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-light-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ==========================================================================
   ANIMATIONS (AOS / Scroll Effects)
   ========================================================================== */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================================================
   ADMIN & PORTAL LAYOUTS
   ========================================================================== */
.system-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-main);
}

.system-sidebar {
    width: 280px;
    background: var(--color-primary);
    color: var(--text-light);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1040;
    transition: transform var(--transition-normal);
}

.system-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.system-nav .nav-item {
    margin-bottom: 2px;
}

.system-nav .nav-link {
    color: var(--text-light-muted);
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.system-nav .nav-link:hover, .system-nav .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.05);
    border-left-color: var(--color-accent);
}

.system-nav .nav-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.system-main-content {
    flex-grow: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
}

.system-topbar {
    height: 70px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.system-page-content {
    padding: 2rem;
    flex-grow: 1;
}

/* Stat Cards */
.stat-widget {
    padding: 1.5rem;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition-normal);
}

.stat-widget:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
}

.stat-widget-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: rgba(10, 25, 47, 0.05);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-widget-info h5 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-widget-info h3 {
    font-size: 1.75rem;
    margin: 0;
    color: var(--text-primary);
    line-height: 1;
}

/* Mobile Adjustments */
@media (max-width: 991.98px) {
    .system-sidebar {
        transform: translateX(-100%);
    }
    .system-sidebar.show {
        transform: translateX(0);
    }
    .system-main-content {
        margin-left: 0;
    }
}

/* Theme Utilities */
.bg-surface { background-color: var(--bg-surface) !important; }
.text-body { color: var(--text-primary) !important; }

/* ==========================================================================
   PROFILE DASHBOARD LAYOUT
   ========================================================================== */
.profile-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 4rem;
    align-items: start;
}

@media (max-width: 991px) {
    .profile-shell {
        grid-template-columns: 1fr;
    }
}

.profile-menu-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    overflow: hidden;
    position: sticky;
    top: 2rem;
}

.profile-menu-head {
    padding: 2.5rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.05) 0%, rgba(13, 110, 253, 0) 100%);
}

.profile-menu-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent-blue), #0a58ca);
    color: white;
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
}

.profile-menu-head h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.profile-menu-head .muted {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.profile-menu-nav {
    padding: 1rem 0;
}

.profile-menu-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 3px solid transparent;
}

.profile-menu-icon {
    font-family: 'Material Symbols Outlined';
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.profile-menu-link:hover {
    background: var(--bg-surface-alt);
    color: var(--color-accent-blue);
}

.profile-menu-link:hover .profile-menu-icon {
    color: var(--color-accent-blue);
}

.profile-menu-link.active {
    background: rgba(13, 110, 253, 0.08);
    color: var(--color-accent-blue);
    border-left-color: var(--color-accent-blue);
    font-weight: 600;
}

.profile-menu-link.active .profile-menu-icon {
    color: var(--color-accent-blue);
    font-variation-settings: 'FILL' 1;
}

.profile-main-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.profile-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.profile-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.profile-card-header {
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.profile-metric {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
}

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

.profile-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 991px) {
    .profile-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .profile-grid-3 { grid-template-columns: 1fr; }
}

.profile-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
    width: 100%;
    margin-bottom: 0.75rem;
}

.profile-action-primary {
    background: var(--color-accent-blue);
    color: white;
}
.profile-action-primary:hover {
    background: var(--color-accent-blue-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(13,110,253,0.3);
}

.profile-action-secondary {
    background: var(--bg-surface-alt);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.profile-action-secondary:hover {
    background: var(--bg-surface-alt);
    filter: brightness(0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.profile-list-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}
.profile-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.profile-list-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    text-decoration: none;
}
.profile-list-title:hover {
    text-decoration: underline;
    color: var(--color-accent-blue);
}
.profile-list-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   SYSTEM SIDEBAR PROTECTION
   These rules ensure admin-design.css does not leak into the system sidebar.
   ========================================================================== */
.system-sidebar h1, 
.system-sidebar h2, 
.system-sidebar h3, 
.system-sidebar h4, 
.system-sidebar h5, 
.system-sidebar h6,
.system-sidebar .sidebar-heading {
    color: var(--text-light-muted) !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    margin: 0 !important;
    padding: 0 !important;
}

.system-nav .nav-link,
.system-nav .nav-link:link,
.system-nav .nav-link:visited {
    color: var(--text-light-muted) !important;
    padding: 0.8rem 1.5rem !important;
    min-height: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    border: none !important;
    border-left: 3px solid transparent !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

.system-nav .nav-link::before,
.system-nav .nav-link::after {
    display: none !important;
}

.system-nav .nav-link:hover, 
.system-nav .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.05) !important;
    border-left-color: var(--color-accent) !important;
    box-shadow: none !important;
    transform: none !important;
}

.system-sidebar-header .navbar-brand-logo strong,
.system-sidebar-header .navbar-brand-logo span,
.system-sidebar-header .navbar-brand-logo {
    color: #fff !important;
    text-decoration: none !important;
}

/* Ultra Premium Switch Dark Mode Support */
[data-theme="dark"] .form-switch .form-check-input {
    background-color: #334155;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}
[data-theme="dark"] .form-switch .form-check-input::after {
    background-color: #e2e8f0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .form-switch .form-check-input:checked {
    background-color: #3b82f6 !important;
}
[data-theme="dark"] .form-switch .form-check-label {
    color: #e2e8f0;
}


