/* ═══════════════════════════════════════════════════════════
   HYDRA SaaS — White + Red Investor Theme
   High contrast, ultra-readable, fluid
   ═══════════════════════════════════════════════════════════ */

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

:root {
    --bg: #ffffff;
    --bg2: #f7f7fa;
    --bg3: #eff0f5;
    --bg4: #e8e9f0;
    --border: #dfe1ea;
    --border-subtle: #ecedf2;
    --text: #3a3a4e;
    --text-dim: #7a7a92;
    --text-bright: #111128;
    --accent: #e03030;
    --accent-hover: #c82828;
    --accent-dim: rgba(224,48,48,0.07);
    --accent-glow: rgba(224,48,48,0.04);
    --green: #1a8a50;
    --green-dim: rgba(26,138,80,0.08);
    --yellow: #b07a08;
    --crit: #d01a1a;
    --high: #d45a18;
    --med: #b07a08;
    --low: #0d8070;
    --info: #6a6a82;
    --shadow-sm: 0 1px 3px rgba(17,17,40,0.05), 0 1px 2px rgba(17,17,40,0.03);
    --shadow-md: 0 4px 12px rgba(17,17,40,0.07);
    --shadow-lg: 0 8px 30px rgba(17,17,40,0.10);
    --mono: 'SF Mono','Cascadia Code','JetBrains Mono',Consolas,monospace;
    --sans: 'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;
    --radius: 10px;
    --radius-sm: 6px;
    --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

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

/* Global SVG safety — prevent inline icons from exploding */
svg { max-width: 100%; }
.main-content svg {
    max-width: 48px;
    max-height: 48px;
}

/* ── Layout ─────────────────────────────────────────────── */
.app-container { display: flex; min-height: 100vh; }

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
    width: 250px;
    background: var(--bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 50;
    box-shadow: 1px 0 3px rgba(0,0,0,0.03);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-logo {
    font-family: var(--mono);
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 5px;
    cursor: pointer;
}

.sidebar-logo span {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 1px;
    font-weight: 400;
    display: block;
    margin-top: 3px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: var(--bg2);
    color: var(--text);
    text-decoration: none;
}

.nav-item.active {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: rgba(224,48,48,0.1);
    font-weight: 600;
}

.nav-item svg {
    width: 18px; height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-subtle);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
}
.user-badge:hover { background: var(--bg2); }

.user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 2px solid rgba(224,48,48,0.2);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--accent);
    font-weight: 700;
}

.user-name {
    font-size: 13px;
    color: var(--text-bright);
    font-weight: 600;
}
.user-plan {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.user-info { flex: 1; min-width: 0; }

/* ── Main Content ───────────────────────────────────────── */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 32px 40px;
    min-height: 100vh;
    background: var(--bg2);
}

/* ── Auth Pages ─────────────────────────────────────────── */
.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px;
    background: var(--bg2);
    position: relative;
}

.auth-back {
    position: absolute;
    top: 24px;
    left: 24px;
    font-size: 13px;
    color: var(--text-dim);
    cursor: pointer;
    transition: color var(--transition);
    z-index: 10;
}
.auth-back:hover { color: var(--accent); }

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 44px;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    font-family: var(--mono);
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 8px;
    text-align: center;
    margin-bottom: 6px;
}

.auth-subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 36px;
}

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 8px;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-bright);
    font-family: var(--sans);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
    background: var(--bg);
}

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

textarea.form-input {
    min-height: 120px;
    resize: vertical;
    font-family: var(--mono);
    font-size: 13px;
}

.form-error {
    background: rgba(208,26,26,0.06);
    border: 1px solid rgba(208,26,26,0.2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--crit);
    display: none;
}
.form-error.visible { display: block; }

.auth-link {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-dim);
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center; justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 1px 3px rgba(224,48,48,0.2);
}
.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 2px 8px rgba(224,48,48,0.25);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}
.btn-secondary:hover { background: var(--accent-dim); }

.btn-ghost {
    background: var(--bg);
    color: var(--text);
    border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg3); color: var(--text-bright); }

.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 15px; }
.btn-full { width: 100%; }

.btn svg {
    width: 16px; height: 16px;
    stroke: currentColor; fill: none; stroke-width: 2;
}

/* ── Page Headers ───────────────────────────────────────── */
.page-header { margin-bottom: 28px; }

.page-title {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.page-title svg {
    width: 18px; height: 18px;
    stroke: currentColor; fill: none; stroke-width: 1.5;
    flex-shrink: 0;
}
.page-title::before {
    content: '';
    width: 24px; height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

/* ── Metric Cards ───────────────────────────────────────── */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.metric-card {
    background: var(--bg);
    padding: 22px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.metric-value {
    font-family: var(--mono);
    font-size: 30px;
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1;
    margin-bottom: 4px;
}
.metric-value .unit { font-size: 16px; color: var(--text-dim); font-weight: 400; }
.metric-label { font-size: 12px; color: var(--text-dim); }

/* ── Chat-style Input Block ────────────────────────────── */
.chat-input-block {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 0;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
    overflow: hidden;
}
.chat-input-block:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.chat-textarea {
    width: 100%;
    padding: 18px 20px 8px;
    background: transparent;
    border: none;
    color: var(--text-bright);
    font-family: var(--mono);
    font-size: 14px;
    outline: none;
    resize: none;
    overflow: hidden;
    min-height: 44px;
    line-height: 1.5;
}
.chat-textarea::placeholder { color: var(--text-dim); }

.chat-input-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 8px 16px;
}

.chat-tags {
    flex: 1;
    padding: 0;
    font-size: 12px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-family: var(--sans);
    outline: none;
}
.chat-tags::placeholder { color: var(--border); }

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--transition), transform 0.15s ease;
}
.chat-send-btn:hover { background: var(--accent-hover); transform: scale(1.08); }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.chat-send-btn svg {
    width: 18px; height: 18px;
    stroke: #fff; fill: none; stroke-width: 2;
}
.chat-send-btn .spinner { width: 18px; height: 18px; border-color: rgba(255,255,255,0.3); border-top-color: #fff; }

/* ── Scan Cards ─────────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
}

.scans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 12px;
}

.scan-card {
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}
.scan-card:hover {
    border-color: rgba(224,48,48,0.25);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.scan-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.scan-target {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.scan-card-body {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.scan-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-dim);
}

/* ── Status Badges ──────────────────────────────────────── */
.status-badge {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 4px;
}

.status-queued { background: var(--bg3); color: var(--text-dim); border: 1px solid var(--border); }

.status-running {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(224,48,48,0.2);
    animation: pulse-badge 2s ease-in-out infinite;
}

.status-completed {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid rgba(26,138,80,0.2);
}

.status-failed {
    background: rgba(208,26,26,0.06);
    color: var(--crit);
    border: 1px solid rgba(208,26,26,0.15);
}

@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    50% { box-shadow: 0 0 8px 2px rgba(224,48,48,0.12); }
}

/* ── Severity Badges ────────────────────────────────────── */
.sev-badge {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
}

.sev-critical { background: rgba(208,26,26,0.08); color: var(--crit); border: 1px solid rgba(208,26,26,0.2); }
.sev-high { background: rgba(212,90,24,0.08); color: var(--high); border: 1px solid rgba(212,90,24,0.2); }
.sev-medium { background: rgba(176,122,8,0.08); color: var(--med); border: 1px solid rgba(176,122,8,0.2); }
.sev-low { background: rgba(13,128,112,0.08); color: var(--low); border: 1px solid rgba(13,128,112,0.2); }
.sev-info { background: var(--bg3); color: var(--info); border: 1px solid var(--border); }

/* ═══ KANBAN BOARD ══════════════════════════════════════════ */
.kanban-wrapper {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 16px;
    margin-bottom: 24px;
    min-height: 300px;
}

.kanban-header-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 8px;
}
.kanban-total {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.kanban-column {
    min-width: 260px;
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    max-height: 520px;
}

.kanban-col-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.kanban-col-title {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
}

.kanban-col-count {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    background: var(--bg3);
    padding: 2px 8px;
    border-radius: 10px;
}

.kanban-col-body {
    padding: 8px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kanban-column.col-confirmed .kanban-col-title { color: var(--green); }
.kanban-column.col-confirmed .kanban-col-count { background: var(--green-dim); color: var(--green); }
.kanban-column.col-discarded .kanban-col-title { color: var(--text-dim); }

/* Kanban Cards */
.kanban-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    transition: all 0.3s ease;
    animation: cardIn 0.4s ease;
    box-shadow: var(--shadow-sm);
}

.kanban-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(224,48,48,0.2);
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.kanban-card-agent {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kanban-card-agent .agent-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.kanban-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-bright);
    line-height: 1.4;
    margin-bottom: 6px;
}

.kanban-card-method {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.4;
    font-style: italic;
    max-height: 40px;
    overflow: hidden;
    cursor: pointer;
    transition: max-height 0.3s ease;
    position: relative;
}
.kanban-card-method::after {
    content: 'click to expand';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 18px;
    background: linear-gradient(transparent, var(--bg));
    font-size: 9px;
    color: var(--accent);
    font-style: normal;
    text-align: right;
    padding-right: 4px;
    line-height: 24px;
    letter-spacing: 0.3px;
}
.kanban-card-method.expanded {
    max-height: none;
}
.kanban-card-method.expanded::after {
    display: none;
}

.kanban-card-endpoint {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-dim);
    background: var(--bg3);
    padding: 2px 6px;
    border-radius: 3px;
    margin-bottom: 4px;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kanban-card.discarded .kanban-card-title {
    text-decoration: line-through;
    color: var(--text-dim);
}

/* ═══ AGENTS SECTION ═══════════════════════════════════════ */
.agents-section {
    margin-bottom: 24px;
}
.agents-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.agents-count {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
}
.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.agent-card {
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}
.agent-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}
.agent-card.active {
    border-color: var(--accent);
}
.agent-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.agent-card-name {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: 0.3px;
}
.agent-card-desc {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.4;
    margin-bottom: 8px;
}
.agent-card-stats {
    display: flex;
    gap: 12px;
}
.agent-stat {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 0.3px;
}
.agent-stat-findings {
    color: var(--accent);
    font-weight: 700;
}
.agent-status-icon {
    flex-shrink: 0;
    font-size: 12px;
    width: 18px; height: 18px;
    display: flex;
    align-items: center; justify-content: center;
    border-radius: 50%;
}
.agent-status-icon.done {
    background: var(--green-dim);
    color: var(--green);
    font-weight: 700;
}
.agent-status-icon.running {
    background: var(--accent-dim);
    color: var(--accent);
}
.agent-status-icon.discarded {
    background: var(--bg3);
    color: var(--text-dim);
}
.agent-card.agent-running {
    border-left: 3px solid var(--accent);
}
.agent-card.agent-done {
    border-left: 3px solid var(--green);
}
.agent-card.agent-discarded {
    border-left: 3px solid var(--border);
    opacity: 0.7;
}

/* Agent detail (expanded inline) */
.agent-detail {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}
.agent-detail-method {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 10px;
    font-style: italic;
}
.agent-detail-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.agent-detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 4px 0;
}
.agent-detail-col {
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    background: var(--bg3);
    padding: 1px 6px;
    border-radius: 3px;
    flex-shrink: 0;
}
.agent-detail-title {
    color: var(--text);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.agent-detail-endpoint {
    font-family: var(--mono);
    font-size: 9px;
    color: var(--text-dim);
    background: var(--bg3);
    padding: 1px 5px;
    border-radius: 3px;
    flex-shrink: 0;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Scan Progress ──────────────────────────────────────── */
.scan-progress { max-width: 1100px; }

.scan-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-dim);
}
.scan-meta .target-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-bright);
}

.elapsed {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
}

/* Phase Bar */
.phase-bar {
    display: flex;
    gap: 2px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.phase-step {
    flex: 1;
    padding: 14px 16px;
    background: var(--bg);
    text-align: center;
    border: 1px solid var(--border-subtle);
    transition: all 0.4s ease;
}

.phase-step .phase-name {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-dim);
    transition: color 0.4s ease;
}
.phase-step .phase-desc { font-size: 11px; color: var(--text-dim); margin-top: 2px; opacity: 0.7; }

.phase-step.active {
    background: var(--accent-dim);
    border-color: rgba(224,48,48,0.2);
    border-bottom: 3px solid var(--accent);
}
.phase-step.active .phase-name { color: var(--accent); }

.phase-step.done {
    background: var(--green-dim);
    border-color: rgba(26,138,80,0.15);
}
.phase-step.done .phase-name { color: var(--green); }

/* Terminal */
.terminal {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.7;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.terminal-bar {
    background: var(--bg3);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot:nth-child(1) { background: #ff5f56; }
.terminal-dot:nth-child(2) { background: #ffbd2e; }
.terminal-dot:nth-child(3) { background: #27c93f; }
.terminal-title { margin-left: 8px; color: var(--text-dim); font-size: 11px; }

.terminal-body {
    padding: 14px 16px;
    max-height: 300px;
    overflow-y: auto;
    background: #fafafe;
}

.terminal-line {
    padding: 2px 0;
    display: flex;
    gap: 8px;
    animation: lineIn 0.3s ease;
}

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

.terminal-line .timestamp { color: var(--text-dim); font-size: 10px; min-width: 60px; flex-shrink: 0; }
.terminal-line .event-tag { font-weight: 700; font-size: 10px; min-width: 85px; flex-shrink: 0; }
.terminal-line .message { color: var(--text); word-break: break-word; }

.terminal-line.event-phase .event-tag { color: var(--accent); }
.terminal-line.event-finding .event-tag { color: var(--crit); }
.terminal-line.event-exploit .event-tag { color: var(--green); }
.terminal-line.event-discard .event-tag { color: var(--text-dim); }
.terminal-line.event-discard .message { color: var(--text-dim); text-decoration: line-through; }
.terminal-line.event-error .event-tag { color: var(--crit); }
.terminal-line.event-progress .event-tag { color: var(--text-dim); }
.terminal-line.event-complete .event-tag { color: var(--green); }
.terminal-line.event-complete .message { color: var(--green); font-weight: 700; }

/* Scan layout: terminal + sidebar stats */
.scan-layout {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 20px;
}

.live-stats { display: flex; flex-direction: column; gap: 8px; }

.live-stat {
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.live-stat-value { font-family: var(--mono); font-size: 24px; font-weight: 700; line-height: 1; }
.live-stat-label { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.live-stat.crit .live-stat-value { color: var(--crit); }
.live-stat.high .live-stat-value { color: var(--high); }
.live-stat.med .live-stat-value { color: var(--med); }
.live-stat.low .live-stat-value { color: var(--low); }

/* ── Report View — Redesigned ──────────────────────────── */
.report-container { max-width: 960px; }

/* Report Hero */
.report-hero {
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg2) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}
.report-back {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 16px;
    cursor: pointer;
    display: inline-block;
    transition: color var(--transition);
}
.report-back:hover { color: var(--accent); text-decoration: none; }
.report-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 8px;
}
.report-meta-row {
    display: flex;
    gap: 24px;
    font-size: 12px;
    color: var(--text-dim);
    flex-wrap: wrap;
}
.report-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* Executive Summary */
.report-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.report-stat {
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.report-stat-value {
    font-family: var(--mono);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: var(--text-bright);
}
.report-stat-label {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 4px;
}

/* Severity Bar */
.severity-bar {
    display: flex;
    height: 32px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}
.severity-bar-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    min-width: 40px;
    transition: flex 0.3s ease;
}
.severity-bar-segment.sev-critical { background: var(--crit); }
.severity-bar-segment.sev-high { background: var(--high); }
.severity-bar-segment.sev-medium { background: var(--med); }
.severity-bar-segment.sev-low { background: var(--low); }
.severity-bar-segment.sev-info { background: var(--info); }

/* Findings Index */
.findings-index {
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.findings-index-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
}
.findings-index-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background var(--transition);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 13px;
}
.findings-index-row:last-child { border-bottom: none; }
.findings-index-row:hover { background: var(--bg2); }
.findings-index-num {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
    min-width: 24px;
}
.findings-index-title {
    flex: 1;
    color: var(--text-bright);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.findings-index-cvss {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
}
.findings-index-cwe {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-dim);
}

/* Finding Cards — redesigned */
.finding-card {
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.finding-card.sev-card-critical { border-left-color: var(--crit); }
.finding-card.sev-card-high { border-left-color: var(--high); }
.finding-card.sev-card-medium { border-left-color: var(--med); }
.finding-card.sev-card-low { border-left-color: var(--low); }
.finding-card.sev-card-info { border-left-color: var(--info); }

.finding-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background var(--transition);
}
.finding-header:hover { background: var(--bg2); }

.finding-title { flex: 1; font-size: 14px; font-weight: 600; color: var(--text-bright); }
.finding-cvss { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
.finding-cwe { font-family: var(--mono); font-size: 10px; color: var(--text-dim); background: var(--bg3); padding: 2px 8px; border-radius: 3px; }
.finding-chevron { color: var(--text-dim); transition: transform var(--transition); }
.finding-card.expanded .finding-chevron { transform: rotate(180deg); }

.finding-agent {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    padding: 4px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.finding-body { display: none; padding: 0 20px 20px; border-top: 1px solid var(--border-subtle); }
.finding-card.expanded .finding-body { display: block; }

.finding-section { margin-top: 16px; }
.finding-section-title {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}
.finding-section p { color: var(--text); font-size: 13px; line-height: 1.7; }

.methodology-block {
    background: #1e1038;
    border-radius: var(--radius-sm);
    padding: 16px;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.7;
    color: #c0a0ff;
    white-space: pre-wrap;
    overflow-x: auto;
}

.poc-block {
    background: #1a1a2e;
    border-radius: var(--radius-sm);
    padding: 16px;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.7;
    color: #00ff88;
    white-space: pre-wrap;
    overflow-x: auto;
}

.finding-meta-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 0;
    margin-top: 12px;
    border-top: 1px solid var(--border-subtle);
}
.finding-meta-badge {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-dim);
    background: var(--bg3);
    padding: 2px 8px;
    border-radius: 3px;
}

/* Report Empty State */
.report-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}
.report-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--green-dim);
    color: var(--green);
    margin-bottom: 16px;
}
.report-empty-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--green);
    fill: none;
    stroke-width: 1.5;
}
.report-empty-state h3 {
    font-size: 18px;
    color: var(--green);
    margin-bottom: 8px;
}
.report-empty-state p {
    font-size: 13px;
    color: var(--text-dim);
    max-width: 400px;
    margin: 0 auto;
}

/* Report Footer */
.report-footer {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-top: 36px;
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.8;
}

/* ═══ FILE MANAGER ══════════════════════════════════════════ */
.files-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
    min-height: 500px;
}

.file-tree {
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow-y: auto;
}

.file-tree-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-tree-title {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-dim);
}

.file-tree-list { padding: 8px; }

.file-tree-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 13px;
    color: var(--text);
}
.file-tree-item:hover { background: var(--bg2); }
.file-tree-item.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }

.file-tree-icon { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; }
.file-tree-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-tree-version {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-dim);
    margin-left: auto;
    flex-shrink: 0;
}

.file-viewer {
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.file-toolbar {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.file-toolbar-name {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-bright);
    flex: 1;
}

.file-toolbar-version {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-dim);
}

.file-content {
    flex: 1;
    padding: 20px;
    overflow: auto;
    font-size: 14px;
    line-height: 1.7;
}

/* Markdown rendering */
.md-render h1 { font-size: 22px; font-weight: 700; color: var(--text-bright); margin: 20px 0 12px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.md-render h2 { font-size: 18px; font-weight: 700; color: var(--text-bright); margin: 18px 0 10px; }
.md-render h3 { font-size: 15px; font-weight: 700; color: var(--text-bright); margin: 14px 0 8px; }
.md-render p { margin-bottom: 12px; color: var(--text); }
.md-render code { font-family: var(--mono); font-size: 12px; background: var(--bg3); padding: 2px 6px; border-radius: 3px; color: var(--accent); }
.md-render pre { background: #1a1a2e; border-radius: var(--radius-sm); padding: 16px; margin: 10px 0; overflow-x: auto; }
.md-render pre code { background: transparent; color: #e8e8f0; padding: 0; }
.md-render ul, .md-render ol { margin: 8px 0 12px 24px; }
.md-render li { margin-bottom: 4px; }
.md-render table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.md-render th { background: var(--bg3); padding: 8px 12px; text-align: left; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; border: 1px solid var(--border); color: var(--text-dim); }
.md-render td { padding: 8px 12px; border: 1px solid var(--border); }
.md-render hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.md-render strong { color: var(--text-bright); font-weight: 700; }
.md-render blockquote { border-left: 3px solid var(--accent); padding-left: 16px; color: var(--text-dim); margin: 10px 0; }

/* Editor mode */
.file-editor {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.file-editor textarea {
    flex: 1;
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    padding: 20px;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-bright);
    background: var(--bg);
}

/* Version diff display */
.diff-view {
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.8;
}

.diff-line { padding: 1px 12px; }
.diff-line.added { background: rgba(26,138,80,0.08); color: var(--green); }
.diff-line.removed { background: rgba(208,26,26,0.06); color: var(--crit); }
.diff-line.header { color: var(--text-dim); font-weight: 700; }

/* Version list */
.version-list { padding: 8px; }

.version-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
    border-bottom: 1px solid var(--border-subtle);
}
.version-item:last-child { border-bottom: none; }
.version-item:hover { background: var(--bg2); }
.version-item.active { background: var(--accent-dim); }

.version-num {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    min-width: 30px;
}

.version-msg { font-size: 12px; color: var(--text); flex: 1; }
.version-date { font-size: 11px; color: var(--text-dim); }

/* ── Settings ───────────────────────────────────────────── */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 800px;
}

.settings-section {
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.settings-section-title {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.settings-section-title svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    flex-shrink: 0;
}

.usage-bar-wrap { margin: 12px 0; }
.usage-bar { height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden; }
.usage-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.4s ease; }
.usage-text { font-family: var(--mono); font-size: 12px; color: var(--text-dim); margin-top: 6px; }

.plan-badge {
    display: inline-block;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 4px;
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(224,48,48,0.2);
}

/* ── Empty / Loading ────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}
.empty-state svg { width: 48px; height: 48px; stroke: var(--text-dim); fill: none; stroke-width: 1; margin-bottom: 16px; }
.empty-state h3 { font-size: 16px; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 13px; margin-bottom: 20px; }

.spinner {
    width: 18px; height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
    display: flex;
    align-items: center; justify-content: center;
    padding: 60px; gap: 12px;
    color: var(--text-dim);
    font-size: 13px;
}

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

.toast {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    font-size: 13px;
    color: var(--text);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    min-width: 200px;
}
.toast.error { border-color: rgba(208,26,26,0.3); color: var(--crit); }
.toast.success { border-color: rgba(26,138,80,0.3); color: var(--green); }
.toast.toast-exit { animation: toastOut 0.3s ease forwards; }
.toast-msg { flex: 1; }

.toast-icon {
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center; justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.toast-icon-success { background: var(--green-dim); color: var(--green); }
.toast-icon-error { background: rgba(208,26,26,0.08); color: var(--crit); }

.toast-progress {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--bg3);
}
.toast-progress-bar {
    height: 100%;
    background: var(--accent);
    animation: toastTimer 3.7s linear forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}
@keyframes toastTimer {
    from { width: 100%; }
    to { width: 0%; }
}

/* ── Progress Bar ───────────────────────────────────────── */
.progress-bar { height: 4px; background: var(--bg3); border-radius: 2px; overflow: hidden; margin: 8px 0; }
.progress-bar-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.5s ease; position: relative; overflow: hidden; }
.progress-bar-fill.animated::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ── Logout ─────────────────────────────────────────────── */
.logout-btn {
    background: none; border: none;
    color: var(--text-dim);
    font-size: 12px; cursor: pointer;
    padding: 6px;
    font-family: var(--mono);
    transition: color var(--transition);
}
.logout-btn:hover { color: var(--crit); }

/* ── Hamburger Button ──────────────────────────────────── */
.hamburger-btn {
    display: none;
    position: fixed;
    top: 14px; left: 14px;
    z-index: 60;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 9px;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--shadow-sm);
}
.hamburger-btn span {
    display: block;
    width: 18px; height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: all 0.2s ease;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 40;
}
.sidebar-overlay.visible { display: block; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .hamburger-btn { display: flex; }
    .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 16px; padding-top: 56px; }
    .metrics-row { grid-template-columns: repeat(2, 1fr); }
    .report-summary { grid-template-columns: repeat(2, 1fr); }
    .findings-index { display: none; }
    .scan-layout { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .scan-input-row { flex-direction: column; }
    .scans-grid { grid-template-columns: 1fr; }
    .phase-bar { flex-direction: column; }
    .kanban-wrapper { flex-direction: column; }
    .kanban-column { min-width: unset; }
    .agent-grid { grid-template-columns: 1fr; }
    .files-layout { grid-template-columns: 1fr; }
    .report-hero { padding: 20px; }
    .report-title { font-size: 20px; }
    .report-meta-row { gap: 12px; }
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

::selection { background: var(--accent-dim); color: var(--accent); }

/* ── Tab bar for file views ─────────────────────────────── */
.tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 16px;
    flex-shrink: 0;
}

.tab-item {
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
}
.tab-item:hover { color: var(--text); }
.tab-item.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ═══ RECON MAP ════════════════════════════════════════════ */
.recon-map-section {
    background: var(--bg);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 28px;
    position: relative;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.recon-map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.recon-map-title {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
}

.recon-map-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.recon-map-stats {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
}

.recon-reset-btn {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.5px;
}

.recon-zoom-btn {
    padding: 4px 10px !important;
    font-size: 14px !important;
    font-weight: 700;
    min-width: 30px;
}

.recon-map-legend {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--mono);
}

/* Shaped legend dots matching node shapes */
.legend-shape {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

.legend-target {
    background: #e03030;
    border-radius: 3px;
}

.legend-technology {
    background: #4a8fe7;
    border-radius: 2px;
}

.legend-endpoint {
    background: #64748b;
    border-radius: 2px;
}

.legend-parameter {
    background: #2bbcb3;
    border-radius: 5px;
}

.legend-finding {
    background: #e74c3c;
    border-radius: 2px;
    animation: legend-pulse 2s ease-in-out infinite;
}

@keyframes legend-pulse {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    50% { box-shadow: 0 0 6px 2px rgba(231,76,60,0.4); }
}

.recon-map-section canvas {
    border-radius: 8px;
    background: var(--bg2);
    display: block;
    width: 100%;
}

/* Rich tooltip */
.recon-map-tooltip {
    display: none;
    position: absolute;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: var(--text);
    pointer-events: none;
    z-index: 10;
    font-family: var(--sans);
    box-shadow: var(--shadow-lg);
    max-width: 240px;
}

.recon-tip-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-bright);
    margin-bottom: 4px;
    line-height: 1.3;
}

.recon-tip-type {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.recon-tip-sev {
    margin-top: 4px;
}

.recon-tip-detail {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 4px;
    font-family: var(--mono);
}

/* ── Page Transitions ──────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
.main-content > *:first-child { animation: fadeIn 0.2s ease; }

/* ── Error State ───────────────────────────────────────── */
.error-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-dim);
}
.error-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(208,26,26,0.06);
    margin-bottom: 16px;
}
.error-state-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--crit);
    fill: none;
    stroke-width: 1.5;
}
.error-state h3 {
    font-size: 18px;
    color: var(--text-bright);
    margin-bottom: 8px;
}
.error-state p {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}
.error-state-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* ── View Report Badge (dashboard) ─────────────────────── */
.view-report-badge {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--green);
    background: var(--green-dim);
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    border: 1px solid rgba(26,138,80,0.2);
}

/* ═══════════════════════════════════════════════════════════
   HYDRA v2.5 — Dark Mode + New UI Components
   ═══════════════════════════════════════════════════════════ */

/* ── Dark Mode ─────────────────────────────────────────── */
:root[data-theme="dark"] {
    --bg: #0a0e1a;
    --bg2: #0f1424;
    --bg3: #151a2e;
    --bg4: #1a2038;
    --border: #1e2a42;
    --border-subtle: #161d30;
    --text: #c0c0d0;
    --text-dim: #6a6a82;
    --text-bright: #e8e8f0;
    --accent: #e03030;
    --accent-hover: #ff4040;
    --accent-dim: rgba(224,48,48,0.12);
    --accent-glow: rgba(224,48,48,0.08);
    --green: #00e080;
    --green-dim: rgba(0,224,128,0.1);
    --yellow: #ffd166;
    --crit: #e94560;
    --high: #ff6b35;
    --med: #ffd166;
    --low: #06d6a0;
    --info: #8888a0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
}

:root[data-theme="dark"] .auth-card { background: var(--bg2); border-color: var(--border); }
:root[data-theme="dark"] .form-input { background: var(--bg3); border-color: var(--border); color: var(--text-bright); }
:root[data-theme="dark"] .terminal { background: #050810; }
:root[data-theme="dark"] .terminal-body { background: #050810; }
:root[data-theme="dark"] .kanban-card { background: var(--bg3); border-color: var(--border); }
:root[data-theme="dark"] .scan-card { background: var(--bg2); border-color: var(--border); }
:root[data-theme="dark"] .metric-card { background: var(--bg2); border-color: var(--border); }
:root[data-theme="dark"] .finding-card { background: var(--bg2); border-color: var(--border); }
:root[data-theme="dark"] .agent-card { background: var(--bg2); border-color: var(--border); }
:root[data-theme="dark"] .file-tree { background: var(--bg2); border-color: var(--border); }
:root[data-theme="dark"] .settings-section { background: var(--bg2); border-color: var(--border); }

/* ── Theme Toggle ──────────────────────────────────────── */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    margin-top: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-dim);
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.theme-toggle:hover { background: var(--accent-dim); color: var(--text); }
.theme-toggle-track {
    width: 32px; height: 18px;
    background: var(--bg4);
    border-radius: 9px;
    position: relative;
    transition: background 0.2s;
    border: 1px solid var(--border);
}
.theme-toggle-track::after {
    content: '';
    width: 14px; height: 14px;
    background: var(--text-dim);
    border-radius: 50%;
    position: absolute;
    top: 1px; left: 1px;
    transition: transform 0.2s, background 0.2s;
}
:root[data-theme="dark"] .theme-toggle-track { background: var(--accent-dim); }
:root[data-theme="dark"] .theme-toggle-track::after { transform: translateX(14px); background: var(--accent); }

/* ── Search & Filter Bar ───────────────────────────────── */
.scan-filters {
    display: flex; gap: 8px; align-items: center;
    margin-bottom: 16px; flex-wrap: wrap;
}
.scan-search {
    flex: 1; min-width: 200px;
    padding: 8px 14px;
    font-size: 13px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--sans);
    outline: none;
    transition: border-color var(--transition);
}
.scan-search:focus { border-color: var(--accent); }
.scan-search::placeholder { color: var(--text-dim); }

.filter-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-chip {
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg2);
    color: var(--text-dim);
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--sans);
}
.filter-chip:hover { border-color: var(--accent); color: var(--text); }
.filter-chip.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* ── Tags ──────────────────────────────────────────────── */
.tag-badge {
    display: inline-block;
    padding: 1px 8px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 10px;
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text-dim);
    margin-right: 4px;
}
/* tags-input defined above in scan hero section */

/* ── Finding Triage ────────────────────────────────────── */
.finding-status-select {
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg2);
    color: var(--text);
    font-family: var(--sans);
    cursor: pointer;
    outline: none;
}
.finding-status-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.3px;
}
.finding-status-confirmed { background: rgba(208,26,26,0.12); color: var(--crit); border: 1px solid rgba(208,26,26,0.2); }
.finding-status-accepted { background: rgba(212,90,24,0.12); color: var(--high); border: 1px solid rgba(212,90,24,0.2); }
.finding-status-fixed { background: rgba(26,138,80,0.12); color: var(--green); border: 1px solid rgba(26,138,80,0.2); }
.finding-status-false_positive { background: rgba(100,100,130,0.12); color: var(--text-dim); border: 1px solid rgba(100,100,130,0.2); }
.finding-status-wontfix { background: rgba(100,100,130,0.12); color: var(--text-dim); border: 1px solid rgba(100,100,130,0.2); }

/* ── Pagination ────────────────────────────────────────── */
.pagination {
    display: flex; justify-content: center; align-items: center;
    gap: 8px; padding: 20px 0;
}
.pagination-btn {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg2);
    color: var(--text);
    cursor: pointer;
    font-family: var(--sans);
    transition: all var(--transition);
}
.pagination-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-info { font-size: 12px; color: var(--text-dim); }

/* ── Version Footer ────────────────────────────────────── */
.app-version {
    font-size: 10px;
    color: var(--text-dim);
    text-align: center;
    padding: 8px 0;
    opacity: 0.6;
}


/* ═══════════════════════════════════════════════════════════
   HYDRA v2.6 — Glassmorphism + Premium Features
   ═══════════════════════════════════════════════════════════ */

/* ── Glassmorphism Variables ──────────────────────────────── */
:root {
    --glass: var(--bg);
    --glass-border: var(--border-subtle);
    --glass-blur: 0px;
    --gradient-accent: linear-gradient(135deg, #e03030, #ff6b35);
    --gradient-success: linear-gradient(135deg, #1a8a50, #06d6a0);
    --anim-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --radius-lg: 16px;
    --radius-xl: 24px;
}

:root[data-theme="dark"] {
    --glass: rgba(15,20,36,0.7);
    --glass-border: rgba(30,42,66,0.5);
    --glass-blur: 20px;
}

/* ── Glassmorphism Cards (glass effect in dark mode only) ── */
.metric-card, .scan-card, .finding-card, .agent-card, .kanban-card {
    border-radius: var(--radius-lg);
    transition: transform 0.3s var(--anim-spring), box-shadow 0.3s ease;
}

:root[data-theme="dark"] .metric-card,
:root[data-theme="dark"] .scan-card,
:root[data-theme="dark"] .finding-card,
:root[data-theme="dark"] .agent-card,
:root[data-theme="dark"] .kanban-card {
    background: var(--glass);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-color: var(--glass-border);
}

:root[data-theme="dark"] .sidebar {
    background: var(--glass);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-right-color: var(--glass-border);
}

.scan-card:hover, .metric-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.finding-card:hover, .agent-card:hover, .kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(224,48,48,0.4); }
    50% { box-shadow: 0 0 20px 4px rgba(224,48,48,0.2); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.main-content > * {
    animation: fadeSlideUp 0.4s ease both;
}

.metrics-row .metric-card:nth-child(1) { animation: fadeSlideUp 0.4s ease both; animation-delay: 0.05s; }
.metrics-row .metric-card:nth-child(2) { animation: fadeSlideUp 0.4s ease both; animation-delay: 0.1s; }
.metrics-row .metric-card:nth-child(3) { animation: fadeSlideUp 0.4s ease both; animation-delay: 0.15s; }
.metrics-row .metric-card:nth-child(4) { animation: fadeSlideUp 0.4s ease both; animation-delay: 0.2s; }

/* ── Terminal Premium ────────────────────────────────────── */
.terminal {
    background: #0a0e18 !important;
    border: 1px solid rgba(0,229,255,0.1) !important;
    box-shadow: 0 0 40px rgba(0,229,255,0.05), inset 0 0 60px rgba(0,0,0,0.3) !important;
    border-radius: var(--radius-lg);
}

.terminal-line {
    animation: fadeSlideUp 0.2s ease both;
    padding-left: 12px;
    border-left: 2px solid transparent;
}

.terminal-line.event-finding { border-left-color: #e94560; }
.terminal-line.event-exploit { border-left-color: #00ff88; }
.terminal-line.event-phase { border-left-color: #00e5ff; }
.terminal-line.event-agent_dispatch { border-left-color: #a855f7; }

/* ── Severity Badges Gradient ────────────────────────────── */
.sev-badge.sev-critical {
    background: linear-gradient(135deg, rgba(208,26,26,0.15), rgba(233,69,96,0.2)) !important;
    border: 1px solid rgba(208,26,26,0.3) !important;
    font-weight: 700;
    animation: pulseGlow 2s infinite;
}

.sev-badge.sev-high {
    background: linear-gradient(135deg, rgba(212,90,24,0.12), rgba(255,107,53,0.18)) !important;
    border: 1px solid rgba(212,90,24,0.3) !important;
    font-weight: 700;
}

.sev-badge.sev-medium {
    background: linear-gradient(135deg, rgba(176,122,8,0.1), rgba(255,209,102,0.15)) !important;
    border: 1px solid rgba(176,122,8,0.25) !important;
}

.sev-badge.sev-low {
    background: linear-gradient(135deg, rgba(13,128,112,0.1), rgba(6,214,160,0.15)) !important;
    border: 1px solid rgba(13,128,112,0.25) !important;
}

/* ── Charts ──────────────────────────────────────────────── */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.chart-card {
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    animation: fadeSlideUp 0.4s ease both;
    animation-delay: 0.25s;
    overflow: hidden;
}

.chart-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.chart-card canvas {
    width: 100% !important;
    height: 200px !important;
}

/* ── Attack Chain Cards ──────────────────────────────────── */
.attack-chain-card {
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.chain-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.chain-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.chain-score.score-critical { background: var(--gradient-accent); }
.chain-score.score-high { background: linear-gradient(135deg, #d45a18, #ff8c42); }
.chain-score.score-medium { background: linear-gradient(135deg, #b07a08, #ffd166); color: #333; }

.chain-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-bright);
}

.chain-narrative {
    font-size: 13px;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 12px;
}

.chain-meta {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: var(--text-dim);
}

.chain-phase-badge {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(224,48,48,0.15);
}

/* ── Security Score Gauge ────────────────────────────────── */
.security-score-section {
    background: var(--glass);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.score-gauge-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-bottom: 16px;
}

.score-details {
    text-align: left;
    max-width: 400px;
}

.score-summary {
    font-size: 13px;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 12px;
}

.score-recommendations {
    list-style: none;
    padding: 0;
}

.score-recommendations li {
    font-size: 12px;
    color: var(--text-dim);
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
}

.score-recommendations li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* ── Notification Bell ───────────────────────────────────── */
.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notification-bell:hover {
    background: var(--accent-dim);
}

.notification-bell svg {
    width: 20px; height: 20px;
    stroke: var(--text-dim);
    fill: none;
    stroke-width: 1.5;
}

.notif-badge {
    position: absolute;
    top: 2px; right: 2px;
    width: 16px; height: 16px;
    background: var(--accent);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    animation: pulseGlow 2s infinite;
}

.notif-dropdown {
    position: absolute;
    top: 40px;
    right: 0;
    width: 340px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: fadeSlideUp 0.2s ease;
}

.notif-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: background var(--transition);
    font-size: 13px;
}

.notif-item:hover { background: var(--bg2); }

.notif-item.unread {
    border-left: 3px solid var(--accent);
}

.notif-item-title {
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 2px;
}

.notif-item-body {
    color: var(--text-dim);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item-time {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 4px;
    font-family: var(--mono);
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-bright);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.notif-mark-all {
    font-size: 11px;
    color: var(--accent);
    cursor: pointer;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.notif-mark-all:hover { text-decoration: underline; }

/* ── Command Palette ─────────────────────────────────────── */
.cmd-palette-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    animation: fadeIn 0.15s ease;
}

.cmd-palette {
    width: 520px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: fadeSlideUp 0.2s var(--anim-spring);
}

.cmd-palette-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-bright);
    font-family: var(--sans);
    outline: none;
}

.cmd-palette-input::placeholder { color: var(--text-dim); }

.cmd-palette-results {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
}

.cmd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
    color: var(--text);
    font-size: 14px;
}

.cmd-item:hover, .cmd-item.active {
    background: var(--accent-dim);
    color: var(--accent);
}

.cmd-item-icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}

.cmd-item-shortcut {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--mono);
    padding: 2px 6px;
    background: var(--bg3);
    border-radius: 4px;
}

/* ── Templates & Schedules Pages ─────────────────────────── */
.template-card, .schedule-card {
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.template-card:hover, .schedule-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-row-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-bright);
}

.cron-badge {
    font-family: var(--mono);
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 10px;
    background: rgba(0,229,255,0.08);
    color: #00bcd4;
    border: 1px solid rgba(0,229,255,0.15);
}

.schedule-next {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--mono);
}

.status-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.active { background: var(--green); }
.status-dot.paused { background: var(--yellow); }

/* ── Share Link Modal ────────────────────────────────────── */
.share-url-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg3);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin: 12px 0;
}

.share-url-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-bright);
    font-family: var(--mono);
    font-size: 12px;
    outline: none;
}

.share-url-box .btn-copy {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 4px;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background var(--transition);
}

.share-url-box .btn-copy:hover { background: var(--accent-hover); }

/* ── Sidebar Notification Bell Area ──────────────────────── */
.sidebar-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── Animated Counter ────────────────────────────────────── */
.metric-value[data-target] {
    transition: color 0.3s;
}

/* ── Quick Form (inline forms for templates, schedules) ─── */
.quick-form {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    animation: fadeSlideUp 0.3s ease;
}

.quick-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.quick-form .form-row.full {
    grid-template-columns: 1fr;
}

.quick-form label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: block;
}

.quick-form input, .quick-form select {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--sans);
    outline: none;
    transition: border-color var(--transition);
}

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

/* ── Webhook status indicators ───────────────────────────── */
.webhook-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.webhook-status.active { color: var(--green); }
.webhook-status.inactive { color: var(--text-dim); }
.webhook-events {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.webhook-event-tag {
    padding: 1px 6px;
    font-size: 9px;
    border-radius: 8px;
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 600;
}

/* ── API Key display ─────────────────────────────────────── */
.api-key-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.api-key-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
    flex: 1;
}

.api-key-prefix {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.api-key-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-bright);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.api-key-meta {
    font-size: 10px;
    color: var(--text-dim);
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   Landing Page — Premium Public-Facing Pages
   ═══════════════════════════════════════════════════════════ */
.landing {
    min-height: 100vh;
    background: var(--bg);
}

.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
}
:root[data-theme="dark"] .landing-nav { background: rgba(15,20,36,0.92); }

.landing-nav-logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--accent);
    cursor: pointer;
}

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}
.landing-nav-links a {
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition);
}
.landing-nav-links a:hover { color: var(--accent); }

/* Hero */
.landing-hero {
    text-align: center;
    padding: 100px 24px 70px;
    max-width: 720px;
    margin: 0 auto;
    position: relative;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(224,48,48,0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}
:root[data-theme="dark"] .landing-hero::before {
    background: radial-gradient(circle, rgba(224,48,48,0.08) 0%, transparent 70%);
}

.landing-hero-badge {
    display: inline-block;
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(224,48,48,0.12);
    border-radius: 20px;
    margin-bottom: 28px;
    animation: fadeInDown 0.6s ease;
}

.landing-hero-title {
    font-size: clamp(38px, 6vw, 60px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -2px;
    color: var(--text-bright);
    margin-bottom: 22px;
    animation: fadeInDown 0.7s ease 0.1s both;
}

.landing-hero-sub {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text-dim);
    max-width: 520px;
    margin: 0 auto 36px;
    animation: fadeInDown 0.8s ease 0.2s both;
}

.landing-hero-ctas {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInDown 0.9s ease 0.3s both;
}

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

.landing-cta-primary {
    padding: 14px 36px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 20px rgba(224,48,48,0.3);
    transition: all 0.25s ease !important;
}
.landing-cta-primary:hover {
    box-shadow: 0 6px 28px rgba(224,48,48,0.4) !important;
    transform: translateY(-1px) !important;
}

/* Stats Bar */
.landing-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    padding: 44px 24px;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg2);
    flex-wrap: wrap;
}

.landing-stat {
    text-align: center;
    animation: fadeInUp 0.5s ease both;
}
.landing-stat:nth-child(1) { animation-delay: 0.1s; }
.landing-stat:nth-child(2) { animation-delay: 0.2s; }
.landing-stat:nth-child(3) { animation-delay: 0.3s; }
.landing-stat:nth-child(4) { animation-delay: 0.4s; }

.landing-stat-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--text-bright);
    letter-spacing: -0.5px;
}
.landing-stat-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 6px;
}

/* Demo Terminal */
.landing-demo {
    padding: 48px 40px;
    max-width: 780px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.landing-demo-terminal {
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.05) inset;
}

.demo-terminal-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.05);
}

.demo-terminal-title {
    font-family: var(--mono);
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    margin-left: 8px;
}

.demo-terminal-body {
    padding: 16px 20px;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 2;
    color: rgba(255,255,255,0.7);
}

.demo-line {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: typeIn 0.4s ease forwards;
}
.demo-line:nth-child(1) { animation-delay: 0.8s; }
.demo-line:nth-child(2) { animation-delay: 1.2s; }
.demo-line:nth-child(3) { animation-delay: 1.6s; }
.demo-line:nth-child(4) { animation-delay: 2.2s; }
.demo-line:nth-child(5) { animation-delay: 2.8s; }
.demo-line:nth-child(6) { animation-delay: 3.2s; }
.demo-line:nth-child(7) { animation-delay: 3.8s; }

@keyframes typeIn {
    from { opacity: 0; transform: translateX(-4px); }
    to { opacity: 1; transform: translateX(0); }
}

.demo-ts {
    color: rgba(255,255,255,0.25);
    font-size: 10px;
    flex-shrink: 0;
    width: 52px;
}

.demo-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    flex-shrink: 0;
}
.tag-phase { color: #64b5f6; }
.tag-info { color: #81c784; }
.tag-agent { color: #ba68c8; }
.tag-finding { color: #ef5350; background: rgba(239,83,80,0.15); }
.tag-exploit { color: #ff7043; background: rgba(255,112,67,0.15); }
.tag-complete { color: #66bb6a; background: rgba(102,187,106,0.15); }

/* Features Grid */
.landing-features {
    padding: 60px 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.landing-section-title {
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

.landing-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.landing-feature-card {
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
    background: var(--bg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease both;
}
.landing-feature-card:nth-child(1) { animation-delay: 0s; }
.landing-feature-card:nth-child(2) { animation-delay: 0.05s; }
.landing-feature-card:nth-child(3) { animation-delay: 0.1s; }
.landing-feature-card:nth-child(4) { animation-delay: 0.15s; }
.landing-feature-card:nth-child(5) { animation-delay: 0.2s; }
.landing-feature-card:nth-child(6) { animation-delay: 0.25s; }

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

.landing-feature-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(224,48,48,0.08);
    transform: translateY(-3px);
}

.landing-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-dim);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.landing-feature-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
}

.landing-feature-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 8px;
}
.landing-feature-card p {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   Pricing Cards
   ═══════════════════════════════════════════════════════════ */
.landing-pricing {
    padding: 60px 40px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.landing-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    align-items: start;
    margin: 0 auto;
    max-width: 480px;
    width: 100%;
}

.pricing-card {
    position: relative;
    padding: 36px 28px;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    background: var(--bg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease both;
    text-align: left;
    max-width: 480px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.pricing-card:nth-child(1) { animation-delay: 0s; }
.pricing-card:nth-child(2) { animation-delay: 0.08s; }
.pricing-card:nth-child(3) { animation-delay: 0.16s; }
.pricing-card:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}

.pricing-card-featured {
    border-color: var(--accent);
    border-width: 2px;
    box-shadow: 0 8px 32px rgba(224,48,48,0.12);
}
.pricing-card-featured:hover {
    box-shadow: 0 16px 48px rgba(224,48,48,0.18);
}

.pricing-card-current { border-color: var(--green); }

.pricing-popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 14px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #fff;
    background: var(--accent);
    border-radius: 20px;
}

.pricing-current-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 14px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    background: var(--green);
    border-radius: 20px;
    white-space: nowrap;
}

.pricing-card-header { margin-bottom: 20px; }

.pricing-plan-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 8px;
}

.pricing-price { display: flex; align-items: baseline; gap: 2px; }
.pricing-amount {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-bright);
    letter-spacing: -1px;
}
.pricing-period {
    font-size: 14px;
    color: var(--text-dim);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}
.pricing-features li {
    padding: 8px 0;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 8px;
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li::before {
    content: '\2713';
    color: var(--green);
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.coming-soon-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    background: var(--accent-dim);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Social Proof */
.landing-social-proof {
    padding: 60px 40px;
    text-align: center;
}

.landing-trust-badges {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: var(--bg2);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-bright);
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease both;
}
.trust-badge:nth-child(1) { animation-delay: 0s; }
.trust-badge:nth-child(2) { animation-delay: 0.08s; }
.trust-badge:nth-child(3) { animation-delay: 0.16s; }
.trust-badge:nth-child(4) { animation-delay: 0.24s; }
.trust-badge:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(224,48,48,0.06);
}
.trust-badge svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
}

/* Footer */
.landing-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 40px;
    background: var(--bg2);
}

.landing-footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.landing-footer-brand { display: flex; align-items: center; gap: 12px; }
.landing-footer-logo {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent);
}
.landing-footer-tagline {
    font-size: 12px;
    color: var(--text-dim);
}

.landing-footer-links {
    display: flex;
    gap: 20px;
}
.landing-footer-links a {
    font-size: 13px;
    color: var(--text-dim);
    text-decoration: none;
    cursor: pointer;
}
.landing-footer-links a:hover { color: var(--accent); }

.landing-footer-copy {
    font-size: 11px;
    color: var(--text-dim);
    width: 100%;
    text-align: center;
    margin-top: 16px;
}

/* ═══════════════════════════════════════════════════════════
   Onboarding Wizard
   ═══════════════════════════════════════════════════════════ */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.3s ease;
}

.onboarding-card {
    background: var(--bg);
    border-radius: 16px;
    padding: 40px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 24px 80px rgba(0,0,0,0.2);
    text-align: center;
    animation: slideUp 0.4s cubic-bezier(0.16,1,0.3,1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.onboarding-steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.onboarding-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.3s ease;
}
.onboarding-step-dot.active {
    background: var(--accent);
    width: 24px;
    border-radius: 4px;
}
.onboarding-step-dot.done { background: var(--green); }

.onboarding-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.onboarding-welcome-icon {
    margin-bottom: 16px;
    color: var(--accent);
}
.onboarding-welcome-icon svg {
    width: 48px;
    height: 48px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.onboarding-desc {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 20px;
}

.onboarding-highlights {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    margin-bottom: 20px;
}

.onboarding-highlight {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg2);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text);
}

.onboarding-highlight-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--accent);
}
.onboarding-highlight-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
}

.onboarding-example {
    text-align: left;
    background: var(--bg2);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
}
.onboarding-example-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    font-weight: 700;
    margin-bottom: 6px;
}
.onboarding-example-item {
    font-size: 12px;
    font-family: var(--mono);
    color: var(--accent);
    padding: 4px 0;
    cursor: pointer;
}
.onboarding-example-item:hover { text-decoration: underline; }

.onboarding-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
}

/* ═══════════════════════════════════════════════════════════
   Settings — Email Toggles + Audit Log
   ═══════════════════════════════════════════════════════════ */
.settings-toggles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
}

.settings-toggle input[type="checkbox"] { display: none; }

.toggle-slider {
    position: relative;
    width: 40px;
    height: 22px;
    background: var(--border);
    border-radius: 11px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}
.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.settings-toggle input:checked + .toggle-slider {
    background: var(--accent);
}
.settings-toggle input:checked + .toggle-slider::after {
    transform: translateX(18px);
}

.toggle-label { flex: 1; }

/* Audit Table */
.audit-table {
    font-size: 12px;
    width: 100%;
}

.audit-header {
    display: grid;
    grid-template-columns: 80px 100px 100px 1fr 100px;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg3);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.audit-row {
    display: grid;
    grid-template-columns: 80px 100px 100px 1fr 100px;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
    align-items: center;
}
.audit-row:hover { background: var(--bg2); }

.audit-time { color: var(--text-dim); font-size: 11px; }
.audit-user { color: var(--text-bright); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-resource { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-ip { color: var(--text-dim); font-family: var(--mono); font-size: 10px; }

.audit-action-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}
.audit-action-post { background: var(--green-dim); color: var(--green); }
.audit-action-put, .audit-action-patch { background: rgba(176,122,8,0.08); color: var(--yellow); }
.audit-action-delete { background: rgba(208,26,26,0.08); color: var(--crit); }

/* ═══════════════════════════════════════════════════════════
   Enterprise Polish — Badges, Powered by AI
   ═══════════════════════════════════════════════════════════ */
.powered-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-dim);
    border-radius: 12px;
    letter-spacing: 0.3px;
}
.powered-badge svg {
    width: 12px;
    height: 12px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
}

.btn-accent {
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
}
.btn-accent:hover { background: var(--accent-hover); }

.app-version {
    text-align: center;
    font-size: 10px;
    color: var(--text-dim);
    padding: 8px 0 4px;
    opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════
   Responsive — Mobile CEO Demo
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .landing-nav { padding: 12px 16px; }
    .landing-hero { padding: 40px 16px 30px; }
    .landing-hero-title { font-size: 32px; }
    .landing-stats { gap: 20px; padding: 24px 16px; }
    .landing-stat-value { font-size: 22px; }
    .landing-features { padding: 40px 16px; }
    .landing-pricing { padding: 40px 16px; }
    .landing-pricing-grid { grid-template-columns: 1fr; max-width: 360px; width: 100%; margin: 0 auto; }
    .pricing-card { max-width: 100%; }
    .landing-features-grid { grid-template-columns: 1fr; }
    .landing-social-proof { padding: 40px 16px; }
    .landing-trust-badges { gap: 12px; }
    .landing-footer { padding: 24px 16px; }
    .landing-footer-content { justify-content: center; text-align: center; }

    .onboarding-card { padding: 24px; }
    .onboarding-title { font-size: 18px; }

    .audit-header, .audit-row {
        grid-template-columns: 60px 80px 80px 1fr;
    }
    .audit-header span:last-child, .audit-row span:last-child { display: none; }
}

@media (max-width: 480px) {
    .landing-hero-ctas { flex-direction: column; align-items: center; }
    .landing-hero-title { font-size: 28px; letter-spacing: -1px; }
    .landing-hero-sub { font-size: 15px; }
    .landing-stats { gap: 16px; flex-direction: column; align-items: center; }
    .landing-stat-value { font-size: 20px; }
    .landing-nav-links a:first-child { display: none; }
    .landing-pricing-grid { max-width: 100%; }
    .landing-footer-links { flex-direction: column; gap: 10px; align-items: center; }
}

/* ── Dark mode overrides for v2.6 components ─────────────── */
:root[data-theme="dark"] .cmd-palette { background: var(--bg); border-color: var(--border); }
:root[data-theme="dark"] .notif-dropdown { background: var(--bg); border-color: var(--border); }
:root[data-theme="dark"] .quick-form { background: var(--bg2); border-color: var(--border); }
:root[data-theme="dark"] .attack-chain-card { background: var(--bg2); border-color: var(--border); }
:root[data-theme="dark"] .security-score-section { background: var(--bg2); border-color: var(--border); }
:root[data-theme="dark"] .chart-card { background: var(--bg2); border-color: var(--border); }
:root[data-theme="dark"] .template-card, :root[data-theme="dark"] .schedule-card { background: var(--bg2); border-color: var(--border); }
:root[data-theme="dark"] .api-key-row { background: var(--bg3); border-color: var(--border); }
:root[data-theme="dark"] .landing-feature-card { background: var(--bg2); }
:root[data-theme="dark"] .pricing-card { background: var(--bg2); }
:root[data-theme="dark"] .onboarding-card { background: var(--bg); }
:root[data-theme="dark"] .trust-badge { background: var(--bg3); }
:root[data-theme="dark"] .audit-header { background: var(--bg3); }
:root[data-theme="dark"] .landing-footer { background: var(--bg3); }

/* ── Admin Terminal ──────────────────────────────── */
.admin-terminal {
    background: #0a0e18;
    border-radius: 12px;
    border: 1px solid #1a2040;
    overflow: hidden;
    font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.6;
}
.term-output {
    padding: 16px 20px;
    min-height: 400px;
    max-height: 60vh;
    overflow-y: auto;
    color: #c0c8e0;
    white-space: pre-wrap;
    word-break: break-all;
}
.term-output .term-system { color: #4a9eff; }
.term-output .term-error { color: #e94560; }
.term-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #1a2040;
    background: #060a14;
}
.term-prompt {
    color: #e03030;
    font-weight: 700;
    white-space: nowrap;
}
.term-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #e0e8f0;
    font-family: inherit;
    font-size: inherit;
    caret-color: #e03030;
}
