:root {
    --perf-bg-card: #13161f;
    --perf-bg-soft: #191d28;
    --perf-border: #252b3b;
    --perf-border-strong: #2e3549;
    --perf-text: #e2e8f0;
    --perf-muted: #64748b;
    --perf-faint: #475569;
}

.perf-shell {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.perf-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.perf-hero-copy {
    min-width: 0;
}

.perf-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: rgba(30, 41, 59, 0.8);
    color: #a5b4fc;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.perf-title {
    margin: 0.9rem 0 0;
    font-size: 2rem;
    line-height: 1.12;
    font-weight: 900;
    color: #f8fafc;
}

.perf-subtitle {
    margin: 0.7rem 0 0;
    max-width: 62ch;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #94a3b8;
}

.perf-hud-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
}

.perf-hud-stat {
    padding: 1.2rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--perf-border);
    background: var(--perf-bg-soft);
}

.perf-hud-stat.is-default {
    border-color: #374151;
}

.perf-hud-stat.is-success {
    border-color: #166534;
}

.perf-hud-stat.is-accent {
    border-color: #4338ca;
}

.perf-hud-stat.is-primary {
    border-color: #1d4ed8;
}

.perf-hud-stat.is-warning {
    border-color: #c2410c;
}

.perf-hud-value {
    font-size: 2rem;
    line-height: 1;
    font-weight: 900;
    color: #f8fafc;
    letter-spacing: -0.04em;
}

.perf-hud-value.is-success {
    color: #4ade80;
}

.perf-hud-value.is-accent {
    color: #818cf8;
}

.perf-hud-value.is-primary {
    color: #60a5fa;
}

.perf-hud-value.is-warning {
    color: #fb923c;
}

.perf-hud-label {
    margin-top: 0.35rem;
    font-size: 0.68rem;
    color: var(--perf-muted);
}

.perf-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.8rem;
    padding: 3rem 1.4rem;
    border-radius: 18px;
    border: 1px solid rgba(51, 65, 85, 0.7);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.52), rgba(15, 23, 42, 0.2));
}

.perf-empty-icon {
    width: 3rem;
    height: 3rem;
    color: #475569;
}

.perf-empty-title {
    margin: 0;
    color: #cbd5e1;
    font-size: 1.05rem;
    font-weight: 800;
}

.perf-empty-copy {
    margin: 0;
    max-width: 34rem;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.7;
}

.perf-main {
    display: block;
}

.perf-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.95rem;
}

.perf-card {
    min-width: 0;
    padding: 1.15rem;
    border-radius: 18px;
    border: 1px solid var(--perf-border);
    background: var(--perf-bg-card);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.perf-card--trend {
    background:
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.12), transparent 38%),
        var(--perf-bg-card);
}

.perf-card-kicker {
    font-size: 0.66rem;
    font-weight: 800;
    color: var(--perf-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
}

.perf-card-footnote {
    margin-top: 0.7rem;
    font-size: 0.67rem;
    color: var(--perf-faint);
}

.perf-chart-wrap {
    position: relative;
    height: 220px;
}

.perf-trend-ticks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
    gap: 0.45rem;
    margin-top: 0.55rem;
}

.perf-trend-tick {
    font-size: 0.63rem;
    color: #475569;
    line-height: 1.45;
}

.perf-trend-tick strong {
    display: block;
    margin-top: 0.1rem;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 800;
}

.perf-trend-tick.is-latest strong {
    color: #818cf8;
}

.perf-errors-list,
.perf-bancas-list,
.perf-insights-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.perf-error-row {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr) 42px;
    gap: 0.7rem;
    align-items: center;
}

.perf-error-label {
    color: #cbd5e1;
    font-size: 0.78rem;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.perf-error-track {
    background: #1f2937;
    border-radius: 8px;
    overflow: hidden;
}

.perf-balance-track {
    display: flex;
    align-items: stretch;
    background: #1f2937;
    border: 1px solid rgba(51, 65, 85, 0.9);
}

.perf-balance-fill {
    min-width: 2.4rem;
    padding: 0.4rem 0.55rem;
    font-size: 0.69rem;
    font-weight: 800;
    white-space: nowrap;
}

.perf-balance-fill span {
    display: block;
}

.perf-balance-fill--hits {
    background: linear-gradient(90deg, #166534, #22c55e);
    color: #f0fdf4;
    text-align: left;
}

.perf-balance-fill--errors {
    color: #fff;
    text-align: right;
}

.perf-balance-fill--errors.is-danger {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.perf-balance-fill--errors.is-high {
    background: linear-gradient(90deg, #f97316, #ea580c);
}

.perf-balance-fill--errors.is-mid {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.perf-balance-fill--errors.is-low {
    background: linear-gradient(90deg, #fb7185, #f43f5e);
}

.perf-balance-fill--errors.is-minor {
    background: linear-gradient(90deg, #94a3b8, #64748b);
}

.perf-error-fill {
    min-width: 2.2rem;
    padding: 0.38rem 0.55rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
    text-align: right;
}

.perf-error-fill.is-danger {
    background: #ef4444;
}

.perf-error-fill.is-high {
    background: #f97316;
}

.perf-error-fill.is-mid {
    background: #eab308;
}

.perf-error-fill.is-low {
    background: #22c55e;
}

.perf-error-fill.is-minor {
    background: #3b82f6;
}

.perf-error-tone {
    font-size: 0.72rem;
    font-weight: 800;
}

.perf-error-tone-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.18rem;
}

.perf-error-tone--hits {
    color: #4ade80;
}

.perf-error-tone.is-danger {
    color: #ef4444;
}

.perf-error-tone.is-high {
    color: #f97316;
}

.perf-error-tone.is-mid {
    color: #eab308;
}

.perf-error-tone.is-low {
    color: #22c55e;
}

.perf-error-tone.is-minor {
    color: #3b82f6;
}

.perf-banca-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--perf-border-strong);
    background: var(--perf-bg-soft);
}

.perf-banca-name {
    font-size: 0.78rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.perf-banca-side {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.perf-banca-track {
    width: 74px;
    height: 5px;
    border-radius: 999px;
    background: #1e293b;
    overflow: hidden;
}

.perf-banca-fill {
    height: 100%;
    border-radius: 999px;
}

.perf-banca-fill.is-good {
    background: #22c55e;
}

.perf-banca-fill.is-mid {
    background: #eab308;
}

.perf-banca-fill.is-low {
    background: #f97316;
}

.perf-banca-pct {
    min-width: 2.1rem;
    text-align: right;
    font-size: 0.76rem;
    font-weight: 800;
}

.perf-banca-pct.is-good {
    color: #4ade80;
}

.perf-banca-pct.is-mid {
    color: #fbbf24;
}

.perf-banca-pct.is-low {
    color: #fb923c;
}

.perf-insight {
    display: flex;
    gap: 0.7rem;
    padding: 0.95rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--perf-border-strong);
    font-size: 0.75rem;
    line-height: 1.65;
}

.perf-insight-icon {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    margin-top: 0.12rem;
}

.perf-insight.is-positive {
    background: #0a1f0a;
    border-color: #14532d;
    color: #86efac;
}

.perf-insight.is-warning {
    background: #1a0a0a;
    border-color: #450a0a;
    color: #fca5a5;
}

.perf-insight.is-accent {
    background: #0d0f1f;
    border-color: #312e81;
    color: #a5b4fc;
}

.perf-card--radar {
    background:
        radial-gradient(circle at bottom left, rgba(99, 102, 241, 0.10), transparent 45%),
        var(--perf-bg-card);
}

.perf-radar-wrap {
    position: relative;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1100px) {
    .perf-hud-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .perf-grid,
    .perf-hud-grid {
        grid-template-columns: 1fr;
    }

    .perf-error-row {
        grid-template-columns: 1fr;
    }

    .perf-error-label {
        text-align: left;
    }
}

@media (max-width: 640px) {
    .perf-title {
        font-size: 1.55rem;
    }

    .perf-card,
    .perf-hud-stat {
        padding: 1rem;
    }

    .perf-chart-wrap {
        height: 190px;
    }
}
