:root {
    --bg-dark: #0a0a0a;
    --bg-panel: #141414;
    --border-light: rgba(255, 255, 255, 0.12);
    --border-hover: rgba(255, 255, 255, 0.3);
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    
    --accent: #f0f0f0;
    --accent-hover: #ffffff;
    
    --danger: #ff4a4a;
    --success: #3be282;
    
    --glass-bg: rgba(20, 20, 20, 0.65);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Calibri', 'Arial', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: radial-gradient(circle at top center, #1f1f1f 0%, #0a0a0a 100%);
}

.background-shapes {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; overflow: hidden;
}

.shape {
    position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.4; animation: slowDrift 25s infinite alternate ease-in-out;
}
.shape-1 { width: 600px; height: 600px; background: #333333; top: -20%; left: -10%; }
.shape-2 { width: 500px; height: 500px; background: #444444; bottom: -10%; right: -10%; animation-delay: -5s; }

@keyframes slowDrift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.1); }
}

.container { width: 100%; max-width: 900px; padding: 2rem; display: flex; flex-direction: column; gap: 1.5rem; z-index: 10; }

header { text-align: center; margin-bottom: 0.5rem; }
header h1 { font-size: 2.8rem; font-weight: 300; letter-spacing: 2px; text-transform: uppercase; }
header p { color: var(--text-secondary); font-size: 1.05rem; }

/* Tabs */
.tabs { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border-light); padding-bottom: 1rem;}
.tab-btn {
    background: transparent; border: none; color: var(--text-secondary); padding: 0.5rem 1rem; font-size: 1.1rem; cursor: pointer; border-radius: 4px; transition: all 0.3s ease; text-transform: uppercase; letter-spacing: 1px;
}
.tab-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.tab-btn.active { color: var(--bg-dark); background: var(--accent); }

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeUp 0.4s ease forwards; }

.glass-panel {
    background: var(--glass-bg); backdrop-filter: blur(20px); border: 1px solid var(--border-light); border-radius: 12px; padding: 2rem; box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.input-group { display: flex; flex-direction: column; gap: 0.6rem; }
label { font-size: 0.85rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }

input, select {
    width: 100%; padding: 0.8rem; border-radius: 8px; border: 1px solid var(--border-light); background: rgba(255,255,255,0.03); color: var(--text-primary); outline: none; appearance: none;
}
select { background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 1rem center; background-size: 1em; }
input:focus, select:focus { border-color: var(--accent); background: rgba(255,255,255,0.08); }
select option { background: var(--bg-panel); color: var(--text-primary); }

.primary-btn { width: 100%; padding: 1rem; border: 1px solid var(--accent); border-radius: 8px; background: transparent; color: var(--accent); cursor: pointer; transition: all 0.3s ease; text-transform: uppercase; letter-spacing: 2px; }
.primary-btn:hover { background: var(--accent); color: var(--bg-dark); }
.secondary-btn { padding: 0.5rem 1rem; border: 1px solid var(--border-light); background: transparent; color: var(--text-primary); border-radius: 4px; cursor: pointer; transition: 0.3s; }
.secondary-btn:hover { background: rgba(255,255,255,0.1); }

.loader { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: currentColor; animation: spin 1s infinite linear; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* Results */
.result-panel { margin-top: 2rem; }
.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border-light); padding-bottom: 1rem; }
.status-badge { display: inline-block; padding: 0.8rem 2rem; border-radius: 4px; font-size: 1.2rem; letter-spacing: 1px; margin-bottom: 1.5rem; }
.status-churn { background: rgba(255,74,74,0.1); color: var(--danger); border: 1px solid rgba(255,74,74,0.3); }
.status-retain { background: rgba(59,226,130,0.1); color: var(--success); border: 1px solid rgba(59,226,130,0.3); }

.prob-container { display: flex; align-items: center; gap: 1.5rem; color: var(--text-secondary); margin-bottom: 2rem; }
.progress-bar-bg { flex: 1; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; position: relative; }
.progress-bar-fill { height: 100%; width: 0%; background: var(--text-primary); transition: width 1s ease; }

/* SHAP */
.shap-container h3, .recs-container h3 { margin-bottom: 1rem; font-size: 1.1rem; color: var(--text-secondary); border-bottom: 1px solid var(--border-light); padding-bottom: 0.5rem; }
.shap-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.shap-label { width: 150px; font-size: 0.9rem; text-transform: uppercase; color: #ccc; }
.shap-bar-container { flex: 1; height: 8px; background: rgba(255,255,255,0.05); position: relative; border-radius: 4px; margin-left: 1rem; margin-right: 1rem;}
.shap-bar { position: absolute; height: 100%; top: 0; border-radius: 4px; }
.shap-val { width: 50px; text-align: right; font-size: 0.85rem; }

/* Recs */
#recs-list { list-style: none; padding-left: 0; }
#recs-list li { padding: 0.8rem; background: rgba(255,255,255,0.03); border-left: 3px solid var(--accent); margin-bottom: 0.5rem; font-size: 0.95rem; }

/* Bulk Upload */
.upload-zone { border: 2px dashed var(--border-light); padding: 3rem; text-align: center; border-radius: 8px; position: relative; transition: 0.3s; }
.upload-zone:hover { border-color: var(--accent); background: rgba(255,255,255,0.02); }
.upload-zone input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-zone span { color: var(--accent); text-decoration: underline; }

/* Dashboard */
.dashboard-stats { display: flex; gap: 1rem; margin-bottom: 2rem; }
.stat-card { flex: 1; background: rgba(255,255,255,0.03); padding: 1.5rem; border-radius: 8px; border: 1px solid var(--border-light); text-align: center; }
.stat-card h4 { color: var(--text-secondary); margin-bottom: 0.5rem; font-size: 0.9rem; text-transform: uppercase; }
.stat-card span { font-size: 2rem; font-weight: bold; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.chart-container { background: rgba(255,255,255,0.02); padding: 1rem; border-radius: 8px; border: 1px solid var(--border-light); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
