/* FX Trader - Combined Styles with Theme Support */

/* ============ THEME: DEFAULT ============ */
:root, [data-theme="default"] {
    --bg-primary: #f3f4f6;
    --bg-card: #ffffff;
    --bg-card-secondary: #f9fafb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --accent-color: #3b82f6;
    --accent-blue: #3b82f6;
    --accent-green: #16a34a;
    --accent-red: #dc2626;
    --accent-orange: #f59e0b;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --input-bg: #ffffff;
    --input-border: #d1d5db;
    --input-text: #1f2937;
    --btn-primary-bg: #3b82f6;
    --btn-primary-text: #ffffff;
    --btn-secondary-bg: #e5e7eb;
    --btn-secondary-text: #374151;
    --tab-active: #3b82f6;
    --tab-inactive: #6b7280;
}

[data-theme="default"] body,
[data-theme="default"] html,
[data-theme="default"] .min-h-screen {
    background-color: #f3f4f6 !important;
    color: #1f2937 !important;
}

/* ============ THEME: FUTURISTIC ============ */
[data-theme="futuristic"] {
    --bg-primary: #0a0a0f;
    --bg-card: #12121f;
    --bg-card-secondary: #1a1a2e;
    --text-primary: #f0f4ff;
    --text-secondary: #c7d2fe;
    --text-muted: #818cf8;
    --border-color: #4c1d95;
    --accent-color: #a78bfa;
    --accent-blue: #818cf8;
    --accent-green: #34d399;
    --accent-red: #fb7185;
    --accent-orange: #c084fc;
    --shadow: 0 0 20px rgba(139, 92, 246, 0.2);
    --input-bg: #1e1e35;
    --input-border: #5b21b6;
    --input-text: #f0f4ff;
    --btn-primary-bg: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    --btn-primary-text: #ffffff;
    --btn-secondary-bg: #3f3f5a;
    --btn-secondary-text: #f0f4ff;
    --tab-active: #a78bfa;
    --tab-inactive: #818cf8;
}

[data-theme="futuristic"] body,
[data-theme="futuristic"] html,
[data-theme="futuristic"] .min-h-screen {
    background: linear-gradient(135deg, #0a0a0f 0%, #0f0f1a 50%, #1a1a2e 100%) !important;
    background-color: #0a0a0f !important;
    background-attachment: fixed !important;
    font-family: 'Orbitron', 'Segoe UI', sans-serif;
    color: #f0f4ff !important;
}

[data-theme="futuristic"] .app-title {
    background: linear-gradient(90deg, #e0e7ff 0%, #c084fc 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

[data-theme="futuristic"] .bg-white,
[data-theme="futuristic"] .settings-section {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

[data-theme="futuristic"] .bg-gray-100 {
    background-color: var(--bg-primary) !important;
}

[data-theme="futuristic"] input,
[data-theme="futuristic"] textarea,
[data-theme="futuristic"] select {
    background-color: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--input-text) !important;
}

[data-theme="futuristic"] input:focus,
[data-theme="futuristic"] textarea:focus,
[data-theme="futuristic"] select:focus {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3) !important;
    outline: none !important;
}

[data-theme="futuristic"] select option {
    background-color: #1a1a2e;
    color: #e0e7ff;
}

/* ============ THEME: BLOOMBERG ============ */
[data-theme="bloomberg"] {
    --bg-primary: #000000;
    --bg-card: #1a1a1a;
    --bg-card-secondary: #262626;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --border-color: #444444;
    --accent-color: #ff6600;
    --accent-blue: #33aaff;
    --accent-green: #00dd00;
    --accent-red: #ff4444;
    --accent-orange: #ff6600;
    --shadow: 0 2px 8px rgba(0,0,0,0.5);
    --input-bg: #222222;
    --input-border: #555555;
    --input-text: #ffffff;
    --btn-primary-bg: #ff6600;
    --btn-primary-text: #000000;
    --btn-secondary-bg: #444444;
    --btn-secondary-text: #ffffff;
    --tab-active: #ff6600;
    --tab-inactive: #888888;
}

[data-theme="bloomberg"] body,
[data-theme="bloomberg"] html,
[data-theme="bloomberg"] .min-h-screen {
    background: #000000 !important;
    background-color: #000000 !important;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #ffffff !important;
}

[data-theme="bloomberg"] .app-title {
    color: #ff6600;
    font-weight: 700;
    letter-spacing: 2px;
}

[data-theme="bloomberg"] .bg-white,
[data-theme="bloomberg"] .settings-section {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color);
}

[data-theme="bloomberg"] .bg-gray-100 {
    background-color: var(--bg-primary) !important;
}

[data-theme="bloomberg"] input,
[data-theme="bloomberg"] textarea,
[data-theme="bloomberg"] select {
    background-color: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--input-text) !important;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

[data-theme="bloomberg"] input:focus,
[data-theme="bloomberg"] textarea:focus,
[data-theme="bloomberg"] select:focus {
    border-color: var(--accent-color) !important;
    outline: none !important;
}

[data-theme="bloomberg"] select option {
    background-color: #2d2d2d;
    color: #ffffff;
}

[data-theme="bloomberg"] .pnl-positive { color: var(--accent-green); }
[data-theme="bloomberg"] .pnl-negative { color: var(--accent-red); }

/* ============ THEME: NEON ============ */
[data-theme="neon"] {
    --bg-primary: #0a0a0a;
    --bg-card: #141414;
    --bg-card-secondary: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #dddddd;
    --text-muted: #aaaaaa;
    --border-color: #333333;
    --accent-color: #00ff88;
    --accent-blue: #00ccff;
    --accent-green: #00ff88;
    --accent-red: #ff3366;
    --accent-orange: #ff8800;
    --shadow: 0 0 20px rgba(0, 255, 136, 0.2);
    --input-bg: #1e1e1e;
    --input-border: #444444;
    --input-text: #ffffff;
    --btn-primary-bg: linear-gradient(135deg, #00ff88 0%, #00ccff 100%);
    --btn-primary-text: #000000;
    --btn-secondary-bg: #333333;
    --btn-secondary-text: #ffffff;
    --tab-active: #00ff88;
    --tab-inactive: #aaaaaa;
}

[data-theme="neon"] body,
[data-theme="neon"] html,
[data-theme="neon"] .min-h-screen {
    background: linear-gradient(135deg, #0a0a0a 0%, #0d050d 50%, #050d0d 100%) !important;
    background-color: #0a0a0a !important;
    background-attachment: fixed !important;
    color: #ffffff !important;
}

[data-theme="neon"] .app-title {
    background: linear-gradient(90deg, #00ff88 0%, #ff6600 50%, #ff3366 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    animation: neonGlow 2s ease-in-out infinite alternate;
}

@keyframes neonGlow {
    from { filter: drop-shadow(0 0 5px #00ff88); }
    to { filter: drop-shadow(0 0 15px #00ff88); }
}

[data-theme="neon"] .bg-white,
[data-theme="neon"] .settings-section {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.1);
}

[data-theme="neon"] .bg-gray-100 {
    background-color: var(--bg-primary) !important;
}

[data-theme="neon"] input,
[data-theme="neon"] textarea,
[data-theme="neon"] select {
    background-color: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--input-text) !important;
}

[data-theme="neon"] input:focus,
[data-theme="neon"] textarea:focus,
[data-theme="neon"] select:focus {
    border-color: var(--accent-green) !important;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3) !important;
    outline: none !important;
}

[data-theme="neon"] select option {
    background-color: #262626;
    color: #ffffff;
}

[data-theme="neon"] .pnl-positive { color: var(--accent-green); text-shadow: 0 0 5px rgba(0, 255, 136, 0.5); }
[data-theme="neon"] .pnl-negative { color: var(--accent-red); text-shadow: 0 0 5px rgba(255, 51, 102, 0.5); }

/* ============ BASE BODY STYLING ============ */
html, body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Force background on app container */
#app {
    background-color: transparent !important;
}

/* Ensure min-h-screen doesn't override background */
.min-h-screen {
    background-color: var(--bg-primary) !important;
}

/* ============ AGGRESSIVE DARK THEME OVERRIDES ============ */
/* These must override Tailwind's utility classes */

[data-theme="futuristic"],
[data-theme="bloomberg"],
[data-theme="neon"] {
    color-scheme: dark;
}

/* Force dark backgrounds on html and body */
[data-theme="futuristic"] html,
[data-theme="futuristic"] body,
[data-theme="bloomberg"] html,
[data-theme="bloomberg"] body,
[data-theme="neon"] html,
[data-theme="neon"] body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* Override ALL white and gray backgrounds */
[data-theme="futuristic"] .bg-white,
[data-theme="futuristic"] .bg-gray-50,
[data-theme="futuristic"] .bg-gray-100,
[data-theme="futuristic"] .bg-gray-200,
[data-theme="bloomberg"] .bg-white,
[data-theme="bloomberg"] .bg-gray-50,
[data-theme="bloomberg"] .bg-gray-100,
[data-theme="bloomberg"] .bg-gray-200,
[data-theme="neon"] .bg-white,
[data-theme="neon"] .bg-gray-50,
[data-theme="neon"] .bg-gray-100,
[data-theme="neon"] .bg-gray-200 {
    background-color: var(--bg-card) !important;
}

/* Override blue buttons to theme accent */
[data-theme="futuristic"] .bg-blue-600,
[data-theme="futuristic"] .bg-blue-500,
[data-theme="futuristic"] .bg-blue-700,
[data-theme="futuristic"] button.bg-blue-600,
[data-theme="futuristic"] a.bg-blue-600 {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
    color: #ffffff !important;
    border: none !important;
}

[data-theme="bloomberg"] .bg-blue-600,
[data-theme="bloomberg"] .bg-blue-500,
[data-theme="bloomberg"] .bg-blue-700,
[data-theme="bloomberg"] button.bg-blue-600,
[data-theme="bloomberg"] a.bg-blue-600 {
    background-color: #ff6600 !important;
    background: #ff6600 !important;
    color: #000000 !important;
    font-weight: 600 !important;
    border: none !important;
}

[data-theme="neon"] .bg-blue-600,
[data-theme="neon"] .bg-blue-500,
[data-theme="neon"] .bg-blue-700,
[data-theme="neon"] button.bg-blue-600,
[data-theme="neon"] a.bg-blue-600 {
    background: linear-gradient(135deg, #00ff88 0%, #00ccff 100%) !important;
    color: #000000 !important;
    font-weight: 600 !important;
    border: none !important;
}

/* Override green buttons */
[data-theme="futuristic"] .bg-green-600,
[data-theme="futuristic"] .bg-green-500,
[data-theme="futuristic"] .bg-green-700,
[data-theme="futuristic"] button.bg-green-600 {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: none !important;
}

[data-theme="bloomberg"] .bg-green-600,
[data-theme="bloomberg"] .bg-green-500,
[data-theme="bloomberg"] .bg-green-700,
[data-theme="bloomberg"] button.bg-green-600 {
    background-color: #00dd00 !important;
    background: #00dd00 !important;
    color: #000000 !important;
    font-weight: 600 !important;
    border: none !important;
}

[data-theme="neon"] .bg-green-600,
[data-theme="neon"] .bg-green-500,
[data-theme="neon"] .bg-green-700,
[data-theme="neon"] button.bg-green-600 {
    background: linear-gradient(135deg, #00ff88 0%, #34d399 100%) !important;
    color: #000000 !important;
    font-weight: 600 !important;
    border: none !important;
}

/* Small badge buttons */
[data-theme="futuristic"] .bg-blue-100,
[data-theme="futuristic"] .bg-purple-100,
[data-theme="futuristic"] .bg-red-100 {
    background-color: rgba(139, 92, 246, 0.2) !important;
}

[data-theme="bloomberg"] .bg-blue-100,
[data-theme="bloomberg"] .bg-purple-100,
[data-theme="bloomberg"] .bg-red-100 {
    background-color: rgba(255, 102, 0, 0.2) !important;
}

[data-theme="neon"] .bg-blue-100,
[data-theme="neon"] .bg-purple-100,
[data-theme="neon"] .bg-red-100 {
    background-color: rgba(0, 255, 136, 0.2) !important;
}

/* Override gray buttons */
[data-theme="futuristic"] .bg-gray-200,
[data-theme="futuristic"] .bg-gray-300,
[data-theme="bloomberg"] .bg-gray-200,
[data-theme="bloomberg"] .bg-gray-300,
[data-theme="neon"] .bg-gray-200,
[data-theme="neon"] .bg-gray-300 {
    background-color: var(--btn-secondary-bg) !important;
    color: var(--btn-secondary-text) !important;
}

/* Override all text colors */
[data-theme="futuristic"] .text-gray-800,
[data-theme="futuristic"] .text-gray-700,
[data-theme="futuristic"] .text-gray-900,
[data-theme="bloomberg"] .text-gray-800,
[data-theme="bloomberg"] .text-gray-700,
[data-theme="bloomberg"] .text-gray-900,
[data-theme="neon"] .text-gray-800,
[data-theme="neon"] .text-gray-700,
[data-theme="neon"] .text-gray-900 {
    color: var(--text-primary) !important;
}

[data-theme="futuristic"] .text-gray-600,
[data-theme="futuristic"] .text-gray-500,
[data-theme="futuristic"] .text-gray-400,
[data-theme="bloomberg"] .text-gray-600,
[data-theme="bloomberg"] .text-gray-500,
[data-theme="bloomberg"] .text-gray-400,
[data-theme="neon"] .text-gray-600,
[data-theme="neon"] .text-gray-500,
[data-theme="neon"] .text-gray-400 {
    color: var(--text-secondary) !important;
}

/* Override border colors */
[data-theme="futuristic"] .border-gray-200,
[data-theme="futuristic"] .border-gray-300,
[data-theme="futuristic"] .border-gray-100,
[data-theme="futuristic"] .border-b,
[data-theme="bloomberg"] .border-gray-200,
[data-theme="bloomberg"] .border-gray-300,
[data-theme="bloomberg"] .border-gray-100,
[data-theme="bloomberg"] .border-b,
[data-theme="neon"] .border-gray-200,
[data-theme="neon"] .border-gray-300,
[data-theme="neon"] .border-gray-100,
[data-theme="neon"] .border-b {
    border-color: var(--border-color) !important;
}

/* Override blue text colors to accent */
[data-theme="futuristic"] .text-blue-600,
[data-theme="futuristic"] .text-blue-500,
[data-theme="futuristic"] .text-blue-800,
[data-theme="bloomberg"] .text-blue-600,
[data-theme="bloomberg"] .text-blue-500,
[data-theme="bloomberg"] .text-blue-800,
[data-theme="neon"] .text-blue-600,
[data-theme="neon"] .text-blue-500,
[data-theme="neon"] .text-blue-800 {
    color: var(--accent-color) !important;
}

/* Override border-blue for active tabs */
[data-theme="futuristic"] .border-blue-600,
[data-theme="bloomberg"] .border-blue-600,
[data-theme="neon"] .border-blue-600 {
    border-color: var(--accent-color) !important;
}

/* Green and red text */
[data-theme="futuristic"] .text-green-600,
[data-theme="futuristic"] .text-green-700,
[data-theme="bloomberg"] .text-green-600,
[data-theme="bloomberg"] .text-green-700,
[data-theme="neon"] .text-green-600,
[data-theme="neon"] .text-green-700 {
    color: var(--accent-green) !important;
}

[data-theme="futuristic"] .text-red-600,
[data-theme="futuristic"] .text-red-700,
[data-theme="bloomberg"] .text-red-600,
[data-theme="bloomberg"] .text-red-700,
[data-theme="neon"] .text-red-600,
[data-theme="neon"] .text-red-700 {
    color: var(--accent-red) !important;
}

/* Override colored backgrounds for form elements */
[data-theme="futuristic"] .bg-green-50,
[data-theme="futuristic"] .bg-green-100,
[data-theme="futuristic"] .bg-red-50,
[data-theme="futuristic"] .bg-red-100,
[data-theme="futuristic"] .bg-blue-50,
[data-theme="futuristic"] .bg-blue-100,
[data-theme="bloomberg"] .bg-green-50,
[data-theme="bloomberg"] .bg-green-100,
[data-theme="bloomberg"] .bg-red-50,
[data-theme="bloomberg"] .bg-red-100,
[data-theme="bloomberg"] .bg-blue-50,
[data-theme="bloomberg"] .bg-blue-100,
[data-theme="neon"] .bg-green-50,
[data-theme="neon"] .bg-green-100,
[data-theme="neon"] .bg-red-50,
[data-theme="neon"] .bg-red-100,
[data-theme="neon"] .bg-blue-50,
[data-theme="neon"] .bg-blue-100 {
    background-color: var(--bg-card-secondary) !important;
}

/* Override colored borders for form elements */
[data-theme="futuristic"] .border-green-300,
[data-theme="futuristic"] .border-red-300,
[data-theme="futuristic"] .border-blue-300,
[data-theme="bloomberg"] .border-green-300,
[data-theme="bloomberg"] .border-red-300,
[data-theme="bloomberg"] .border-blue-300,
[data-theme="neon"] .border-green-300,
[data-theme="neon"] .border-red-300,
[data-theme="neon"] .border-blue-300 {
    border-color: var(--border-color) !important;
}

/* Override small colored buttons/badges */
[data-theme="futuristic"] .bg-blue-100,
[data-theme="futuristic"] .bg-purple-100,
[data-theme="futuristic"] .bg-gray-100,
[data-theme="futuristic"] .bg-red-100,
[data-theme="bloomberg"] .bg-blue-100,
[data-theme="bloomberg"] .bg-purple-100,
[data-theme="bloomberg"] .bg-gray-100,
[data-theme="bloomberg"] .bg-red-100,
[data-theme="neon"] .bg-blue-100,
[data-theme="neon"] .bg-purple-100,
[data-theme="neon"] .bg-gray-100,
[data-theme="neon"] .bg-red-100 {
    background-color: var(--bg-card-secondary) !important;
}

[data-theme="futuristic"] .text-blue-700,
[data-theme="futuristic"] .text-purple-700,
[data-theme="bloomberg"] .text-blue-700,
[data-theme="bloomberg"] .text-purple-700,
[data-theme="neon"] .text-blue-700,
[data-theme="neon"] .text-purple-700 {
    color: var(--accent-color) !important;
}

/* Hover states */
[data-theme="futuristic"] .hover\:bg-blue-700:hover,
[data-theme="futuristic"] .hover\:bg-green-700:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #818cf8 100%) !important;
}

[data-theme="bloomberg"] .hover\:bg-blue-700:hover,
[data-theme="bloomberg"] .hover\:bg-green-700:hover {
    background-color: #ff8833 !important;
}

[data-theme="neon"] .hover\:bg-blue-700:hover,
[data-theme="neon"] .hover\:bg-green-700:hover {
    background: linear-gradient(135deg, #33ffaa 0%, #66ddff 100%) !important;
}

[data-theme="futuristic"] .hover\:bg-gray-50:hover,
[data-theme="futuristic"] .hover\:bg-gray-100:hover,
[data-theme="futuristic"] .hover\:bg-gray-200:hover,
[data-theme="futuristic"] .hover\:bg-gray-300:hover,
[data-theme="bloomberg"] .hover\:bg-gray-50:hover,
[data-theme="bloomberg"] .hover\:bg-gray-100:hover,
[data-theme="bloomberg"] .hover\:bg-gray-200:hover,
[data-theme="bloomberg"] .hover\:bg-gray-300:hover,
[data-theme="neon"] .hover\:bg-gray-50:hover,
[data-theme="neon"] .hover\:bg-gray-100:hover,
[data-theme="neon"] .hover\:bg-gray-200:hover,
[data-theme="neon"] .hover\:bg-gray-300:hover {
    background-color: var(--bg-card-secondary) !important;
}

/* Dividers */
[data-theme="futuristic"] .divide-y > :not([hidden]) ~ :not([hidden]),
[data-theme="bloomberg"] .divide-y > :not([hidden]) ~ :not([hidden]),
[data-theme="neon"] .divide-y > :not([hidden]) ~ :not([hidden]) {
    border-color: var(--border-color) !important;
}

/* Inputs, textareas, selects */
[data-theme="futuristic"] input,
[data-theme="futuristic"] textarea,
[data-theme="futuristic"] select,
[data-theme="bloomberg"] input,
[data-theme="bloomberg"] textarea,
[data-theme="bloomberg"] select,
[data-theme="neon"] input,
[data-theme="neon"] textarea,
[data-theme="neon"] select {
    background-color: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--input-text) !important;
}

[data-theme="futuristic"] input:focus,
[data-theme="futuristic"] textarea:focus,
[data-theme="futuristic"] select:focus,
[data-theme="bloomberg"] input:focus,
[data-theme="bloomberg"] textarea:focus,
[data-theme="bloomberg"] select:focus,
[data-theme="neon"] input:focus,
[data-theme="neon"] textarea:focus,
[data-theme="neon"] select:focus {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 2px rgba(var(--accent-color), 0.2) !important;
    outline: none !important;
}

[data-theme="futuristic"] select option,
[data-theme="bloomberg"] select option,
[data-theme="neon"] select option {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

/* Placeholder text */
[data-theme="futuristic"] input::placeholder,
[data-theme="futuristic"] textarea::placeholder,
[data-theme="bloomberg"] input::placeholder,
[data-theme="bloomberg"] textarea::placeholder,
[data-theme="neon"] input::placeholder,
[data-theme="neon"] textarea::placeholder {
    color: var(--text-muted) !important;
}

/* Shadow override */
[data-theme="futuristic"] .shadow,
[data-theme="futuristic"] .shadow-lg,
[data-theme="futuristic"] .shadow-xl,
[data-theme="bloomberg"] .shadow,
[data-theme="bloomberg"] .shadow-lg,
[data-theme="bloomberg"] .shadow-xl,
[data-theme="neon"] .shadow,
[data-theme="neon"] .shadow-lg,
[data-theme="neon"] .shadow-xl {
    box-shadow: var(--shadow) !important;
}

/* Gradient backgrounds for specific sections */
[data-theme="futuristic"] .bg-gradient-to-br,
[data-theme="bloomberg"] .bg-gradient-to-br,
[data-theme="neon"] .bg-gradient-to-br {
    background: var(--bg-card) !important;
}

/* Tab styling for dark themes */
[data-theme="futuristic"] .tab-btn,
[data-theme="bloomberg"] .tab-btn,
[data-theme="neon"] .tab-btn {
    color: var(--tab-inactive) !important;
}

[data-theme="futuristic"] .tab-btn.text-blue-600,
[data-theme="bloomberg"] .tab-btn.text-blue-600,
[data-theme="neon"] .tab-btn.text-blue-600 {
    color: var(--tab-active) !important;
    border-color: var(--tab-active) !important;
}

[data-theme="futuristic"] .tab-border,
[data-theme="bloomberg"] .tab-border,
[data-theme="neon"] .tab-border {
    border-color: var(--border-color) !important;
}

/* ============ SETTINGS PAGE STYLES ============ */
.settings-section {
    background-color: var(--bg-card);
}

.settings-header {
    color: var(--text-primary);
}

.settings-label {
    color: var(--text-secondary);
}

.input-field {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--input-text);
}

.checkbox-label {
    background-color: var(--bg-card-secondary);
    color: var(--text-secondary);
}

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

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background-color: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
}

.btn-secondary:hover {
    opacity: 0.8;
}

/* Theme selector buttons */
.theme-option {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.theme-option:hover {
    border-color: var(--accent-color);
}

.theme-option.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-color);
}

[data-theme="futuristic"] .theme-option.active {
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

[data-theme="bloomberg"] .theme-option.active {
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.4);
}

[data-theme="neon"] .theme-option.active {
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

/* P&L Colors */
.pnl-positive { color: var(--accent-green); }
.pnl-negative { color: var(--accent-red); }

/* Change value colors */
.change-positive, .positive { color: var(--accent-green); }
.change-negative, .negative { color: var(--accent-red); }

/* Exposure colors */
.exposure-long, .long { color: var(--accent-green); }
.exposure-short, .short { color: var(--accent-red); }
.exposure-neutral, .neutral { color: var(--text-secondary); }

/* Settled/Closed trades - significantly grayed out */
.trade-closed {
    opacity: 0.45;
    background-color: var(--bg-secondary) !important;
    filter: grayscale(40%);
}
.trade-closed:hover {
    opacity: 0.6;
    filter: grayscale(20%);
}
.settled { opacity: 0.45; filter: grayscale(40%); }

/* Closed trades section */
.closed-trades-section {
    border-top: 1px dashed var(--border-color);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

.closed-trades-toggle {
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}
.closed-trades-toggle:hover {
    background-color: var(--bg-secondary);
}
.closed-trades-toggle .toggle-icon {
    transition: transform 0.2s;
}
.closed-trades-toggle.expanded .toggle-icon {
    transform: rotate(90deg);
}

/* Next forward date highlight */
.next-forward-highlight {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
    border-left: 3px solid var(--accent-blue) !important;
}
[data-theme="futuristic"] .next-forward-highlight {
    background: linear-gradient(90deg, rgba(167, 139, 250, 0.15) 0%, transparent 100%);
    border-left-color: var(--accent-color) !important;
}
[data-theme="bloomberg"] .next-forward-highlight {
    background: linear-gradient(90deg, rgba(255, 102, 0, 0.15) 0%, transparent 100%);
    border-left-color: var(--accent-color) !important;
}
[data-theme="neon"] .next-forward-highlight {
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.15) 0%, transparent 100%);
    border-left-color: var(--accent-green) !important;
}

/* Trade pair group */
.pair-group { border-left: 3px solid var(--accent-blue); }

/* Total exposure row - prominent styling */
.total-exposure-row {
    background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
    padding: 0.75rem 1rem !important;
    font-weight: 600;
    border-top: 2px solid var(--accent-blue);
    border-bottom: 2px solid var(--accent-blue);
}
[data-theme="futuristic"] .total-exposure-row {
    background: linear-gradient(90deg, rgba(167, 139, 250, 0.1) 0%, var(--bg-card) 100%);
    border-color: var(--accent-color);
}
[data-theme="bloomberg"] .total-exposure-row {
    background: linear-gradient(90deg, rgba(255, 102, 0, 0.1) 0%, var(--bg-card) 100%);
    border-color: var(--accent-color);
}
[data-theme="neon"] .total-exposure-row {
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.1) 0%, var(--bg-card) 100%);
    border-color: var(--accent-green);
}

/* Sparkline */
.sparkline { display: inline-block; vertical-align: middle; }
.sparkline-bar { display: inline-block; width: 3px; margin-right: 1px; vertical-align: bottom; }

/* Exposure bar */
.exposure-bar { height: 8px; border-radius: 2px; transition: width 0.3s; }

/* P&L Chart container */
.pnl-chart-container { cursor: pointer; }
.pnl-chart-container:hover { opacity: 0.8; }

/* Pair Exposure Card (Analysis Tab) */
.pair-exposure-card {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #1d4ed8 100%);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    padding: 1rem;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.pair-exposure-card:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.pair-exposure-card.no-trades {
    cursor: default;
}

.pair-exposure-card.no-trades:hover {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #1d4ed8 100%);
}

.pair-exposure-card.expanded #pair-expand-arrow {
    transform: rotate(180deg);
}

#pair-expand-arrow::after {
    content: '▼';
}

.pair-exposure-value.long { color: #86efac; }
.pair-exposure-value.short { color: #fca5a5; }
.pair-exposure-value.neutral { opacity: 0.7; }

/* Rate direction indicators */
.rate-dir-up {
    color: var(--accent-green);
    background: #dcfce7;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.7rem;
}

.rate-dir-down {
    color: var(--accent-red);
    background: #fee2e2;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.7rem;
}

.rate-dir-unchanged {
    color: var(--text-muted);
    background: #f3f4f6;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.7rem;
}

/* AI Trend indicators */
.trend-bullish {
    background: #dcfce7;
    color: var(--accent-green);
}

.trend-bearish {
    background: #fee2e2;
    color: var(--accent-red);
}

.trend-neutral {
    background: #f3f4f6;
    color: var(--text-secondary);
}

/* AI Block expand */
.ai-header {
    position: relative;
}

.ai-header .expand-icon {
    transition: transform 0.2s;
}

#short-term-block.expanded .expand-icon,
#long-term-block.expanded .expand-icon {
    transform: rotate(45deg);
}

/* Loading spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Border width for spinner */
.border-3 {
    border-width: 3px;
}

/* Tab active state helper */
.tab-btn.active {
    color: #2563eb;
    border-bottom: 2px solid #2563eb;
}

/* Chart source badge */
.chart-source-fred {
    background: #22c55e;
}

/* iOS safe area support */
@supports (padding-top: env(safe-area-inset-top)) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Smooth touch scrolling */
html {
    -webkit-overflow-scrolling: touch;
}

/* ============ MODAL THEMING ============ */
[data-theme="futuristic"] .fixed.inset-0 > div,
[data-theme="bloomberg"] .fixed.inset-0 > div,
[data-theme="neon"] .fixed.inset-0 > div {
    background-color: var(--bg-card) !important;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

[data-theme="futuristic"] .fixed.inset-0 .border-b,
[data-theme="futuristic"] .fixed.inset-0 .border-t,
[data-theme="bloomberg"] .fixed.inset-0 .border-b,
[data-theme="bloomberg"] .fixed.inset-0 .border-t,
[data-theme="neon"] .fixed.inset-0 .border-b,
[data-theme="neon"] .fixed.inset-0 .border-t {
    border-color: var(--border-color) !important;
}

/* Form elements in dark themes */
[data-theme="futuristic"] .bg-green-50,
[data-theme="futuristic"] .bg-red-50,
[data-theme="futuristic"] .bg-blue-50,
[data-theme="bloomberg"] .bg-green-50,
[data-theme="bloomberg"] .bg-red-50,
[data-theme="bloomberg"] .bg-blue-50,
[data-theme="neon"] .bg-green-50,
[data-theme="neon"] .bg-red-50,
[data-theme="neon"] .bg-blue-50 {
    background-color: var(--bg-card-secondary) !important;
}

[data-theme="futuristic"] .border-green-300,
[data-theme="futuristic"] .border-red-300,
[data-theme="futuristic"] .border-blue-300,
[data-theme="bloomberg"] .border-green-300,
[data-theme="bloomberg"] .border-red-300,
[data-theme="bloomberg"] .border-blue-300,
[data-theme="neon"] .border-green-300,
[data-theme="neon"] .border-red-300,
[data-theme="neon"] .border-blue-300 {
    border-color: var(--border-color) !important;
}

/* Trade form buy/sell currency styling for dark themes */
[data-theme="futuristic"] .bg-green-100,
[data-theme="futuristic"] .bg-red-100,
[data-theme="bloomberg"] .bg-green-100,
[data-theme="bloomberg"] .bg-red-100,
[data-theme="neon"] .bg-green-100,
[data-theme="neon"] .bg-red-100 {
    background-color: var(--bg-card-secondary) !important;
}

[data-theme="futuristic"] .text-green-700,
[data-theme="bloomberg"] .text-green-700,
[data-theme="neon"] .text-green-700 {
    color: var(--accent-green) !important;
}

[data-theme="futuristic"] .text-red-700,
[data-theme="bloomberg"] .text-red-700,
[data-theme="neon"] .text-red-700 {
    color: var(--accent-red) !important;
}

/* Placeholder text in dark themes */
[data-theme="futuristic"] input::placeholder,
[data-theme="futuristic"] textarea::placeholder,
[data-theme="bloomberg"] input::placeholder,
[data-theme="bloomberg"] textarea::placeholder,
[data-theme="neon"] input::placeholder,
[data-theme="neon"] textarea::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.7;
}

/* Button theming */
[data-theme="futuristic"] .bg-blue-600,
[data-theme="futuristic"] .bg-green-600 {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
}

[data-theme="bloomberg"] .bg-blue-600,
[data-theme="bloomberg"] .bg-green-600 {
    background-color: #ff6600 !important;
    color: #000000 !important;
}

[data-theme="neon"] .bg-blue-600,
[data-theme="neon"] .bg-green-600 {
    background: linear-gradient(135deg, #00ff88 0%, #00ccff 100%) !important;
    color: #000000 !important;
}

/* Gray backgrounds in dark themes */
[data-theme="futuristic"] .bg-gray-50,
[data-theme="futuristic"] .bg-gray-100,
[data-theme="futuristic"] .bg-gray-200,
[data-theme="bloomberg"] .bg-gray-50,
[data-theme="bloomberg"] .bg-gray-100,
[data-theme="bloomberg"] .bg-gray-200,
[data-theme="neon"] .bg-gray-50,
[data-theme="neon"] .bg-gray-100,
[data-theme="neon"] .bg-gray-200 {
    background-color: var(--bg-card-secondary) !important;
}

/* Matched trades styling */
.matched-trade {
    background-color: rgba(139, 92, 246, 0.05);
}

[data-theme="futuristic"] .matched-trade {
    background-color: rgba(139, 92, 246, 0.15);
}

[data-theme="neon"] .matched-trade {
    background-color: rgba(0, 255, 136, 0.1);
}

/* ============ APP CONTAINER & TITLE THEMING ============ */
#app {
    background-color: transparent;
}

.app-title {
    color: var(--accent-blue);
    transition: all 0.3s ease;
}

[data-theme="default"] .app-title {
    color: #1e40af;
}

/* Header styling for dark themes */
[data-theme="futuristic"] header,
[data-theme="bloomberg"] header,
[data-theme="neon"] header {
    color: var(--text-primary);
}

/* Loading indicator theming */
[data-theme="futuristic"] #loading .border-t-blue-600,
[data-theme="bloomberg"] #loading .border-t-blue-600,
[data-theme="neon"] #loading .border-t-blue-600 {
    border-top-color: var(--accent-color) !important;
}

[data-theme="futuristic"] #loading .border-gray-200,
[data-theme="bloomberg"] #loading .border-gray-200,
[data-theme="neon"] #loading .border-gray-200 {
    border-color: var(--border-color) !important;
}

/* ============ PAIR EXPOSURE CARD THEMING ============ */
[data-theme="futuristic"] .pair-exposure-card {
    background: linear-gradient(135deg, #8b5cf6 0%, #4338ca 100%);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

[data-theme="futuristic"] .pair-exposure-card:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #6366f1 100%);
}

[data-theme="bloomberg"] .pair-exposure-card {
    background: linear-gradient(135deg, #ff6600 0%, #cc5200 100%);
}

[data-theme="bloomberg"] .pair-exposure-card:hover {
    background: linear-gradient(135deg, #ff8033 0%, #ff6600 100%);
}

[data-theme="neon"] .pair-exposure-card {
    background: linear-gradient(135deg, #00ff88 0%, #00ccff 100%);
    color: #000000;
}

[data-theme="neon"] .pair-exposure-card:hover {
    background: linear-gradient(135deg, #33ffaa 0%, #33ddff 100%);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .pair-exposure-card {
        padding: 0.75rem;
    }

    .pair-exposure-card .text-xl {
        font-size: 1.125rem;
    }
}

/* ============ CLOSED TRADES SECTION THEMING ============ */
/* Dark theme styling for closed trades */
[data-theme="futuristic"] .trade-closed,
[data-theme="bloomberg"] .trade-closed,
[data-theme="neon"] .trade-closed {
    opacity: 0.4;
    filter: grayscale(50%);
}

[data-theme="futuristic"] .trade-closed:hover,
[data-theme="bloomberg"] .trade-closed:hover,
[data-theme="neon"] .trade-closed:hover {
    opacity: 0.55;
    filter: grayscale(30%);
}

[data-theme="futuristic"] .closed-trades-section {
    border-top-color: rgba(167, 139, 250, 0.3);
}

[data-theme="bloomberg"] .closed-trades-section {
    border-top-color: rgba(255, 102, 0, 0.3);
}

[data-theme="neon"] .closed-trades-section {
    border-top-color: rgba(0, 255, 136, 0.3);
}

[data-theme="futuristic"] .closed-trades-toggle,
[data-theme="bloomberg"] .closed-trades-toggle,
[data-theme="neon"] .closed-trades-toggle {
    color: var(--text-secondary);
}

[data-theme="futuristic"] .closed-trades-toggle:hover {
    background-color: rgba(167, 139, 250, 0.1);
}

[data-theme="bloomberg"] .closed-trades-toggle:hover {
    background-color: rgba(255, 102, 0, 0.1);
}

[data-theme="neon"] .closed-trades-toggle:hover {
    background-color: rgba(0, 255, 136, 0.1);
}

/* Status badges for closed trades */
.trade-closed .bg-gray-300 {
    background-color: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
}

/* Next forward badge theming */
[data-theme="futuristic"] .bg-blue-500 {
    background-color: var(--accent-color) !important;
}

[data-theme="bloomberg"] .bg-blue-500 {
    background-color: var(--accent-color) !important;
}

[data-theme="neon"] .bg-blue-500 {
    background-color: var(--accent-green) !important;
}
