@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #070b14;
    --bg-elevated: #0e1420;
    --surface: rgba(16, 22, 36, 0.88);
    --surface-solid: #101828;
    --surface-hover: #1a2438;
    --border: rgba(148, 163, 184, 0.12);
    --border-strong: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #8b5cf6;
    --accent-2: #06b6d4;
    --accent-3: #f472b6;
    --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #06b6d4 55%, #34d399 100%);
    --accent-soft: rgba(139, 92, 246, 0.18);
    --success: #34d399;
    --danger: #fb7185;
    --warn: #fbbf24;
    --sidebar-w: 252px;
    --radius: 16px;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    --glow: 0 0 0 1px rgba(139, 92, 246, 0.2), 0 16px 40px rgba(124, 58, 237, 0.15);
}

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

body {
    font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% -10%, rgba(124, 58, 237, 0.28), transparent 50%),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(6, 182, 212, 0.2), transparent 45%),
        radial-gradient(ellipse 50% 30% at 50% 100%, rgba(244, 114, 182, 0.08), transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: meshShift 18s ease-in-out infinite alternate;
}

@keyframes meshShift {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.85; transform: scale(1.05); }
}

a { color: #c4b5fd; text-decoration: none; transition: color .15s; }
a:hover { color: #e9d5ff; }

/* ─── Shell & Sidebar ─── */
.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 1rem 0.85rem;
    border-right: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(12, 16, 28, 0.95) 0%, rgba(8, 11, 20, 0.98) 100%);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .35rem .5rem 1rem;
    margin-bottom: .25rem;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--accent-gradient);
    display: grid;
    place-items: center;
    color: #fff;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.45);
    flex-shrink: 0;
}

.brand-text strong {
    display: block;
    font-size: 1rem;
    letter-spacing: -.02em;
    background: linear-gradient(90deg, #fff, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-text span {
    display: block;
    font-size: .68rem;
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.nav-section { margin-bottom: .65rem; }

.nav-section-label {
    display: block;
    padding: .5rem .65rem .35rem;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #64748b;
}

.nav-section-admin {
    margin-top: .5rem;
    padding-top: .65rem;
    border-top: 1px dashed var(--border);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .58rem .65rem;
    border-radius: 11px;
    color: #cbd5e1;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: .84rem;
    transition: .15s ease;
    position: relative;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255,255,255,.05);
}

.nav-item.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(124,58,237,.22), rgba(6,182,212,.08));
    border-color: rgba(139, 92, 246, 0.35);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 55%;
    border-radius: 0 4px 4px 0;
    background: var(--accent-gradient);
}

.nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: rgba(255,255,255,.04);
}

.nav-icon svg { width: 16px; height: 16px; }

.nav-icon-dash { color: #a78bfa; background: rgba(167,139,250,.12); }
.nav-icon-activity { color: #22d3ee; background: rgba(34,211,238,.12); }
.nav-icon-research { color: #f472b6; background: rgba(244,114,182,.12); }
.nav-icon-watch { color: #34d399; background: rgba(52,211,153,.12); }
.nav-icon-keywords { color: #fbbf24; background: rgba(251,191,36,.12); }
.nav-icon-linkedin { color: #60a5fa; background: rgba(96,165,250,.15); }
.nav-icon-accounts { color: #60a5fa; background: rgba(96,165,250,.12); }
.nav-icon-integ { color: #c084fc; background: rgba(192,132,252,.12); }
.nav-icon-alerts { color: #fb923c; background: rgba(251,146,60,.12); }
.nav-icon-agency { color: #2dd4bf; background: rgba(45,212,191,.12); }
.nav-icon-settings { color: #e879f9; background: rgba(232,121,249,.12); }
.nav-icon-health { color: #f87171; background: rgba(248,113,113,.12); }
.nav-icon-profile { color: #94a3b8; background: rgba(148,163,184,.1); }

.nav-item.active .nav-icon { box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }

.nav-item-profile { margin-top: auto; }

.client-context-chip {
    margin: .5rem 0;
    padding: .65rem .75rem;
    border-radius: 12px;
    background: rgba(251,191,36,.08);
    border: 1px solid rgba(251,191,36,.2);
    font-size: .78rem;
}

.client-context-chip strong { display: block; margin: .15rem 0 .35rem; }

.sidebar-footer {
    padding-top: .85rem;
    margin-top: .5rem;
    border-top: 1px solid var(--border);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem;
    border-radius: 12px;
    background: rgba(255,255,255,.04);
    margin-bottom: .55rem;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--accent-gradient);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: .8rem;
    flex-shrink: 0;
}

.user-chip-text strong { display: block; font-size: .82rem; }
.user-chip-text small { display: block; color: var(--muted); font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }

.main-content {
    padding: 1.35rem 1.65rem 2.5rem;
    max-width: 1200px;
}

.guest-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* ─── Page & Cards ─── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.35rem;
}

.page-header h1 {
    font-size: clamp(1.45rem, 2vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -.03em;
}

.page-header .subtitle,
.subtitle { color: var(--muted); margin-top: .3rem; font-size: .92rem; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.card-glow { box-shadow: var(--glow); border-color: rgba(139, 92, 246, 0.25); }
.card + .card { margin-top: 1rem; }

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

.section-title { font-size: .98rem; font-weight: 700; letter-spacing: -.01em; }
.muted { color: var(--muted); font-size: .9rem; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border: none;
    border-radius: 11px;
    padding: .68rem 1rem;
    font-weight: 700;
    font-size: .84rem;
    cursor: pointer;
    transition: .18s ease;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    color: #fff;
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.45);
}

.btn-auto { width: auto; }
.btn-block { width: 100%; }

.btn-ghost {
    background: rgba(255,255,255,.04);
    color: var(--muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--border-strong);
    background: rgba(255,255,255,.08);
}

.btn-sm { padding: .45rem .7rem; font-size: .78rem; }

.field { margin-bottom: 1rem; }
.field label {
    display: block;
    margin-bottom: .4rem;
    font-size: .82rem;
    color: var(--muted);
    font-weight: 600;
}

.field input, .field select, .field textarea {
    width: 100%;
    padding: .75rem .9rem;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,.3);
    color: var(--text);
    font-family: inherit;
}

.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.field-hint { font-size: .76rem; color: var(--muted); margin-top: .3rem; }

.alert {
    padding: .85rem 1rem;
    border-radius: 11px;
    margin-bottom: 1rem;
    font-size: .88rem;
    border: 1px solid transparent;
}

.alert-error { background: rgba(251,113,133,.12); border-color: rgba(251,113,133,.3); color: #fecdd3; }
.alert-success { background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.3); color: #a7f3d0; }
.alert-warn { background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.28); color: #fde68a; }
.error-list { margin-left: 1.1rem; }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: 2fr 1fr; }

.stat-card {
    padding: 1.1rem 1.15rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(145deg, rgba(255,255,255,.05), rgba(255,255,255,.01));
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 100px; height: 100px;
    background: radial-gradient(circle, rgba(139,92,246,.25), transparent 70%);
}

.stat-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    font-weight: 700;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -.03em;
    margin-top: .3rem;
}

.stat-delta { margin-top: .3rem; font-size: .76rem; color: var(--success); font-weight: 600; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: .2rem .5rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: var(--accent-soft);
    color: #ddd6fe;
}

.badge-google { background: rgba(248,113,113,.15); color: #fca5a5; }
.badge-meta { background: rgba(96,165,250,.15); color: #93c5fd; }
.badge-success { background: rgba(52,211,153,.15); color: #6ee7b7; }
.badge-warn { background: rgba(251,191,36,.15); color: #fcd34d; }
.badge-danger { background: rgba(251,113,133,.15); color: #fda4af; }

/* ─── Admin Settings (compact) ─── */
.settings-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 1rem 1.15rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(124,58,237,.12), rgba(6,182,212,.08));
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.settings-stat { min-width: 100px; }
.settings-stat-value {
    display: block;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -.03em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.settings-stat-label { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

.settings-legend {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .85rem;
    font-size: .78rem;
    color: var(--muted);
    font-weight: 600;
}

.cost-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: .25rem;
}
.cost-dot.cost-high { background: #fb7185; box-shadow: 0 0 8px rgba(251,113,133,.6); }
.cost-dot.cost-medium { background: #fbbf24; box-shadow: 0 0 8px rgba(251,191,36,.5); }
.cost-dot.cost-low { background: #34d399; box-shadow: 0 0 8px rgba(52,211,153,.5); }

.settings-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .85rem;
}

.settings-tabs {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
    padding: .25rem;
    background: rgba(0,0,0,.25);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.settings-tab {
    padding: .5rem .85rem;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    font-size: .78rem;
    cursor: pointer;
    font-family: inherit;
    transition: .15s;
}

.settings-tab:hover { color: var(--text); }
.settings-tab.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(124,58,237,.35), rgba(6,182,212,.2));
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.settings-quick { display: flex; gap: .4rem; flex-wrap: wrap; }

.settings-tab-panel { display: none; }
.settings-tab-panel.active { display: block; }

.engine-compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: .55rem;
}

.engine-chip {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .65rem .75rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,.2);
    cursor: pointer;
    transition: .15s;
    position: relative;
}

.engine-chip:hover { border-color: var(--border-strong); background: rgba(255,255,255,.03); }

.engine-chip input { position: absolute; opacity: 0; pointer-events: none; }

.engine-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.engine-chip.cost-high .engine-chip-dot { background: #fb7185; }
.engine-chip.cost-medium .engine-chip-dot { background: #fbbf24; }
.engine-chip.cost-low .engine-chip-dot { background: #34d399; }

.engine-chip-body { flex: 1; min-width: 0; }
.engine-chip-body strong {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.engine-chip-body small { font-size: .68rem; color: var(--muted); }

.engine-chip-toggle {
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    position: relative;
    flex-shrink: 0;
    transition: .2s;
}

.engine-chip-toggle::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #64748b;
    transition: .2s;
}

.engine-chip input:checked ~ .engine-chip-toggle {
    background: linear-gradient(90deg, #7c3aed, #06b6d4);
}

.engine-chip input:checked ~ .engine-chip-toggle::after {
    transform: translateX(16px);
    background: #fff;
}

.engine-chip input:checked ~ .engine-chip-body strong { color: #e9d5ff; }

.engine-chip.cost-high.is-checked,
.engine-chip.cost-high:has(input:checked) { border-color: rgba(251,113,133,.35); background: rgba(251,113,133,.06); }
.engine-chip.cost-medium.is-checked,
.engine-chip.cost-medium:has(input:checked) { border-color: rgba(251,191,36,.3); background: rgba(251,191,36,.05); }
.engine-chip.cost-low.is-checked,
.engine-chip.cost-low:has(input:checked) { border-color: rgba(52,211,153,.3); background: rgba(52,211,153,.05); }

.sticky-actions {
    position: sticky;
    bottom: 0;
    padding: 1rem 0;
    background: linear-gradient(180deg, transparent, var(--bg) 30%);
}

.cost-badge {
    display: inline-flex;
    padding: .18rem .45rem;
    border-radius: 999px;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
}
.cost-high { background: rgba(251,113,133,.18); color: #fda4af; }
.cost-medium { background: rgba(251,191,36,.18); color: #fcd34d; }
.cost-low { background: rgba(52,211,153,.18); color: #6ee7b7; }

/* ─── Tables & Lists ─── */
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: .8rem .6rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
tr:hover td { background: rgba(255,255,255,.02); }

.status-completed { color: var(--success); font-weight: 700; }
.status-failed { color: var(--danger); font-weight: 700; }
.status-pending, .status-processing { color: var(--warn); font-weight: 700; }

.module-list { list-style: none; display: grid; gap: .55rem; }
.module-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(0,0,0,.15);
}

.timeline { display: grid; gap: .65rem; }
.timeline-item { display: grid; grid-template-columns: 38px 1fr; gap: .75rem; align-items: start; }

.timeline-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.25);
    font-weight: 800;
    font-size: .85rem;
}

.timeline-body strong { display: block; font-size: .88rem; }
.timeline-body .muted { font-size: .8rem; margin-top: .12rem; }
.timeline-time { font-size: .72rem; color: var(--muted); margin-top: .2rem; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .85rem; }

.feature-card {
    padding: 1rem;
    border-radius: 13px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.02);
}

.feature-card h3 { font-size: .92rem; margin-bottom: .3rem; }
.feature-card p { font-size: .82rem; color: var(--muted); }

.tabs { display: flex; gap: .45rem; margin-bottom: 1rem; }
.tab-btn {
    flex: 1;
    padding: .65rem .75rem;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,.2);
    color: var(--muted);
    cursor: pointer;
    font-weight: 700;
    font-family: inherit;
    font-size: .82rem;
}

.tab-btn.active {
    color: #fff;
    border-color: rgba(139, 92, 246, 0.4);
    background: var(--accent-soft);
}

.platform-fields { display: none; }
.platform-fields.active { display: block; }

.empty-state { text-align: center; padding: 2rem 1rem; }
.empty-state .icon { font-size: 2rem; margin-bottom: .5rem; opacity: .9; }

.form-actions { margin-top: 1rem; display: flex; gap: .65rem; flex-wrap: wrap; }
.conn-meta { font-size: .8rem; color: var(--muted); margin-top: .15rem; }

.platform-grid { display: flex; gap: .85rem; flex-wrap: wrap; margin-top: .45rem; }
.platform-grid label { display: flex; align-items: center; gap: .4rem; font-size: .88rem; }
.checkbox { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .85rem; }

.ad-item { flex-wrap: wrap; }
.ad-item-body { flex: 1; min-width: 200px; }
.ad-actions { display: flex; flex-direction: column; gap: .35rem; min-width: 150px; }
.ad-metrics { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.ad-metric {
    font-size: .72rem;
    padding: .15rem .45rem;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.15);
    color: #ddd6fe;
}

.capability-grid { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cap-list { margin: .45rem 0 0 1rem; color: var(--muted); font-size: .85rem; }
.ok-text { color: var(--success); }
.warn-text { color: var(--warn); }
.platform-links { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .65rem; }

.login-card {
    width: min(420px, 100%);
    padding: 1.85rem;
    border-radius: 22px;
    border: 1px solid var(--border-strong);
    background: rgba(12,16,28,.92);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

.login-brand { text-align: center; margin-bottom: 1.5rem; }

.login-brand-mark {
    margin: 0 auto 1rem;
    color: #fff;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.03em;
    background: linear-gradient(90deg, #fff, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quick-actions {
    display: flex;
    gap: .55rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.container-narrow { max-width: 780px; }

@media (max-width: 960px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: relative;
        height: auto;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .nav-section { display: contents; }
    .nav-section-label { display: none; }
    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: .35rem;
    }
    .nav-item-profile { grid-column: 1 / -1; }
    .nav-label { font-size: .75rem; }
    .grid-3 { grid-template-columns: 1fr; }
    .main-content { padding: 1rem; }
    .settings-legend { margin-left: 0; width: 100%; }
}

@media (max-width: 640px) {
    .sidebar-nav { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .engine-compact-grid { grid-template-columns: 1fr; }
}
