/* ==========================================================================
   InvestPlan SK - Main Theme & Layout Tokens
   ========================================================================== */

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

:root {
    /* Color Palette - Dark Mode (Default) */
    --bg-base: #0a0f1d;
    --bg-surface: #111827;
    --bg-surface-elevated: #1e293b;
    --bg-surface-hover: #26354a;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-focus: rgba(59, 130, 246, 0.5);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Accents */
    --accent-emerald: #10b981;
    --accent-emerald-glow: rgba(16, 185, 129, 0.2);
    --accent-blue: #3b82f6;
    --accent-blue-glow: rgba(59, 130, 246, 0.2);
    --accent-red: #ef4444;
    --accent-red-glow: rgba(239, 68, 68, 0.2);
    --accent-amber: #f59e0b;
    --accent-amber-glow: rgba(245, 158, 11, 0.2);
    --accent-purple: #8b5cf6;

    /* Badges */
    --badge-success-bg: rgba(16, 185, 129, 0.15);
    --badge-success-text: #34d399;
    --badge-primary-bg: rgba(59, 130, 246, 0.15);
    --badge-primary-text: #60a5fa;
    --badge-danger-bg: rgba(239, 68, 68, 0.15);
    --badge-danger-text: #f87171;
    --badge-neutral-bg: rgba(245, 158, 11, 0.15);
    --badge-neutral-text: #fbbf24;

    /* Typography */
    --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Shadows & Radii */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.15);
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f1f5f9;
    --bg-surface-hover: #e2e8f0;
    --border-color: #e2e8f0;
    --border-color-focus: rgba(59, 130, 246, 0.5);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.12);
}

/* Reset & Base Setup */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Layout Container */
.app-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 24px 20px 80px;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
}

.brand-title-area h1 {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-title-area p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Action Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.btn-action:hover {
    background: var(--bg-surface-elevated);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.btn-action.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #ffffff;
}

/* Lang and Theme Pickers */
.segmented-control {
    display: flex;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 3px;
    gap: 2px;
}

.segmented-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.segmented-btn.active {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Two Column Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 28px;
    align-items: start;
}

@media (max-width: 1080px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}
