/* ═══════════════════════════════════════════════════════════════
   VRI Credit Intelligence — Design System & Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
    /* Background */
    --bg-base: #0a0a0f;
    --bg-surface: #111118;
    --bg-surface-raised: #16161f;
    --bg-surface-hover: #1c1c28;
    --bg-card: rgba(18, 18, 28, 0.72);
    --bg-card-hover: rgba(24, 24, 36, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-glass-hover: rgba(255, 255, 255, 0.06);

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-focus: rgba(99, 102, 241, 0.5);
    --border-success: rgba(52, 211, 153, 0.4);
    --border-danger: rgba(244, 63, 94, 0.4);

    /* Text */
    --text-primary: #f0f0f5;
    --text-secondary: #9898a8;
    --text-tertiary: #5e5e72;
    --text-inverse: #0a0a0f;

    /* Accents */
    --accent-indigo: #818cf8;
    --accent-indigo-dim: rgba(129, 140, 248, 0.15);
    --accent-emerald: #34d399;
    --accent-emerald-dim: rgba(52, 211, 153, 0.12);
    --accent-rose: #f43f5e;
    --accent-rose-dim: rgba(244, 63, 94, 0.12);
    --accent-amber: #fbbf24;
    --accent-amber-dim: rgba(251, 191, 36, 0.12);
    --accent-sky: #38bdf8;
    --accent-sky-dim: rgba(56, 189, 248, 0.12);

    /* Gradients */
    --gradient-score-good: linear-gradient(135deg, #34d399, #38bdf8);
    --gradient-score-mid: linear-gradient(135deg, #fbbf24, #fb923c);
    --gradient-score-bad: linear-gradient(135deg, #f43f5e, #e879f9);
    --gradient-hero: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(52, 211, 153, 0.06));

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow-indigo: 0 0 24px rgba(99, 102, 241, 0.15);
    --shadow-glow-emerald: 0 0 24px rgba(52, 211, 153, 0.15);

    /* Sizing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

::selection {
    background: rgba(129, 140, 248, 0.3);
    color: #fff;
}

/* ── Animated Background ── */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
    animation: bgFloat 20s ease-in-out infinite alternate;
}

.bg-glow--1 {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -100px;
    background: rgba(99, 102, 241, 0.06);
}

.bg-glow--2 {
    width: 500px;
    height: 500px;
    bottom: -150px;
    left: -100px;
    background: rgba(52, 211, 153, 0.04);
    animation-delay: -7s;
}

.bg-glow--3 {
    width: 400px;
    height: 400px;
    top: 50%;
    left: 50%;
    background: rgba(244, 63, 94, 0.03);
    animation-delay: -13s;
}

@keyframes bgFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -20px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 30px) scale(0.95);
    }

    100% {
        transform: translate(10px, 10px) scale(1);
    }
}

/* ── Header ── */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid var(--border-subtle);
}

.header__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.header__logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.header__logo-text {
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-emerald));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header__badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-indigo);
    background: var(--accent-indigo-dim);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(129, 140, 248, 0.15);
}

.header__nav {
    display: flex;
    gap: 2px;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 3px;
    border: 1px solid var(--border-subtle);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

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

.nav-btn--active {
    color: var(--text-primary);
    background: var(--bg-surface-raised);
    box-shadow: var(--shadow-sm);
}

.header__status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-tertiary);
    transition: background var(--duration-normal);
}

.status-dot--ok {
    background: var(--accent-emerald);
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.5);
}

.status-dot--error {
    background: var(--accent-rose);
    box-shadow: 0 0 6px rgba(244, 63, 94, 0.5);
}

.status-dot--checking {
    animation: pulse 1.5s ease infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* ── Main ── */
.main {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

/* ── Views ── */
.view {
    display: none;
}

.view--active {
    display: block;
    animation: fadeIn 0.4s var(--ease-out);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Steps ── */
.step {
    display: none;
}

.step--active {
    display: block;
    animation: fadeIn 0.4s var(--ease-out);
}

.step__header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
}

.step__number {
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-indigo);
    background: var(--accent-indigo-dim);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(129, 140, 248, 0.12);
    letter-spacing: 0.05em;
}

.step__title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.25;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step__subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ── Input Card ── */
.input-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 32px;
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow-lg);
    transition: border-color var(--duration-normal) var(--ease-out);
}

.input-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.input-group {
    margin-bottom: 24px;
}

.input-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-field {
    width: 100%;
    height: 52px;
    padding: 0 48px 0 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    background: var(--bg-surface);
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-md);
    outline: none;
    transition: all var(--duration-fast) var(--ease-out);
    text-transform: uppercase;
}

.input-field::placeholder {
    color: var(--text-tertiary);
    text-transform: none;
    font-size: 0.95rem;
}

.input-field:focus {
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 3px var(--accent-indigo-dim), var(--shadow-glow-indigo);
}

.input-field.input-field--valid {
    border-color: var(--accent-emerald);
    box-shadow: 0 0 0 3px var(--accent-emerald-dim);
}

.input-field.input-field--invalid {
    border-color: var(--accent-rose);
    box-shadow: 0 0 0 3px var(--accent-rose-dim);
}

.input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    transition: color var(--duration-fast);
}

.input-hint {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    margin-top: 6px;
}

.input-error {
    font-size: 0.75rem;
    color: var(--accent-rose);
    margin-top: 4px;
    min-height: 1.2em;
}

/* ── Buttons ── */
.action-row {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none !important;
}

.btn--primary {
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #7c7ffa, #a5b4fc);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

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

.btn--ghost {
    color: var(--text-secondary);
    background: var(--bg-glass);
    border: 1px solid var(--border-default);
}

.btn--ghost:hover:not(:disabled) {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn__loader {
    display: none;
    align-items: center;
    gap: 6px;
}

.btn.btn--loading .btn__text {
    display: none;
}

.btn.btn--loading .btn__arrow {
    display: none;
}

.btn.btn--loading .btn__loader {
    display: flex;
}

.btn.btn--loading {
    pointer-events: none;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-glass);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    flex-shrink: 0;
}

.back-btn:hover {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
    transform: translateX(-2px);
}

/* ── Quick Select ── */
.quick-select {
    border-top: 1px solid var(--border-subtle);
    padding-top: 18px;
}

.quick-select__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}

.quick-select__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.chip:hover {
    color: var(--accent-indigo);
    border-color: rgba(129, 140, 248, 0.3);
    background: var(--accent-indigo-dim);
    transform: translateY(-1px);
}

.chip__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.chip__dot--healthy {
    background: var(--accent-emerald);
}

.chip__dot--stressed {
    background: var(--accent-rose);
}

.chip__dot--borderline {
    background: var(--accent-amber);
}

.chip__dot--growing {
    background: var(--accent-sky);
}

.chip__dot--suspended {
    background: var(--accent-rose);
}

/* ── Dashboard ── */
.dashboard {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
}

/* ── Score Card ── */
.score-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 28px;
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.gauge {
    position: relative;
    width: 180px;
    height: 180px;
}

.gauge__svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.gauge__track {
    fill: none;
    stroke: var(--bg-surface-raised);
    stroke-width: 10;
}

.gauge__fill {
    fill: none;
    stroke: url(#gaugeGrad);
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.2s var(--ease-out);
}

.gauge__center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gauge__score {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.gauge__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.score-meta {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.meta-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.meta-value {
    font-size: 0.82rem;
    font-weight: 700;
}

.meta-value--grade {
    font-size: 1rem;
    padding: 2px 10px;
    border-radius: var(--radius-sm);
}

.meta-value--mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-tertiary);
}

/* ── SHAP Card ── */
.shap-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 24px;
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow-lg);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 18px;
    color: var(--text-primary);
}

.shap-factors {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shap-factor {
    display: grid;
    grid-template-columns: 1fr 80px 60px;
    gap: 10px;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--duration-fast) var(--ease-out);
    animation: slideInRight 0.3s var(--ease-out) both;
}

.shap-factor:hover {
    background: var(--bg-glass-hover);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(3px);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.shap-factor__name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
}

.shap-factor__bar-wrap {
    height: 6px;
    background: var(--bg-surface);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.shap-factor__bar {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.8s var(--ease-out);
}

.shap-factor__bar--positive {
    background: var(--gradient-score-good);
}

.shap-factor__bar--negative {
    background: var(--gradient-score-bad);
}

.shap-factor__value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    text-align: right;
}

.shap-factor__value--positive {
    color: var(--accent-emerald);
}

.shap-factor__value--negative {
    color: var(--accent-rose);
}

/* ── Report Section ── */
.report-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 28px;
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow-lg);
    margin-bottom: 20px;
}

.report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.report-badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-amber);
    background: var(--accent-amber-dim);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(251, 191, 36, 0.15);
}

.report-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.report-block {
    padding: 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    animation: fadeIn 0.4s var(--ease-out) both;
}

.report-block__title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-indigo);
    margin-bottom: 8px;
}

.report-block__text {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.report-block--recommendation {
    border-color: rgba(129, 140, 248, 0.2);
    background: var(--accent-indigo-dim);
}

.report-block--recommendation .report-block__text {
    color: var(--text-primary);
    font-weight: 500;
}

.report-disclaimer {
    margin-top: 16px;
    padding: 14px 16px;
    font-size: 0.72rem;
    line-height: 1.6;
    color: var(--text-tertiary);
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent-amber);
}

/* ── Result Actions ── */
.result-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── History ── */
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.history-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 64px 24px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.88rem;
}

.history-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 20px;
    backdrop-filter: blur(24px);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    animation: fadeIn 0.3s var(--ease-out) both;
}

.history-card:hover {
    border-color: rgba(129, 140, 248, 0.3);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-indigo);
}

.history-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.history-card__name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}

.history-card__gstin {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.history-card__score {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.history-card__grade {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    margin-left: 6px;
}

.history-card__meta {
    display: flex;
    gap: 16px;
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

/* ── Toast ── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-surface-raised);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
    animation: toastIn 0.35s var(--ease-spring);
    transition: all var(--duration-normal) var(--ease-out);
}

.toast--error {
    border-color: var(--border-danger);
    background: rgba(244, 63, 94, 0.08);
}

.toast--success {
    border-color: var(--border-success);
    background: rgba(52, 211, 153, 0.08);
}

.toast.toast--exit {
    opacity: 0;
    transform: translateX(20px);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* ── Color utilities ── */
.color-good {
    color: var(--accent-emerald) !important;
}

.color-mid {
    color: var(--accent-amber) !important;
}

.color-bad {
    color: var(--accent-rose) !important;
}

.bg-good {
    background: var(--accent-emerald-dim) !important;
    color: var(--accent-emerald) !important;
}

.bg-mid {
    background: var(--accent-amber-dim) !important;
    color: var(--accent-amber) !important;
}

.bg-bad {
    background: var(--accent-rose-dim) !important;
    color: var(--accent-rose) !important;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .header__inner {
        padding: 0 16px;
    }

    .header__badge {
        display: none;
    }

    .main {
        padding: 20px 16px 48px;
    }

    .input-card {
        padding: 20px;
    }

    .step__title {
        font-size: 1.2rem;
    }

    .score-card {
        padding: 20px;
    }

    .shap-card {
        padding: 18px;
    }

    .action-row {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .gauge {
        width: 150px;
        height: 150px;
    }

    .gauge__score {
        font-size: 1.8rem;
    }
}