/* ═══════════════════════════════════════════════════════════════════════════
   RepoShield Dashboard — frames.so design layer
   Loads on top of landing.css (shared tokens, nav, buttons, type scale).
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --orange: #f97316;
    --yellow: #eab308;
    --text-muted: #71717a;
}

.hidden { display: none !important; }

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

/* ── Ambient glow backdrop ─────────────────────────────────────────── */

.dash-glow {
    position: fixed;
    top: -220px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1100px, 100vw);
    height: 620px;
    background: radial-gradient(closest-side, rgba(99, 102, 241, 0.13), transparent 72%);
    filter: blur(30px);
    pointer-events: none;
    z-index: 0;
}

.dash-shell {
    position: relative;
    z-index: 50;
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: clamp(0.75rem, 2.5vw, 2rem);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ── Hero / scanner ────────────────────────────────────────────────── */

.scanner-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(1.5rem, 3vh, 2.25rem);
    padding: clamp(1.75rem, 5vh, 3.25rem) 8px clamp(1.5rem, 5vh, 2.75rem);
    animation: rise 0.75s ease both;
}

.scanner-input-wrapper {
    width: 100%;
    max-width: 660px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scanner-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: rgba(16, 16, 19, 0.82);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 7px 7px 7px 18px;
    transition: border-color 200ms ease, box-shadow 200ms ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.scanner-input-container:focus-within {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 16px 50px -12px rgba(99, 102, 241, 0.3);
}
.scanner-input-container:hover:not(:focus-within) {
    border-color: rgba(255, 255, 255, 0.15);
}

.input-icon {
    color: var(--faint);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.scanner-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: none;
    color: var(--fg);
    font-family: var(--font-mono);
    font-size: 0.92rem;
    height: 46px;
}
.scanner-input::placeholder { color: var(--faint); }

.scan-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 22px;
    background: var(--fg);
    color: #09090b;
    border: 0;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}
.scan-btn:hover:not(:disabled) {
    background: #e4e4e7;
    box-shadow: 0 8px 30px -6px rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}
.scan-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}
.scan-btn:hover:not(:disabled) .btn-arrow { transform: translateX(3px); }
.scan-btn:active:not(:disabled) { transform: translateY(0); }
.scan-btn:disabled { opacity: 0.55; cursor: wait; }
.scan-btn .btn-arrow { transition: transform 200ms ease; }

.input-hint {
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--faint);
    display: flex;
    align-items: center;
    gap: 5px;
}

.hint-lock {
    flex-shrink: 0;
    opacity: 0.75;
}

@media (max-width: 560px) {
    .scanner-input-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px;
        border-radius: 12px;
    }
    .input-row {
        position: relative;
        width: 100%;
    }
    .input-icon {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
    }
    .scanner-input {
        width: 100%;
        height: 44px;
        padding-left: 40px;
    }
    .scan-btn { width: 100%; height: 44px; }
}

.grad-text {
    background: linear-gradient(92deg, #a5b4fc 0%, #818cf8 45%, #22d3ee 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 26px;
}

.tpill {
    --tc: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.02em;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 5px 14px;
    transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
}
.tpill i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tc);
    box-shadow: 0 0 7px var(--tc);
}

.t-yara { --tc: #a5b4fc; }
.t-osv { --tc: #4ade80; }
.t-gpt { --tc: #c4b5fd; }
.t-secret { --tc: #fbbf24; }

.tpill:hover {
    color: var(--fg);
    border-color: color-mix(in srgb, var(--tc) 45%, transparent);
    background: color-mix(in srgb, var(--tc) 10%, transparent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px -6px color-mix(in srgb, var(--tc) 30%, transparent);
}
.tpill:active {
    transform: translateY(0) scale(0.98);
}
.tpill i {
    transition: transform 200ms ease, box-shadow 200ms ease;
}
.tpill:hover i {
    transform: scale(1.3);
    box-shadow: 0 0 12px var(--tc);
}

/* legacy mobile input hacks removed — handled by the ≤560px block above */

/* ── Progress ──────────────────────────────────────────────────────── */

.progress-section {
    display: flex;
    justify-content: center;
    padding: clamp(1.5rem, 5vh, 3rem) 0;
    animation: rise 0.45s ease both;
}

.progress-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 720px;
    background: var(--muted-bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: clamp(20px, 3vw, 28px);
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.progress-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -45%;
    width: 45%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.07), transparent);
    animation: sheen 1.9s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sheen { to { left: 115%; } }

@media (prefers-reduced-motion: reduce) {
    .progress-card::after { animation: none; }
}

.progress-header { display: flex; align-items: center; gap: 15px; }

.spinner {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.12);
    border-top-color: var(--fg);
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

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

.progress-head-text h3 { font-size: 1.05rem; font-weight: 700; }
.progress-head-text p {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--faint);
    margin-top: 3px;
}

.progress-bar-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--indigo), #a5b4fc, #22d3ee);
    background-size: 200% 100%;
    transition: width 0.45s ease;
    animation: progress-shimmer 2s ease-in-out infinite;
}
@keyframes progress-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.progress-steps {
    display: flex;
    align-items: center;
    margin-top: 4px;
}

.step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--faint);
    transition: color 250ms ease;
}

.step-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.18);
    transition: all 250ms ease;
}

.step-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.09);
    margin: 0 12px;
    min-width: 18px;
}

.step.active { color: #c7d2fe; }
.step.active .step-dot {
    border-color: var(--indigo);
    background: rgba(99, 102, 241, 0.35);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
    animation: step-pulse 1.5s ease-in-out infinite;
}
@keyframes step-pulse {
    0%, 100% { box-shadow: 0 0 12px rgba(99, 102, 241, 0.6); }
    50% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.8); }
}

.step.done { color: #86efac; }
.step.done .step-dot {
    border-color: var(--green);
    background: var(--green);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
    animation: done-pop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes done-pop {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@media (max-width: 480px) {
    .step span { display: none; }
    .step-line { margin: 0 8px; }
}

/* ── Results ───────────────────────────────────────────────────────── */

.results-section {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.25rem);
    padding: clamp(2rem, 6vh, 3.5rem) 0 3rem;
}

.results-section > * { animation: rise 0.55s ease both; }
.results-section > *:nth-child(1) { animation-delay: 0.03s; }
.results-section > *:nth-child(2) { animation-delay: 0.1s; }
.results-section > *:nth-child(3) { animation-delay: 0.17s; }
.results-section > *:nth-child(4) { animation-delay: 0.24s; }
.results-section > *:nth-child(5) { animation-delay: 0.31s; }

/* ── Verdict Hero Banner ─────────────────────────────────────────── */

.verdict-hero {
    position: relative;
    overflow: hidden;
    background: var(--muted-bg);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: clamp(28px, 4vw, 44px);
    animation: verdict-slide 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes verdict-slide {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.verdict-hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--vc, var(--green)), transparent);
}

.verdict-hero.safetoclone { --vc: var(--green); }
.verdict-hero.caution { --vc: var(--yellow); }
.verdict-hero.suspicious { --vc: var(--orange); }
.verdict-hero.malicious { --vc: var(--red); }

.verdict-glow {
    position: absolute;
    top: -120px; left: 50%;
    transform: translateX(-50%);
    width: 500px; height: 300px;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--vc, var(--green)) 20%, transparent), transparent 70%);
    filter: blur(50px);
    pointer-events: none;
    animation: glow-breathe 4s ease-in-out infinite;
}
@keyframes glow-breathe {
    0%, 100% { opacity: 0.8; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.verdict-hero-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: clamp(20px, 4vw, 36px);
    flex-wrap: wrap;
}

.verdict-hero-icon {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--vc, var(--green)) 12%, transparent);
    border: 1.5px solid color-mix(in srgb, var(--vc, var(--green)) 30%, transparent);
    flex-shrink: 0;
    animation: verdict-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes verdict-pop {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

.verdict-hero-text { flex: 1; min-width: 240px; }

.verdict-eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--vc, var(--green)) 80%, #fff);
    margin-bottom: 10px;
}

.verdict-hero-title {
    font-size: clamp(1.75rem, 4.5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--fg);
    text-wrap: balance;
}

.verdict-hero-sub {
    margin-top: 10px;
    max-width: 50ch;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--muted);
}

.verdict-score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.verdict-score-ring { position: relative; width: 100px; height: 100px; }
.verdict-score-ring svg { width: 100%; height: 100%; }

.vsr-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.07);
    stroke-width: 8;
}

.vsr-fill {
    fill: none;
    stroke: var(--green);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transform-origin: center;
    transform: rotate(-90deg);
    transition: stroke-dashoffset 1.1s cubic-bezier(0.22, 1, 0.36, 1), stroke 400ms ease;
}

.vsr-value {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}
.vsr-value b {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
}
.vsr-value i {
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    color: var(--faint);
    margin-left: 2px;
}

.verdict-score-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--faint);
}

.verdict-repo-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
}

.verdict-repo-chip {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 5px 14px;
    word-break: break-all;
}

.verdict-time {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--faint);
}

@media (max-width: 640px) {
    .verdict-hero-content { flex-direction: column; align-items: flex-start; }
    .verdict-score-block { flex-direction: row; gap: 12px; }
}

/* ── Quick Stats Row ─────────────────────────────────────────────── */

.quick-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    .quick-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .quick-stats { grid-template-columns: repeat(2, 1fr); }
}

.qs-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: var(--muted-bg);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 18px 12px;
    text-align: center;
    transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
    animation: qs-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.qs-card:nth-child(1) { animation-delay: 0.05s; }
.qs-card:nth-child(2) { animation-delay: 0.1s; }
.qs-card:nth-child(3) { animation-delay: 0.15s; }
.qs-card:nth-child(4) { animation-delay: 0.2s; }
.qs-card:nth-child(5) { animation-delay: 0.25s; }
@keyframes qs-pop {
    from { opacity: 0; transform: translateY(16px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.qs-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-4px);
    box-shadow: 0 12px 35px -10px rgba(0, 0, 0, 0.4);
}
.qs-card:active {
    transform: translateY(-1px) scale(0.98);
    transition-duration: 0.1s;
}

.qs-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.qs-icon.blue { color: #93c5fd; background: rgba(59, 130, 246, 0.12); }
.qs-icon.orange { color: #fdba74; background: rgba(249, 115, 22, 0.12); }
.qs-icon.red { color: #fca5a5; background: rgba(239, 68, 68, 0.12); }
.qs-icon.purple { color: #d8b4fe; background: rgba(168, 85, 247, 0.12); }
.qs-icon.cyan { color: #67e8f9; background: rgba(6, 182, 212, 0.12); }

.qs-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.qs-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--faint);
    white-space: nowrap;
}

.qs-card.clean .qs-value { color: var(--green); }

/* ── Findings Summary ────────────────────────────────────────────── */

.findings-summary {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fs-card {
    background: var(--muted-bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 200ms ease, box-shadow 200ms ease;
    animation: fs-slide 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.fs-card:nth-child(1) { animation-delay: 0.1s; }
.fs-card:nth-child(2) { animation-delay: 0.2s; }
.fs-card:nth-child(3) { animation-delay: 0.3s; }
@keyframes fs-slide {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
.fs-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.fs-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    cursor: pointer;
    user-select: none;
    transition: background 180ms ease;
}
.fs-header:hover { background: rgba(255, 255, 255, 0.03); }
.fs-header:active { background: rgba(255, 255, 255, 0.05); }

.fs-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.fs-icon-wrap.orange { color: #fdba74; background: rgba(249, 115, 22, 0.1); }
.fs-icon-wrap.red { color: #fca5a5; background: rgba(239, 68, 68, 0.1); }
.fs-icon-wrap.purple { color: #d8b4fe; background: rgba(168, 85, 247, 0.1); }

.fs-text { flex: 1; min-width: 0; }
.fs-text h3 { font-size: 0.95rem; font-weight: 700; color: var(--fg); }
.fs-text p { font-size: 0.76rem; color: var(--faint); margin-top: 2px; }

.fs-count {
    min-width: 28px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    flex-shrink: 0;
}
.fs-count.zero {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

.fs-body {
    padding: 0 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.findings-pass {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 20px 16px;
    border-radius: 10px;
    background: rgba(74, 222, 128, 0.05);
    border: 1px dashed rgba(74, 222, 128, 0.25);
    color: #86efac;
    font-size: 0.85rem;
}
.findings-pass svg { flex-shrink: 0; }

.finding-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.finding-rule {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fg);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.finding-file {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: #a5b4fc;
    word-break: break-all;
}

.finding-detail {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--faint);
    word-break: break-word;
}
.finding-detail code {
    font-family: var(--font-mono);
    font-size: 0.78em;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-soft);
    word-break: break-all;
}
.finding-detail.dim { font-size: 0.76rem; opacity: 0.8; }

.severity-badge {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 9px;
    border-radius: 999px;
}
.severity-badge.critical { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.severity-badge.high { background: rgba(249, 115, 22, 0.15); color: #fdba74; }
.severity-badge.medium { background: rgba(234, 179, 8, 0.15); color: #fde047; }
.severity-badge.low { background: rgba(34, 197, 94, 0.15); color: #86efac; }

/* ── Red Flags ───────────────────────────────────────────────────── */

.red-flags-section {
    background: var(--muted-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-lg);
    padding: clamp(18px, 3vw, 24px);
}

.rf-header, .rp-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.rf-icon, .rp-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.rf-icon { color: #fca5a5; background: rgba(239, 68, 68, 0.12); }
.rp-icon { color: #a5b4fc; background: rgba(99, 102, 241, 0.12); }

.rf-header h3, .rp-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--fg);
}
.rf-header p, .rp-header p {
    font-size: 0.8rem;
    color: var(--faint);
    margin-top: 3px;
}

.red-flags-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.red-flag-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.14);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.flag-num {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 800;
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
}

.flag-text { color: #fecaca; padding-top: 1px; }

/* ── Reasoning Panel ─────────────────────────────────────────────── */

.reasoning-panel {
    background: var(--muted-bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: clamp(18px, 3vw, 24px);
}

.reasoning-steps {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.reasoning-steps::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 12px;
    bottom: 12px;
    width: 1px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.35), rgba(255, 255, 255, 0.06));
}

.reasoning-step {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 14px 12px 44px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--fg-dim);
    word-break: break-word;
}

.reasoning-step::before {
    content: attr(data-step);
    position: absolute;
    left: 7px;
    top: 13px;
    z-index: 1;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.56rem;
    font-weight: 800;
    background: var(--indigo);
    color: #fff;
    box-shadow: 0 0 0 4px var(--muted-bg);
}

.turn-badge {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.14);
    border-radius: 999px;
    padding: 2px 8px;
}

.empty-state {
    padding: 22px;
    text-align: center;
    color: var(--faint);
    font-size: 0.85rem;
    border: 1px dashed var(--border);
    border-radius: 10px;
}

/* ── Action Row ──────────────────────────────────────────────────── */

.action-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--fg-dim);
    font-family: var(--font-sans);
    font-size: 0.93rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}
.btn-outline:hover {
    color: var(--fg);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-1px);
}


