/* ═══════════════════════════════════════════════════
   HerPredict.AI — Dashboard Stylesheet
   style.css | v2.0  (8-Fitur Ensemble Update)
═══════════════════════════════════════════════════ */

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

/* ─── CSS VARIABLES ─── */
:root {
    --bg: #f0f4f8;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-glow: rgba(79, 70, 229, 0.15);
    --primary-bg: #eef2ff;
    --success: #10b981;
    --success-bg: #d1fae5;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 16px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.05);
    --shadow-primary: 0 8px 32px rgba(79, 70, 229, 0.25);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── NAVBAR ─── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ─── NAV LIVE BADGE ─── */
.nav-badge-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--success-bg);
    border: 1px solid #6ee7b7;
    color: var(--success);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 5px 14px;
    border-radius: 100px;
    text-transform: uppercase;
}

.nav-badge-live .dot {
    width: 6px; height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    box-shadow: var(--shadow-primary);
    flex-shrink: 0;
}

.nav-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.nav-title span { color: var(--primary); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: var(--primary-bg);
}

.nav-links a i { font-size: 13px; }

.nav-cta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-primary);
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 36px rgba(79, 70, 229, 0.35);
}

.btn-primary:active { transform: translateY(0); }

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 6px;
}

/* ─── HERO BANNER ─── */
.hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #3730a3 70%, #4f46e5 100%);
    padding: 3.5rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-glow-1 {
    position: absolute;
    top: -60px; left: -60px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(139,92,246,0.3), transparent 70%);
    border-radius: 50%;
    animation: pulse-glow 4s ease-in-out infinite;
}

.hero-glow-2 {
    position: absolute;
    bottom: -80px; right: -60px;
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(79,70,229,0.4), transparent 70%);
    border-radius: 50%;
    animation: pulse-glow 5s ease-in-out infinite 1.5s;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.9);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.hero-badge .dot {
    width: 6px; height: 6px;
    background: #4ade80;
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    color: white;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.hero h1 .gradient-text {
    background: linear-gradient(90deg, #a5b4fc, #818cf8, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.65);
    max-width: 520px;
    margin: 0 auto 2rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* ─── STATS ROW ─── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    max-width: 900px;
    margin: 2.5rem auto 0;
    position: relative;
    z-index: 1;
}

.stat-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255,255,255,0.13);
    transform: translateY(-3px);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 900;
    color: white;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ─── MAIN CONTENT ─── */
.main-content {
    padding: 2.5rem 2.5rem 4rem;
}

/* ─── DASHBOARD CARDS ─── */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.3s ease;
    cursor: default;
}

.info-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg), 0 0 0 3px var(--primary-glow);
    transform: translateY(-2px);
}

.info-card-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.icon-indigo { background: var(--primary-bg); color: var(--primary); }
.icon-green  { background: var(--success-bg); color: var(--success); }
.icon-amber  { background: var(--warning-bg); color: var(--warning); }

.info-card-body { flex: 1; min-width: 0; }

.info-card-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.info-card-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

.info-card-sub {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--success);
    background: var(--success-bg);
    padding: 2px 8px;
    border-radius: 100px;
    margin-top: 8px;
}

/* ─── FORM CARD ─── */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* ─── FORM HEADER ─── */
.form-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface-2);
}

.form-header-left { display: flex; align-items: center; gap: 12px; }

.step-indicator {
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 100px;
}

.form-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.progress-group { display: flex; align-items: center; gap: 12px; }

.progress-bar-container {
    width: 140px;
    height: 6px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(79,70,229,0.4);
}

.progress-percent {
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--text-primary);
    min-width: 36px;
    text-align: right;
}

/* ─── PRESETS BAR ─── */
.presets-bar {
    padding: 1rem 2rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.presets-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

.preset-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-btn.healthy  { background: var(--success-bg); color: var(--success); border-color: #6ee7b7; }
.preset-btn.warning  { background: var(--warning-bg); color: var(--warning); border-color: #fcd34d; }
.preset-btn.critical { background: var(--danger-bg);  color: var(--danger);  border-color: #fca5a5; }

.preset-btn:hover { filter: brightness(0.95); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* ─── HIDDEN UTILITY ─── */
.hidden { display: none !important; }

/* ─── FORM BODY & STEPS ─── */
.form-body { padding: 2rem; }

.step-content { display: none; }
.step-content.active {
    display: block;
    animation: fadeUp 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field-group { display: flex; flex-direction: column; gap: 6px; }

.field-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.label-required {
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--danger-bg);
    color: var(--danger);
    padding: 1px 8px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.label-optional {
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--primary-bg);
    color: var(--primary);
    padding: 1px 8px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.field-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin-top: 2px;
    line-height: 1.5;
}

.field-hint i { margin-top: 1px; font-size: 0.68rem; color: var(--primary); flex-shrink: 0; }

.field-input {
    width: 100%;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: var(--surface-2);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    transition: all 0.25s ease;
    outline: none;
}

.field-input:hover { border-color: #c7d2fe; }

.field-input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

select.field-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' 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 14px center;
    padding-right: 40px;
}

/* ─── BMI PANEL ─── */
.bmi-panel {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    border-radius: var(--radius);
    padding: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.25rem;
    position: relative;
    overflow: hidden;
}

.bmi-panel::after {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(99,102,241,0.35), transparent 70%);
    border-radius: 50%;
}

.bmi-left { position: relative; z-index: 1; }

.bmi-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.6);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    border-radius: 100px;
    margin-bottom: 8px;
}

.bmi-chip .dot { width: 5px; height: 5px; background: #818cf8; border-radius: 50%; }

#bmiStatus {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    font-style: italic;
}

.bmi-right {
    display: flex;
    align-items: baseline;
    gap: 6px;
    position: relative;
    z-index: 1;
}

#bmiResult {
    background: transparent;
    border: none;
    outline: none;
    font-size: 3.5rem;
    font-weight: 900;
    color: white;
    font-family: 'Inter', sans-serif;
    width: 140px;
    text-align: right;
    letter-spacing: -0.04em;
}

.bmi-unit {
    font-size: 0.875rem;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
}

/* ─── CHECKBOX CARDS ─── */
.check-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    cursor: pointer;
    transition: all 0.25s ease;
}

.check-card:hover                   { border-color: var(--primary); background: var(--primary-bg); }
.check-card input[type="checkbox"]  { display: none; }
.check-card input[type="checkbox"]:checked + .card-inner { color: var(--primary); }
.check-card:has(input:checked)      { border-color: var(--primary); background: var(--primary-bg); }

.card-inner { display: flex; align-items: center; gap: 12px; }

.card-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.card-text { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }

.custom-checkbox {
    width: 22px; height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    color: transparent;
    font-size: 11px;
}

.check-card:has(input:checked) .custom-checkbox {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ─── BUTTONS ─── */
.btn-nav-next {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-primary);
}

.btn-nav-next:hover  { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(79,70,229,0.35); }
.btn-nav-next:active { transform: translateY(0); }

.btn-nav-back {
    padding: 15px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 700;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-nav-back:hover { border-color: var(--text-secondary); color: var(--text-primary); background: var(--surface-2); }

.btn-submit {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: white;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(79,70,229,0.3);
    position: relative;
    overflow: hidden;
}

.btn-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-submit:hover        { transform: translateY(-2px); box-shadow: 0 16px 48px rgba(79,70,229,0.4); }
.btn-submit:hover::after { opacity: 1; }
.btn-submit:active       { transform: translateY(0); }

.nav-row { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }

/* ─── LOADING ─── */
#loading {
    display: none;
    padding: 4rem 2rem;
    text-align: center;
}

.spinner-ring {
    width: 64px; height: 64px;
    border: 5px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

#loading h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

#loading p {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 6px;
}

/* ─── RESULT AREA ─── */
#resultArea { display: none; }

.result-hero {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}

.result-badge {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 1px solid var(--border);
    color: var(--text-muted);
    background: white;
    margin-bottom: 1rem;
}

#resHasil {
    font-size: clamp(2rem, 6vw, 3.25rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.confidence-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.confidence-row span { font-weight: 800; color: var(--text-primary); font-size: 1rem; }

/* ─── GROQ BUTTON ─── */
#rekomendasiTrigger { text-align: center; padding: 1rem 0 0.5rem; }

.btn-groq {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-groq:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.btn-groq:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ─── SARAN AREA ─── */
#saranArea {
    display: none;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.saran-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    padding: 1rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.saran-header i    { font-size: 1rem; }
.saran-header span { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }

#resSaran {
    padding: 2rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
}

#resSaran h1, #resSaran h2, #resSaran h3 { color: var(--text-primary); font-weight: 700; margin: 1rem 0 0.5rem; }
#resSaran ul, #resSaran ol { padding-left: 1.5rem; margin: 0.5rem 0; }
#resSaran li     { margin: 0.3rem 0; }
#resSaran strong { color: var(--primary); }
#resSaran p      { margin: 0.5rem 0; }

/* ─── ENSEMBLE DETAIL ─── */
#ensembleDetail {
    display: none;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.ensemble-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ensemble-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ensemble-item {
    display: grid;
    grid-template-columns: 110px 1fr 56px;
    align-items: center;
    gap: 12px;
}

.ens-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.ens-bar-wrap {
    height: 8px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.ens-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.xgb-bar { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.rf-bar  { background: linear-gradient(90deg, var(--success), #059669); }

.ens-val {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-primary);
    text-align: right;
}

/* ─── LAB REFERENCE CARD ─── */
.lab-ref-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 0.5rem;
}

.lab-ref-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lab-ref-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.lab-ref-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
}

.ref-icon {
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 800;
    flex-shrink: 0;
}

.ref-icon.normal  { background: var(--success-bg); color: var(--success); }
.ref-icon.warning { background: var(--warning-bg); color: var(--warning); }
.ref-icon.danger  { background: var(--danger-bg);  color: var(--danger); }

.ref-label {
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.3;
}

.ref-val {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 1px;
}

/* ─── RESET BUTTON ─── */
.btn-reset {
    width: 100%;
    padding: 14px;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.btn-reset:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }

/* ─── SECTION LABEL ─── */
.section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.25rem;
}

.section-label h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.section-label p  { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

/* ─── FOOTER ─── */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 64px;
        left: 0; right: 0;
        background: white;
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        gap: 4px;
        z-index: 99;
        box-shadow: var(--shadow-lg);
    }
    .hamburger             { display: block; }
    .nav-cta .btn-primary  { display: none; }
    .stats-row             { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid        { grid-template-columns: 1fr; }
    .form-grid             { grid-template-columns: 1fr; }
    .nav-row               { grid-template-columns: 1fr; }
    .hero                  { padding: 2.5rem 1.25rem 3rem; }
    .form-body             { padding: 1.5rem; }
    .form-header           { padding: 1rem 1.5rem; }
    .presets-bar           { padding: 0.75rem 1.5rem; }
    .lab-ref-grid          { grid-template-columns: repeat(2, 1fr); }
    .ensemble-item         { grid-template-columns: 90px 1fr 46px; }
    .nav-badge-live        { display: none; }
}

@media (max-width: 480px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .hero h1   { font-size: 1.75rem; }
}
