/* ── Reset & Base ─────────────────────────────────────────────────────────── */

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

:root {
    --bg: #0a0e17;
    --bg-card: #111827;
    --bg-input: #1f2937;
    --border: #374151;
    --text: #e5e7eb;
    --text-dim: #9ca3af;
    --muted: #9ca3af;
    --accent: #06b6d4;
    --accent-hover: #22d3ee;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
    --info: #3b82f6;
    --critical: #dc2626;
    --high: #f97316;
    --medium: #eab308;
    --low: #06b6d4;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── Navigation ──────────────────────────────────────────────────────────── */

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav.hidden { display: none; }

.nav-brand {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: .5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-links a {
    color: var(--text-dim);
    font-size: .9rem;
    padding: .3rem 0;
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

/* ── Layout ──────────────────────────────────────────────────────────────── */

#app {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
}

/* ── Cards ───────────────────────────────────────────────────────────────── */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.card + .card { margin-top: 1rem; }

.toolbar {
    display: flex;
    gap: .75rem;
    justify-content: flex-end;
    margin-bottom: .75rem;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: .75rem;
    color: var(--text);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.stat-card-link {
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.stat-card-link:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 8px 26px rgba(6,182,212,.15);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: .85rem;
    color: var(--text-dim);
    margin-top: .25rem;
}

/* ── Forms ───────────────────────────────────────────────────────────────── */

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: .85rem;
    color: var(--text-dim);
    margin-bottom: .35rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: .6rem .8rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: .95rem;
}

.form-group textarea {
    width: 100%;
    padding: .6rem .8rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: .95rem;
    line-height: 1.45;
    resize: vertical;
    min-height: 6.5rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;   /* keep buttons aligned with input bottoms */
}

.form-row .form-group { flex: 1; margin-bottom: 0; }

.form-row > .btn { align-self: flex-end; }

.checkbox-group {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    accent-color: var(--accent);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.1rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s, border-color .2s;
    color: #fff;
}

.btn-primary { background: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }

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

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
}
.btn-ghost:hover { border-color: var(--text-dim); color: var(--text); }

.btn-sm { padding: .35rem .7rem; font-size: .8rem; }

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

/* ── Tables ──────────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; }

.table-controls {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .65rem;
}

.table-filter-label {
    font-size: .8rem;
    color: var(--text-dim);
}

.table-status-filter {
    min-width: 140px;
    padding: .4rem .65rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: .65rem .8rem;
    border-bottom: 1px solid var(--border);
    font-size: .9rem;
}

th {
    font-weight: 600;
    color: var(--text-dim);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
}

th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.3rem;
}

th.sortable::after {
    content: "↕";
    position: absolute;
    right: .35rem;
    color: var(--text-muted, #6b7280);
}

tr.clickable-row {
    cursor: pointer;
}

tr.clickable-row td {
    cursor: pointer;
}

tr.clickable-row:hover td {
    background: rgba(15, 23, 42, 0.04);
}

.finding-detail-card {
    gap: 1.25rem;
}

.finding-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.finding-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.finding-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.finding-detail-section {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
}

.finding-meta {
    display: grid;
    grid-template-columns: minmax(130px, 170px) minmax(0, 1fr);
    align-items: start;
    column-gap: 1.7rem;
    row-gap: 0.35rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.finding-meta:last-child {
    border-bottom: 0;
}

.finding-meta strong {
    display: block;
    min-width: 0;
    word-break: break-word;
    line-height: 1.45;
}

.inline-detail-section {
    margin-top: 1rem;
}

.finding-section-label,
.cell-help {
    color: var(--muted);
    font-size: 0.9rem;
}

.finding-meta .meta-label {
    color: var(--muted);
    font-size: 0.85rem;
    letter-spacing: 0.01em;
}

.finding-meta .meta-label::after {
    content: ":";
    margin-left: 0.2rem;
}

.finding-meta .meta-value {
    display: block;
    min-width: 0;
    word-break: break-word;
    line-height: 1.45;
    color: var(--text);
    font-size: 0.95rem;
}

.finding-description {
    margin: 0.5rem 0 0;
    line-height: 1.6;
}

.threat-explainer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.threat-explainer-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.9));
}

.threat-explainer-card p {
    margin: 0.4rem 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.cell-title {
    font-weight: 600;
}

.cell-help {
    margin-top: 0.2rem;
    line-height: 1.4;
}

.subtle-copy {
    color: var(--muted);
    line-height: 1.5;
}

.certificate-monitor-form {
    display: grid;
    gap: 0.9rem;
}

.monitor-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-row {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    width: 100%;
}

.checkbox-row input {
    cursor: pointer;
}

.checkbox-row span {
    display: block;
}

.form-row.two-up {
    align-items: stretch;
}

.form-row.two-up .form-group {
    flex: 1 1 260px;
}

.chip-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 0.88rem;
}

.history-list {
    display: grid;
    gap: 0.75rem;
}

.history-item {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    background: rgba(248, 250, 252, 0.7);
}

.history-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.4rem;
}

.history-item ul {
    margin: 0;
    padding-left: 1rem;
}

th.sortable::after {
    content: "";
    position: absolute;
    right: .35rem;
    color: var(--text-muted, #6b7280);
}

th.sortable[data-sort-dir="asc"]::after { content: "↑"; color: var(--accent); }
th.sortable[data-sort-dir="desc"]::after { content: "↓"; color: var(--accent); }

tr:hover td { background: rgba(6,182,212,.04); }

/* ── Badges ──────────────────────────────────────────────────────────────── */

.badge {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 9999px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.badge-info     { background: rgba(59,130,246,.15); color: var(--info); }
.badge-low      { background: rgba(6,182,212,.15);  color: var(--low); }
.badge-medium   { background: rgba(234,179,8,.15);  color: var(--medium); }
.badge-high     { background: rgba(249,115,22,.15); color: var(--high); }
.badge-critical { background: rgba(220,38,38,.15);  color: var(--critical); }
.badge-success  { background: rgba(16,185,129,.15); color: var(--success); }
.badge-warning  { background: rgba(245,158,11,.15); color: var(--warning); }
.badge-pending  { background: rgba(156,163,175,.15); color: var(--text-dim); }

/* ── Auth pages ──────────────────────────────────────────────────────────── */

.auth-container {
    max-width: 420px;
    margin: 4rem auto;
}

.auth-container .card { padding: 2rem; }

.auth-container .page-title {
    text-align: center;
    margin-bottom: .25rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-dim);
    font-size: .9rem;
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1rem;
    font-size: .85rem;
    color: var(--text-dim);
}

/* ── Plans Page ──────────────────────────────────────────────────────────── */

.plans-container {
    max-width: 960px;
    margin: 3rem auto;
    padding: 0 1rem;
    text-align: center;
}
.plans-subtitle {
    color: var(--text-dim);
    font-size: .95rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.plan-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius, 12px);
    padding: 1.5rem 1.25rem;
    text-align: left;
    display: flex;
    flex-direction: column;
}
.plan-card-highlight {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(6, 182, 212, .15);
}
.plan-badge {
    position: absolute;
    top: .75rem; right: .75rem;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .15rem .5rem;
    border-radius: 4px;
    background: var(--bg-input);
    color: var(--text-dim);
}
.plan-badge-accent {
    background: var(--accent);
    color: var(--bg);
}
.plan-name {
    font-size: 1.15rem;
    margin-bottom: .5rem;
}
.plan-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .25rem;
}
.plan-cycle {
    font-size: .85rem;
    font-weight: 400;
    color: var(--text-dim);
}
.plan-desc {
    font-size: .82rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}
.plan-features {
    list-style: none;
    font-size: .85rem;
    color: var(--text);
    margin-bottom: 1.25rem;
    flex: 1;
}
.plan-features li {
    padding: .3rem 0;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.plan-features li::before {
    content: "✓ ";
    color: var(--accent);
    font-weight: 600;
}
.btn-outline {
    display: inline-block;
    padding: .5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius, 8px);
    background: transparent;
    color: var(--text-dim);
    font-size: .85rem;
    cursor: default;
    text-align: center;
    width: 100%;
}
.btn-outline:disabled {
    opacity: .6;
}
.plans-notice {
    font-size: .85rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */

.alert {
    padding: .75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: .9rem;
}

.alert-error {
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(239,68,68,.3);
    color: var(--danger);
}

.alert-success {
    background: rgba(16,185,129,.1);
    border: 1px solid rgba(16,185,129,.3);
    color: var(--success);
}

.alert-info {
    background: rgba(59,130,246,.1);
    border: 1px solid rgba(59,130,246,.3);
    color: var(--info);
}

/* ── Verification instructions ───────────────────────────────────────────── */

.verify-instructions {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 1rem 0;
}

.verify-instructions code {
    display: block;
    padding: .5rem;
    background: var(--bg);
    border-radius: 4px;
    font-family: "JetBrains Mono", "Fira Code", monospace;
    font-size: .85rem;
    color: var(--accent);
    word-break: break-all;
    margin-top: .5rem;
}

.verify-instructions img {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    padding: .35rem;
}

.verify-instructions .form-row {
    margin-top: .5rem;
}

td .btn + .btn {
    margin-left: .35rem;
}

.timeline-chart {
    position: relative;
    width: 100%;
    margin-top: .25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255,255,255,.04), transparent);
    overflow: hidden;
}

.timeline-svg {
    display: block;
    width: 100%;
    height: auto;
}

.timeline-line {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    animation: timelineDraw 0.8s ease forwards;
}

.timeline-line-domains { stroke: #22c55e; }
.timeline-line-findings { stroke: #f97316; animation-delay: .2s; }
.timeline-line-events { stroke: #3b82f6; animation-delay: .4s; }

.timeline-dot {
    fill: #cbd5e1;
    cursor: pointer;
    opacity: .85;
    transition: transform .15s ease, opacity .15s ease, fill .15s ease;
    transform-origin: center;
}

.timeline-dot[data-kind="domains"] { fill: #22c55e; }
.timeline-dot[data-kind="findings"] { fill: #f97316; }
.timeline-dot[data-kind="events"] { fill: #3b82f6; }

.timeline-dot:hover,
.timeline-dot.active {
    opacity: 1;
    transform: scale(1.45);
}

.timeline-hotspot {
    fill: transparent;
    cursor: pointer;
}

.timeline-axis {
    stroke: rgba(255,255,255,.3);
    stroke-width: 1;
}

.timeline-gridline {
    stroke: rgba(255,255,255,.15);
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.timeline-y-label {
    fill: var(--text-dim);
    font-size: 10px;
    text-anchor: end;
}

.timeline-axis-label {
    fill: var(--text-dim);
    font-size: 12px;
    text-anchor: middle;
}

.timeline-hover {
    position: absolute;
    z-index: 5;
    background: rgba(17,24,39,.95);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .25rem .5rem;
    color: var(--text);
    font-size: .75rem;
    pointer-events: none;
}

.timeline-hover.hidden { display: none; }

.timeline-legend {
    margin-top: .5rem;
    font-size: .82rem;
    color: var(--text-dim);
    display: flex;
    gap: .85rem;
    align-items: center;
    flex-wrap: wrap;
}

.timeline-legend-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .32rem .55rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
}

.timeline-legend-btn.active {
    color: var(--text);
    border-color: var(--accent);
    background: rgba(6,182,212,.08);
}

.timeline-legend-btn.muted {
    opacity: .55;
}

.timeline-legend .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: .25rem;
}

.timeline-legend .dot.domains { background: #22c55e; }
.timeline-legend .dot.findings { background: #f97316; }
.timeline-legend .dot.events { background: #3b82f6; }

@keyframes timelineDraw {
    to {
        opacity: 1;
    }
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-dim);
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: .5rem;
}

/* ── Workflow tabs ────────────────────────────────────────────────────────── */

.workflow-tabs {
    display: flex;
    gap: .25rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
    overflow-x: auto;
}

.workflow-tab {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .65rem 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--text-dim);
    font-size: .9rem;
    cursor: pointer;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}

.workflow-tab:hover { color: var(--text); }
.workflow-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.workflow-tab-icon { font-size: 1rem; }

.workflow-tab-count {
    background: var(--accent);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: .1rem .45rem;
    border-radius: 9px;
    min-width: 1.2rem;
    text-align: center;
}

.workflow-tab:not(.active) .workflow-tab-count {
    background: var(--border);
    color: var(--text-dim);
}

/* ── Findings filters ─────────────────────────────────────────────────── */

.findings-filters {
    display: flex;
    gap: .75rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: .6rem .75rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
}

.filter-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-dim);
    font-weight: 600;
}

.filter-select {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .35rem .5rem;
    font-size: .85rem;
    min-width: 130px;
    max-width: 220px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state-text { color: var(--text-dim); font-size: 1rem; }

/* ── Row actions ─────────────────────────────────────────────────────────── */

.row-actions { white-space: nowrap; }
.actions-col { width: 1%; white-space: nowrap; }

.text-dim { color: var(--text-dim); }

/* ── Back link ───────────────────────────────────────────────────────────── */

.back-link {
    display: inline-block;
    color: var(--text-dim);
    font-size: .85rem;
    margin-bottom: .75rem;
    text-decoration: none;
}
.back-link:hover { color: var(--accent); }

/* ── Modal / dialog overlay ──────────────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    min-width: 320px;
    max-width: 440px;
    width: 90%;
}

.modal-box h3 { margin: 0 0 .25rem; font-size: 1.05rem; color: var(--text); }

.snooze-options {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: .5rem;
}

/* ── Finding detail sidebar layout ───────────────────────────────────────── */

.finding-detail-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
    align-items: start;
}

.finding-detail-main { min-width: 0; }

.finding-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    position: sticky;
    top: 1rem;
}

.sidebar-section {
    padding: .75rem 0;
    border-bottom: 1px solid var(--border);
}

.sidebar-section:last-child { border-bottom: none; }
.sidebar-section:first-child { padding-top: 0; }

.sidebar-label {
    display: block;
    font-size: .8rem;
    color: var(--text-dim);
    margin-bottom: .4rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.sidebar-select,
.sidebar-input {
    width: 100%;
    padding: .45rem .6rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: .85rem;
}

.sidebar-select:focus,
.sidebar-input:focus {
    outline: none;
    border-color: var(--accent);
}

.sidebar-textarea {
    width: 100%;
    padding: .45rem .6rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: .85rem;
    line-height: 1.4;
    resize: vertical;
    min-height: 4rem;
}

.sidebar-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.sidebar-snooze {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
}

.sidebar-snooze .btn { flex: 1; min-width: 0; padding: .3rem .4rem; font-size: .8rem; text-align: center; justify-content: center; }

/* ── Inline table controls ───────────────────────────────────────────────── */

select.domain-schedule,
table select {
    background: var(--bg-input, #1f2937);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .35rem .55rem;
    font-size: .85rem;
    cursor: pointer;
    min-width: 6rem;
}

select.domain-schedule:focus,
table select:focus {
    outline: none;
    border-color: var(--accent);
}

/* ── Status row + button stacking (e.g. MFA card) ────────────────────────── */

.status-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.status-row + .btn,
.card > p + .btn { margin-top: .25rem; }

/* ── Grouped top navigation ──────────────────────────────────────────────── */

.nav-group {
    position: relative;
}

.nav-group > .nav-group-toggle {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: .9rem;
    padding: .3rem 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
}

.nav-group:hover > .nav-group-toggle,
.nav-group.open > .nav-group-toggle,
.nav-group.has-active > .nav-group-toggle {
    color: var(--text);
    border-bottom-color: var(--accent);
}

.nav-group-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 12rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .35rem 0 .35rem;
    margin-top: 0;
    box-shadow: 0 6px 20px rgba(0,0,0,.35);
    z-index: 200;
}

.nav-group:hover .nav-group-menu,
.nav-group.open .nav-group-menu {
    display: block;
}

.nav-group-menu a {
    display: block;
    padding: .45rem .9rem;
    color: var(--text-dim);
    font-size: .88rem;
    border-bottom: none;
}

.nav-group-menu a:hover,
.nav-group-menu a.active {
    color: var(--text);
    background: rgba(255,255,255,.04);
    border-bottom: none;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .nav { flex-wrap: wrap; gap: .5rem; }
    .nav-links { gap: .75rem; flex-wrap: wrap; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-row { flex-direction: column; }
    #app { padding: 1rem; }
    .finding-detail-layout { grid-template-columns: 1fr; }
    .finding-sidebar { position: static; }
}

.osint-list { list-style: none; padding-left: 0; margin: .25rem 0 0; }
.osint-list li { padding: .2rem 0; font-size: .9rem; }
.contact-block { margin-bottom: .6rem; font-size: .9rem; }
.contact-block .meta-label { display: block; font-weight: 600; margin-bottom: .2rem; }
.finding-meta-list code { background: var(--code-bg, #f3f3f3); padding: .1rem .35rem; border-radius: 3px; margin-right: .3rem; }

.confirm-consequences { margin: .6rem 0 0 1.1rem; padding: 0; color: var(--text-dim); font-size: .9rem; }
.confirm-consequences li { margin: .2rem 0; list-style: disc; }
