/* ========================================================= */
/* MODULE 03: TRADE CONFIGURATOR AESTHETICS                  */
/* ========================================================= */

:root {
    --bg-void: #09090b;             
    --surface-glass: rgba(24, 24, 27, 0.6); 
    --border-glass: rgba(255, 255, 255, 0.08); 
    --text-primary: #ededed;
    --text-dim: #a1a1aa;
    --accent-glow: #10b981; /* Emerald Green for Demand */
    --accent-pure: #34d399;
    --danger: #ef4444;
    --shadow-soft: 0 20px 40px rgba(0, 0, 0, 0.4);
    --input-bg: rgba(0,0,0,0.3);
}

.theme-light {
    --bg-void: #f9fafb;             
    --surface-glass: rgba(255, 255, 255, 0.8); 
    --border-glass: rgba(15, 23, 42, 0.1); 
    --text-primary: #0f172a;        
    --text-dim: #64748b;
    --accent-glow: #059669; 
    --accent-pure: #10b981;
    --shadow-soft: 0 20px 40px rgba(15, 23, 42, 0.06);
    --input-bg: rgba(255,255,255,0.9);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }

body {
    background-color: var(--bg-void); color: var(--text-primary);
    display: flex; justify-content: center; padding: 24px 16px;
    transition: all 0.5s ease;
}

.trade-container { width: 100%; max-width: 800px; position: relative; min-height: 500px; }

/* THEME TOGGLE */
.theme-switch-btn {
    position: fixed; bottom: 24px; right: 24px; z-index: 1000;
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--surface-glass); border: 1px solid var(--border-glass);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-primary); cursor: pointer; transition: all 0.3s;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

/* STAGE FLOW */
.stage { position: absolute; top: 0; left: 0; width: 100%; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.stage.active { opacity: 1; pointer-events: all; position: relative; }
.hidden { display: none !important; }

/* GLASS CARDS */
.glass-card {
    background: var(--surface-glass); border: 1px solid var(--border-glass);
    border-radius: 24px; padding: 32px; backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow-soft);
}

/* HEADER */
.global-header { text-align: center; margin-bottom: 32px; }
.covert-badge {
    display: inline-block; background: var(--border-glass); border: 1px solid var(--border-glass);
    color: var(--text-dim); font-size: 11px; font-weight: 600; padding: 6px 14px;
    border-radius: 9999px; margin-bottom: 12px; letter-spacing: 1px;
}
.global-header h1 { font-size: 32px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px;}
.global-header p { color: var(--text-dim); font-size: 15px; }

/* INPUTS */
.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 8px; font-weight: 500; }
.terminal-input {
    width: 100%; background: var(--input-bg); border: 1px solid var(--border-glass);
    color: var(--text-primary); padding: 16px; border-radius: 12px; font-size: 16px;
    transition: border-color 0.3s;
}
.terminal-input:focus { outline: none; border-color: var(--accent-glow); }
.terminal-input.invalid { border-color: var(--danger); }
.inline-error { color: var(--danger); font-size: 12px; display: block; margin-top: 6px; }

/* BUTTONS */
.btn-primary {
    width: 100%; background: var(--accent-pure); color: #fff; border: none;
    padding: 16px; border-radius: 12px; font-size: 16px; font-weight: 600;
    cursor: pointer; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-primary:hover:not(.disabled) { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3); }
.btn-primary.disabled { background: var(--border-glass); color: var(--text-dim); cursor: not-allowed; }

.btn-back { display: flex; align-items: center; gap: 8px; color: var(--text-dim); background: none; border: none; cursor: pointer; font-size: 14px; margin-bottom: 24px;}
.btn-back svg { width: 18px; height: 18px; }

/* ========================================================= */
/* MICRO-SAAS UI (SLIDERS & GAUGE)                           */
/* ========================================================= */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 24px; }
@media(max-width: 768px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* RING GAUGE */
.gauge-panel { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge-panel h3 { font-size: 14px; color: var(--text-dim); letter-spacing: 1px; font-weight: 600; text-transform: uppercase;}
.gauge-wrapper { position: relative; width: 180px; height: 180px; margin: 24px 0; }
.demand-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--border-glass); stroke-width: 6; }
.ring-fill {
    fill: none; stroke: var(--accent-pure); stroke-width: 6;
    stroke-dasharray: 251.2; /* 2 * PI * 40 */
    stroke-dashoffset: 251.2;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.3s;
}
.score-display {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
#scoreValue { font-size: 48px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.score-max { font-size: 14px; color: var(--text-dim); font-weight: 500; }
.pulse-text { font-size: 12px; color: var(--accent-pure); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* PREMIUM SLIDERS */
.slider-group { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border-glass); }
.slider-group:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.slider-labels { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.slider-labels label { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.dynamic-val { color: var(--accent-pure); font-size: 14px; font-weight: 600; background: rgba(16, 185, 129, 0.1); padding: 4px 10px; border-radius: 6px; }

.premium-slider {
    -webkit-appearance: none; width: 100%; height: 6px;
    background: var(--border-glass); border-radius: 3px; outline: none;
    margin-bottom: 12px;
}
.premium-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--text-primary); border: 2px solid var(--bg-void);
    cursor: pointer; box-shadow: 0 0 15px rgba(0,0,0,0.5);
    transition: transform 0.1s;
}
.theme-light .premium-slider::-webkit-slider-thumb { border-color: var(--accent-pure); }
.premium-slider::-webkit-slider-thumb:active { transform: scale(1.2); }
.slider-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-dim); }

/* LABOR ILLUSION */
.labor-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; }
.spinner-core { width: 50px; height: 50px; border: 3px solid var(--border-glass); border-top-color: var(--accent-pure); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 24px; }
@keyframes spin { 100% { transform: rotate(360deg); } }
#laborTitle { font-size: 20px; font-weight: 600; color: var(--text-primary); margin-bottom: 16px; }
.terminal-feed p { font-family: monospace; font-size: 13px; margin-bottom: 4px; }
.term-dim { color: var(--text-dim); opacity: 0.7; }
.term-focus { color: var(--accent-pure); font-weight: bold; }

/* FOMO MODAL */
.fomo-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 5000; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.fomo-box { background: var(--bg-void); border: 1px solid var(--danger); border-radius: 16px; padding: 32px; max-width: 400px; text-align: center; }
.fomo-box h3 { color: var(--danger); font-size: 20px; margin-bottom: 12px; font-weight: 600; }
.fomo-box p { color: var(--text-primary); font-size: 14px; margin-bottom: 24px; line-height: 1.5; }
.btn-outline { background: transparent; border: 1px solid var(--border-glass); color: var(--text-primary); padding: 12px 24px; border-radius: 8px; cursor: pointer; transition: all 0.3s; }
.btn-outline:hover { background: var(--border-glass); }
