/* ========================================================= */
/* MODULE 04: THE LEASE ESCAPE HATCH 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;
    --danger: #ef4444;       /* Crimson Red */
    --emerald: #10b981;      /* Escape Green */
    --shadow-soft: 0 20px 40px rgba(0, 0, 0, 0.4);
    --input-bg: rgba(0,0,0,0.3);
}

* { 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;
    background-image: radial-gradient(circle at 50% -20%, rgba(30, 30, 40, 0.5), var(--bg-void) 70%);
}

.text-danger { color: var(--danger); }
.text-emerald { color: var(--emerald); }
.bg-danger\/20 { background-color: rgba(239, 68, 68, 0.2); }
.bg-danger\/40 { background-color: rgba(239, 68, 68, 0.4); }
.bg-danger\/80 { background-color: rgba(239, 68, 68, 0.8); }
.bg-emerald { background-color: var(--emerald); }
.border-t-emerald { border-top-color: var(--emerald); }

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

/* STAGES */
.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: 20px; 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: 14px; max-width: 400px; margin: 0 auto;}

/* INPUTS */
.input-group { margin-bottom: 24px; position: relative; }
.input-group label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 2px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px;}
.micro-helper { font-size: 11px; color: rgba(161, 161, 170, 0.7); margin-bottom: 10px; line-height: 1.3;}

.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: 18px;
    transition: border-color 0.3s;
}
.terminal-input:focus { outline: none; border-color: rgba(255,255,255,0.4); }
.terminal-input.invalid { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.inline-error { color: var(--danger); font-size: 12px; display: block; margin-top: 6px; }

.currency-wrapper { position: relative; }
.currency-symbol { position: absolute; left: 16px; top: 18px; color: var(--text-dim); font-size: 18px; font-weight: 600;}
.pl-8 { padding-left: 2rem; }

/* SLIDER */
.slider-group { position: relative; }
.slider-labels { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.slider-labels label { font-size: 12px; font-weight: 500; color: var(--text-dim); text-transform: uppercase; margin-bottom: 2px; }
.slider-labels .micro-helper { margin-bottom: 0; max-width: 80%; }
.dynamic-val { font-size: 16px; font-weight: 600; color: var(--text-primary); padding-top: 2px;}

.premium-slider { -webkit-appearance: none; width: 100%; height: 6px; background: var(--border-glass); border-radius: 3px; outline: none; margin-bottom: 10px; }
.premium-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 24px; height: 24px; border-radius: 50%;
    background: #fff; border: 2px solid var(--bg-void);
    cursor: pointer; box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: transform 0.1s;
}
.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); }

/* BUTTONS */
.btn-primary {
    width: 100%; background: #ffffff; color: #000; 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(255, 255, 255, 0.15); }
.btn-primary.disabled { background: var(--border-glass); color: var(--text-dim); cursor: not-allowed; }

/* TOGGLE DASHBOARD */
.toggle-wrapper { margin-bottom: 24px; display: flex; justify-content: center; }
.toggle-pill {
    position: relative; display: flex; background: var(--input-bg);
    border: 1px solid var(--border-glass); border-radius: 999px; padding: 4px;
    width: 320px;
}
.toggle-bg {
    position: absolute; top: 4px; left: 4px; bottom: 4px; width: calc(50% - 4px);
    background: var(--danger); border-radius: 999px; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.toggle-btn {
    flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: var(--text-dim);
    padding: 10px 0; z-index: 10; border: none; background: transparent; cursor: pointer;
    transition: color 0.3s;
}
.toggle-btn.active { color: #fff; }

/* DASHBOARD VIEWS */
.dashboard-core { text-align: center; display: grid; grid-template-columns: 1fr; overflow: hidden; }
.view-panel { grid-row-start: 1; grid-column-start: 1; transition: all 0.5s ease; width: 100%; display: flex; flex-direction: column; justify-content: flex-start;}
.view-panel.active { opacity: 1; transform: translateX(0); pointer-events: all; z-index: 2; }
.view-panel.hidden { opacity: 0; transform: translateX(20px); pointer-events: none; z-index: 1; }
#viewLiability.hidden { transform: translateX(-20px); }

.data-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.data-value { font-size: 42px; font-weight: 800; line-height: 1; }

/* RED CHART (DOM BAR CHART) */
.chart-container { display: flex; justify-content: space-around; align-items: flex-end; height: 160px; margin-top: auto; border-bottom: 1px solid var(--border-glass); padding-bottom: 8px; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 25%; position: relative;}
.hover-trigger { cursor: pointer; transition: transform 0.2s ease; }
.hover-trigger:hover { transform: scale(1.05); }
.bar-fill { width: 40px; border-radius: 6px 6px 0 0; transition: height 1s cubic-bezier(0.16, 1, 0.3, 1); height: 0px; box-shadow: 0 0 15px rgba(239, 68, 68, 0.2); }
.bar-label { font-size: 10px; color: var(--text-dim); margin-top: 8px; text-transform: uppercase; position: absolute; bottom: -24px;}
.bar-value { font-size: 11px; font-weight: 700; margin-bottom: 4px; opacity: 0; transition: opacity 0.5s ease 0.5s; }
.bar-value.show { opacity: 1; }

/* GREEN SUV (VISUAL ANCHOR) */
.visual-anchor { position: relative; width: 100%; flex-grow: 1; display: flex; align-items: center; justify-content: center; min-height: 140px; max-height: 220px; margin-top: 16px; margin-bottom: 24px; }
.hero-suv { width: 100%; height: 100%; object-fit: contain; position: relative; z-index: 10; transform: scale(1); transform-origin: center center; animation: slideInX 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.suv-glow { position: absolute; bottom: 5%; left: 50%; width: 60%; transform: translateX(-50%); height: 30px; background: var(--emerald); filter: blur(30px); opacity: 0.3; z-index: 1; animation: pulseGlow 2s infinite alternate;}

@keyframes slideInX { 0% { transform: scale(1) translateX(30px); opacity: 0; } 100% { transform: scale(1) translateX(0); opacity: 1; } }
@keyframes pulseGlow { 0% { opacity: 0.1; } 100% { opacity: 0.4; } }

.glow-text { text-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }

/* GATEWAY ANIMATION */
.gateway-slide { transition: transform 0.4s ease, opacity 0.4s ease; transform: translateY(20px); opacity: 0;}
.gateway-slide.active { transform: translateY(0); opacity: 1; pointer-events: all; }
