/* Design System: Dark Finance (OLED) */
/* Generated based on ui-ux-pro-max recommendations */

:root {
    /* --- Color Palette --- */
    /* Primary (Gold/Amber) - Wealth, Trust */
    --color-primary: #F59E0B;
    /* Amber 500 */
    --color-primary-hover: #D97706;
    /* Amber 600 */
    --color-secondary: #FBBF24;
    /* Amber 400 */

    /* CTA (Electric Blue) - Tech, Professional */
    /* Adjusted from Purple to Blue to match Finance theme */
    --color-cta: #3B82F6;
    /* Blue 500 */
    --color-cta-hover: #2563EB;
    /* Blue 600 */

    /* Backgrounds (Dark Slate) */
    --color-bg-base: #0F172A;
    /* Slate 900 */
    --color-bg-surface: #1E293B;
    /* Slate 800 */
    --color-bg-card: #1E293B;
    /* Slate 800 (Card Base) */
    --color-bg-elevated: #334155;
    /* Slate 700 */

    /* Text */
    --color-text-main: #F8FAFC;
    /* Slate 50 */
    --color-text-muted: #94A3B8;
    /* Slate 400 */
    --color-text-inverted: #0F172A;
    /* Slate 900 */

    /* Semantic (Red/Green) - Pastel/Soft */
    --color-up: #F87171;
    /* Red 400 (Soft Red) */
    --color-down: #34D399;
    /* Emerald 400 (Soft Green) */
    --color-neutral: #94A3B8;
    /* Slate 400 */

    /* --- Typography (Fira Code / Inter) --- */
    /* Using system fonts fallback first for performance, then web fonts */
    --font-heading: 'Fira Code', 'Roboto Mono', monospace;
    --font-body: 'Inter', 'Roboto', 'Segoe UI', sans-serif;

    /* --- Spacing (Comfortable Density) --- */
    --space-xs: 0.5rem;
    /* 8px */
    --space-sm: 0.75rem;
    /* 12px */
    --space-md: 1.25rem;
    /* 20px - Increased from 16px */
    --space-lg: 2rem;
    /* 32px */
    --space-xl: 3rem;
    /* 48px */

    /* --- Effects --- */
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.15);
    --shadow-elevated: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --radius-sm: 0.375rem;
    /* 6px */
    --radius-md: 0.75rem;
    /* 12px */
    --radius-lg: 1rem;
    /* 16px */

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
}

/* Global Reset & Base Styles */
body {
    background-color: var(--color-bg-base);
    color: var(--color-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text-main);
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

/* --- Components --- */

/* Card (Glassmorphism / OLED Friendly) */
.ds-card {
    background-color: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.ds-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Buttons */
.ds-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    text-decoration: none;
}

.ds-btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-inverted);
}

.ds-btn-primary:hover {
    background-color: var(--color-primary-hover);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
    /* Glow effect */
}

.ds-btn-cta {
    background-color: var(--color-cta);
    color: #ffffff;
}

.ds-btn-cta:hover {
    background-color: var(--color-cta-hover);
}

.ds-btn-outline {
    background-color: transparent;
    border: 1px solid var(--color-text-muted);
    color: var(--color-text-main);
}

.ds-btn-outline:hover {
    border-color: var(--color-text-main);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Text Utilities */
.text-gold {
    color: var(--color-primary);
}

.text-blue {
    color: var(--color-cta);
}

.text-up {
    color: var(--color-up);
}

.text-down {
    color: var(--color-down);
}

.text-muted {
    color: var(--color-text-muted);
}

.text-giant {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    font-family: var(--font-heading);
}

.text-big {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Flex Utilities */
.flex-row {
    display: flex;
    flex-direction: row;
    gap: var(--space-sm);
    align-items: center;
}

.flex-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.flex-between {
    justify-content: space-between;
}

.flex-center {
    justify-content: center;
    align-items: center;
}

/* Grid System */
.ds-grid {
    display: grid;
    gap: var(--space-md);
}

.ds-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ds-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ds-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Sidebar Layout Helper */
.layout-container {
    display: flex;
    min-height: 100vh;
}

.layout-sidebar {
    width: 260px;
    background-color: var(--color-bg-surface);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: var(--space-md);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.layout-main {
    flex: 1;
    margin-left: 260px;
    /* Sidebar width */
    padding: var(--space-lg);
    background-color: var(--color-bg-base);
    /* Prevent ultra-wide stretching on large screens */
    width: calc(100% - 260px);
}

/* Container for page content to centralize it on huge screens */
.page-container {
    max-width: 1600px;
    margin: 0 auto;
}

/* Form Elements */
.ds-input {
    background-color: var(--color-bg-base);
    border: 1px solid var(--color-text-muted);
    color: var(--color-text-main);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    width: 100%;
}

.ds-input:focus {
    outline: none;
    border-color: var(--color-cta);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Indicators */
.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.indicator-up {
    background-color: var(--color-up);
    box-shadow: 0 0 5px var(--color-up);
}

.indicator-down {
    background-color: var(--color-down);
}

.indicator-neutral {
    background-color: var(--color-neutral);
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .layout-sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
    }

    .layout-sidebar.open {
        transform: translateX(0);
    }

    .layout-main {
        margin-left: 0;
        padding: var(--space-md);
    }

    .ds-grid-2,
    .ds-grid-3,
    .ds-grid-4 {
        grid-template-columns: 1fr;
    }
}