/* MonRust 3.0 - Dark Amber Hacker Theme (oklch) */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* Core palette — oklch */
    --bg-primary: oklch(0.09 0 0);
    --bg-secondary: oklch(0.12 0 0);
    --bg-tertiary: oklch(0.15 0 0);
    --bg-hover: oklch(0.17 0 0);
    --bg-active: oklch(0.20 0 0);
    --text-primary: oklch(0.98 0 0);
    --text-secondary: oklch(0.72 0 0);
    --text-muted: oklch(0.45 0 0);
    --accent: oklch(0.65 0.18 35);
    --accent-hover: oklch(0.72 0.18 35);
    --accent-dim: oklch(0.65 0.18 35 / 0.15);
    --success: oklch(0.65 0.17 160);
    --warning: oklch(0.72 0.18 85);
    --danger: oklch(0.577 0.245 27.325);
    --critical: oklch(0.52 0.22 25);
    --high: oklch(0.65 0.2 45);
    --medium: oklch(0.75 0.17 85);
    --low: oklch(0.55 0.18 255);
    --info: oklch(0.5 0 0);
    --purple: oklch(0.627 0.265 303.9);
    --cyan: oklch(0.6 0.118 184.704);
    --border: oklch(0.22 0 0);
    --border-light: oklch(0.26 0 0);
    --ring: oklch(0.5 0 0);
    --radius: 0.5rem;
    --shadow: 0 1px 3px oklch(0 0 0 / 0.5);
    --shadow-lg: 0 4px 16px oklch(0 0 0 / 0.6);
    --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Chart colors */
    --chart-1: oklch(0.65 0.18 35);
    --chart-2: oklch(0.6 0.118 184.704);
    --chart-3: oklch(0.398 0.07 227.392);
    --chart-4: oklch(0.828 0.189 84.429);
    --chart-5: oklch(0.769 0.188 70.08);
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* ============================
   LAYOUT
   ============================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 10;
}

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

.sidebar-logo {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
}

.sidebar-logo .logo-mon { color: var(--text-primary); }
.sidebar-logo .logo-rust { color: var(--accent); }
.sidebar-logo .logo-ver { color: var(--text-muted); font-weight: 400; font-size: 0.7rem; margin-left: 4px; }

.sidebar-header span {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    margin-bottom: 2px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.12s;
}

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

.sidebar-nav a.active {
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 600;
}

.nav-icon {
    width: 20px;
    text-align: center;
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.sidebar-nav a.active .nav-icon { color: var(--accent); }
.sidebar-nav a:hover .nav-icon { color: var(--text-secondary); }

.sidebar-nav a { position: relative; }
.nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: var(--danger);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    line-height: 1;
}
.nav-badge-pulse {
    animation: badge-pulse 0.4s ease;
}
@keyframes badge-pulse {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s ease-in-out infinite;
}

.sidebar-version {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    margin-left: 220px;
    padding: 24px;
    min-height: 100vh;
}

/* ============================
   PAGE HEADER
   ============================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-family: var(--font-mono);
}

.header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* WS Status */
.ws-status {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-mono);
    background: rgba(82,82,82,0.2);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.ws-status.connected {
    background: oklch(0.65 0.17 160 / 0.1);
    color: var(--success);
    border-color: oklch(0.65 0.17 160 / 0.3);
}

/* ============================
   CARDS
   ============================ */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.card h2 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}

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

.card-header h2 { margin-bottom: 0; }

/* ============================
   STATS GRID
   ============================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stats-small {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.15s;
}

.stat-card:hover {
    border-color: var(--border-light);
    background: var(--bg-tertiary);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-muted);
    flex-shrink: 0;
}

.stat-body { text-align: left; }

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.stat-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.stat-card.accent { border-color: oklch(0.65 0.18 35 / 0.3); }
.stat-card.accent .stat-icon { background: var(--accent-dim); color: var(--accent); }
.stat-card.accent .stat-value { color: var(--accent); }

.stat-card.danger { border-color: oklch(0.577 0.245 27 / 0.3); }
.stat-card.danger .stat-icon { background: oklch(0.577 0.245 27 / 0.1); color: var(--danger); }
.stat-card.danger .stat-value { color: var(--danger); }

.stat-card.success { border-color: oklch(0.65 0.17 160 / 0.3); }
.stat-card.success .stat-icon { background: oklch(0.65 0.17 160 / 0.1); color: var(--success); }
.stat-card.success .stat-value { color: var(--success); }

/* ============================
   BUTTONS
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover { background: var(--bg-hover); border-color: var(--border-light); }
.btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-tertiary); }
.btn-danger { color: var(--danger); border-color: oklch(0.577 0.245 27 / 0.3); }
.btn-danger:hover { background: oklch(0.577 0.245 27 / 0.1); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-hover); }
.btn-sm { padding: 4px 10px; font-size: 0.75rem; }
.btn-lg { padding: 10px 20px; font-size: 0.9rem; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 600; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-critical { border-color: oklch(0.52 0.22 25 / 0.4); color: var(--critical); }
.btn-high { border-color: oklch(0.65 0.2 45 / 0.4); color: var(--high); }
.btn-medium { border-color: oklch(0.75 0.17 85 / 0.4); color: var(--medium); }

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

/* ============================
   TABLES
   ============================ */
.table-container { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.table th, .table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tr:hover { background: var(--bg-hover); }
.table .actions { white-space: nowrap; }
.table .actions .btn { margin-right: 4px; }

/* ============================
   BADGES
   ============================ */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}

.badge-active { background: oklch(0.65 0.17 160 / 0.1); color: var(--success); }
.badge-inactive { background: oklch(0.5 0 0 / 0.2); color: var(--info); }
.badge-monitoring { background: var(--accent-dim); color: var(--accent); }
.badge-changed { background: oklch(0.65 0.2 45 / 0.1); color: var(--high); }
.badge-new { background: oklch(0.65 0.17 160 / 0.1); color: var(--success); }
.badge-pending { background: oklch(0.72 0.18 85 / 0.1); color: var(--warning); }
.badge-validated { background: oklch(0.65 0.17 160 / 0.1); color: var(--success); }
.badge-alive { background: oklch(0.65 0.17 160 / 0.1); color: var(--success); }
.badge-dead { background: oklch(0.5 0 0 / 0.2); color: var(--info); }

.badge-manual { background: oklch(0.627 0.265 303.9 / 0.1); color: var(--purple); }
.badge-chaos { background: oklch(0.627 0.265 303.9 / 0.1); color: var(--purple); }
.badge-chaos-bounty { background: oklch(0.627 0.265 303.9 / 0.15); color: oklch(0.72 0.2 303.9); }
.badge-hackerone { background: oklch(0.65 0.17 160 / 0.1); color: var(--success); }
.badge-bugcrowd { background: oklch(0.65 0.2 45 / 0.1); color: var(--high); }
.badge-intigriti { background: oklch(0.72 0.18 85 / 0.1); color: var(--warning); }
.badge-yeswehack { background: oklch(0.577 0.245 27 / 0.1); color: var(--danger); }
.badge-federacy { background: oklch(0.55 0.18 255 / 0.1); color: var(--low); }
.badge-monrust2 { background: oklch(0.6 0.118 184.704 / 0.1); color: var(--cyan); }

/* ============================
   INPUTS
   ============================ */
.input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: var(--font-sans);
    transition: border-color 0.12s;
}

.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px oklch(0.65 0.18 35 / 0.2);
}

.input-sm { max-width: 200px; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.form-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.form-actions { margin-top: 24px; }
select.input { appearance: auto; }

/* ============================
   MODAL
   ============================ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}

.modal.hidden { display: none; }

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    min-width: 400px;
    max-width: 90%;
    box-shadow: var(--shadow-lg);
}

.modal-content h3 {
    margin-bottom: 16px;
    font-size: 1rem;
    color: var(--text-primary);
}

.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* ============================
   MESSAGES
   ============================ */
.message {
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

.message.hidden { display: none; }
.message.success { background: oklch(0.65 0.17 160 / 0.1); color: var(--success); border: 1px solid oklch(0.65 0.17 160 / 0.2); }
.message.error { background: oklch(0.577 0.245 27 / 0.1); color: var(--danger); border: 1px solid oklch(0.577 0.245 27 / 0.2); }

/* ============================
   2-COL GRID
   ============================ */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* ============================
   BAR CHARTS
   ============================ */
.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chart-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-label {
    width: 100px;
    flex-shrink: 0;
    text-align: right;
}

.chart-bar-track {
    flex: 1;
    height: 20px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
    min-width: 2px;
}

.chart-value {
    width: 55px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
}

/* ============================
   RING CHARTS (SVG)
   ============================ */
.quick-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0;
    gap: 12px;
}

.qs-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.qs-ring {
    position: relative;
    width: 80px;
    height: 80px;
}

.qs-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.qs-bg {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 3;
}

.qs-fg {
    fill: none;
    stroke: var(--text-muted);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.qs-active .qs-fg { stroke: var(--accent); }
.qs-warn .qs-fg { stroke: var(--warning); }
.qs-success .qs-fg { stroke: var(--success); }

.qs-pct {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.qs-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ============================
   ACTIVITY FEED
   ============================ */
.activity-feed {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

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

.activity-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    flex-shrink: 0;
    color: var(--text-muted);
}

.activity-change .activity-icon { background: var(--accent-dim); color: var(--accent); }
.activity-finding .activity-icon { background: oklch(0.577 0.245 27 / 0.1); color: var(--danger); }
.activity-sub .activity-icon { background: oklch(0.65 0.17 160 / 0.1); color: var(--success); }

.activity-body { flex: 1; min-width: 0; }
.activity-body strong { display: block; font-size: 0.8rem; font-weight: 600; }
.activity-detail { font-size: 0.75rem; color: var(--text-muted); word-break: break-all; font-family: var(--font-mono); }
.activity-time { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; font-family: var(--font-mono); }

.activity-new { animation: slideIn 0.3s ease; }

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

/* ============================
   LIVE DOT
   ============================ */
.live-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 oklch(0.65 0.17 160 / 0.4); }
    50% { opacity: 0.5; box-shadow: 0 0 0 4px oklch(0.65 0.17 160 / 0); }
}

/* ============================
   PIPELINE STATUS
   ============================ */
.pipeline-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--accent-dim);
    border: 1px solid oklch(0.65 0.18 35 / 0.2);
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--accent);
    font-family: var(--font-mono);
}

.pipeline-steps {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.pipeline-step {
    width: 24px;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    transition: background 0.3s;
}

.pipeline-step.done { background: var(--accent); }
.pipeline-step.active { background: var(--accent); animation: stepPulse 1s ease infinite; }

@keyframes stepPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ============================
   PERSISTENT SCAN TERMINAL (bottom bar)
   ============================ */
.persistent-terminal {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width, 220px);
    right: 0;
    z-index: 900;
    background: oklch(0.06 0 0);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 280px;
}
.persistent-terminal.collapsed {
    height: 36px;
}
.persistent-terminal.collapsed .pt-body { display: none; }
.persistent-terminal.collapsed .pt-toggle { transform: rotate(180deg); }

.pt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    cursor: pointer;
    background: oklch(0.08 0 0);
    border-bottom: 1px solid var(--border);
    user-select: none;
    min-height: 36px;
    flex-shrink: 0;
}
.pt-header:hover { background: oklch(0.10 0 0); }
.pt-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pt-count {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
}
.pt-toggle {
    color: var(--text-muted);
    font-size: 0.7rem;
    transition: transform 0.3s;
}
.pt-radar {
    width: 12px;
    height: 12px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pt-radar-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: background 0.3s;
}
.pt-radar-dot.active {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: pt-pulse 1s ease-in-out infinite;
}
@keyframes pt-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--accent); }
    50% { opacity: 0.6; box-shadow: 0 0 12px var(--accent); }
}
.pt-body {
    flex: 1;
    overflow: hidden;
}

/* Adjust main content so it doesn't hide behind terminal */
.main-content { padding-bottom: 44px !important; }

/* ============================
   SCAN TERMINAL (inner)
   ============================ */
.scan-terminal {
    background: oklch(0.06 0 0);
    padding: 12px;
    height: 100%;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.6;
    scroll-behavior: smooth;
}

.scan-terminal::-webkit-scrollbar { width: 6px; }
.scan-terminal::-webkit-scrollbar-track { background: transparent; }
.scan-terminal::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

.terminal-line {
    padding: 1px 0;
    word-break: break-all;
    color: var(--text-secondary);
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.terminal-line.terminal-new {
    animation: termFadeIn 0.3s ease;
}

@keyframes termFadeIn {
    from { opacity: 0; background: oklch(0.65 0.18 35 / 0.05); }
    to { opacity: 1; background: transparent; }
}

.terminal-time {
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 65px;
    font-size: 0.68rem;
}

.terminal-icon {
    color: var(--text-muted);
    font-weight: 700;
    flex-shrink: 0;
}

.terminal-tag {
    font-size: 0.62rem;
    padding: 0 5px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.terminal-tag-crawler { background: oklch(0.55 0.18 255 / 0.15); color: var(--low); }
.terminal-tag-subfinder { background: oklch(0.627 0.265 303.9 / 0.15); color: var(--purple); }
.terminal-tag-naabu { background: oklch(0.6 0.118 184.704 / 0.15); color: var(--cyan); }
.terminal-tag-httpx { background: oklch(0.65 0.17 160 / 0.15); color: var(--success); }
.terminal-tag-katana { background: oklch(0.72 0.18 85 / 0.15); color: var(--warning); }
.terminal-tag-cloudfinder { background: oklch(0.65 0.18 35 / 0.15); color: var(--accent); }
.terminal-tag-nuclei { background: oklch(0.577 0.245 27 / 0.15); color: var(--danger); }
.terminal-tag-pipeline { background: oklch(0.65 0.18 35 / 0.15); color: var(--accent); }
.terminal-tag-monitor { background: oklch(0.72 0.18 85 / 0.15); color: var(--warning); }
.terminal-tag-js_monitor { background: oklch(0.72 0.18 85 / 0.15); color: var(--warning); }
.terminal-tag-scheduler { background: var(--bg-tertiary); color: var(--text-muted); }
.terminal-tag-error { background: oklch(0.577 0.245 27 / 0.15); color: var(--danger); }

.terminal-system { color: var(--text-muted); font-style: italic; }
.terminal-info { color: var(--text-secondary); }
.terminal-success { color: var(--success); }
.terminal-warning { color: var(--warning); }
.terminal-danger { color: var(--danger); font-weight: 600; }
.terminal-accent { color: var(--accent); }
.terminal-muted { color: var(--text-muted); }

.btn-sm {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 3px;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-mono);
}

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

/* ============================
   TOOLBAR
   ============================ */
.toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.search-box { display: flex; gap: 8px; }
.search-box .input { flex: 1; max-width: 400px; }

.filter-chips { display: flex; gap: 4px; flex-wrap: wrap; }

.chip {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-mono);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.12s;
}

.chip:hover { color: var(--text-secondary); border-color: var(--border-light); }
.chip.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* ============================
   PAGINATION
   ============================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
}

.page-info { font-size: 0.8rem; color: var(--text-muted); font-family: var(--font-mono); }

/* ============================
   DIFF CARDS
   ============================ */
.diff-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.12s;
    border-left: 3px solid var(--accent);
}

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

.diff-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.diff-url {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-primary);
    word-break: break-all;
    font-family: var(--font-mono);
}

.diff-stats {
    display: flex;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

.diff-added { color: var(--success); }
.diff-removed { color: var(--danger); }

.diff-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.diff-time { font-size: 0.7rem; color: var(--text-muted); font-family: var(--font-mono); }
.diff-actions { display: flex; gap: 6px; }

/* ============================
   DIFF VIEWER
   ============================ */
.diff-table {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.5;
    overflow-x: auto;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.diff-row { display: flex; min-height: 22px; }

.diff-gutter {
    width: 45px;
    text-align: right;
    padding: 0 8px;
    color: var(--text-muted);
    user-select: none;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    font-size: 0.7rem;
}

.diff-content {
    flex: 1;
    padding: 0 12px;
    white-space: pre-wrap;
    word-break: break-all;
}

.diff-add { background: oklch(0.65 0.17 160 / 0.06); }
.diff-add .diff-content { color: var(--success); }
.diff-remove { background: oklch(0.577 0.245 27 / 0.06); }
.diff-remove .diff-content { color: var(--danger); }
.diff-hunk { background: oklch(0.65 0.18 35 / 0.06); }
.diff-hunk .diff-content { color: var(--accent); font-weight: 600; }
.diff-header { background: var(--bg-tertiary); }
.diff-header .diff-content { color: var(--text-muted); }

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

.diff-detail-header h2 {
    font-size: 0.85rem;
    word-break: break-all;
    margin-bottom: 0;
    font-family: var(--font-mono);
}

/* ============================
   FINDINGS
   ============================ */
.finding-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 8px;
    cursor: pointer;
    border-left: 3px solid var(--border);
    transition: all 0.12s;
}

.finding-card:hover { background: var(--bg-hover); }
.finding-card.severity-critical { border-left-color: var(--critical); }
.finding-card.severity-high { border-left-color: var(--high); }
.finding-card.severity-medium { border-left-color: var(--medium); }
.finding-card.severity-low { border-left-color: var(--low); }

.finding-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.severity-badge {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}

.severity-critical { background: oklch(0.52 0.22 25 / 0.15); color: var(--critical); }
.severity-high { background: oklch(0.65 0.2 45 / 0.15); color: var(--high); }
.severity-medium { background: oklch(0.75 0.17 85 / 0.15); color: var(--medium); }
.severity-low { background: oklch(0.55 0.18 255 / 0.15); color: var(--low); }
.severity-info { background: oklch(0.5 0 0 / 0.2); color: var(--info); }

.finding-name { font-weight: 600; font-size: 0.85rem; }
.finding-url { font-size: 0.75rem; color: var(--text-muted); word-break: break-all; font-family: var(--font-mono); }
.finding-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; font-family: var(--font-mono); }

.finding-detail-grid { display: flex; flex-direction: column; gap: 16px; }
.finding-meta p { margin-bottom: 8px; font-size: 0.85rem; }
.finding-meta a { color: var(--accent); }

.poc-section h3, .raw-section h3 {
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: var(--accent);
}

.code-block {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    position: relative;
    color: var(--text-secondary);
}

.copy-btn { position: absolute; top: 8px; right: 8px; }
.finding-actions { margin-top: 12px; }

/* ============================
   SPINNER
   ============================ */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 10px;
}

.spinner-sm {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

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

/* ============================
   TOAST NOTIFICATIONS (SaaS)
   ============================ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px 14px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    background: oklch(0.14 0 0 / 0.92);
    backdrop-filter: blur(16px) saturate(1.5);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    border: 1px solid oklch(0.28 0 0);
    color: var(--text-primary);
    box-shadow: 0 8px 32px oklch(0 0 0 / 0.5), 0 0 0 1px oklch(1 0 0 / 0.03) inset;
    transform: translateY(16px) scale(0.96);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s;
    pointer-events: auto;
    max-width: 420px;
    min-width: 300px;
    position: relative;
    overflow: hidden;
    line-height: 1.45;
}

.toast.show { transform: translateY(0) scale(1); opacity: 1; }

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.toast-msg { flex: 1; min-width: 0; word-break: break-word; }

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0 0 4px;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}
.toast:hover .toast-close { opacity: 1; }
.toast-close:hover { color: var(--text-primary); }

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: oklch(0.2 0 0);
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    animation: toastCountdown 5s linear forwards;
}

@keyframes toastCountdown {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

.toast-info { border-left: 3px solid var(--accent); }
.toast-info .toast-icon { color: var(--accent); }
.toast-info .toast-progress-bar { background: var(--accent); }

.toast-success { border-left: 3px solid var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-success .toast-progress-bar { background: var(--success); }

.toast-warning { border-left: 3px solid var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-warning .toast-progress-bar { background: var(--warning); }

.toast-error { border-left: 3px solid var(--danger); }
.toast-error .toast-icon { color: var(--danger); }
.toast-error .toast-progress-bar { background: var(--danger); }

/* ============================
   DOMAIN DETAIL
   ============================ */
.dd-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 16px;
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}
.dd-tab {
    padding: 8px 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all 0.15s;
}
.dd-tab:hover { color: var(--text-primary); background: var(--bg-hover); }
.dd-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.dd-tab-count {
    font-size: 0.65rem;
    background: var(--bg-tertiary);
    padding: 1px 5px;
    border-radius: 8px;
    margin-left: 4px;
}
.dd-tab.active .dd-tab-count { background: oklch(0.65 0.18 35 / 0.15); color: var(--accent); }

.dd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 768px) { .dd-grid { grid-template-columns: 1fr; } }

.dd-info-grid { display: grid; grid-template-columns: 100px 1fr; gap: 6px 12px; font-size: 0.85rem; }
.dd-info-label { color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; align-self: center; }
.dd-info-value { color: var(--text-secondary); }
.dd-info-value.mono { font-family: var(--font-mono); font-size: 0.82rem; }

.dd-summary { display: flex; gap: 16px; flex-wrap: wrap; }
.dd-summary-item { display: flex; flex-direction: column; align-items: center; padding: 12px 16px; background: var(--bg-tertiary); border-radius: var(--radius); min-width: 70px; }
.dd-summary-item.danger { background: oklch(0.577 0.245 27 / 0.08); }
.dd-summary-val { font-size: 1.3rem; font-weight: 700; font-family: var(--font-mono); color: var(--text-primary); }
.dd-summary-item.danger .dd-summary-val { color: var(--danger); }
.dd-summary-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

.dd-diff-card {
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    margin-bottom: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.dd-diff-card:hover { background: var(--bg-hover); }

.dd-finding-group { margin-bottom: 16px; }
.dd-finding-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: 1px solid var(--border);
}

/* ============================
   SCAN STATUS INDICATOR
   ============================ */
.scan-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--accent);
    animation: scan-fade-in 0.3s ease;
}
.scan-radar {
    width: 14px;
    height: 14px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.scan-radar::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    opacity: 0.4;
    animation: scan-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.scan-radar::after {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    animation: scan-pulse 1s ease-in-out infinite;
}
.scan-stage {
    background: oklch(0.72 0.17 70 / 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.scan-step {
    color: var(--text-muted);
    font-size: 0.65rem;
}
@keyframes scan-ping {
    0% { transform: scale(1); opacity: 0.4; }
    75%, 100% { transform: scale(2.2); opacity: 0; }
}
@keyframes scan-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}
@keyframes scan-fade-in {
    from { opacity: 0; transform: translateX(-6px); }
    to { opacity: 1; transform: translateX(0); }
}
tr.row-scanning { background: oklch(0.72 0.17 70 / 0.04); }
tr.row-scanning td.domain-name { color: var(--accent); }

/* ============================
   CONFIRM DIALOG (SaaS)
   ============================ */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: oklch(0 0 0 / 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.confirm-overlay.show { opacity: 1; }

.confirm-dialog {
    background: oklch(0.13 0 0 / 0.95);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    border: 1px solid oklch(0.25 0 0);
    border-radius: 12px;
    padding: 0;
    min-width: 400px;
    max-width: 480px;
    box-shadow: 0 24px 80px oklch(0 0 0 / 0.6), 0 0 0 1px oklch(1 0 0 / 0.03) inset;
    transform: scale(0.92) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.confirm-overlay.show .confirm-dialog {
    transform: scale(1) translateY(0);
}

.confirm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px 0;
}

.confirm-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.confirm-icon.danger {
    background: oklch(0.577 0.245 27 / 0.12);
    color: var(--danger);
}

.confirm-icon.warning {
    background: oklch(0.72 0.18 85 / 0.12);
    color: var(--warning);
}

.confirm-icon.info {
    background: oklch(0.65 0.18 35 / 0.12);
    color: var(--accent);
}

.confirm-icon svg {
    width: 20px;
    height: 20px;
}

.confirm-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.confirm-body {
    padding: 12px 24px 0;
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.confirm-body code {
    background: oklch(0.2 0 0);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
}

.confirm-details {
    margin-top: 10px;
    padding: 10px 12px;
    background: oklch(0.1 0 0);
    border-radius: 8px;
    border: 1px solid oklch(0.2 0 0);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.confirm-details .detail-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.confirm-details .detail-label { color: var(--text-muted); }
.confirm-details .detail-value { color: var(--text-secondary); font-weight: 500; }

.confirm-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 16px 24px 20px;
    margin-top: 16px;
}

.confirm-footer .btn {
    min-width: 90px;
    justify-content: center;
    font-size: 0.82rem;
    padding: 8px 16px;
    border-radius: 8px;
}

.confirm-footer .btn-cancel {
    background: oklch(0.18 0 0);
    border: 1px solid oklch(0.28 0 0);
    color: var(--text-secondary);
}

.confirm-footer .btn-cancel:hover {
    background: oklch(0.22 0 0);
    color: var(--text-primary);
}

.confirm-footer .btn-confirm-danger {
    background: oklch(0.577 0.245 27 / 0.9);
    border: 1px solid oklch(0.577 0.245 27);
    color: #fff;
    font-weight: 600;
}

.confirm-footer .btn-confirm-danger:hover {
    background: oklch(0.62 0.245 27);
}

.confirm-footer .btn-confirm-primary {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #000;
    font-weight: 600;
}

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

/* ============================
   OUTLINE / RING
   ============================ */
*:focus-visible {
    outline: 2px solid oklch(0.5 0 0 / 0.5);
    outline-offset: 2px;
}

/* ============================
   SUBDOMAIN TABLE EXTRAS
   ============================ */
.port-badges {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.port-badge {
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.http-status {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
}

.http-status.s2xx { color: var(--success); }
.http-status.s3xx { color: var(--accent); }
.http-status.s4xx { color: var(--warning); }
.http-status.s5xx { color: var(--danger); }

.tech-badges {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.tech-badge {
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.6rem;
    font-family: var(--font-mono);
    background: oklch(0.627 0.265 303.9 / 0.08);
    color: var(--purple);
    border: 1px solid oklch(0.627 0.265 303.9 / 0.15);
}

/* ============================
   UTILITY
   ============================ */
.loading { text-align: center; padding: 40px; color: var(--text-muted); }
.empty { text-align: center; padding: 30px; color: var(--text-muted); font-size: 0.85rem; }
.error { color: var(--danger); padding: 20px; text-align: center; }
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }

.empty-state { text-align: center; padding: 40px 20px; }
.empty-icon { font-size: 1.5rem; color: var(--text-muted); margin-bottom: 8px; font-family: var(--font-mono); }
.empty-state p { margin-bottom: 4px; font-size: 0.85rem; }
.error-state { text-align: center; padding: 50px 20px; color: var(--danger); }
.error-state p { margin-bottom: 4px; }

.domain-name { font-weight: 600; font-family: var(--font-mono); font-size: 0.8rem; }
.file-url { max-width: 400px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: 0.75rem; }

.row-active { background: oklch(0.65 0.18 35 / 0.03); }

/* Monitoring pulse indicator — green=idle, red=new activity */
.monitoring-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    display: inline-block;
    animation: mon-pulse-green 2s ease-in-out infinite;
    margin-right: 4px;
    vertical-align: middle;
    transition: background 0.3s;
}
.monitoring-pulse.alert {
    background: var(--danger);
    animation: mon-pulse-red 1s ease-in-out infinite;
}
@keyframes mon-pulse-green {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 oklch(0.65 0.17 160 / 0.4); }
    50% { opacity: 0.6; box-shadow: 0 0 0 4px oklch(0.65 0.17 160 / 0); }
}
@keyframes mon-pulse-red {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 oklch(0.577 0.245 27 / 0.5); }
    50% { opacity: 0.6; box-shadow: 0 0 0 6px oklch(0.577 0.245 27 / 0); }
}

tr.row-monitoring td:first-child {
    border-left: 2px solid var(--success);
}

.sidebar-logo-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-glyph {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: filter 0.2s;
}

/* ============================
   LOGO HOVER GLOW
   ============================ */
.sidebar-logo-row:hover .logo-glyph {
    filter: drop-shadow(0 0 6px oklch(0.577 0.245 27 / 0.6));
}
.sidebar-logo-row:hover .logo-rust {
    text-shadow: 0 0 8px oklch(0.65 0.18 35 / 0.5);
}

/* Blink animation for cursor */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.animate-blink {
    animation: blink 1s step-end infinite;
}

/* Moving floor animation */
@keyframes moveFloor {
    0%   { background-position: 0 0; }
    100% { background-position: 0 4rem; }
}

.animate-floor {
    animation: moveFloor 0.5s linear infinite;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
    .sidebar { width: 56px; }
    .sidebar-header h1, .sidebar-logo { font-size: 0; }
    .sidebar-header span { display: none; }
    .sidebar-nav a span:not(.nav-icon) { display: none; }
    .sidebar-footer .sidebar-version { display: none; }
    .main-content { margin-left: 56px; padding: 16px; }
    .persistent-terminal { left: 56px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .page-header { flex-direction: column; align-items: flex-start; }
    .header-actions { width: 100%; }
    .grid-2 { grid-template-columns: 1fr; }
}

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