/* ============================================================
 * app.css — uappgenerator-specific styles
 *
 * Extends the cloned design system with app-specific layouts,
 * components, and ABRN-flavored polish.
 * ============================================================ */

/* ─── Body ──────────────────────────────────────────────── */
.uappgen-surface {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── Header ────────────────────────────────────────────── */
.quantix-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky, 1020);
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    background: linear-gradient(135deg, #1c1810 0%, #3d2415 58%, #5a1a2a 100%);
    border-bottom: 2px solid rgba(138, 21, 56, 0.4);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    color: #f5f0eb;
}

.quantix-header-content {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    gap: 1.5rem;
}

.header-title h1 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.header-subtitle {
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.6;
}

.header-nav {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
}

.nav-link {
    color: rgba(245, 240, 235, 0.75);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md, 6px);
    transition: all 200ms ease;
}

.nav-link:hover {
    color: #f5f0eb;
    background: rgba(255,255,255,0.08);
}

.nav-link.active {
    color: #f5f0eb;
    background: rgba(138, 21, 56, 0.35);
}

.header-actions {
    display: flex;
    align-items: center;
}

.theme-settings-trigger {
    background: none;
    border: none;
    color: rgba(245,240,235,0.7);
    cursor: pointer;
    padding: 0.375rem;
    border-radius: var(--radius-md, 6px);
    transition: all 200ms;
}

.theme-settings-trigger:hover {
    color: #f5f0eb;
    background: rgba(255,255,255,0.1);
}

/* ─── Main Content ──────────────────────────────────────── */
.page {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 1.5rem;
}

/* ─── Dashboard Hero ────────────────────────────────────── */
.dashboard-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl, 12px);
    margin-bottom: 2rem;
}

.hero-inner {
    padding: 3rem 2.5rem;
    position: relative;
    z-index: 1;
}

.af-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--af-brand, #8a1538);
    margin-bottom: 1rem;
}

.af-eyebrow-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--af-brand, #8a1538);
}

.af-lede {
    font-size: 1.1rem;
    color: var(--af-text-muted, #5f564a);
    max-width: 56ch;
    line-height: 1.6;
    margin: 0.5rem 0 1.5rem;
}

.af-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.af-stat-grid div {
    text-align: center;
}

.af-stat-grid dt {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--af-text-muted, #5f564a);
    margin-bottom: 0.25rem;
}

.af-stat-grid dd {
    font-family: var(--af-serif, 'Libre Baskerville', serif);
    font-size: 2.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin: 0;
    color: var(--af-paper-ink, #1c1810);
}

/* ─── Glass & Atmosphere ────────────────────────────────── */
.af-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-xl, 12px);
    box-shadow: 0 10px 15px rgba(15, 20, 40, 0.06);
}

.af-noise {
    position: relative;
    isolation: isolate;
}

.af-noise::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.04;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    border-radius: inherit;
}

.af-ambient-mesh {
    position: relative;
    isolation: isolate;
}

.af-ambient-mesh::before {
    content: "";
    position: absolute;
    inset: -10%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 22%, rgba(138,21,56,0.10), transparent 45%),
        radial-gradient(circle at 82% 28%, rgba(138,21,56,0.07), transparent 50%),
        radial-gradient(circle at 50% 88%, rgba(138,21,56,0.05), transparent 55%);
    filter: blur(40px);
}

.loading-spinner-dots::after {
    content: '...';
    display: inline-block;
    animation: loading-dots 1.5s infinite;
    width: 1em;
    text-align: left;
}
@keyframes loading-dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

/* ─── Badge Components ──────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-md, 4px);
    line-height: 1;
}
.badge-success {
    background: #d1fae5;
    color: #065f46;
}
.badge-warning {
    background: #fef3c7;
    color: #92400e;
}
.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* ─── Alert Components ──────────────────────────────────── */
.alert {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-lg, 6px);
    font-size: 0.8125rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}
.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-color: rgba(16, 185, 129, 0.2);
}
.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.2);
}
.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.2);
}
.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-color: rgba(59, 130, 246, 0.2);
}

/* ─── Section Layouts ───────────────────────────────────── */
.content-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary, #1f2937);
}

/* ─── Page Header ───────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.page-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-title {
    font-size: 1.375rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.slug-display {
    font-size: 0.8rem;
    color: var(--color-text-secondary, #6b7280);
    background: var(--color-gray-100, #f3f4f6);
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-md, 6px);
}

/* ─── Cards ─────────────────────────────────────────────── */
.card {
    background: var(--color-bg-elevated, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-lg, 8px);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.card-header {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--color-border-subtle, #f3f4f6);
    background: var(--color-bg-secondary, #f9fafb);
}

.card-header h3, .card-header h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid var(--color-border-subtle, #f3f4f6);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ─── Forms ─────────────────────────────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--color-text-primary, #1f2937);
}

.required {
    color: var(--color-danger, #ef4444);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-md, 6px);
    background: var(--color-bg-primary, #fff);
    color: var(--color-text-primary, #1f2937);
    transition: border-color 200ms, box-shadow 200ms;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--af-brand, #8a1538);
    box-shadow: 0 0 0 3px rgba(138, 21, 56, 0.12);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--color-text-tertiary, #9ca3af);
    margin-top: 0.25rem;
    display: block;
}

.form-actions {
    padding: 1.25rem;
    border-top: 1px solid var(--color-border-subtle, #f3f4f6);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.inline-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border-subtle, #f3f4f6);
}

.form-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.form-input-sm,
.form-select-sm {
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-md, 6px);
    background: var(--color-bg-primary, #fff);
    color: var(--color-text-primary, #1f2937);
    font-family: inherit;
}

.form-input-sm:focus,
.form-select-sm:focus {
    outline: none;
    border-color: var(--af-brand, #8a1538);
    box-shadow: 0 0 0 2px rgba(138, 21, 56, 0.1);
}

.arrow-label {
    color: var(--color-text-tertiary, #9ca3af);
    font-size: 1.1rem;
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid transparent;
    border-radius: var(--radius-md, 6px);
    cursor: pointer;
    transition: all 200ms ease;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--af-brand, #8a1538);
    color: #fff;
    border-color: var(--af-brand, #8a1538);
}

.btn-primary:hover {
    background: var(--af-brand-ink, #5f1027);
    border-color: var(--af-brand-ink, #5f1027);
    box-shadow: 0 2px 8px rgba(138, 21, 56, 0.25);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary, #6b7280);
    border-color: var(--color-border, #e5e7eb);
}

.btn-ghost:hover {
    background: var(--color-gray-50, #f9fafb);
    color: var(--color-text-primary, #1f2937);
}

.btn-danger {
    background: var(--color-danger, #ef4444);
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm { padding: 0.3rem 0.625rem; font-size: 0.75rem; }
.btn-xs { padding: 0.15rem 0.4rem; font-size: 0.7rem; }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── Data Tables ───────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.data-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-secondary, #6b7280);
    border-bottom: 2px solid var(--color-border, #e5e7eb);
}

.data-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--color-border-subtle, #f3f4f6);
    color: var(--color-text-primary, #1f2937);
}

.data-table tbody tr:hover td {
    background: var(--af-brand-mist, rgba(138, 21, 56, 0.04));
}

/* ─── App Grid ──────────────────────────────────────────── */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.app-card {
    background: var(--color-bg-elevated, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-lg, 8px);
    padding: 1.25rem;
    transition: all 200ms ease;
    box-shadow: var(--shadow-xs, 0 1px 2px rgba(0,0,0,0.04));
}

.app-card:hover {
    box-shadow: var(--shadow-md, 0 4px 8px rgba(0,0,0,0.06));
    border-color: var(--af-brand-soft, rgba(138,21,56,0.2));
    transform: translateY(-1px);
}

.app-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.app-card-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
}

.app-card-header h3 a {
    color: var(--color-text-primary, #1f2937);
    text-decoration: none;
}

.app-card-header h3 a:hover {
    color: var(--af-brand, #8a1538);
}

.app-card-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.app-card-meta .slug {
    font-size: 0.75rem;
    color: var(--color-text-secondary, #6b7280);
}

.surface-tag {
    font-size: 0.65rem;
    background: var(--af-brand-mist, rgba(138,21,56,0.06));
    color: var(--af-brand, #8a1538);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm, 2px);
    font-weight: 500;
}

.app-card-desc {
    font-size: 0.8rem;
    color: var(--color-text-secondary, #6b7280);
    margin: 0.5rem 0;
    line-height: 1.5;
}

.app-card-stats {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--color-text-tertiary, #9ca3af);
    margin: 0.75rem 0;
}

.app-card-actions {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.75rem;
}

.app-card-time {
    display: block;
    font-size: 0.7rem;
    color: var(--color-text-tertiary, #9ca3af);
    margin-top: 0.5rem;
}

/* ─── Status & Badges ───────────────────────────────────── */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-draft { background: var(--color-warning, #f59e0b); }
.status-active { background: var(--color-success, #10b981); }
.status-archived { background: var(--color-gray-400, #9ca3af); }

.version-badge {
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--color-gray-100, #f3f4f6);
    color: var(--color-text-secondary, #6b7280);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm, 2px);
}

.role-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm, 2px);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.role-entity { background: #dbeafe; color: #1d4ed8; }
.role-child { background: #d1fae5; color: #047857; }
.role-lookup { background: #fef3c7; color: #b45309; }
.role-mirror { background: #e0e7ff; color: #4338ca; }

.run-status { font-weight: 600; }
.run-success { color: var(--color-success, #10b981); }
.run-failed { color: var(--color-danger, #ef4444); }
.run-running { color: var(--color-info, #3b82f6); }
.run-partial { color: var(--color-warning, #f59e0b); }

/* ─── Flash Messages ────────────────────────────────────── */
.flash-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    margin: 0.75rem 1.5rem;
    border-radius: var(--radius-md, 6px);
    font-size: 0.8125rem;
    font-weight: 500;
    animation: slideDown 300ms ease-out;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.flash-success {
    background: var(--color-success-bg, #d1fae5);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.flash-error {
    background: var(--color-danger-bg, #fee2e2);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.flash-message button {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 0 0.25rem;
}

.flash-message button:hover {
    opacity: 1;
}

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

/* ─── Edit Grid (two-column) ────────────────────────────── */
.edit-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}

.edit-sidebar .sidebar-card {
    position: sticky;
    top: 72px;
}

.info-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.info-list dt {
    color: var(--color-text-secondary, #6b7280);
    font-weight: 500;
}

.info-list dd {
    margin: 0;
    color: var(--color-text-primary, #1f2937);
}

/* ─── Show Grid ─────────────────────────────────────────── */
.show-grid {
    display: grid;
    gap: 1.25rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 0.5rem 1rem;
    font-size: 0.875rem;
}

.detail-grid dt {
    color: var(--color-text-secondary, #6b7280);
    font-weight: 500;
}

.detail-grid dd {
    margin: 0;
}

/* ─── Empty State ───────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--color-text-secondary, #6b7280);
    margin-bottom: 1.5rem;
}

/* ─── Footer ────────────────────────────────────────────── */
.app-footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.75rem;
    color: var(--color-text-tertiary, #9ca3af);
    border-top: 1px solid var(--color-border-subtle, #f3f4f6);
}

/* ─── Text Utilities ────────────────────────────────────── */
.text-muted { color: var(--color-text-secondary, #6b7280); }
.text-sm { font-size: 0.8125rem; }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
    .quantix-header { padding: 0 1rem; }
    .quantix-header-content { gap: 0.75rem; }
    .header-subtitle { display: none; }
    .page { padding: 1rem; }
    .form-grid { grid-template-columns: 1fr; }
    .edit-grid { grid-template-columns: 1fr; }
    .app-grid { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; gap: 0.75rem; }
    .hero-inner { padding: 2rem 1.5rem; }
    .af-stat-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .af-stat-grid dd { font-size: 1.75rem; }
    .form-row { flex-direction: column; }
}

@media (max-width: 480px) {
    .header-nav { display: none; }
    .af-stat-grid dd { font-size: 1.5rem; }
}

/* ─── Visual Sandbox Styles (Step 3) ────────────────────── */
#sandbox-preview-card {
    border: 1px solid var(--color-border, #e5e7eb);
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
}
#sandbox-iframe {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    border-radius: var(--radius-md, 6px);
    transition: width 0.3s ease;
}
.btn-active {
    background: var(--color-primary, #3b82f6) !important;
    color: var(--color-primary-text, #fff) !important;
    border-color: var(--color-primary, #3b82f6) !important;
}
.loading-spinner-dots::after {
    content: '...';
    display: inline-block;
    animation: loading-dots 1.5s infinite;
    width: 1em;
    text-align: left;
}
@keyframes loading-dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

/* ─── Autocomplete Table Picker ─── */
.autocomplete-container {
    position: relative;
    width: 100%;
}
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border, #334155);
    border-radius: var(--radius-md, 6px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    margin-top: 4px;
}
.suggestion-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--text, #f1f5f9);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 150ms ease;
}
.suggestion-item:last-child {
    border-bottom: none;
}
.suggestion-item:hover {
    background: rgba(138, 21, 56, 0.25);
    color: #f5f0eb;
}

/* ─── Diagnostics Stepper Wizard ─── */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.spinner {
    animation: spin 1s linear infinite;
}
.diagnostic-step {
    border: 1px solid var(--border, #334155);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.01);
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}
.diagnostic-step.pass {
    border-left: 4px solid #10b981;
}
.diagnostic-step.fail {
    border-left: 4px solid #ef4444;
}
.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.step-title {
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.step-status-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}
.step-status-badge.pass {
    background: rgba(16,185,129,0.15);
    color: #10b981;
}
.step-status-badge.fail {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}
.step-details {
    margin-top: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-muted, #94a3b8);
}
.step-fix-block {
    margin-top: 0.4rem;
    padding: 0.5rem;
    background: rgba(239,68,68,0.05);
    border: 1px dashed rgba(239,68,68,0.25);
    border-radius: 4px;
}

/* ─── Accordion Logs ─── */
.accordion-header:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}
.accordion-header.active {
    background: rgba(138, 21, 56, 0.1) !important;
    border-left: 3px solid var(--af-brand, #8a1538);
}
.accordion-header.active .accordion-arrow {
    transform: rotate(180deg);
}

