/* AI Assurance Control Plane — Enterprise Theme v2 */
/* Sidebar layout, executive-grade aesthetic */

:root {
    --bg-base: #0a0e17;
    --bg-sidebar: #0d111a;
    --bg-elevated: #11161f;
    --bg-card: #131826;
    --bg-card-hover: #1a2030;
    --bg-input: #0d111a;
    --border: #1d2436;
    --border-strong: #2a3349;
    --border-focus: #4a7dff;

    --text-primary: #e4e8f0;
    --text-secondary: #98a3b8;
    --text-tertiary: #6b7689;
    --text-disabled: #3d465a;

    --accent: #4a7dff;
    --accent-hover: #3567ff;
    --accent-bg: rgba(74, 125, 255, 0.12);

    --critical: #ef4444;
    --critical-bg: rgba(239, 68, 68, 0.12);
    --critical-border: rgba(239, 68, 68, 0.3);
    --high: #f97316;
    --high-bg: rgba(249, 115, 22, 0.12);
    --high-border: rgba(249, 115, 22, 0.3);
    --medium: #f59e0b;
    --medium-bg: rgba(245, 158, 11, 0.12);
    --medium-border: rgba(245, 158, 11, 0.3);
    --low: #3b82f6;
    --low-bg: rgba(59, 130, 246, 0.12);
    --low-border: rgba(59, 130, 246, 0.3);
    --pass: #10b981;
    --pass-bg: rgba(16, 185, 129, 0.12);
    --pass-border: rgba(16, 185, 129, 0.3);
    --info: #6366f1;
    --info-bg: rgba(99, 102, 241, 0.12);
    --warning: #eab308;
}

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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
}

/* ============ LAYOUT ============ */
.app {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}

/* ============ SIDEBAR ============ */
.sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.sidebar-brand-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #4a7dff 0%, #6d3aff 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.sidebar-brand-subtitle {
    font-size: 10px;
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.sidebar-nav {
    padding: 0.75rem 0.5rem;
    flex: 1;
}

.sidebar-nav-section {
    margin-bottom: 1rem;
}

.sidebar-nav-label {
    padding: 0.5rem 0.75rem 0.25rem;
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 500;
    border-radius: 6px;
    margin-bottom: 1px;
    transition: all 0.1s;
    position: relative;
}

.sidebar-nav a:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.sidebar-nav a.active {
    color: var(--text-primary);
    background: var(--accent-bg);
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 30%;
    bottom: 30%;
    width: 2px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
}

.sidebar-nav a .nav-arrow {
    margin-left: auto;
    color: var(--text-tertiary);
    font-size: 11px;
}

.sidebar-nav-badge {
    margin-left: auto;
    padding: 0.05rem 0.4rem;
    background: var(--critical-bg);
    color: var(--critical);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
}

.sidebar-nav-badge.medium {
    background: var(--medium-bg);
    color: var(--medium);
}

.sidebar-quick {
    padding: 0.5rem;
    border-top: 1px solid var(--border);
}

.sidebar-quick-label {
    padding: 0.5rem 0.75rem 0.25rem;
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.sidebar-quick-action {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
}

.sidebar-quick-action:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.sidebar-quick-action::before {
    content: '◇';
    margin-right: 0.5rem;
    color: var(--text-tertiary);
    font-size: 10px;
}

/* ============ MAIN ============ */
.main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    height: 56px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.search-bar {
    flex: 1;
    max-width: 480px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 0.875rem;
    color: var(--text-primary);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-bar::before {
    content: '⌕';
    color: var(--text-tertiary);
}

.search-bar input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    font-family: inherit;
}

.search-bar input::placeholder {
    color: var(--text-tertiary);
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.icon-btn {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 16px;
}

.icon-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.icon-btn .badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 14px;
    height: 14px;
    background: var(--critical);
    border-radius: 50%;
    font-size: 9px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.user-block {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, #f59e0b, #dc2626);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 11px;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 10px;
    color: var(--text-tertiary);
}

/* ============ PAGE ============ */
.page {
    padding: 1.5rem;
    max-width: none;
}

.page-header {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

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

.page-meta {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-right: 0.5rem;
}

/* ============ CARDS ============ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
}

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

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.card-link {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 12px;
}

.card-link:hover {
    color: var(--accent);
}

/* ============ KPI CARDS ============ */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.875rem;
    margin-bottom: 1.5rem;
}

/* Explicit 8-col on very wide displays (so 8-card homepage spreads evenly) */
@media (min-width: 1700px) {
    .kpi-row.fixed-8 { grid-template-columns: repeat(8, 1fr); }
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1rem 0.875rem;
    position: relative;
    min-height: 110px;
}

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

.kpi-icon {
    width: 28px;
    height: 28px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 14px;
}

.kpi-icon.critical { color: var(--critical); border-color: var(--critical-border); background: var(--critical-bg); }
.kpi-icon.high { color: var(--high); border-color: var(--high-border); background: var(--high-bg); }
.kpi-icon.medium { color: var(--medium); border-color: var(--medium-border); background: var(--medium-bg); }
.kpi-icon.pass { color: var(--pass); border-color: var(--pass-border); background: var(--pass-bg); }
.kpi-icon.info { color: var(--info); border-color: rgba(99,102,241,0.3); background: var(--info-bg); }
.kpi-icon.accent { color: var(--accent); border-color: rgba(74,125,255,0.3); background: var(--accent-bg); }

.kpi-label {
    font-size: 11.5px;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.3;
}

.kpi-value-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.02em;
    font-feature-settings: 'tnum';
}

.kpi-value.critical { color: var(--critical); }
.kpi-value.high { color: var(--high); }
.kpi-value.pass { color: var(--pass); }

.kpi-value-suffix {
    font-size: 11px;
    color: var(--text-tertiary);
}

.kpi-trend {
    font-size: 11px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.kpi-trend::before {
    content: '↑';
    color: var(--text-tertiary);
    font-size: 11px;
}

.kpi-card.has-gauge {
    display: grid;
    grid-template-columns: 1fr 60px;
    gap: 0.5rem;
}

.kpi-gauge {
    width: 60px;
    height: 60px;
    align-self: end;
}

/* ============ BADGES ============ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.5;
}

.badge-critical { background: var(--critical-bg); color: var(--critical); border: 1px solid var(--critical-border); }
.badge-high { background: var(--high-bg); color: var(--high); border: 1px solid var(--high-border); }
.badge-medium { background: var(--medium-bg); color: var(--medium); border: 1px solid var(--medium-border); }
.badge-low { background: var(--low-bg); color: var(--low); border: 1px solid var(--low-border); }
.badge-pass { background: var(--pass-bg); color: var(--pass); border: 1px solid var(--pass-border); }
.badge-info { background: var(--info-bg); color: var(--info); border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-neutral { background: rgba(149, 159, 178, 0.08); color: var(--text-secondary); border: 1px solid var(--border-strong); }

.decision-approved { background: var(--pass-bg); color: var(--pass); border: 1px solid var(--pass-border); }
.decision-conditional { background: var(--medium-bg); color: var(--medium); border: 1px solid var(--medium-border); }
.decision-hold { background: var(--critical-bg); color: var(--critical); border: 1px solid var(--critical-border); }
.decision-reject { background: rgba(120, 30, 30, 0.3); color: #ff6b6b; border: 1px solid rgba(120, 30, 30, 0.6); }

.framework-badge {
    display: inline-flex;
    padding: 0.125rem 0.5rem;
    background: rgba(74, 125, 255, 0.08);
    border: 1px solid rgba(74, 125, 255, 0.25);
    color: var(--accent);
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 600;
    margin: 0 0.25rem 0.125rem 0;
    font-family: 'Monaco', 'Consolas', monospace;
}

.priority-badge {
    display: inline-flex;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.priority-badge.high {
    background: var(--critical-bg);
    color: var(--critical);
    border: 1px solid var(--critical-border);
}

.priority-badge.today {
    background: var(--high-bg);
    color: var(--high);
    border: 1px solid var(--high-border);
}

.priority-badge.normal {
    background: rgba(149, 159, 178, 0.08);
    color: var(--text-secondary);
    border: 1px solid var(--border-strong);
}

/* Risk dot indicator */
.risk-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.risk-dot.high { background: var(--critical); }
.risk-dot.medium { background: var(--medium); }
.risk-dot.low { background: var(--pass); }

/* ============ TABLES ============ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead {
    background: transparent;
}

.data-table th {
    padding: 0.5rem 0.875rem;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 0.75rem 0.875rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
    cursor: pointer;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.cell-primary { font-weight: 500; color: var(--text-primary); }
.cell-secondary { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.cell-mono { font-family: 'Monaco', 'Consolas', monospace; font-size: 12px; color: var(--text-secondary); }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

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

.btn-sm { padding: 0.375rem 0.625rem; font-size: 12px; }

/* ============ DONUTS / CHARTS ============ */
.donut-container {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
}

.donut-svg {
    width: 140px;
    height: 140px;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.donut-legend-item {
    display: grid;
    grid-template-columns: 20px 1fr;
    align-items: center;
    gap: 0.5rem;
    font-size: 12px;
}

.donut-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.donut-legend-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
}

.donut-legend-value {
    font-weight: 700;
    color: var(--text-primary);
    font-feature-settings: 'tnum';
}

/* Line chart container */
.linechart {
    height: 200px;
    width: 100%;
    position: relative;
}

.linechart-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    font-size: 12px;
}

.linechart-legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-secondary);
}

.linechart-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* ============ FRAMEWORK COVERAGE BARS ============ */
.framework-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.framework-name {
    font-size: 12.5px;
    color: var(--text-primary);
    width: 180px;
    flex-shrink: 0;
}

.framework-progress {
    flex: 1;
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
}

.framework-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a7dff, #6d3aff);
    transition: width 0.6s;
}

.framework-progress-fill.pass {
    background: linear-gradient(90deg, var(--pass), #34d399);
}

.framework-progress-fill.warn {
    background: linear-gradient(90deg, var(--medium), #fbbf24);
}

.framework-progress-fill.fail {
    background: linear-gradient(90deg, var(--critical), #f87171);
}

.framework-percent {
    width: 45px;
    text-align: right;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-feature-settings: 'tnum';
}

/* ============ GRID LAYOUTS ============ */
.grid-3col-main {
    display: grid;
    grid-template-columns: 1fr 320px 320px;
    gap: 1rem;
    margin-bottom: 1rem;
}

.grid-3col-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.grid-2col-bottom {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1rem;
}

@media (max-width: 1400px) {
    .grid-3col-main { grid-template-columns: 1fr 1fr; }
    .grid-3col-bottom { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .app { grid-template-columns: 1fr; }
    .sidebar { position: relative; height: auto; }
    .grid-3col-main, .grid-3col-bottom, .grid-2col-bottom {
        grid-template-columns: 1fr;
    }
}

/* ============ FINDINGS LIST ============ */
.finding-item {
    display: grid;
    grid-template-columns: 14px 1fr auto auto;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.finding-item:last-child { border-bottom: none; }

.finding-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

.finding-icon.critical { background: var(--critical); }
.finding-icon.high { background: var(--high); }
.finding-icon.medium { background: var(--medium); }

.finding-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
}

.finding-system {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.finding-meta {
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: right;
}

/* ============ LIST ROWS (next actions) ============ */
.list-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.list-row:last-child { border-bottom: none; }

.list-row-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.list-row-icon.warn { background: var(--medium-bg); color: var(--medium); }
.list-row-icon.ok { background: var(--pass-bg); color: var(--pass); }
.list-row-icon.danger { background: var(--critical-bg); color: var(--critical); }

.list-row-text {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
}

.list-row-arrow {
    color: var(--text-tertiary);
    font-size: 14px;
}

/* ============ UTILITY ============ */
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-critical { color: var(--critical); }
.text-high { color: var(--high); }
.text-pass { color: var(--pass); }
.text-medium { color: var(--medium); }
.font-mono { font-family: 'Monaco', 'Consolas', monospace; font-size: 12px; }
.font-bold { font-weight: 600; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* Loading/empty states */
.loading { text-align: center; padding: 2rem; color: var(--text-tertiary); font-size: 12px; }
.empty-state { text-align: center; padding: 2rem; color: var(--text-tertiary); font-size: 12px; }

/* Drawer */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: none; }
.drawer-overlay.open { display: block; }
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: 560px; max-width: 100vw; background: var(--bg-elevated); border-left: 1px solid var(--border-strong); z-index: 1001; transform: translateX(100%); transition: transform 0.25s; overflow-y: auto; }
.drawer.open { transform: translateX(0); }
.drawer-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.drawer-title { font-size: 15px; font-weight: 600; }
.drawer-close { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 18px; padding: 0.25rem 0.5rem; border-radius: 4px; }
.drawer-close:hover { background: var(--bg-card-hover); }
.drawer-body { padding: 1.25rem; }
.drawer-section { margin-bottom: 1.5rem; }
.drawer-section-title { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-bottom: 0.5rem; }
.def-list { display: grid; grid-template-columns: 140px 1fr; gap: 0.5rem 1rem; font-size: 13px; }
.def-list dt { color: var(--text-secondary); font-weight: 500; }
.def-list dd { color: var(--text-primary); }

/* Filter Bar */
.filter-bar { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.filter-input, .filter-select { padding: 0.4rem 0.75rem; background: var(--bg-input); border: 1px solid var(--border-strong); color: var(--text-primary); border-radius: 6px; font-size: 13px; font-family: inherit; min-width: 140px; }

/* Tabs */
.tabs { display: flex; gap: 1px; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.tab { padding: 0.625rem 1rem; background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 13px; font-weight: 500; border-bottom: 2px solid transparent; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Status dot */
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 0.375rem; }
.status-dot.production { background: var(--pass); }
.status-dot.pilot { background: var(--medium); }
.status-dot.staged { background: var(--high); }

/* Progress */
.progress { height: 6px; background: var(--bg-input); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--pass); transition: width 0.3s; }
.progress-fill.warn { background: var(--medium); }
.progress-fill.fail { background: var(--critical); }

/* Event stream */
.event-stream { display: flex; flex-direction: column; gap: 0.5rem; max-height: 600px; overflow-y: auto; }
.event-item { display: grid; grid-template-columns: 90px auto 1fr 100px; gap: 1rem; align-items: start; padding: 0.75rem; background: var(--bg-input); border: 1px solid var(--border); border-radius: 6px; font-size: 12px; }

/* SLA */
.sla-breach { color: var(--critical); font-weight: 600; }
.sla-warning { color: var(--high); font-weight: 600; }
.severity-indicator { display: inline-block; width: 3px; height: 14px; margin-right: 0.5rem; vertical-align: middle; border-radius: 2px; }
.severity-indicator.critical { background: var(--critical); }
.severity-indicator.high { background: var(--high); }
.severity-indicator.medium { background: var(--medium); }
.severity-indicator.low { background: var(--low); }

/* Action badges */
.action-badge { display: inline-flex; padding: 0.125rem 0.5rem; border-radius: 4px; font-size: 11px; font-weight: 600; }
.action-blocked { background: var(--critical-bg); color: var(--critical); border: 1px solid var(--critical-border); }
.action-masked { background: var(--accent-bg); color: var(--accent); border: 1px solid rgba(74,125,255,0.3); }
.action-escalated { background: var(--medium-bg); color: var(--medium); border: 1px solid var(--medium-border); }

/* === Intake wizard === */
.wizard-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.25rem; align-items: start; }
@media (max-width: 1200px) { .wizard-layout { grid-template-columns: 1fr; } }

.step-rail { display: flex; gap: 0.25rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.step-rail-item {
    flex: 1; min-width: 130px;
    padding: 0.625rem 0.875rem; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 6px; font-size: 12px; color: var(--text-secondary);
    display: flex; gap: 0.5rem; align-items: center; cursor: pointer;
}
.step-rail-item .step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%; background: var(--bg-elevated);
    border: 1px solid var(--border-strong); font-size: 11px; font-weight: 700;
}
.step-rail-item.active { border-color: var(--accent); color: var(--text-primary); background: var(--accent-bg); }
.step-rail-item.active .step-num { background: var(--accent); color: white; border-color: var(--accent); }
.step-rail-item.done .step-num { background: var(--pass); color: white; border-color: var(--pass); }
.step-rail-item.done { color: var(--text-primary); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.875rem 1rem; }
.form-grid.single { grid-template-columns: 1fr; }
.form-field { display: flex; flex-direction: column; gap: 0.375rem; }
.form-field.span-2 { grid-column: span 2; }
.form-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.form-label .req { color: var(--critical); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
    padding: 0.5rem 0.75rem; background: var(--bg-input); color: var(--text-primary);
    border: 1px solid var(--border-strong); border-radius: 6px; font-size: 13px;
    font-family: inherit; width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-bg);
}
.form-textarea { min-height: 80px; resize: vertical; }
.form-help { font-size: 11px; color: var(--text-tertiary); }

.chip-group { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.chip {
    padding: 0.375rem 0.75rem; background: var(--bg-card); border: 1px solid var(--border-strong);
    border-radius: 999px; font-size: 12px; cursor: pointer; user-select: none;
    color: var(--text-secondary); transition: all 0.1s;
}
.chip:hover { border-color: var(--text-secondary); }
.chip.selected { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }
.chip.selected.critical { background: var(--critical-bg); color: var(--critical); border-color: var(--critical-border); }

.switch-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.625rem 0.75rem; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 6px;
}
.switch-row .switch-label { font-size: 13px; color: var(--text-primary); }
.switch-row .switch-help { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.switch {
    position: relative; width: 36px; height: 20px; flex-shrink: 0;
    background: var(--bg-input); border: 1px solid var(--border-strong);
    border-radius: 999px; cursor: pointer; transition: background 0.15s;
}
.switch::after {
    content: ''; position: absolute; top: 1px; left: 1px;
    width: 16px; height: 16px; border-radius: 50%; background: var(--text-secondary);
    transition: transform 0.15s, background 0.15s;
}
.switch.on { background: var(--accent); border-color: var(--accent); }
.switch.on::after { transform: translateX(16px); background: white; }

.wizard-footer { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 1.25rem; }
.wizard-footer .left, .wizard-footer .right { display: flex; gap: 0.5rem; }

.risk-panel { position: sticky; top: 1rem; }
.risk-pill {
    display: inline-block; padding: 0.5rem 1rem; border-radius: 999px;
    font-weight: 700; font-size: 18px; letter-spacing: 0.02em;
}
.risk-pill.LOW { background: var(--pass-bg); color: var(--pass); border: 1px solid var(--pass-border); }
.risk-pill.MEDIUM { background: var(--medium-bg); color: var(--medium); border: 1px solid var(--medium-border); }
.risk-pill.HIGH { background: var(--high-bg); color: var(--high); border: 1px solid var(--high-border); }
.risk-pill.CRITICAL { background: var(--critical-bg); color: var(--critical); border: 1px solid var(--critical-border); }
.rule-row {
    font-size: 12px; padding: 0.5rem 0; border-bottom: 1px solid var(--border); color: var(--text-secondary);
    display: flex; gap: 0.5rem; align-items: start;
}
.rule-row:last-child { border-bottom: none; }
.rule-row .rule-tag {
    font-family: var(--font-mono); font-size: 11px; padding: 0 0.375rem; height: 18px;
    line-height: 18px; border-radius: 4px; background: var(--bg-input);
    color: var(--text-primary); flex-shrink: 0;
}

/* ============================================================================
   AI Risk Operations Notification Center
   ============================================================================ */
.notif-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    opacity: 0; pointer-events: none; transition: opacity 0.15s ease;
    z-index: 1000;
}
.notif-overlay.open { opacity: 1; pointer-events: auto; }

.notif-panel {
    position: fixed; top: 0; right: 0; height: 100vh; width: 460px; max-width: 90vw;
    background: var(--bg-card); border-left: 1px solid var(--border);
    box-shadow: -8px 0 32px rgba(0,0,0,0.4);
    display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform 0.18s ease;
    z-index: 1001;
}
.notif-panel.open { transform: translateX(0); }

.notif-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 1rem; padding: 1rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--border);
}
.notif-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.notif-subtitle {
    font-size: 11px; color: var(--text-tertiary); margin-top: 6px;
    display: flex; gap: 6px; flex-wrap: wrap;
}
.notif-close {
    background: transparent; border: none; color: var(--text-secondary);
    font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.notif-close:hover { color: var(--text-primary); }

.notif-tabs {
    display: flex; gap: 4px; padding: 0.5rem 1.25rem;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}
.notif-tab {
    background: transparent; border: 1px solid transparent; color: var(--text-secondary);
    padding: 4px 10px; font-size: 12px; border-radius: 999px;
    cursor: pointer; white-space: nowrap;
    display: inline-flex; gap: 6px; align-items: center;
}
.notif-tab:hover { background: var(--bg-deep); color: var(--text-primary); }
.notif-tab.active {
    background: rgba(99,102,241,0.12); color: #a5b4fc; border-color: rgba(99,102,241,0.35);
}
.notif-tab-count {
    background: var(--bg-deep); border: 1px solid var(--border);
    padding: 0 6px; border-radius: 999px; font-size: 10px;
    color: var(--text-tertiary); min-width: 18px; text-align: center;
}
.notif-tab.active .notif-tab-count { color: #a5b4fc; border-color: rgba(99,102,241,0.35); }

.notif-list {
    flex: 1; overflow-y: auto; padding: 0.75rem 1rem 1rem;
    display: flex; flex-direction: column; gap: 8px;
}
.notif-empty {
    padding: 2rem 1rem; text-align: center;
    color: var(--text-tertiary); font-size: 12px; font-style: italic;
}

.notif-card {
    background: var(--bg-deep); border: 1px solid var(--border); border-left-width: 3px;
    border-radius: 6px; padding: 0.625rem 0.75rem;
    cursor: pointer; transition: background 0.1s ease, border-color 0.1s ease;
}
.notif-card:hover { background: var(--bg-hover, rgba(255,255,255,0.02)); }
.notif-card.crit  { border-left-color: var(--critical); }
.notif-card.high  { border-left-color: var(--high, #f59e0b); }
.notif-card.med   { border-left-color: var(--medium, #eab308); }
.notif-card.low   { border-left-color: var(--low, #6b7280); }

.notif-card-head {
    display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap;
}
.notif-cat {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-tertiary);
}
.notif-ts { margin-left: auto; font-size: 10px; color: var(--text-tertiary); }

.notif-card-title {
    font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.35;
}
.notif-card-detail {
    font-size: 11px; color: var(--text-secondary); margin-top: 2px; line-height: 1.4;
}
.notif-card-meta {
    margin-top: 6px; display: flex; gap: 4px; flex-wrap: wrap;
}
.notif-meta-pill {
    font-family: var(--font-mono); font-size: 10px;
    padding: 1px 6px; border-radius: 4px;
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary);
}
.notif-card-action {
    margin-top: 6px; font-size: 11px; color: var(--text-tertiary); font-style: italic;
}
.notif-card-actions {
    margin-top: 8px; display: flex; align-items: center; gap: 8px;
}
.notif-open {
    font-size: 11px; color: var(--accent, #6366f1); text-decoration: none;
}
.notif-open:hover { text-decoration: underline; }
.notif-resolve {
    margin-left: auto;
    background: transparent; border: 1px solid var(--border);
    color: var(--text-secondary); font-size: 10px; text-transform: uppercase;
    letter-spacing: 0.06em; padding: 3px 8px; border-radius: 4px; cursor: pointer;
}
.notif-resolve:hover { background: var(--bg-card); color: var(--text-primary); }

.notif-sev-pill {
    font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
    text-transform: uppercase; letter-spacing: 0.06em;
}
.notif-sev-pill.crit { background: var(--critical-bg); color: var(--critical); border: 1px solid var(--critical-border); }
.notif-sev-pill.high { background: var(--high-bg, rgba(245,158,11,0.12)); color: var(--high, #f59e0b); border: 1px solid var(--high-border, rgba(245,158,11,0.3)); }
.notif-sev-pill.med  { background: var(--medium-bg, rgba(234,179,8,0.12)); color: var(--medium, #eab308); border: 1px solid var(--medium-border, rgba(234,179,8,0.3)); }
.notif-sev-pill.low  { background: rgba(99,102,241,0.12); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.3); }

.notif-footer {
    padding: 0.75rem 1.25rem; border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.notif-link { font-size: 12px; color: var(--accent, #6366f1); text-decoration: none; font-weight: 600; }
.notif-link:hover { text-decoration: underline; }
.notif-reset {
    background: transparent; border: 1px solid var(--border);
    color: var(--text-tertiary); font-size: 10px; text-transform: uppercase;
    letter-spacing: 0.06em; padding: 3px 8px; border-radius: 4px; cursor: pointer;
}
.notif-reset:hover { background: var(--bg-deep); color: var(--text-primary); }

/* Topbar badge uses small unread count text (number, not dot). */
.icon-btn .badge-dot {
    position: absolute; top: -2px; right: -4px;
    background: var(--critical); color: white;
    min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 999px; font-size: 10px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-card);
}

/* ============================================================================
   AI Governance Assistant — drawer panel
   ============================================================================ */
.guide-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    opacity: 0; pointer-events: none; transition: opacity 0.15s ease;
    z-index: 1002;
}
.guide-overlay.open { opacity: 1; pointer-events: auto; }

.guide-panel {
    position: fixed; top: 0; right: 0; height: 100vh; width: 520px; max-width: 92vw;
    background: var(--bg-card); border-left: 1px solid var(--border);
    box-shadow: -8px 0 32px rgba(0,0,0,0.4);
    display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform 0.18s ease;
    z-index: 1003;
}
.guide-panel.open { transform: translateX(0); }

.guide-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 1rem; padding: 1rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--border);
}
.guide-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.guide-subtitle {
    font-size: 11px; color: var(--text-tertiary); margin-top: 4px; line-height: 1.4;
}

.guide-search { padding: 0.625rem 1.25rem; border-bottom: 1px solid var(--border); }
.guide-search input {
    width: 100%; box-sizing: border-box;
    background: var(--bg-deep); color: var(--text-primary);
    border: 1px solid var(--border); border-radius: 6px;
    padding: 7px 10px; font-size: 12px;
}
.guide-search input:focus {
    outline: none; border-color: rgba(99,102,241,0.5);
    box-shadow: 0 0 0 1px rgba(99,102,241,0.25);
}

.guide-tabs {
    display: flex; gap: 4px; padding: 0.5rem 1.25rem;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.guide-body {
    flex: 1; overflow-y: auto; padding: 0.875rem 1.25rem 1rem;
}

.guide-hero {
    background: linear-gradient(135deg, rgba(99,102,241,0.10), rgba(56,189,248,0.06));
    border: 1px solid rgba(99,102,241,0.25); border-radius: 8px;
    padding: 0.75rem 0.875rem; margin-bottom: 0.875rem;
}
.guide-hero-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.guide-hero-q { font-size: 12px; color: var(--text-secondary); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.guide-section { margin-bottom: 1rem; }
.guide-section h4 {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-tertiary); margin: 0 0 0.375rem;
}
.guide-section p {
    font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin: 0;
}
.guide-list {
    margin: 0; padding-left: 1.2rem;
    font-size: 12px; color: var(--text-secondary); line-height: 1.55;
}
.guide-list li { margin-bottom: 4px; }
.guide-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.guide-empty { color: var(--text-tertiary); font-size: 11px; font-style: italic; }
.guide-chip {
    display: inline-block; margin: 2px 6px 2px 0;
    background: var(--bg-deep); border: 1px solid var(--border);
    color: var(--text-secondary); font-size: 11px;
    padding: 3px 8px; border-radius: 4px; text-decoration: none;
}
.guide-chip:hover { color: var(--text-primary); border-color: rgba(99,102,241,0.4); }

.guide-dl { margin: 0; }
.guide-dl dt {
    font-size: 12px; font-weight: 700; color: var(--text-primary); margin-top: 8px;
}
.guide-dl dd {
    margin: 2px 0 0 0;
    font-size: 11px; color: var(--text-secondary); line-height: 1.5;
}

.guide-control-grid { display: flex; flex-direction: column; gap: 4px; }
.guide-control-row {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-deep); border: 1px solid var(--border);
    border-radius: 6px; padding: 6px 10px;
    cursor: pointer; text-align: left;
    font-size: 12px; color: var(--text-secondary);
    transition: background 0.1s ease, border-color 0.1s ease;
}
.guide-control-row:hover { background: var(--bg-card); border-color: rgba(99,102,241,0.4); color: var(--text-primary); }
.guide-control-row strong { color: var(--text-primary); font-weight: 700; flex-shrink: 0; }

.guide-glossary-row {
    background: var(--bg-deep); border: 1px solid var(--border);
    border-radius: 6px; padding: 8px 10px; margin-bottom: 6px;
}
.guide-glossary-term {
    font-size: 12px; font-weight: 700; color: var(--text-primary);
    display: flex; gap: 6px; align-items: center; margin-bottom: 3px;
}
.guide-glossary-def { font-size: 11px; color: var(--text-secondary); line-height: 1.4; }

.guide-back {
    background: transparent; border: none; color: var(--text-tertiary);
    font-size: 11px; padding: 0 0 8px; cursor: pointer;
}
.guide-back:hover { color: var(--text-primary); }

.guide-pre {
    background: var(--bg-deep); border: 1px solid var(--border);
    border-radius: 4px; padding: 6px 8px;
    font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary);
    white-space: pre-wrap; word-break: break-word; margin: 0;
}

/* Topbar Guide button — small label next to icon */
.guide-btn { display: inline-flex; gap: 4px; align-items: center; padding: 4px 10px; width: auto; }
.guide-btn-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-secondary);
}
.guide-btn:hover .guide-btn-label { color: var(--text-primary); }

/* ============================================================================
   Assurance-model inline response panel (used by contextual buttons)
   ============================================================================ */
.assist-response {
    background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(56,189,248,0.03));
    border: 1px solid rgba(99,102,241,0.25); border-radius: 8px;
    padding: 0.75rem 0.875rem; margin-top: 0.75rem;
    font-size: 12px; color: var(--text-primary); line-height: 1.55;
}
.assist-response .assist-head {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px;
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-tertiary);
}
.assist-response .assist-head .pill {
    background: var(--bg-deep); border: 1px solid var(--border);
    padding: 1px 7px; border-radius: 10px; color: var(--text-secondary);
}
.assist-response .assist-head .pill.ok    { color: var(--green, #4ade80); border-color: rgba(74,222,128,0.3); }
.assist-response .assist-head .pill.bad   { color: var(--red, #f87171);   border-color: rgba(248,113,113,0.3); }
.assist-response .assist-head .pill.warn  { color: var(--amber, #fbbf24); border-color: rgba(251,191,36,0.3); }
.assist-response .assist-body {
    white-space: pre-wrap; color: var(--text-primary); font-family: var(--font-mono);
    font-size: 11px; max-height: 320px; overflow: auto;
}
.assist-response .assist-meta {
    font-size: 10px; color: var(--text-tertiary); margin-top: 6px;
    font-family: var(--font-mono);
}
.assist-response.blocked { border-color: rgba(248,113,113,0.35); background: rgba(248,113,113,0.05); }
.assist-response .alts { margin-top: 6px; }
.assist-response .alts li { font-size: 11px; color: var(--text-secondary); }

/* ============================================================================
   Info tooltip — small "?" affordance next to KPIs / chart titles
   ============================================================================ */
.info-tip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--bg-deep); border: 1px solid var(--border);
    color: var(--text-tertiary); font-size: 10px; font-weight: 700;
    line-height: 1; cursor: help; margin-left: 4px; vertical-align: middle;
    transition: background 0.1s ease, color 0.1s ease, border-color 0.1s ease;
    user-select: none;
}
.info-tip:hover, .info-tip:focus-visible {
    background: rgba(99,102,241,0.12);
    border-color: rgba(99,102,241,0.5);
    color: #a5b4fc; outline: none;
}

.info-pop {
    position: fixed; z-index: 1100; max-width: 320px;
    background: var(--bg-card); color: var(--text-primary);
    border: 1px solid rgba(99,102,241,0.35); border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    padding: 0.625rem 0.75rem; font-size: 12px; line-height: 1.5;
    pointer-events: none;
    opacity: 0; transform: translateY(2px);
    transition: opacity 0.12s ease, transform 0.12s ease;
}
.info-pop.show { opacity: 1; transform: translateY(0); }
.info-pop .info-pop-title {
    font-size: 12px; font-weight: 700; color: var(--text-primary);
    margin-bottom: 4px;
}
.info-pop .info-pop-desc { color: var(--text-secondary); font-size: 11px; }
.info-pop .info-pop-meta {
    margin-top: 6px; padding-top: 6px; border-top: 1px dotted var(--border);
    font-family: var(--font-mono); font-size: 10px; color: var(--text-tertiary);
}
.info-pop .info-pop-meta b { color: var(--text-secondary); font-weight: 600; }

/* ---- Topbar action buttons (analytics link + logout) -------------------- */
.topbar-action {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 6px;
    background: var(--bg-deep, #0b1020);
    border: 1px solid var(--border, #1f2a44);
    color: var(--text-secondary, #c4cee0);
    font-size: 12px; font-weight: 500; text-decoration: none; cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.topbar-action:hover {
    background: rgba(99,102,241,0.12);
    border-color: rgba(99,102,241,0.45);
    color: var(--text-primary, #e6ecff);
}
.topbar-action-label { white-space: nowrap; }
.topbar-logout { color: #fca5a5; }
.topbar-logout:hover { border-color: rgba(248,113,113,0.45); color: #fecaca; }
