:root {
    /* ── Светлая тема: фоны ── */
    --bg-deep:      #ffffff;
    --bg-primary:   #ffffff;
    --bg-secondary: #f5f7fb;
    --bg-tertiary:  #eaeff6;
    --bg-card:      #ffffff;
    --bg-hover:     #f0f4fa;

    /* ── Акценты: насыщенные, видны на белом ── */
    --arctic-cyan:   #185fa5;
    --arctic-blue:   #185fa5;
    --arctic-teal:   #1a7a3b;
    --energy-green:  #1a7a3b;
    --warning-amber: #7a4f00;
    --danger-red:    #b91c1c;
    --purple-accent: #5b4fcf;
    --pink-accent:   #993556;
    --orange-accent: #854f0b;

    /* ── Текст ── */
    --text-primary:   #0f1923;
    --text-secondary: #3d4f6b;
    --text-tertiary:  #8294ad;

    /* ── Градиенты → плоские цвета ── */
    --gradient-arctic: #185fa5;
    --gradient-energy: #1a7a3b;
    --gradient-warm:   #7a4f00;
    --gradient-danger: #b91c1c;

    --border: #dde3ee;
    --border2: #c5cfde;
    --shadow: 0 1px 4px rgba(15,25,35,.08), 0 0 0 1px rgba(15,25,35,.04);

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, 'Inter', system-ui, sans-serif; }

body {
    font-family: -apple-system, 'Inter', system-ui, sans-serif !important;
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
}

/* Числа — tabular-nums вместо JetBrains Mono */
.cp-ics-num, .cp-bbv, .cp-cc-num, .cp-bs-val,
.budget-summary-value, .budget-bar-value, .control-value,
.credit-value, .credit-grade, .cp-cs-idx, .ival,
.cp-ind-row-val, .cp-ind-sm-val, .cp-exp-stat strong {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-family: -apple-system, 'Inter', system-ui, sans-serif !important;
}

.bg-grid {
    display: none; /* removed grid overlay for light theme */
}

.app-container {
    position: relative;
    z-index: 1;
    max-width: 1700px;
    margin: 0 auto;
    padding: 8px 16px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0 var(--space-lg);
    border-bottom: 1px solid rgba(0,212,255,0.15);
    margin-bottom: var(--space-lg);
}

.logo { display: flex; align-items: center; gap: var(--space-md); }

.logo-icon {
    width: 32px; height: 32px;
    background: rgba(255,255,255,.25);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px;
    color: #fff;
}

.logo-text {
    font-weight: 700; font-size: 15px;
    color: #fff;
    letter-spacing: -.3px;
    -webkit-text-fill-color: #fff;
    background: none;
}

.logo-subtitle { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 2px; }

.header-controls { display: flex; align-items: center; gap: var(--space-md); }

.control-select {
    background: var(--bg-tertiary);
    border: 1px solid rgba(0,212,255,0.2);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-primary);
    font-family: inherit; font-size: 12px;
    cursor: pointer;
}

.year-badge {
    background: var(--bg-card);
    border: 1px solid rgba(0,255,136,0.3);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-lg);
    font-family: -apple-system, 'Inter', system-ui, sans-serif;
    font-weight: 600;
    color: var(--energy-green);
}

.main-tabs {
    display: flex; gap: var(--space-xs);
    margin-bottom: var(--space-lg);
    background: var(--bg-secondary);
    padding: var(--space-xs);
    border-radius: var(--radius-lg);
}

.main-tab {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 13px; font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none; background: transparent;
    text-align: center;
}

.main-tab:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.main-tab.active { background: var(--gradient-arctic); color: var(--bg-deep); font-weight: 600; }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Main Layout with Sidebar */
.main-layout {
    display: flex;
    gap: var(--space-lg);
    min-height: calc(100vh - 150px);
}

/* Sidebar hidden — navigation moved to header */
.sidebar {
    display: none !important;
}

.sidebar.collapsed {
    width: 60px;
    min-width: 60px;
}

.sidebar-toggle {
    position: absolute;
    top: var(--space-md);
    right: -12px;
    width: 24px;
    height: 24px;
    background: var(--gradient-arctic);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,212,255,0.3);
    transition: transform 0.3s ease;
}

.sidebar-toggle:hover {
    transform: scale(1.1);
}

.sidebar-toggle .toggle-icon {
    color: var(--bg-deep);
    font-size: 10px;
    transition: transform 0.3s ease;
}

.sidebar.collapsed .toggle-icon {
    transform: rotate(180deg);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-top: var(--space-xl);
}

.sidebar-tab {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
}

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

.sidebar-tab.active {
    background: var(--gradient-arctic);
    color: var(--bg-deep);
    font-weight: 600;
}

.sidebar-tab .tab-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.sidebar-tab .tab-text {
    transition: opacity 0.3s ease, width 0.3s ease;
}

.sidebar.collapsed .sidebar-tab .tab-text {
    display: none;
}

.sidebar.collapsed .sidebar-tab {
    justify-content: center;
    padding: var(--space-md);
    gap: 0;
}

.sidebar.collapsed .sidebar-tab .tab-icon {
    margin: 0 auto;
}

/* Main Content Area */
.main-content {
    flex: 1;
    min-width: 0;
}

/* Hide old main-tabs */
.main-tabs {
    display: none;
}

.section {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
    overflow: hidden;
}

.section-header {
    background: var(--bg-tertiary);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex; justify-content: space-between; align-items: center;
}

.section-title {
    font-family: -apple-system, 'Inter', system-ui, sans-serif;
    font-size: 13px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px;
}

.section-badge {
    background: rgba(0,212,255,0.15);
    color: var(--arctic-cyan);
    font-size: 10px; padding: 2px 8px;
    border-radius: 10px; font-weight: 500;
}

.section-body { padding: var(--space-lg); }

.control-row {
    display: grid;
    grid-template-columns: 200px 1fr 80px;
    gap: var(--space-md); align-items: center;
    padding: var(--space-md) 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.control-row:last-child { border-bottom: none; }
.control-label { font-size: 13px; }
.control-value { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 14px; font-weight: 600; color: var(--arctic-cyan); text-align: right; }

.slider {
    -webkit-appearance: none;
    width: 100%; height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px; outline: none; cursor: pointer;
}
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    background: var(--gradient-arctic);
    border-radius: 50%; cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,212,255,0.4);
}

.budget-summary {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg); margin-bottom: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}
.budget-summary-item { text-align: center; }
.budget-summary-label { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: var(--space-xs); }
.budget-summary-value { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 28px; font-weight: 700; }
.budget-summary-value.income { color: var(--energy-green); }
.budget-summary-value.expense { color: var(--warning-amber); }
.budget-summary-value.balance { color: var(--arctic-cyan); }
.budget-summary-value.negative { color: var(--danger-red); }
.budget-summary-sub { font-size: 11px; color: var(--text-tertiary); margin-top: var(--space-xs); }

/* NEW: Budget Summary Bar - 6 items in 1 row */
.budget-summary-bar {
    display: flex;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: rgba(26, 34, 45, 0.98);
    border-radius: var(--radius-md);
    position: sticky;
    top: 8px;
    z-index: 100;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.budget-bar-item { text-align: center; flex: 1; min-width: 0; }
.budget-bar-label { font-size: 8px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 3px; white-space: nowrap; }
.budget-bar-label .year-hint { font-size: 7px; color: var(--text-tertiary); }
.budget-bar-value { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 18px; font-weight: 700; }
.budget-bar-value.income { color: var(--energy-green); }
.budget-bar-value.expense { color: var(--warning-amber); }
.budget-bar-value.balance { color: var(--arctic-cyan); }
.budget-bar-value.govsupport { color: #a855f7; }
.budget-bar-value.negative { color: var(--danger-red); }
.budget-bar-unit { font-size: 9px; color: var(--text-tertiary); margin-top: 2px; }

/* Budget Approval Bar */
.budget-approval-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, rgba(30,32,44,0.9) 0%, rgba(20,22,32,0.9) 100%);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
}
.budget-approval-status { display: flex; align-items: center; gap: var(--space-sm); }
.budget-approval-status .status-icon { font-size: 20px; }
.budget-approval-status .status-text { font-size: 13px; color: var(--text-secondary); }
.budget-approval-status.approved .status-text { color: var(--energy-green); font-weight: 600; }
.budget-approval-status.blocked .status-text { color: var(--danger-red); }

.budget-approval-actions { display: flex; gap: var(--space-sm); }
.budget-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.budget-btn .btn-icon { font-size: 14px; }
.budget-btn.ai-check {
    background: linear-gradient(135deg, rgba(139,92,246,0.2) 0%, rgba(236,72,153,0.2) 100%);
    color: var(--purple-accent);
    border: 1px solid rgba(139,92,246,0.3);
}
.budget-btn.ai-check:hover { background: linear-gradient(135deg, rgba(139,92,246,0.3) 0%, rgba(236,72,153,0.3) 100%); }
.budget-btn.recalc {
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.1);
}
.budget-btn.recalc:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.budget-btn.approve {
    background: linear-gradient(135deg, rgba(0,255,136,0.2) 0%, rgba(0,212,255,0.2) 100%);
    color: var(--energy-green);
    border: 1px solid rgba(0,255,136,0.3);
}
.budget-btn.approve:hover { background: linear-gradient(135deg, rgba(0,255,136,0.3) 0%, rgba(0,212,255,0.3) 100%); }
.budget-btn.approve:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--bg-tertiary);
    border-color: rgba(255,255,255,0.1);
}

.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-lg); }
@media (max-width: 1200px) { .three-col { grid-template-columns: 1fr 1fr; } }
@media (max-width: 800px) { .three-col { grid-template-columns: 1fr; } }

/* Forecast Chart */
.forecast-chart-container { background: var(--bg-tertiary); border-radius: var(--radius-md); padding: var(--space-md); }
.forecast-legend { display: flex; gap: var(--space-lg); justify-content: center; margin-top: var(--space-md); flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-secondary); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }

/* Income Structure */
.income-structure { background: var(--bg-tertiary); border-radius: var(--radius-md); padding: var(--space-md); margin-bottom: var(--space-md); }
.income-structure-title { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; margin-bottom: var(--space-sm); }
.income-item { display: flex; align-items: center; gap: var(--space-sm); padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.income-item:last-child { border-bottom: none; }
.income-item.transfers { background: rgba(139,92,246,0.1); margin: 6px -12px -12px; padding: 8px 12px; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.income-item.investment { background: rgba(255,215,0,0.1); margin: 6px -12px -12px; padding: 8px 12px; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.income-item.taxcredit { background: rgba(255,71,87,0.1); margin: 6px -12px -12px; padding: 8px 12px; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.income-item.taxcredit { background: rgba(239,68,68,0.1); margin: 6px -12px -12px; padding: 8px 12px; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.income-icon { font-size: 14px; }
.income-name { flex: 1; font-size: 11px; color: var(--text-secondary); }
.income-value { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 12px; font-weight: 600; color: var(--energy-green); }
.income-controls-divider { height: 1px; background: rgba(255,255,255,0.1); margin: var(--space-md) 0; }
.income-controls-title { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; margin-bottom: var(--space-sm); }
.income-badge { background: rgba(0,255,136,0.2) !important; color: var(--energy-green) !important; }
.delta-positive { color: var(--energy-green) !important; font-weight: 600; }
.delta-negative { color: var(--danger-red) !important; font-weight: 600; }
.expandable-row { cursor: pointer; transition: background 0.2s; }
.expandable-row:hover { background: rgba(0,212,255,0.1) !important; }

/* Gov Support Shadow */
.gov-support-shadow { background: linear-gradient(135deg, rgba(139,92,246,0.1) 0%, rgba(236,72,153,0.1) 100%); border: 1px dashed var(--purple-accent); border-radius: var(--radius-md); padding: var(--space-md); margin-top: var(--space-md); }
.gov-support-shadow-header { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--purple-accent); font-weight: 600; }
.gov-support-shadow-total { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 14px; }
.gov-support-shadow-hint { font-size: 10px; color: var(--text-tertiary); margin-top: 6px; font-style: italic; }

/* NEW Credit Section Layout */
.credits-section { margin-top: var(--space-lg); }
.credits-layout { display: grid; grid-template-columns: 1fr 280px; gap: var(--space-lg); }
@media (max-width: 900px) { .credits-layout { grid-template-columns: 1fr; } }

.credit-types-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
.credit-types-grid .credit-type-card.investment { grid-column: span 2; }
@media (max-width: 700px) { .credit-types-grid { grid-template-columns: 1fr; } .credit-types-grid .credit-type-card.investment { grid-column: span 1; } }

.credit-type-card { background: var(--bg-tertiary); border-radius: var(--radius-md); padding: var(--space-md); }
.credit-type-card.repayment { background: linear-gradient(135deg, rgba(0,212,255,0.1) 0%, rgba(0,255,136,0.1) 100%); border: 1px solid rgba(0,255,136,0.2); }
.credit-type-card.investment { background: linear-gradient(135deg, rgba(255,215,0,0.1) 0%, rgba(255,184,0,0.1) 100%); border: 1px solid rgba(255,215,0,0.2); }
.credit-type-rate.invest { color: var(--energy-green); }
.invest-slider::-webkit-slider-thumb { background: gold !important; }
.investment-income-hint { font-size: 10px; color: var(--energy-green); margin-top: 6px; text-align: right; }
.credit-type-header { display: flex; align-items: center; gap: 8px; margin-bottom: var(--space-sm); }
.credit-type-icon { font-size: 18px; }
.credit-type-name { flex: 1; font-size: 12px; font-weight: 600; color: var(--text-primary); }
.credit-type-rate { font-size: 9px; color: var(--warning-amber); background: rgba(255,184,0,0.15); padding: 3px 8px; border-radius: 4px; }
.credit-type-rate.repay { color: var(--energy-green); background: rgba(0,255,136,0.15); }

.credit-slider-row { display: flex; align-items: center; gap: 8px; }
.credit-slider-label { font-size: 10px; color: var(--text-tertiary); min-width: 50px; }
.credit-slider { flex: 1; }
.credit-slider-value { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 14px; font-weight: 600; color: var(--text-primary); min-width: 45px; text-align: right; }
.repay-slider::-webkit-slider-thumb { background: var(--energy-green) !important; }

.credit-summary-panel { background: var(--bg-card); border-radius: var(--radius-md); padding: var(--space-md); border: 1px solid rgba(255,255,255,0.05); }
.credit-summary-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.credit-summary-row:last-of-type { border-bottom: none; }
.credit-summary-label { font-size: 11px; color: var(--text-secondary); }
.credit-summary-value { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.credit-summary-value.negative { color: var(--danger-red); }
.credit-summary-value.expense { color: var(--warning-amber); }

.rating-scale-compact { display: flex; gap: 3px; justify-content: center; margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid rgba(255,255,255,0.05); }
.rating-grade { font-size: 9px; font-weight: 600; padding: 4px 6px; border-radius: 4px; background: var(--bg-tertiary); color: var(--text-tertiary); transition: all 0.2s; }
.rating-grade.active { background: var(--energy-green); color: var(--bg-deep); }
.rating-grade[data-grade="AAA"].active, .rating-grade[data-grade="AA"].active { background: var(--energy-green); }
.rating-grade[data-grade="A"].active, .rating-grade[data-grade="BBB"].active { background: #7dd87d; }
.rating-grade[data-grade="BB"].active, .rating-grade[data-grade="B"].active { background: var(--warning-amber); }
.rating-grade[data-grade="CCC"].active { background: #ff9f43; }
.rating-grade[data-grade="D"].active { background: var(--danger-red); }

.rating-warning { margin-top: var(--space-sm); padding: 8px; background: rgba(255,71,87,0.1); border-radius: var(--radius-sm); font-size: 10px; color: var(--danger-red); text-align: center; }

/* Old credit styles - keep for compatibility */
.credit-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-sm); margin-bottom: var(--space-md); }
.credit-item { background: var(--bg-tertiary); border-radius: var(--radius-sm); padding: var(--space-sm); text-align: center; }
.credit-label { font-size: 9px; color: var(--text-tertiary); text-transform: uppercase; }
.credit-value { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 16px; font-weight: 600; color: var(--text-primary); }
.credit-value.negative { color: var(--danger-red); }
.credit-value.expense { color: var(--warning-amber); }
.credit-sub { font-size: 9px; color: var(--text-tertiary); }

.credit-types { display: flex; flex-direction: column; gap: var(--space-sm); }
.credit-type-item { background: var(--bg-tertiary); border-radius: var(--radius-sm); padding: var(--space-sm); }
.credit-type-row { display: flex; align-items: center; gap: 6px; }
.credit-input { flex: 1; background: var(--bg-card); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-sm); padding: 6px 10px; color: var(--text-primary); font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 12px; }
.credit-input:focus { border-color: var(--arctic-cyan); outline: none; }
.credit-input:disabled { opacity: 0.5; cursor: not-allowed; }
.credit-unit { font-size: 10px; color: var(--text-tertiary); }

.credit-rating-detail { margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid rgba(255,255,255,0.05); }
.rating-scale { display: flex; gap: 4px; justify-content: space-between; margin-bottom: var(--space-sm); }
.rating-grade { font-size: 9px; font-weight: 600; padding: 4px 6px; border-radius: 4px; background: var(--bg-tertiary); color: var(--text-tertiary); transition: all 0.2s; }
.rating-grade.active { background: var(--energy-green); color: var(--bg-deep); }
.rating-grade[data-grade="AAA"].active, .rating-grade[data-grade="AA"].active { background: var(--energy-green); }
.rating-grade[data-grade="A"].active, .rating-grade[data-grade="BBB"].active { background: #7dd87d; }
.rating-grade[data-grade="BB"].active, .rating-grade[data-grade="B"].active { background: var(--warning-amber); }
.rating-grade[data-grade="CCC"].active { background: #ff9f43; }
.rating-grade[data-grade="D"].active { background: var(--danger-red); }
.rating-formula { font-size: 10px; color: var(--text-tertiary); text-align: center; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }

.budget-table { width: 100%; border-collapse: collapse; }
.budget-table th, .budget-table td { padding: var(--space-sm) var(--space-md); text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); }
.budget-table th { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; font-weight: 500; }
.budget-table td { font-size: 12px; }
.budget-table .amount { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-weight: 600; }
.budget-table .amount.expense { color: var(--warning-amber); }
.budget-table .amount.income { color: var(--arctic-cyan); font-weight: 600; }
.budget-slider-container { display: flex; align-items: center; gap: var(--space-sm); flex: 1; }
.budget-slider-container .slider { flex: 1; min-width: 180px; }
.budget-slider-value { min-width: 45px; text-align: right; font-weight: 600; color: var(--arctic-cyan); font-size: 12px; }
.budget-change { font-size: 11px; padding: 3px 8px; border-radius: 4px; font-weight: 600; min-width: 45px; text-align: center; }
.budget-change.positive { background: rgba(0,255,136,0.2); color: var(--energy-green); }
.budget-change.negative { background: rgba(255,71,87,0.2); color: var(--danger-red); }
.budget-change.neutral { background: rgba(139,149,158,0.2); color: var(--text-tertiary); }
.budget-percent { font-size: 10px; color: var(--text-tertiary); min-width: 50px; text-align: right; }
.budget-percent.positive { color: var(--energy-green); }
.budget-percent.negative { color: var(--danger-red); }
.budget-percent.neutral { color: var(--text-tertiary); }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-md); }
.project-card { background: var(--bg-tertiary); border-radius: var(--radius-md); padding: var(--space-md); border: 1px solid transparent; cursor: pointer; transition: all 0.3s ease; }
.project-card:hover { border-color: var(--arctic-cyan); }
.project-card.active { border-color: var(--energy-green); background: rgba(0,255,136,0.05); }
.project-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--space-sm); }
.project-icon { font-size: 24px; }
.project-status { font-size: 9px; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; }
.project-status.planned { background: rgba(139,92,246,0.2); color: var(--purple-accent); }
.project-status.active { background: rgba(0,255,136,0.2); color: var(--energy-green); }
.project-name { font-weight: 600; font-size: 13px; margin-bottom: var(--space-xs); }
.project-desc { font-size: 11px; color: var(--text-tertiary); margin-bottom: var(--space-sm); }
.project-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xs); font-size: 10px; }
.project-metric { text-align: center; padding: var(--space-xs); background: var(--bg-card); border-radius: var(--radius-sm); }
.project-metric-value { font-weight: 600; color: var(--arctic-cyan); }
.project-metric-label { color: var(--text-tertiary); font-size: 9px; }

.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-md); }
.event-card { background: var(--bg-tertiary); border-radius: var(--radius-md); padding: var(--space-md); border: 1px solid rgba(255,255,255,0.05); }
.event-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-sm); }
.event-card-title { display: flex; align-items: center; gap: var(--space-sm); font-weight: 600; font-size: 13px; }
.event-card-month { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 11px; color: var(--arctic-cyan); background: var(--bg-card); padding: 2px 8px; border-radius: 4px; }
.event-card-desc { font-size: 11px; color: var(--text-secondary); margin-bottom: var(--space-sm); }
.event-card-type { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 4px; margin-bottom: var(--space-sm); margin-right: 4px; }
.event-card-type.positive { background: rgba(0,255,136,0.2); color: var(--energy-green); }
.event-card-type.negative { background: rgba(255,71,87,0.2); color: var(--danger-red); }
.event-card-type.neutral { background: rgba(255,184,0,0.2); color: var(--warning-amber); }
.event-effects { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-bottom: var(--space-sm); }
.event-effect { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: var(--bg-card); }
.event-effect.positive { color: var(--energy-green); }
.event-effect.negative { color: var(--danger-red); }
.event-actions-list { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: var(--space-sm); }
.event-action-tag { font-size: 9px; padding: 2px 6px; border-radius: 4px; background: rgba(139,92,246,0.2); color: var(--purple-accent); }
.event-card-actions { display: flex; gap: var(--space-xs); }
.event-btn { flex: 1; padding: 6px; border-radius: 4px; border: none; font-size: 10px; cursor: pointer; transition: all 0.2s; }
.event-btn.edit { background: var(--bg-card); color: var(--text-secondary); }
.event-btn.delete { background: rgba(255,71,87,0.2); color: var(--danger-red); }
.event-btn:hover { transform: translateY(-1px); }

/* Modal Base */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.85); z-index: 1000; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal { background: var(--bg-card); border-radius: var(--radius-lg); width: 520px; max-width: 95vw; max-height: 90vh; overflow-y: auto; border: 1px solid rgba(0,212,255,0.2); animation: modalIn 0.3s ease; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.9) translateY(-20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { padding: var(--space-lg); border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 14px; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--text-tertiary); font-size: 20px; cursor: pointer; }
.modal-body { padding: var(--space-lg); }
.form-group { margin-bottom: var(--space-md); }
.form-label { display: block; font-size: 11px; color: var(--text-secondary); margin-bottom: var(--space-xs); text-transform: uppercase; letter-spacing: 0.5px; }
.form-input, .form-select, .form-textarea { width: 100%; padding: var(--space-sm) var(--space-md); background: var(--bg-tertiary); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-sm); color: var(--text-primary); font-family: inherit; font-size: 13px; }
.form-textarea { min-height: 60px; resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-sm); }
.effect-group { background: var(--bg-tertiary); border-radius: var(--radius-md); padding: var(--space-md); margin-bottom: var(--space-md); }
.effect-group-title { font-size: 12px; font-weight: 600; margin-bottom: var(--space-sm); color: var(--arctic-cyan); }
.effect-row { display: grid; grid-template-columns: 120px 1fr 50px; gap: var(--space-sm); align-items: center; padding: var(--space-xs) 0; }
.effect-label { font-size: 11px; color: var(--text-secondary); }
.effect-value { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 11px; text-align: right; }
.form-checkbox { display: flex; align-items: center; gap: var(--space-sm); font-size: 12px; cursor: pointer; }
.form-checkbox input { width: 16px; height: 16px; }
.modal-footer { padding: var(--space-lg); border-top: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: flex-end; gap: var(--space-sm); }
.btn { padding: var(--space-sm) var(--space-lg); border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: var(--gradient-arctic); color: var(--bg-deep); }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-secondary); }
.btn:hover { transform: translateY(-1px); }
.add-event-btn { padding: var(--space-sm) var(--space-md); background: var(--gradient-arctic); border: none; border-radius: var(--radius-sm); color: var(--bg-deep); font-size: 11px; font-weight: 600; cursor: pointer; }

/* Actions Editor */
.actions-editor { background: var(--bg-card); border-radius: var(--radius-md); padding: var(--space-md); margin-top: var(--space-md); border: 1px solid rgba(139,92,246,0.3); }
.actions-editor-title { font-size: 11px; font-weight: 600; color: var(--purple-accent); margin-bottom: var(--space-sm); }
.action-checkbox { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-xs) 0; font-size: 11px; cursor: pointer; }
.action-checkbox input { width: 14px; height: 14px; }
.action-checkbox-label { flex: 1; }
.action-checkbox-desc { font-size: 10px; color: var(--text-tertiary); }

/* Event Popup */
.event-popup-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.9); z-index: 2000; align-items: center; justify-content: center; }
.event-popup-overlay.active { display: flex; }
.event-popup { background: var(--bg-card); border-radius: var(--radius-lg); width: 600px; max-width: 95vw; border: 2px solid var(--warning-amber); animation: popupIn 0.4s ease; box-shadow: 0 0 60px rgba(255,184,0,0.3); }
.event-popup.decision-required { border-color: var(--danger-red); box-shadow: 0 0 60px rgba(255,71,87,0.4); }
@keyframes popupIn { from { opacity: 0; transform: scale(0.8) translateY(-30px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.event-popup-header { padding: var(--space-lg); background: linear-gradient(135deg, rgba(255,184,0,0.2) 0%, rgba(255,107,53,0.2) 100%); border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; align-items: center; }
.event-popup.decision-required .event-popup-header { background: linear-gradient(135deg, rgba(255,71,87,0.2) 0%, rgba(255,107,53,0.2) 100%); }
.event-popup-title { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: var(--space-md); }
.event-popup-icon { font-size: 32px; }

.event-popup-timer { display: flex; flex-direction: column; align-items: center; }
.timer-circle { width: 60px; height: 60px; border-radius: 50%; background: var(--bg-tertiary); border: 3px solid var(--danger-red); display: flex; align-items: center; justify-content: center; position: relative; }
.timer-value { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 18px; font-weight: 700; color: var(--danger-red); }
.timer-label { font-size: 9px; color: var(--text-tertiary); margin-top: 4px; }
.timer-circle.warning { border-color: var(--warning-amber); }
.timer-circle.warning .timer-value { color: var(--warning-amber); }
.timer-circle.critical { animation: timerPulse 0.5s infinite; }
@keyframes timerPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.event-popup-body { padding: var(--space-lg); }
.event-popup-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: var(--space-lg); line-height: 1.6; }

.event-popup-effects { background: var(--bg-tertiary); border-radius: var(--radius-md); padding: var(--space-md); margin-bottom: var(--space-lg); }
.event-popup-effects-title { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; margin-bottom: var(--space-sm); }
.effect-item { display: flex; justify-content: space-between; align-items: center; padding: var(--space-sm) 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.effect-item:last-child { border-bottom: none; }
.effect-item-name { font-size: 13px; display: flex; align-items: center; gap: var(--space-sm); }
.effect-item-value { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 14px; font-weight: 600; }
.effect-item-value.positive { color: var(--energy-green); }
.effect-item-value.negative { color: var(--danger-red); }

.event-popup-actions { display: flex; flex-direction: column; gap: var(--space-md); }
.action-btn { padding: var(--space-md) var(--space-lg); border-radius: var(--radius-md); font-size: 13px; font-weight: 600; cursor: pointer; border: 2px solid transparent; transition: all 0.3s ease; display: flex; align-items: center; justify-content: space-between; }
.action-btn:hover { transform: translateY(-2px); }
.action-btn-icon { font-size: 20px; }
.action-btn-text { flex: 1; text-align: left; margin-left: var(--space-md); }
.action-btn-effect { font-size: 11px; opacity: 0.8; }

.action-btn.accept { background: rgba(0,255,136,0.1); border-color: var(--energy-green); color: var(--energy-green); }
.action-btn.budget { background: rgba(0,212,255,0.1); border-color: var(--arctic-cyan); color: var(--arctic-cyan); }
.action-btn.funds { background: rgba(139,92,246,0.1); border-color: var(--purple-accent); color: var(--purple-accent); }
.action-btn.news { background: rgba(255,184,0,0.1); border-color: var(--warning-amber); color: var(--warning-amber); }
.action-btn.skip { background: rgba(255,71,87,0.1); border-color: var(--danger-red); color: var(--danger-red); }

/* Funds Modal */
.funds-input-group { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-md); }
.funds-input { flex: 1; padding: var(--space-md); background: var(--bg-secondary); border: 2px solid var(--purple-accent); border-radius: var(--radius-md); color: var(--text-primary); font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 24px; text-align: center; }
.funds-label { font-size: 14px; color: var(--text-secondary); }
.funds-presets { display: flex; gap: var(--space-sm); margin-bottom: var(--space-md); }
.funds-preset { padding: var(--space-sm) var(--space-md); background: var(--bg-tertiary); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 12px; cursor: pointer; }
.funds-preset:hover { border-color: var(--purple-accent); color: var(--purple-accent); }

/* News Editor */
.news-editor-preview { background: var(--bg-secondary); border-radius: var(--radius-md); padding: var(--space-md); margin-top: var(--space-md); }
.news-preview-header { font-size: 10px; color: var(--text-tertiary); margin-bottom: var(--space-sm); }
.news-preview-content { font-size: 13px; color: var(--text-primary); line-height: 1.5; }

/* Simple Event Info Popup */
.info-popup { background: var(--bg-card); border-radius: var(--radius-lg); width: 500px; max-width: 95vw; border: 2px solid var(--arctic-cyan); box-shadow: 0 0 40px rgba(0,212,255,0.3); animation: popupIn 0.4s ease; }
.info-popup-header { padding: var(--space-lg); background: linear-gradient(135deg, rgba(0,212,255,0.15) 0%, rgba(0,184,169,0.15) 100%); display: flex; align-items: center; gap: var(--space-md); }
.info-popup-body { padding: var(--space-lg); }
.info-popup-footer { padding: var(--space-md) var(--space-lg); border-top: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: center; }
.info-continue-btn { padding: var(--space-md) var(--space-xl); background: var(--gradient-arctic); border: none; border-radius: var(--radius-md); color: var(--bg-deep); font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; }

/* Decision Log */
.decision-log { background: var(--bg-tertiary); border-radius: var(--radius-md); padding: var(--space-md); margin-top: var(--space-lg); }
.decision-log-title { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; margin-bottom: var(--space-sm); }
.decision-item { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 11px; }
.decision-item:last-child { border-bottom: none; }
.decision-icon { font-size: 14px; }
.decision-text { flex: 1; color: var(--text-secondary); }
.decision-effect { font-weight: 600; }
.decision-effect.positive { color: var(--energy-green); }
.decision-effect.negative { color: var(--danger-red); }

/* Simulation Panel */
.simulation-panel { background: var(--bg-tertiary); border-radius: var(--radius-lg); padding: var(--space-lg); margin-bottom: var(--space-xl); }
.simulation-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-lg); }
.simulation-title { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 16px; font-weight: 600; }
.simulation-controls { display: flex; gap: var(--space-md); align-items: center; }
.sim-btn { padding: var(--space-sm) var(--space-lg); border-radius: var(--radius-md); font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 12px; font-weight: 600; cursor: pointer; border: none; transition: all 0.3s ease; }
.sim-btn.primary { background: var(--gradient-arctic); color: var(--bg-deep); }
.sim-btn.secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid rgba(255,255,255,0.1); }
.sim-btn:hover { transform: translateY(-2px); }
.sim-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.timeline-container { margin-bottom: var(--space-lg); }
.timeline-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-sm); }
.timeline-date { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 20px; font-weight: 700; color: var(--arctic-cyan); }
.timeline-day { font-size: 12px; color: var(--text-secondary); }
.timeline-progress { height: 8px; background: var(--bg-card); border-radius: 4px; overflow: hidden; }
.timeline-progress-fill { height: 100%; background: var(--gradient-arctic); border-radius: 4px; transition: width 0.1s linear; }

.agent-activity { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--space-md); margin-bottom: var(--space-lg); }
.agent-mini { background: var(--bg-card); border-radius: var(--radius-md); padding: var(--space-md); text-align: center; transition: all 0.3s ease; }
.agent-mini.active { border: 1px solid var(--arctic-cyan); box-shadow: 0 0 15px rgba(0,212,255,0.2); }
.agent-mini-icon { font-size: 20px; margin-bottom: var(--space-xs); }
.agent-mini-name { font-size: 9px; color: var(--text-tertiary); margin-bottom: var(--space-xs); }
.agent-mini-value { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 13px; font-weight: 600; }
.agent-mini-change { font-size: 10px; margin-top: var(--space-xs); }
.agent-mini-change.positive { color: var(--energy-green); }
.agent-mini-change.negative { color: var(--danger-red); }

.news-feed { background: var(--bg-card); border-radius: var(--radius-md); max-height: 140px; overflow-y: auto; }

/* Results Bar Styles */
.results-bar-section:hover { background: rgba(255,255,255,0.05); }
.results-bar-section:active { background: rgba(255,255,255,0.08); }
.results-drill-panel { animation: slideDown 0.3s ease; }
@keyframes slideDown { from { opacity: 0; max-height: 0; } to { opacity: 1; max-height: 800px; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.stakeholder-result-card:hover { transform: scale(1.02); transition: transform 0.2s; }
.sdi-category-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.sdi-indicator-card:hover { background: rgba(255,255,255,0.05) !important; transform: scale(1.02); }
.sdi-drill-level2 { animation: slideDown 0.3s ease; }
.news-item { padding: var(--space-sm) var(--space-md); border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; gap: var(--space-sm); font-size: 11px; }
.news-item:last-child { border-bottom: none; }
.news-month { min-width: 40px; color: var(--arctic-cyan); font-weight: 600; }
.news-text { flex: 1; color: var(--text-secondary); }
.news-text strong { color: var(--text-primary); }

.quick-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); margin-bottom: var(--space-xl); }
.quick-stat { background: var(--bg-card); border-radius: var(--radius-md); padding: var(--space-md); text-align: center; border: 1px solid rgba(255,255,255,0.05); }
.quick-stat-icon { font-size: 20px; margin-bottom: var(--space-xs); }
.quick-stat-value { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 22px; font-weight: 700; color: var(--arctic-cyan); }
.quick-stat-label { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; }
.quick-stat-change { font-size: 11px; margin-top: var(--space-xs); font-weight: 600; }
.quick-stat-change.positive { color: var(--energy-green); }
.quick-stat-change.negative { color: var(--danger-red); }

.charts-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-lg); }
.chart-card { background: var(--bg-tertiary); border-radius: var(--radius-md); padding: var(--space-lg); }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-md); }
.chart-title { font-weight: 600; font-size: 12px; }
.chart-summary-value { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 16px; font-weight: 700; }
.chart-summary-value.positive { color: var(--energy-green); }
.chart-summary-value.negative { color: var(--danger-red); }
.chart-summary-label { font-size: 9px; color: var(--text-tertiary); }

.bar-chart { display: flex; align-items: flex-end; gap: 2px; height: 140px; padding-bottom: 25px; position: relative; overflow-x: auto; }
.bar-chart::before { content: ''; position: absolute; bottom: 23px; left: 0; right: 0; height: 1px; background: rgba(255,255,255,0.1); }
.bar-group { flex: 0 0 auto; min-width: 32px; display: flex; flex-direction: column; align-items: center; position: relative; }
.bar-group.year-bar { min-width: 45px; }
.bar-group.year-bar .bar { width: 18px; }
.bar-group.year-bar .bar-label { font-weight: 700; color: var(--warning-amber); }
.bar-wrapper { display: flex; gap: 1px; align-items: flex-end; height: 105px; }
.bar { width: 11px; border-radius: 2px 2px 0 0; transition: all 0.3s ease; position: relative; }
.bar.primary { background: var(--arctic-cyan); }
.bar.secondary { background: var(--warning-amber); }
.bar.tertiary { background: var(--purple-accent); }
.bar.quaternary { background: var(--pink-accent); }
.bar-value { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); font-size: 7px; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.bar-label { font-size: 8px; color: var(--text-primary); position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-weight: 500; white-space: nowrap; }

.iks-container { display: flex; gap: var(--space-md); align-items: center; }
.iks-gauge { position: relative; width: 100px; height: 100px; }
.iks-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.iks-bg { fill: none; stroke: var(--bg-card); stroke-width: 10; }
.iks-fill { fill: none; stroke: url(#iksGradient); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 0.5s ease; }
.iks-value-container { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.iks-value { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 24px; font-weight: 800; color: var(--arctic-cyan); }
.iks-label { font-size: 8px; color: var(--text-tertiary); }
.iks-details { flex: 1; font-size: 10px; }
.iks-detail-row { display: flex; justify-content: space-between; padding: 2px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.iks-detail-name { color: var(--text-secondary); }
.iks-detail-value { font-weight: 600; }

.chart-legend { display: flex; gap: var(--space-md); margin-top: var(--space-sm); padding-top: var(--space-sm); border-top: 1px solid rgba(255,255,255,0.05); flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: var(--space-xs); font-size: 9px; color: var(--text-secondary); }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; }

/* Projects Catalog */
.projects-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--space-md); }
.project-catalog-card { background: var(--bg-tertiary); border-radius: var(--radius-md); padding: var(--space-md); border: 2px solid transparent; cursor: pointer; transition: all 0.3s ease; }
.project-catalog-card:hover { border-color: var(--arctic-cyan); }
.project-catalog-card.active { border-color: var(--energy-green); background: rgba(0,255,136,0.05); }
.project-catalog-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--space-sm); }
.project-catalog-icon { font-size: 28px; }
.project-catalog-status { font-size: 9px; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; font-weight: 600; }
.project-catalog-status.planned { background: rgba(139,92,246,0.2); color: var(--purple-accent); }
.project-catalog-status.active { background: rgba(0,255,136,0.2); color: var(--energy-green); }
.project-catalog-name { font-weight: 600; font-size: 14px; margin-bottom: var(--space-xs); color: var(--text-primary); }
.project-catalog-stakeholder { font-size: 10px; color: var(--arctic-cyan); margin-bottom: var(--space-xs); }
.project-catalog-desc { font-size: 11px; color: var(--text-tertiary); margin-bottom: var(--space-sm); line-height: 1.4; }
.project-catalog-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xs); margin-bottom: var(--space-sm); }
.project-catalog-metric { text-align: center; padding: var(--space-xs); background: var(--bg-card); border-radius: var(--radius-sm); }
.project-catalog-metric-value { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 11px; font-weight: 600; }
.project-catalog-metric-value.positive { color: var(--energy-green); }
.project-catalog-metric-value.negative { color: var(--danger-red); }
.project-catalog-metric-label { color: var(--text-tertiary); font-size: 8px; text-transform: uppercase; }
.project-catalog-effects { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: var(--space-sm); }
.project-catalog-effect { font-size: 9px; padding: 2px 6px; border-radius: 4px; background: var(--bg-card); }
.project-catalog-effect.positive { color: var(--energy-green); }
.project-catalog-effect.negative { color: var(--danger-red); }
.project-catalog-actions { display: flex; gap: var(--space-xs); }
.project-catalog-btn { flex: 1; padding: 6px; border-radius: 4px; border: none; font-size: 10px; cursor: pointer; transition: all 0.2s; }
.project-catalog-btn.edit { background: var(--bg-card); color: var(--text-secondary); }
.project-catalog-btn.delete { background: rgba(255,71,87,0.2); color: var(--danger-red); }
.project-catalog-btn:hover { transform: translateY(-1px); }

/* Type Selector in Project Modal */
.type-selector { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xs); margin-top: var(--space-sm); }
.type-btn { padding: var(--space-sm); background: var(--bg-card); border: 2px solid transparent; border-radius: var(--radius-sm); cursor: pointer; text-align: center; transition: all 0.2s; }
.type-btn:hover { border-color: var(--arctic-cyan); }
.type-btn.selected { border-color: var(--energy-green); background: rgba(0,255,136,0.1); }
.type-btn-icon { font-size: 20px; display: block; margin-bottom: 2px; }
.type-btn-label { font-size: 9px; color: var(--text-secondary); }

/* Active Projects List */
.active-projects-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.active-project-item { background: var(--bg-tertiary); border-radius: var(--radius-md); border-left: 3px solid var(--warning-amber); overflow: hidden; transition: all 0.3s ease; }
.active-project-item.approved { border-left-color: var(--energy-green); }
.active-project-item.approved.with-support { border-left-color: var(--purple-accent); }
.active-project-header { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-md); cursor: pointer; }
.active-project-header:hover { background: var(--bg-hover); }
.active-project-icon { font-size: 24px; }
.active-project-info { flex: 1; }
.active-project-name { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.active-project-meta { font-size: 10px; color: var(--text-tertiary); margin-top: 2px; }
.active-project-stats { display: flex; gap: var(--space-md); }
.active-project-stat { text-align: center; }
.active-project-stat-value { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 12px; font-weight: 600; }
.active-project-stat-value.positive { color: var(--energy-green); }
.active-project-stat-value.negative { color: var(--danger-red); }
.active-project-stat-value.amber { color: var(--warning-amber); }
.active-project-stat-label { font-size: 8px; color: var(--text-tertiary); text-transform: uppercase; }
.active-project-status { font-size: 9px; padding: 3px 8px; border-radius: 4px; font-weight: 600; }
.active-project-status.pending { background: rgba(255,184,0,0.2); color: var(--warning-amber); }
.active-project-status.approved { background: rgba(0,255,136,0.2); color: var(--energy-green); }
.active-project-status.supported { background: rgba(139,92,246,0.2); color: var(--purple-accent); }
.active-project-status.failed { background: rgba(255,71,87,0.2); color: var(--danger-red); }

/* Expandable Details */
.active-project-details { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; background: var(--bg-card); }
.active-project-item.expanded .active-project-details { max-height: 300px; }
.active-project-details-inner { padding: var(--space-md); border-top: 1px solid rgba(255,255,255,0.05); }
.gov-support-row { display: flex; align-items: center; justify-content: space-between; padding: var(--space-sm) var(--space-md); background: rgba(139,92,246,0.1); border-radius: var(--radius-sm); margin-bottom: var(--space-md); }
.gov-support-label { font-size: 11px; color: var(--text-secondary); }
.gov-support-value { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 14px; font-weight: 600; color: var(--purple-accent); }
.risk-indicator { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); background: var(--bg-tertiary); border-radius: var(--radius-sm); margin-bottom: var(--space-md); }
.risk-label { font-size: 10px; color: var(--text-tertiary); }
.risk-bar { flex: 1; height: 6px; background: var(--bg-hover); border-radius: 3px; overflow: hidden; }
.risk-bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.risk-bar-fill.low { background: var(--energy-green); }
.risk-bar-fill.medium { background: var(--warning-amber); }
.risk-bar-fill.high { background: var(--danger-red); }
.risk-value { font-size: 10px; font-weight: 600; min-width: 35px; text-align: right; }
.project-action-buttons { display: flex; gap: var(--space-sm); }
.project-action-btn { flex: 1; padding: 10px; border-radius: var(--radius-sm); border: none; font-family: inherit; font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.project-action-btn.approve { background: var(--energy-green); color: var(--bg-deep); }
.project-action-btn.approve-subsidy { background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%); color: white; }
.project-action-btn.approve-taxcredit { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: white; }
.project-action-btn.cancel { background: var(--bg-tertiary); color: var(--text-secondary); }
.project-action-btn.reset { background: rgba(255,184,0,0.2); color: var(--warning-amber); border: 1px solid var(--warning-amber); margin-top: 8px; }
.project-action-btn:hover { transform: translateY(-2px); }
.project-action-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.project-approved-info { text-align: center; }
.approved-status { padding: 10px; color: var(--text-tertiary); font-size: 11px; }
.active-project-stat-label { font-size: 8px; color: var(--text-tertiary); text-transform: uppercase; }

/* AI Expert Button */
.ai-expert-btn { background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%); border: none; border-radius: var(--radius-md); padding: var(--space-sm) var(--space-md); color: white; font-family: inherit; font-size: 11px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.3s ease; }
.ai-expert-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4); }
.ai-expert-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.ai-expert-btn .spinner { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* API Key Section */
.api-key-section { padding: var(--space-md); background: var(--bg-tertiary); border-radius: var(--radius-md); border: 1px solid rgba(139,92,246,0.2); }
.api-key-input-row { display: flex; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.api-key-input { flex: 1; font-family: monospace; }
.api-key-toggle, .api-key-save { padding: var(--space-sm) var(--space-md); border: none; border-radius: var(--radius-sm); cursor: pointer; font-family: inherit; font-size: 12px; transition: all 0.2s; }
.api-key-toggle { background: var(--bg-hover); color: var(--text-secondary); }
.api-key-toggle:hover { background: var(--bg-card); }
.api-key-save { background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%); color: white; font-weight: 600; }
.api-key-save:hover { transform: translateY(-1px); }
.api-key-status { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-secondary); margin-bottom: var(--space-sm); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.inactive { background: var(--danger-red); }
.status-dot.active { background: var(--energy-green); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.api-key-hint { font-size: 10px; color: var(--text-tertiary); line-height: 1.4; }

/* AI Assistant Floating Button */
.ai-assistant-fab { position: fixed; bottom: 24px; right: 24px; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5); transition: all 0.3s ease; z-index: 1000; }
.ai-assistant-fab:hover { transform: scale(1.1); box-shadow: 0 6px 25px rgba(139, 92, 246, 0.7); }
.ai-assistant-fab.active { transform: scale(1.1) rotate(15deg); }
.ai-assistant-fab .notification-dot { position: absolute; top: 0; right: 0; width: 14px; height: 14px; background: var(--energy-green); border-radius: 50%; border: 2px solid var(--bg-deep); font-size: 8px; display: flex; align-items: center; justify-content: center; color: var(--bg-deep); font-weight: bold; }

/* AI Assistant Chat Panel */
.ai-assistant-panel { position: fixed; bottom: 90px; right: 24px; width: 520px; max-height: 700px; background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid rgba(139,92,246,0.3); box-shadow: 0 10px 40px rgba(0,0,0,0.5); z-index: 999; display: none; flex-direction: column; overflow: hidden; }
.ai-assistant-panel.open { display: flex; animation: slideUp 0.3s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.ai-panel-header { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-lg); background: linear-gradient(135deg, rgba(139,92,246,0.2) 0%, rgba(236,72,153,0.2) 100%); border-bottom: 1px solid rgba(255,255,255,0.05); }
.ai-panel-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.ai-panel-info { flex: 1; }
.ai-panel-name { font-weight: 600; font-size: 16px; color: var(--text-primary); }
.ai-panel-status { font-size: 12px; color: var(--energy-green); }
.ai-panel-close { background: none; border: none; color: var(--text-tertiary); font-size: 22px; cursor: pointer; padding: 6px; }
.ai-panel-close:hover { color: var(--text-primary); }
.ai-panel-messages { flex: 1; overflow-y: auto; padding: var(--space-lg); max-height: 450px; }
.ai-message { margin-bottom: var(--space-lg); }
.ai-message.assistant { padding-left: var(--space-md); border-left: 3px solid var(--purple-accent); }
.ai-message.user { padding-left: var(--space-md); border-left: 3px solid var(--arctic-cyan); }
.ai-message-text { font-size: 15px; line-height: 1.6; color: var(--text-primary); }
.ai-message-time { font-size: 11px; color: var(--text-tertiary); margin-top: 6px; }
.ai-panel-input { display: flex; gap: var(--space-sm); padding: var(--space-lg); border-top: 1px solid rgba(255,255,255,0.05); }
.ai-panel-input input { flex: 1; background: var(--bg-tertiary); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-md); padding: var(--space-md) var(--space-lg); color: var(--text-primary); font-family: inherit; font-size: 14px; }
.ai-panel-input input:focus { border-color: var(--purple-accent); outline: none; }
.ai-panel-input button { background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%); border: none; border-radius: var(--radius-md); padding: var(--space-md) var(--space-lg); color: white; font-size: 16px; cursor: pointer; }
.ai-panel-input button:hover { transform: scale(1.05); }
.ai-quick-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 var(--space-lg) var(--space-lg); }
.ai-quick-btn { background: var(--bg-tertiary); border: 1px solid rgba(139,92,246,0.3); border-radius: 20px; padding: 8px 14px; font-size: 12px; color: var(--purple-accent); cursor: pointer; transition: all 0.2s; }
.ai-quick-btn:hover { background: rgba(139,92,246,0.2); border-color: var(--purple-accent); }

/* Project Validation Badge */
.validation-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 4px; font-size: 9px; font-weight: 600; }
.validation-badge.pending { background: rgba(255,184,0,0.2); color: var(--warning-amber); }
.validation-badge.validated { background: rgba(0,255,136,0.2); color: var(--energy-green); }
.validation-badge.failed { background: rgba(255,71,87,0.2); color: var(--danger-red); }

.data-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-md); }
.data-item { background: var(--bg-tertiary); border-radius: var(--radius-md); padding: var(--space-md); }
.data-item-label { font-size: 10px; color: var(--text-tertiary); margin-bottom: var(--space-xs); }
.data-item-value { font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 16px; font-weight: 600; color: var(--arctic-cyan); }

.file-upload-zone { border: 2px dashed rgba(0,212,255,0.3); border-radius: var(--radius-lg); padding: var(--space-xl); text-align: center; cursor: pointer; margin-bottom: var(--space-lg); transition: all 0.3s ease; }
.file-upload-zone:hover { border-color: var(--arctic-cyan); background: rgba(0,212,255,0.05); }
.file-upload-zone.loaded { border-color: var(--energy-green); background: rgba(0,255,136,0.05); }
.file-upload-zone.error { border-color: var(--danger-red); background: rgba(255,71,87,0.05); }
.file-upload-zone.processing { border-color: var(--warning-amber); background: rgba(255,184,0,0.05); animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.sheet-status { font-size: 10px; padding: 6px 8px; background: rgba(0,0,0,0.2); border-radius: 6px; color: var(--text-tertiary); display: flex; align-items: center; gap: 4px; transition: all 0.3s; }
.sheet-status.loaded { background: rgba(0,255,136,0.15); color: var(--energy-green); }
.sheet-status.error { background: rgba(255,71,87,0.15); color: var(--danger-red); }
.sheet-status span { font-size: 12px; }
.file-upload-icon { font-size: 36px; margin-bottom: var(--space-sm); }
.file-upload-title { font-weight: 600; font-size: 13px; margin-bottom: var(--space-xs); }
.file-upload-desc { font-size: 11px; color: var(--text-secondary); }
.file-upload-status { margin-top: var(--space-md); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-sm); font-size: 11px; display: inline-block; background: rgba(0,255,136,0.2); color: var(--energy-green); }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 3px; }

@media (max-width: 1200px) { .charts-grid, .two-col { grid-template-columns: 1fr; } .agent-activity { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .quick-stats { grid-template-columns: repeat(2, 1fr); } .agent-activity { grid-template-columns: repeat(2, 1fr); } }

/* ============ MAP STYLES ============ */
#map { height: 550px; width: 100%; border-radius: var(--radius-lg); border: 1px solid rgba(0,212,255,0.2); }

.map-marker { 
    position: absolute; width: 30px; height: 30px; 
    transform: translate(-50%, -50%); cursor: pointer; 
    transition: all 0.3s; font-size: 24px; 
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5)); 
    pointer-events: auto; z-index: 10; 
}
.map-marker:hover { transform: translate(-50%, -50%) scale(1.3); }
.map-marker.hidden { display: none; }

.building-marker { 
    position: absolute; transform-origin: center center; 
    transition: all 0.3s; cursor: pointer; 
    filter: drop-shadow(4px 8px 12px rgba(0,0,0,0.6)); 
    z-index: 100; pointer-events: auto; 
    transform: translate(-50%, -50%); 
    border-radius: 12px; overflow: hidden; 
}
.building-marker:hover { 
    transform: translate(-50%, -50%) scale(1.15); 
    filter: drop-shadow(6px 12px 20px rgba(0,0,0,0.8)); z-index: 200; 
}
.building-marker img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 12px; }
.building-marker.construction { opacity: 0.6; animation: pulse-building 2s ease-in-out infinite; }
@keyframes pulse-building { 0%, 100% { opacity: 0.6; } 50% { opacity: 0.9; } }

.map-tooltip { 
    position: fixed; 
    background: rgba(10, 14, 20, 0.98); 
    border: 2px solid var(--arctic-cyan); 
    border-radius: var(--radius-md); 
    padding: 15px; min-width: 260px; max-width: 350px; 
    z-index: 10000; pointer-events: none; display: none; 
    box-shadow: 0 8px 32px rgba(0,0,0,0.7); 
}
.map-tooltip.show { display: block; }
.map-tooltip h6 { color: var(--arctic-cyan); margin: 0 0 10px 0; font-size: 14px; font-weight: 600; }
.map-tooltip .detail { font-size: 12px; margin: 5px 0; color: var(--text-secondary); line-height: 1.4; }
.map-tooltip .detail b { color: var(--text-primary); font-weight: 600; }
.map-tooltip .tooltip-image { max-width: 200px; max-height: 120px; object-fit: cover; border-radius: 6px; margin-top: 8px; }

/* Map context menu — light theme, matches app design system */
.context-menu {
    position: fixed;
    background: #ffffff;
    border: 1px solid #dde3ee;
    border-radius: 10px;
    padding: 4px;
    min-width: 240px;
    z-index: 10001;
    display: none;
    box-shadow: 0 10px 32px rgba(15, 25, 35, 0.18), 0 0 0 1px rgba(15, 25, 35, 0.04);
    overflow: hidden;
    font-family: -apple-system, 'Inter', system-ui, sans-serif;
    animation: ctxMenuIn 0.14s ease-out;
}
.context-menu.show { display: block; }
@keyframes ctxMenuIn {
    from { opacity: 0; transform: translateY(-4px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.context-menu::before {
    content: 'Действия на карте';
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #8294ad;
    font-weight: 700;
    padding: 10px 12px 6px;
}
.context-menu-item {
    padding: 9px 10px;
    cursor: pointer;
    border-radius: 8px;
    transition: background .14s, transform .14s;
    color: #0f1923;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.3;
}
.context-menu-item:hover {
    background: #e6f1fb;
    color: #0c447c;
}
.context-menu-item:hover .context-menu-icon {
    transform: scale(1.06);
}
.context-menu-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: transform .14s;
    background: #e6f1fb;
    color: #185fa5;
}
.context-menu-icon.primary { background: linear-gradient(135deg, #185fa5, #0c447c); color: #ffffff; box-shadow: 0 2px 6px rgba(24,95,165,.3); }
.context-menu-icon.accent  { background: #eeedfe; color: #5b4fcf; }
.context-menu-icon.muted   { background: #eaeff6; color: #3d4f6b; }
.context-menu-item .context-menu-label {
    flex: 1;
    min-width: 0;
}
.context-menu-item .context-menu-hint {
    display: block;
    font-size: 10px;
    color: #8294ad;
    font-weight: 400;
    margin-top: 1px;
}
.context-menu-item:hover .context-menu-hint { color: #185fa5; }

.placement-mode-active { cursor: crosshair !important; }
.placement-mode-active * { cursor: crosshair !important; }
.placement-indicator { 
    position: fixed; width: 60px; height: 60px; 
    border: 3px dashed var(--arctic-cyan); border-radius: 50%; 
    pointer-events: none; z-index: 9999; display: none; 
    animation: rotate 3s linear infinite; background: rgba(0,212,255,0.1); 
}
.placement-indicator.show { display: block; }
.placement-indicator.valid { border-color: var(--energy-green); background: rgba(0,255,136,0.15); }
.placement-indicator.invalid { border-color: var(--danger-red); background: rgba(255,71,87,0.15); }
@keyframes rotate { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }

.legend-item { 
    cursor: pointer; padding: 8px 14px; border-radius: var(--radius-sm); 
    transition: all 0.3s; border: 2px solid transparent; 
    background: var(--bg-tertiary); display: flex; align-items: center; gap: 8px;
}
.legend-item:hover { background: var(--bg-hover); }
.legend-item.active { border-color: var(--arctic-cyan); background: rgba(0,212,255,0.15); }
.legend-item.inactive { opacity: 0.4; }

.boundary-point { 
    position: absolute; width: 12px; height: 12px; 
    background: var(--arctic-cyan); border: 2px solid #fff; 
    border-radius: 50%; transform: translate(-50%, -50%); 
    z-index: 1000; box-shadow: 0 0 10px rgba(0,212,255,0.8); 
}
.boundary-line { stroke: var(--arctic-cyan); stroke-width: 3; fill: rgba(0,212,255,0.2); stroke-dasharray: 5,5; animation: dash 20s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -100; } }
.boundary-center-marker { 
    position: absolute; width: 20px; height: 20px; 
    background: var(--warning-amber); border: 3px solid #fff; 
    border-radius: 50%; transform: translate(-50%, -50%); 
    z-index: 1001; box-shadow: 0 0 15px rgba(255,184,0,0.9); 
    animation: pulse-center 2s ease-in-out infinite; 
}
@keyframes pulse-center { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.2); } }

.map-controls { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-bottom: var(--space-md); }
/* ═══ v3: Compact domain filter + geolayers dropdown on the Map tab ═══ */
.map-dom-filter { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.map-dom-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border: 1px solid #dde3ee; border-radius: 14px; font-size: 11px; font-weight: 600; cursor: pointer; background: #fff; color: #3d4f6b; font-family: inherit; transition: all .12s; user-select: none; }
.map-dom-chip:hover { border-color: #c5cfde; }
.map-dom-chip .map-dom-let { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; font-size: 9px; font-weight: 700; color: #fff; flex-shrink: 0; }
.map-dom-chip .map-dom-cnt { font-size: 10px; color: #8294ad; margin-left: 2px; font-weight: 500; background: rgba(130,148,173,.12); padding: 0 5px; border-radius: 8px; min-width: 14px; text-align: center; }

/* Geolayers compact dropdown (positioned under the "📐 Слои" button) */
.map-gl-panel { position: absolute; top: calc(100% + 6px); right: 0; width: 280px; background: #fff; border: 1px solid #dde3ee; border-radius: 8px; box-shadow: 0 6px 20px rgba(15,25,35,.14); padding: 10px 12px; display: none; z-index: 50; font-family: inherit; }
.map-gl-panel.open { display: block; animation: mapGlIn .15s ease-out; }
@keyframes mapGlIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.map-gl-header { font-size: 12px; font-weight: 700; color: #0f1923; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #eaeff6; }
.map-gl-group-title { font-size: 10px; text-transform: uppercase; letter-spacing: .4px; color: #8294ad; font-weight: 700; margin: 8px 0 4px; }
.map-gl-row { display: flex; align-items: center; gap: 6px; padding: 5px 4px; border-radius: 4px; cursor: pointer; font-size: 11px; color: #3d4f6b; }
.map-gl-row:hover { background: #f0f4fa; }
.map-gl-row.on { color: #0f1923; }
.map-gl-row input[type="checkbox"] { accent-color: #185fa5; flex-shrink: 0; }
.map-gl-row .map-gl-name { flex: 1; }
.map-gl-row .map-gl-src { font-size: 9px; color: #8294ad; flex-shrink: 0; }
.map-gl-hint { margin-top: 10px; padding-top: 8px; border-top: 1px solid #eaeff6; font-size: 10px; color: #8294ad; line-height: 1.4; }
.map-gl-empty { padding: 10px; color: #8294ad; font-size: 11px; text-align: center; }

/* ═══ ARCTEK · Карточка проекта (progressive disclosure) ═══ */
.pc-overlay { position: fixed; inset: 0; background: rgba(15, 25, 35, .55); z-index: 9998; opacity: 0; pointer-events: none; transition: opacity .22s; display: flex; justify-content: center; padding: 20px; overflow-y: auto; }
.pc-overlay.open { opacity: 1; pointer-events: auto; }
.pc-overlay.pc-overlay-mini { background: transparent; pointer-events: none; }
.pc-overlay.pc-overlay-mini .pc-modal { transform: translateY(calc(100vh - 120px)) scale(.3); opacity: .7; pointer-events: auto; }
.pc-modal { width: 560px; max-width: 100%; background: #fff; border-radius: 10px; box-shadow: 0 18px 60px rgba(15,25,35,.22), 0 0 0 1px rgba(15,25,35,.08); align-self: flex-start; margin: 20px auto; overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 40px); font-family: -apple-system, 'Inter', system-ui, sans-serif; color: #0f1923; transition: transform .22s, opacity .22s; }

/* Header */
.pc-head { padding: 14px 18px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #dde3ee; flex-shrink: 0; }
.pc-head-title { flex: 1; font-size: 16px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-head-close { width: 28px; height: 28px; border: none; background: transparent; color: #8294ad; font-size: 16px; cursor: pointer; border-radius: 6px; font-family: inherit; line-height: 1; }
.pc-head-close:hover { background: #fcebeb; color: #b91c1c; }
.pc-dirty-dot { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.18); flex-shrink: 0; }

/* Level tabs */
.pc-levels { display: flex; gap: 0; padding: 0 18px; border-bottom: 1px solid #dde3ee; flex-shrink: 0; background: #fafbfd; }
.pc-lvl { padding: 9px 14px; font-size: 11px; font-weight: 600; color: #8294ad; cursor: pointer; border-bottom: 2px solid transparent; display: flex; align-items: center; gap: 6px; user-select: none; transition: color .12s; }
.pc-lvl:hover { color: #3d4f6b; }
.pc-lvl.a { color: #185fa5; border-bottom-color: #185fa5; }
.pc-lvl.done { color: #1a7a3b; }
.pc-lvl.done::after { content: '✓'; margin-left: 2px; font-size: 11px; }
.pc-lvl-num { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; background: #eaeff6; font-size: 10px; font-weight: 800; align-items: center; justify-content: center; color: #8294ad; }
.pc-lvl.a .pc-lvl-num { background: #185fa5; color: #fff; }
.pc-lvl.done .pc-lvl-num { background: #1a7a3b; color: #fff; }

/* Body */
.pc-body { overflow-y: auto; flex: 1; }
.pc-sec { padding: 14px 18px; border-bottom: 1px solid #dde3ee; }
.pc-sec:last-child { border-bottom: none; }
.pc-sec-title { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; margin-bottom: 10px; cursor: pointer; user-select: none; }
.pc-sec-title .pc-ico { font-size: 14px; }
.pc-sec-hint { margin-left: auto; font-size: 10px; font-weight: 500; color: #8294ad; }

.pc-collapse { max-height: 0; overflow: hidden; transition: max-height .3s ease-out; }
.pc-collapse.open { max-height: 3000px; }

/* Inputs */
.pc-row { display: flex; gap: 8px; margin-bottom: 10px; align-items: flex-start; }
.pc-inp { flex: 1; margin-bottom: 10px; }
.pc-inp label { display: block; font-size: 10px; font-weight: 700; color: #8294ad; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 4px; }
.pc-inp-sm { max-width: 180px; }
.pc-inp input[type="text"], .pc-inp input[type="number"], .pc-inp textarea, .pc-inp select { width: 100%; padding: 7px 10px; border: 1px solid #dde3ee; border-radius: 6px; font-size: 12px; font-family: inherit; background: #fff; color: #0f1923; box-sizing: border-box; outline: none; transition: border-color .12s, box-shadow .12s; }
.pc-inp input:focus, .pc-inp textarea:focus, .pc-inp select:focus { border-color: #185fa5; box-shadow: 0 0 0 3px #e6f1fb; }
.pc-inp textarea { resize: vertical; min-height: 52px; font-family: inherit; }
.pc-hint-inline { font-size: 10px; color: #8294ad; font-weight: 400; text-transform: none; letter-spacing: 0; margin-left: 4px; }

/* Domain toggle */
.pc-dom-toggle { display: flex; gap: 2px; background: #eaeff6; padding: 2px; border-radius: 6px; }
.pc-dom-btn { flex: 1; padding: 6px 12px; border: none; border-radius: 4px; font-size: 11px; font-weight: 600; cursor: pointer; background: transparent; color: #3d4f6b; font-family: inherit; transition: all .12s; }
.pc-dom-btn.a { box-shadow: 0 1px 4px rgba(15,25,35,.08); }
.pc-dom-btn.G.a { background: #e6f1fb; color: #185fa5; }
.pc-dom-btn.S.a { background: #eeedfe; color: #5b4fcf; }
.pc-dom-btn.E.a { background: #eaf3de; color: #1a7a3b; }

/* Scale chips */
.pc-scale-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.pc-sc-chip { padding: 4px 10px; border: 1px solid #dde3ee; border-radius: 12px; font-size: 10px; font-weight: 600; cursor: pointer; background: #fff; color: #3d4f6b; user-select: none; }
.pc-sc-chip:hover { border-color: #185fa5; }
.pc-sc-chip.a { background: #185fa5; color: #fff; border-color: #185fa5; }

/* Ramp-up bars */
.pc-ramp { display: flex; gap: 3px; align-items: flex-end; height: 50px; margin-top: 6px; }
.pc-ramp-bar { flex: 1; min-width: 22px; border-radius: 2px 2px 0 0; position: relative; cursor: pointer; transition: filter .12s; }
.pc-ramp-bar:hover { filter: brightness(0.92); }
.pc-ramp-pct { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 700; color: #185fa5; }
.pc-ramp-labels { display: flex; gap: 3px; margin-top: 3px; }
.pc-ramp-yr { flex: 1; min-width: 22px; text-align: center; font-size: 9px; color: #8294ad; }

/* Spillover rows */
.pc-spill { margin-top: 14px; padding-top: 10px; border-top: 1px dashed #dde3ee; }
.pc-spill-title { font-size: 11px; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.pc-spill-ai-btn { margin-left: auto; padding: 3px 10px; border: 1px solid #5b4fcf; background: #eeedfe; color: #5b4fcf; border-radius: 12px; font-size: 10px; font-weight: 700; cursor: pointer; font-family: inherit; }
.pc-spill-ai-btn:hover { background: #5b4fcf; color: #fff; }
.pc-spill-ai-btn:disabled { opacity: .6; cursor: wait; }
.pc-spill-list { display: flex; flex-direction: column; gap: 4px; }
.pc-spill-row { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border: 1px solid #dde3ee; border-radius: 6px; background: #fff; font-size: 11px; }
.pc-spill-num { width: 18px; height: 18px; border-radius: 50%; background: #eaeff6; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; color: #3d4f6b; flex-shrink: 0; }
.pc-spill-name-sel { flex: 1; min-width: 0; border: none; font-size: 11px; font-weight: 600; background: transparent; color: #0f1923; padding: 2px 4px; font-family: inherit; cursor: pointer; }
.pc-spill-name-sel:focus { outline: none; border-radius: 3px; background: #f0f4fa; }
.pc-spill-type-sel { border: 1px solid #dde3ee; border-radius: 3px; font-size: 9px; font-weight: 700; padding: 2px 4px; background: #fff; cursor: pointer; font-family: inherit; flex-shrink: 0; }
.pc-spill-type-sel.supply  { background: #e6f1fb; color: #185fa5; border-color: #185fa5; }
.pc-spill-type-sel.demand  { background: #eaf3de; color: #1a7a3b; border-color: #1a7a3b; }
.pc-spill-type-sel.induced { background: #eeedfe; color: #5b4fcf; border-color: #5b4fcf; }
.pc-spill-ic { font-size: 11px; color: #8294ad; margin-left: 2px; flex-shrink: 0; }
.pc-spill-inp { width: 54px; border: 1px solid #dde3ee; border-radius: 3px; font-size: 10px; font-weight: 700; padding: 2px 4px; text-align: right; background: #fff; color: #0f1923; font-variant-numeric: tabular-nums; font-family: inherit; }
.pc-spill-inp:focus { outline: none; border-color: #185fa5; }
.pc-spill-del { border: none; background: transparent; color: #8294ad; cursor: pointer; font-size: 12px; padding: 0 4px; flex-shrink: 0; }
.pc-spill-del:hover { color: #b91c1c; }
.pc-spill-total { display: flex; justify-content: space-between; padding: 6px 10px; background: #f5f7fb; border-radius: 6px; font-size: 11px; font-weight: 700; margin-top: 6px; }
.pc-spill-total-lbl { color: #3d4f6b; }
.pc-spill-total-val { color: #185fa5; }
.pc-spill-add { margin-top: 6px; padding: 5px 10px; border: 1px dashed #c5cfde; background: #fff; color: #5b4fcf; border-radius: 4px; font-size: 10px; font-weight: 600; cursor: pointer; font-family: inherit; }
.pc-spill-add:hover { border-color: #5b4fcf; background: #eeedfe; }
.pc-spill-hint { margin-top: 6px; font-size: 10px; color: #8294ad; text-align: center; font-style: italic; }

/* Map (site) */
/* Встроенная карта в карточке проекта */
.pc-map-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.pc-map-btn { padding: 7px 12px; border: 1px solid #185fa5; background: #185fa5; color: #fff; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; }
.pc-map-btn:hover { background: #0c447c; border-color: #0c447c; }
.pc-map-btn.ghost { background: #fff; color: #b91c1c; border-color: #f5b8b8; }
.pc-map-btn.ghost:hover { background: #fcebeb; }
.pc-map-area { font-size: 11px; color: #1a7a3b; }
.pc-map-area strong { color: #0f5028; }
.pc-map-hint { font-size: 10px; color: #8294ad; line-height: 1.4; }
.pc-inline-map { width: 100%; height: 280px; border: 1px solid #dde3ee; border-radius: 8px; overflow: hidden; margin-bottom: 8px; background: #eef1f6; }
.pc-inline-map-load { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #8294ad; font-size: 12px; }

/* PZZ result */
.pc-pzz { padding: 8px 10px; border-radius: 6px; font-size: 11px; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; line-height: 1.5; }
.pc-pzz.ok   { background: #eaf3de; color: #1a7a3b; }
.pc-pzz.fail { background: #fcebeb; color: #b91c1c; }
.pc-pzz.warn { background: #faeeda; color: #7a4f00; }

/* Infra distances table */
.pc-infra-label { font-size: 10px; font-weight: 700; color: #8294ad; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 4px; }
.pc-infra-tbl { width: 100%; font-size: 11px; border-collapse: collapse; margin-bottom: 6px; }
.pc-infra-tbl td { padding: 4px 6px; border-bottom: 1px solid #eaeff6; }
.pc-infra-tbl td:first-child { font-weight: 600; width: 30%; }
.pc-infra-tbl td:nth-child(2) { color: #8294ad; }
.pc-infra-tbl td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.pc-infra-total { display: flex; justify-content: space-between; padding: 6px 10px; background: #faeeda; color: #7a4f00; border-radius: 6px; font-size: 12px; font-weight: 700; }

/* Infra grid (level 3b) */
.pc-infra-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.pc-infra-item { padding: 6px 8px; border: 1px solid #dde3ee; border-radius: 6px; background: #fff; }
.pc-infra-item label { display: block; font-size: 9px; color: #8294ad; margin-bottom: 2px; }
.pc-infra-item input { width: 100%; border: none; font-size: 13px; font-weight: 700; background: transparent; padding: 0; color: #0f1923; font-family: inherit; }
.pc-infra-item input:focus { outline: none; }
.pc-infra-unit { font-size: 9px; color: #8294ad; }

/* Effects panel */
.pc-eff-panel { background: #f5f7fb; border-radius: 8px; padding: 10px 12px; }
.pc-eff-status { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 11px; flex-wrap: wrap; }
.pc-eff-badge { padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 700; }
.pc-eff-badge.pending { background: #faeeda; color: #7a4f00; }
.pc-eff-badge.done    { background: #eaf3de; color: #1a7a3b; }
.pc-eff-hint { color: #8294ad; font-size: 10px; }
.pc-eff-dom { margin-bottom: 6px; }
.pc-eff-dom.primary .pc-eff-dom-hdr { font-weight: 800; }
.pc-eff-dom-hdr { font-size: 11px; font-weight: 700; margin-bottom: 3px; display: flex; align-items: center; gap: 4px; }
.pc-eff-items { display: flex; gap: 3px; flex-wrap: wrap; }
.pc-eff-tag { font-size: 10px; padding: 2px 6px; border-radius: 3px; font-weight: 600; }
.pc-eff-tag.pos { background: #eaf3de; color: #1a7a3b; }
.pc-eff-tag.neg { background: #fcebeb; color: #b91c1c; }
.pc-eff-ics { padding: 8px 10px; background: linear-gradient(135deg, #e6f1fb, #eeedfe); border-radius: 6px; display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.pc-eff-ics-val { font-size: 18px; font-weight: 800; color: #0c447c; font-variant-numeric: tabular-nums; }
.pc-eff-ics-label { font-size: 10px; color: #0c447c; }
.pc-eff-mech { font-size: 10px; color: #3d4f6b; margin-top: 8px; padding: 6px 8px; background: #fff; border-radius: 6px; line-height: 1.5; border: 1px solid #eaeff6; }
.pc-eff-fiscal { font-size: 10px; color: #0f5028; margin-top: 8px; padding: 6px 8px; background: #eaf3de; border-radius: 6px; line-height: 1.5; border: 1px solid #c5e0a5; }
.pc-eff-fiscal strong { color: #1a7a3b; }
.pc-eff-fiscal-note { color: #6a8a5a; font-size: 9px; }
/* Masterplan 2.1 — структура финансирования */
.pc-fin-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #eaeff6; margin: 4px 0 8px; }
.pc-fin-bar > div { height: 100%; transition: width .2s; }
.pc-fin-list { display: flex; flex-direction: column; gap: 4px; }
.pc-fin-row { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.pc-fin-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.pc-fin-lbl { flex: 1; color: #3d4f6b; }
.pc-fin-inp { width: 52px; padding: 3px 5px; border: 1px solid #dde3ee; border-radius: 4px; font-size: 11px; text-align: right; font-family: inherit; }
.pc-fin-pct { color: #8294ad; font-size: 10px; }
.pc-fin-mln { width: 62px; text-align: right; color: #0f5028; font-weight: 600; font-size: 10px; }
.pc-fin-presets { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.pc-fin-presets button { padding: 4px 8px; border: 1px solid #c5cfde; background: #fff; color: #3d4f6b; border-radius: 12px; font-size: 10px; cursor: pointer; font-family: inherit; }
.pc-fin-presets button:hover { border-color: #185fa5; background: #e6f1fb; color: #185fa5; }
.pc-fin-presets .pc-fin-balance { border-color: #1a7a3b; color: #1a7a3b; font-weight: 600; }
.pc-fin-presets .pc-fin-balance:hover { background: #eaf3de; }
.pc-fin-prog-apply { flex-shrink: 0; align-self: center; padding: 5px 9px; border: 1px solid #185fa5; background: #fff; color: #185fa5; border-radius: 5px; font-size: 10px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }
.pc-fin-prog-apply:hover { background: #185fa5; color: #fff; }
.pc-fin-prog-apply.on { background: #1a7a3b; border-color: #1a7a3b; color: #fff; }
.pc-fin-prog.applied { border-color: #1a7a3b; background: #f3f9ec; }
/* Masterplan 2.2 — подбор госпрограмм */
.pc-fin-prog-list { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.pc-fin-prog { display: flex; gap: 7px; padding: 6px 8px; background: #f5f7fb; border: 1px solid #dde3ee; border-radius: 6px; }
.pc-fin-prog-lvl { flex-shrink: 0; font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: 3px; height: fit-content; }
.pc-fin-prog-lvl.fed { background: #185fa5; color: #fff; }
.pc-fin-prog-lvl.reg { background: #5b4fcf; color: #fff; }
.pc-fin-prog-lvl.loc { background: #1a7a3b; color: #fff; }
.pc-fin-prog-body { flex: 1; min-width: 0; }
.pc-fin-prog-name { font-size: 11px; font-weight: 600; color: #0f1923; }
.pc-fin-prog-pct { font-size: 9px; color: #1a7a3b; font-weight: 700; }
.pc-fin-prog-rule { font-size: 10px; color: #3d4f6b; margin-top: 2px; line-height: 1.4; }
.pc-fin-prog-gp { font-size: 9px; color: #8294ad; margin-top: 2px; }
.pc-fin-prog-empty { font-size: 10px; color: #8294ad; padding: 6px 0; font-style: italic; }
.pc-fin-ai-btn { margin-top: 4px; padding: 5px 10px; border: 1px solid #5b4fcf; background: #eeedfe; color: #5b4fcf; border-radius: 5px; font-size: 10px; font-weight: 600; cursor: pointer; font-family: inherit; }
.pc-fin-ai-btn:hover { background: #5b4fcf; color: #fff; }
.pc-fin-ai-result { margin-top: 6px; padding: 6px 8px; background: #eeedfe; border-radius: 5px; font-size: 10px; color: #5b4fcf; line-height: 1.4; }
/* Masterplan 2.3 — дорожная карта CAPEX */
.pc-cr-tbl { width: 100%; border-collapse: collapse; font-size: 10px; margin-top: 4px; }
.pc-cr-tbl th { background: #eaeff6; color: #3d4f6b; font-weight: 700; padding: 4px 5px; border: 1px solid #dde3ee; }
.pc-cr-tbl td { padding: 4px 5px; border: 1px solid #dde3ee; text-align: center; color: #8294ad; }
.pc-cr-tbl td.on { background: #e6f1fb; color: #185fa5; font-weight: 600; }
.pc-cr-st { text-align: left !important; color: #0f1923 !important; font-weight: 600; }
.pc-cr-st span { color: #8294ad; font-weight: 400; font-size: 9px; }
.pc-cr-sum { color: #0f5028 !important; font-weight: 700 !important; }
.pc-cr-tot td { background: #f5f7fb; color: #0f1923 !important; font-weight: 700; }
.pc-eff-risks { margin-top: 6px; }
.pc-eff-risk { font-size: 10px; padding: 3px 6px; background: #fcebeb; color: #b91c1c; border-radius: 3px; display: inline-block; margin: 2px; }

/* Footer */
.pc-foot { padding: 10px 18px; border-top: 1px solid #dde3ee; background: #fafbfd; display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.pc-foot-spacer { flex: 1; }
.pc-btn { padding: 7px 14px; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; border: 1px solid #dde3ee; background: #fff; color: #3d4f6b; font-family: inherit; transition: all .12s; }
.pc-btn:hover { border-color: #c5cfde; background: #f0f4fa; }
.pc-btn.primary { background: #185fa5; color: #fff; border-color: #185fa5; }
.pc-btn.primary:hover { background: #0c447c; }
.pc-btn.primary:disabled { opacity: .5; cursor: not-allowed; }
.pc-btn.ai { background: #5b4fcf; color: #fff; border-color: #5b4fcf; }
.pc-btn.ai:hover { background: #4a3fb8; }
.pc-btn.danger { color: #b91c1c; border-color: #fcebeb; }
.pc-btn.danger:hover { background: #fcebeb; border-color: #b91c1c; }

@media (max-width: 680px) {
  .pc-modal { width: 100vw; margin: 0; max-height: 100vh; border-radius: 0; }
  .pc-infra-grid { grid-template-columns: 1fr 1fr; }
  .pc-row { flex-wrap: wrap; }
}

.map-control-btn {
    padding: var(--space-sm) var(--space-md); 
    background: var(--bg-tertiary); border: 1px solid rgba(0,212,255,0.2); 
    border-radius: var(--radius-sm); color: var(--text-primary); 
    cursor: pointer; font-size: 12px; transition: all 0.3s;
}
.map-control-btn:hover { background: var(--bg-hover); border-color: var(--arctic-cyan); }
.map-control-btn.active { background: var(--arctic-cyan); color: var(--bg-deep); font-weight: 600; }

.map-status { font-size: 11px; color: var(--text-tertiary); margin-top: var(--space-sm); }
.map-status.success { color: var(--energy-green); }
.map-status.warning { color: var(--warning-amber); }
.map-status.error { color: var(--danger-red); }

.map-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); margin-bottom: var(--space-md); }
.map-stat { background: var(--bg-tertiary); border-radius: var(--radius-sm); padding: var(--space-md); text-align: center; }
.map-stat-value { font-size: 24px; font-weight: 700; color: var(--arctic-cyan); }
.map-stat-label { font-size: 10px; color: var(--text-tertiary); margin-top: 4px; }

.infowindow-btn { 
    padding: 8px 16px; border: none; border-radius: 6px; 
    font-weight: 600; cursor: pointer; font-size: 12px; 
    transition: all 0.2s; margin: 4px; 
}
.infowindow-btn-primary { background: var(--arctic-cyan); color: var(--bg-deep); }
.infowindow-btn-primary:hover { background: #00b8d4; }
.infowindow-btn-success { background: var(--energy-green); color: var(--bg-deep); }
.infowindow-btn-success:hover { background: #00e676; }
.infowindow-btn-secondary { background: #30363d; color: #c9d1d9; }
.infowindow-btn-secondary:hover { background: #484f58; }
.infowindow-btn-outline { background: transparent; color: #000; border: 2px solid #ccc; }
.infowindow-btn-outline:hover { background: #f3f4f6; }
.infowindow-image { max-width: 100%; height: auto; max-height: 150px; object-fit: cover; border-radius: 6px; margin: 8px 0; }

.boundary-info { background: rgba(0,212,255,0.1); border: 1px solid var(--arctic-cyan); border-radius: var(--radius-sm); padding: 10px; margin-top: 10px; font-size: 12px; }
.boundary-controls { display: flex; gap: 8px; margin-top: 10px; }
.boundary-controls button { flex: 1; }

.city-boundary-section { background: rgba(255,71,87,0.05); border: 2px solid rgba(255,71,87,0.2); border-radius: var(--radius-md); padding: var(--space-md); }
.city-boundary-section .section-title { color: var(--danger-red); }

.api-key-section-maps { 
    background: rgba(255,184,0,0.1); border: 2px solid rgba(255,184,0,0.3); 
    border-radius: var(--radius-md); padding: var(--space-md); margin-bottom: var(--space-md); 
}
.api-key-section-maps h6 { color: var(--warning-amber); margin-bottom: 10px; font-size: 14px; }

.project-on-map-btn {
    padding: 4px 8px; background: rgba(0,212,255,0.15); border: 1px solid rgba(0,212,255,0.3);
    border-radius: 4px; color: var(--arctic-cyan); font-size: 10px; cursor: pointer;
    transition: all 0.2s; margin-left: auto;
}
.project-on-map-btn:hover { background: rgba(0,212,255,0.25); }

/* Quick Project Modal */
.quick-modal {
    position: fixed; top: 0; right: 0; width: 380px; height: 100%;
    background: var(--bg-primary); z-index: 100000;
    display: none; flex-direction: column;
    border-left: 1px solid #30363d;
    box-shadow: -4px 0 20px rgba(0,0,0,0.5);
    pointer-events: auto;
}
.quick-modal.show { display: flex; }
.quick-modal-content {
    background: transparent; border: none; border-radius: 0;
    padding: 16px; max-width: 100%; width: 100%;
    overflow-y: auto; flex: 1;
    pointer-events: auto;
}
.quick-modal-content * { pointer-events: auto; }
.quick-modal-content button,
.quick-modal-content input,
.quick-modal-content select,
.quick-modal-content textarea { position: relative; z-index: 1; }
.quick-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-lg); }
.quick-modal-header h5 { color: var(--arctic-cyan); margin: 0; font-size: 18px; }
.quick-modal-close { 
    background: none; border: none; color: var(--text-primary); 
    font-size: 1.5rem; cursor: pointer; padding: 0; width: 30px; height: 30px; 
    display: flex; align-items: center; justify-content: center; border-radius: 4px; 
}
.quick-modal-close:hover { background: rgba(255,255,255,0.1); }

.building-preview {
    width: 100%; max-height: 200px; object-fit: contain;
    border-radius: var(--radius-sm); margin-top: 10px;
    border: 1px solid rgba(0,212,255,0.2); background: var(--bg-tertiary);
}

/* ═══ NAV REDESIGN v2 ═══ */
/* ── Header L1 — blue professional bar ── */
.header-l1 { display:flex;align-items:center;gap:10px;height:56px;padding:0 20px;background:#185fa5;border-bottom:none;flex-shrink:0;position:sticky;top:0;z-index:200; }
.header { display:none !important; }
.l1-brand { display:flex;align-items:center;gap:8px;margin-right:12px;flex-shrink:0; }
.l1-city-wrap { display:flex;align-items:center;gap:4px; }
.l1-city-name { font-size:12px;font-weight:500;color:rgba(255,255,255,.8);background:rgba(255,255,255,.15);border:.5px solid rgba(255,255,255,.2);border-radius:20px;padding:3px 10px; }
.l1-city-year { font-size:11px;color:rgba(255,255,255,.6); }
.l1-session { display:flex;gap:4px; }
.l1-btn { display:flex;align-items:center;gap:4px;padding:5px 12px;border:.5px solid rgba(255,255,255,.2);border-radius:6px;background:transparent;font-size:11px;color:rgba(255,255,255,.7);cursor:pointer;font-family:inherit;white-space:nowrap;transition:all .12s; }
.l1-btn:hover { background:rgba(255,255,255,.1);color:#fff; }
.l1-btn--save { background:#fff;border-color:#fff;color:#185fa5;font-weight:600; }
.l1-btn--save:hover { background:#e8f0fb; }
.l1-btn--exit { border-color:rgba(255,255,255,.15);color:rgba(255,255,255,.5); }
.l1-btn--exit:hover { border-color:#f85149;color:#f85149;background:rgba(248,81,73,.1); }
.l1-divider { width:1px;height:20px;background:rgba(255,255,255,.2);flex-shrink:0;margin:0 6px; }
.l1-user { font-size:10px;color:rgba(255,255,255,.6);white-space:nowrap; }

/* ── Main nav tabs — white bg ── */
.main-nav { display:flex;align-items:stretch;height:44px;background:#fff;border-bottom:1px solid var(--border);flex-shrink:0;position:sticky;top:56px;z-index:190;box-shadow:var(--shadow); }
.main-nav-tabs { display:flex;flex:1; }
.nav-tab { display:flex;align-items:center;gap:7px;padding:0 22px;font-size:13px;font-weight:500;color:var(--text-tertiary);cursor:pointer;border:none;background:transparent;border-bottom:3px solid transparent;margin-bottom:-1px;border-right:1px solid var(--border);font-family:inherit;transition:all .12s;white-space:nowrap; }
.nav-tab:hover { color:var(--text-primary);background:var(--bg-secondary); }
.nav-tab.active { color:#185fa5;border-bottom-color:#185fa5;background:#e8f0fb; }
.nav-tab-dot { width:7px;height:7px;border-radius:50%;flex-shrink:0; }
.main-nav-right { display:flex;align-items:center;gap:8px;padding:0 16px;border-left:1px solid var(--border); }
.nav-ip-wrap { display:flex;align-items:center;gap:6px; }
.nav-ip-track { width:60px;height:5px;background:var(--bg-tertiary);border-radius:3px; }
.nav-ip-fill { height:5px;border-radius:3px;background:var(--purple-accent);width:0%;transition:width .3s; }
.nav-ip-text { font-size:11px;font-weight:600;color:var(--purple-accent);white-space:nowrap; }
.nav-timer { font-size:12px;font-weight:600;color:#d35400;background:#fff4e0;padding:4px 10px;border-radius:6px;border:1px solid rgba(213,84,0,.15); }
.nav-submit-btn { padding:6px 16px;background:#185fa5;border:none;border-radius:6px;color:#fff;font-size:12px;font-weight:600;cursor:pointer;font-family:inherit;white-space:nowrap;transition:all .12s; }
.nav-submit-btn:hover { background:#1470c0;transform:translateY(-1px);box-shadow:0 3px 10px rgba(24,95,165,.3); }

/* ── Sub nav — white bg, pill buttons ── */
.sub-nav { display:flex;align-items:center;justify-content:space-between;height:44px;padding:0 16px;background:#fff;border-bottom:1px solid var(--border);flex-shrink:0;position:sticky;top:100px;z-index:180;box-shadow:var(--shadow); }
.sub-nav-pills { display:flex;gap:4px;padding:0; }
.sub-pill { padding:6px 14px;border-radius:var(--radius-sm);border:1px solid transparent;background:transparent;color:var(--text-secondary);font-size:12px;font-weight:500;cursor:pointer;font-family:inherit;transition:all .12s;white-space:nowrap;display:flex;align-items:center;gap:5px; }
.sub-pill:hover:not(.active) { color:var(--text-primary);background:var(--bg-secondary); }
.sub-pill.active { background:#e8f0fb;color:#185fa5;border-color:rgba(24,95,165,.2);font-weight:600; }
.cp-nav-bar { display:none !important; }
.app-container { display:flex;flex-direction:column;min-height:100vh;padding:0 !important; }
.main-layout { flex:1;display:flex;gap:0;min-height:0; }
.main-content { flex:1;overflow-y:auto;padding:0; }
.sidebar { display:none !important; }

/* ==================== CITYPLAN V2 PANEL ==================== */

.cp2-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; background: var(--bg-secondary); border-radius: 10px; margin-bottom: 12px; border: 1px solid rgba(255,255,255,0.06); }
.cp2-tb-left { display: flex; align-items: center; gap: 8px; }
.cp2-city { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.cp2-year { font-size: 11px; padding: 2px 8px; background: var(--bg-card); border-radius: 4px; color: var(--text-secondary); }
.cp2-tb-center { display: flex; align-items: center; gap: 6px; }
.cp2-hl { font-size: 11px; color: var(--text-tertiary); }
.cp2-htabs { display: flex; gap: 2px; }
.cp2-ht { padding: 3px 8px; border-radius: 5px; border: 1px solid rgba(255,255,255,0.08); background: transparent; color: var(--text-tertiary); font-size: 11px; cursor: pointer; font-family: inherit; }
.cp2-ht.active { background: rgba(0,212,255,0.15); border-color: var(--arctic-cyan); color: var(--arctic-cyan); font-weight: 600; }
.cp2-target { font-size: 11px; color: var(--text-secondary); }
.cp2-tb-right { display: flex; align-items: center; gap: 12px; }
.cp2-ics-mini { display: flex; align-items: center; gap: 4px; }
.cp2-ics-label { font-size: 10px; color: var(--text-tertiary); }
.cp2-ics-val { font-size: 14px; font-weight: 700; color: var(--arctic-cyan); font-family: -apple-system, 'Inter', system-ui, sans-serif; }
.cp2-ip-wrap { display: flex; align-items: center; gap: 6px; }
.cp2-ip-track { width: 60px; height: 5px; background: rgba(255,255,255,0.08); border-radius: 3px; }
.cp2-ip-fill { height: 5px; border-radius: 3px; background: var(--purple-accent); transition: width 0.3s; }
.cp2-ip-text { font-size: 10px; color: var(--purple-accent); font-weight: 600; }

.cp2-grid { display: grid; grid-template-columns: 420px 1fr; gap: 0; height: calc(100vh - 115px); overflow: hidden; }
.cp2-left { overflow-y: auto; background: #fff; border-right: 1px solid var(--border); }
.cp2-right-area { display: flex; flex-direction: column; overflow: hidden; background: var(--bg-secondary); position: relative; }
#cp2-map-view { overflow-y: auto; padding: 0; }
.cp2-center { flex: 1; overflow-y: auto; padding: 12px 16px; }
.cp2-right { padding: 0 10px 10px; }

.cp2-block { background: #fff; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.cp2-bh { padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.cp2-bh:hover { background: var(--bg-secondary); }
.cp2-arrow { font-size: 10px; color: var(--text-tertiary); }
.cp2-body { display: none; padding: 0 12px 10px; }
.cp2-body.open { display: block; }

.cp2-sl { margin-bottom: 10px; }
.cp2-sl:last-of-type { margin-bottom: 6px; }
.cp2-sl-top { display: flex; justify-content: space-between; margin-bottom: 2px; }
.cp2-sl-name { font-size: 12px; color: var(--text-secondary); }
.cp2-sl-val { font-size: 13px; font-weight: 700; color: var(--arctic-cyan); }
.cp2-sl-hint { font-size: 10px; color: var(--text-tertiary); margin-bottom: 3px; }
.cp2-slider { width: 100%; height: 4px; background: var(--border); border-radius: 2px; outline: none; -webkit-appearance: none; cursor: pointer; }
.cp2-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--arctic-cyan); cursor: pointer; border: 2px solid #fff; box-shadow: 0 0 0 2px var(--arctic-cyan); }

/* ═══ v3 Strategic Sliders — block header with summary ═══ */
.cp2-bh-ico { font-size: 14px; flex-shrink: 0; }
.cp2-bh-title { flex: 1; font-weight: 700; font-size: 12px; }
.cp2-bh-sum { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; margin-right: 6px; }

/* Slider tradeoff pills */
.cp2-sl-trade { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 3px; }
.cp2-sl-t { font-size: 9px; padding: 1px 5px; border-radius: 3px; font-weight: 600; line-height: 1.4; }
.cp2-sl-t.up { background: #eaf3de; color: #1a7a3b; }
.cp2-sl-t.dn { background: #fcebeb; color: #b91c1c; }
.cp2-sl-t.n  { background: #eaeff6; color: #8294ad; }

/* Dev-budget strip (between expense and projects) */
.cp2-slider-intro { padding: 10px 14px; margin-bottom: 8px; background: #f5f7fb; border: 1px solid var(--border); border-radius: 8px; font-size: 11px; color: #3d4f6b; line-height: 1.5; }
.cp2-slider-intro strong { color: #185fa5; }
.dev-strip { padding: 10px 14px; background: linear-gradient(135deg, #e6f1fb, #eeedfe); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; transition: background .25s; }
.dev-strip.deficit { background: linear-gradient(135deg, #fcebeb, #fdecea); border-color: #f5b8b8; }
.dev-strip.deficit .dev-val { color: #b91c1c !important; }
.dev-strip.deficit .dev-label { color: #7a1a1a; }
.dev-warn { width: 100%; font-size: 11px; color: #7a1a1a; margin-top: 4px; line-height: 1.4; font-weight: 600; }
.cp2-add-init.disabled { opacity: 0.5; pointer-events: none; cursor: not-allowed; }
.dev-strip .dev-label { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: #0c447c; font-weight: 700; flex-shrink: 0; }
.dev-strip .dev-val { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; color: #0c447c; }
.dev-strip .dev-val.pos { color: #1a7a3b; }
.dev-strip .dev-val.neg { color: #b91c1c; }
.dev-strip .dev-unit { font-size: 10px; color: #8294ad; }
.dev-strip .dev-bar { flex: 1; min-width: 60px; max-width: 120px; height: 6px; background: #eaeff6; border-radius: 3px; overflow: hidden; margin-left: auto; }
.dev-strip .dev-bar-seg { height: 100%; border-radius: 3px; transition: width .25s, background .25s; }
.dev-strip .dev-pct { font-size: 9px; color: #8294ad; flex-shrink: 0; }

/* Project filter pills */
.pj-filter { display: flex; gap: 4px; margin-bottom: 8px; }
.pj-filter .pf { padding: 3px 10px; border: 1px solid var(--border); border-radius: 12px; font-size: 10px; font-weight: 600; cursor: pointer; background: #fff; color: #3d4f6b; font-family: inherit; transition: all .12s; }
.pj-filter .pf:hover { border-color: #185fa5; color: #185fa5; }
.pj-filter .pf.a { background: #185fa5; color: #fff; border-color: #185fa5; }

/* Project card (compact, in left panel) */
.pj { display: flex; align-items: flex-start; gap: 8px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 4px; cursor: pointer; transition: all .12s; background: #fff; }
.pj:hover { border-color: #c5cfde; background: #f0f4fa; }
.pj.on { border-color: #1a7a3b; background: #eaf3de; }
.pj.over { opacity: .5; }

.pj-chk { width: 15px; height: 15px; border: 2px solid #c5cfde; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 9px; color: transparent; flex-shrink: 0; margin-top: 1px; font-weight: 700; line-height: 1; }
.pj.on .pj-chk { background: #1a7a3b; border-color: #1a7a3b; color: #fff; }

.pj-body { flex: 1; min-width: 0; }
.pj-row1 { display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }
.pj-name { font-size: 11px; font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #0f1923; }
.pj-cost { font-size: 10px; font-weight: 700; color: #7a4f00; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.pj-row2 { display: flex; gap: 3px; flex-wrap: wrap; }
.pj-tag { font-size: 8px; padding: 1px 4px; border-radius: 2px; font-weight: 700; line-height: 1.4; }
.pj-tag.G { background: #e6f1fb; color: #185fa5; }
.pj-tag.S { background: #eeedfe; color: #5b4fcf; }
.pj-tag.E { background: #eaf3de; color: #1a7a3b; }
.pj-ef { font-size: 8px; padding: 1px 4px; border-radius: 2px; font-weight: 600; line-height: 1.4; }
.pj-ef.pos { background: #eaf3de; color: #1a7a3b; }
.pj-ef.neg { background: #fcebeb; color: #b91c1c; }

.pj-add { width: 100%; padding: 6px; border: 1px dashed #c5cfde; border-radius: 6px; font-size: 10px; color: #8294ad; cursor: pointer; background: #fff; text-align: center; margin-top: 4px; font-family: inherit; transition: all .12s; }
.pj-add:hover { border-color: #185fa5; color: #185fa5; }

/* "+ Добавить свой проект" — сверху списка, в пурпурной гамме как .cp2-add-init */
.cp2-add-proj { width: 100%; margin: 0 0 8px 0; padding: 8px; }

/* ═══ PROJECT CONFIG DRAWER (right-side) ═══ */
.cp-pd-overlay { position: fixed; inset: 0; background: rgba(15,25,35,.35); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 9998; }
.cp-pd-overlay.visible { opacity: 1; pointer-events: auto; }
.cp-proj-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 92vw; background: #fff; box-shadow: -8px 0 28px rgba(15,25,35,.18); transform: translateX(100%); transition: transform .28s cubic-bezier(.22,.72,.36,1); z-index: 9999; display: flex; flex-direction: column; font-family: -apple-system, 'Inter', system-ui, sans-serif; }
.cp-proj-drawer.visible { transform: translateX(0); }

.cp-pd-header { padding: 18px 20px 14px; border-bottom: 1px solid #dde3ee; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-shrink: 0; background: linear-gradient(135deg, #eeedfe 0%, #e6f1fb 100%); }
.cp-pd-title-wrap { flex: 1; min-width: 0; }
.cp-pd-title { font-size: 16px; font-weight: 700; color: #0f1923; margin-bottom: 2px; }
.cp-pd-sub { font-size: 11px; color: #8294ad; }
.cp-pd-close { width: 30px; height: 30px; border: none; background: #fff; color: #3d4f6b; border-radius: 6px; font-size: 20px; cursor: pointer; font-family: inherit; line-height: 1; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .12s; }
.cp-pd-close:hover { background: #fcebeb; color: #b91c1c; }

.cp-pd-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cp-pd-group { margin-bottom: 14px; }
.cp-pd-group label { display: block; font-size: 11px; font-weight: 600; color: #3d4f6b; margin-bottom: 5px; }
.cp-pd-hint-inline { font-weight: 400; color: #8294ad; margin-left: 6px; font-size: 10px; }
.cp-pd-group input[type="text"], .cp-pd-group input[type="number"] { width: 100%; padding: 8px 10px; border: 1px solid #dde3ee; border-radius: 6px; font-size: 13px; color: #0f1923; font-family: inherit; outline: none; transition: border-color .12s; box-sizing: border-box; }
.cp-pd-group input:focus { border-color: #534ab7; box-shadow: 0 0 0 3px rgba(83,74,183,.12); }

.cp-pd-row { display: flex; gap: 10px; }

/* Domain picker */
.cp-pd-domain { display: flex; gap: 6px; }
.cp-pd-dom { flex: 1; padding: 8px 6px; border: 1px solid #dde3ee; background: #fff; border-radius: 6px; font-size: 11px; font-weight: 600; color: #3d4f6b; cursor: pointer; font-family: inherit; transition: all .12s; text-align: center; }
.cp-pd-dom:hover { border-color: #c5cfde; }
.cp-pd-dom.g.active { background: #e6f1fb; color: #185fa5; border-color: #185fa5; }
.cp-pd-dom.s.active { background: #eeedfe; color: #5b4fcf; border-color: #5b4fcf; }
.cp-pd-dom.e.active { background: #eaf3de; color: #1a7a3b; border-color: #1a7a3b; }

/* Cost preview */
.cp-pd-cost-preview { font-size: 11px; color: #3d4f6b; background: #eaf3de; padding: 8px 10px; border-radius: 6px; margin-bottom: 14px; border-left: 3px solid #1a7a3b; }
.cp-pd-cost-preview.over { background: #fcebeb; color: #b91c1c; border-left-color: #b91c1c; font-weight: 600; }

/* Effects grid */
.cp-pd-effects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cp-pd-eff { display: flex; flex-direction: column; }
.cp-pd-eff label { font-size: 10px; color: #3d4f6b; margin-bottom: 3px; display: flex; align-items: baseline; gap: 4px; font-weight: 500; }
.cp-pd-eff-hint { font-size: 9px; color: #8294ad; font-weight: 400; margin-left: auto; }
.cp-pd-eff input { padding: 5px 7px; border: 1px solid #dde3ee; border-radius: 4px; font-size: 11px; font-family: inherit; outline: none; color: #0f1923; }
.cp-pd-eff input:focus { border-color: #534ab7; }

/* Footer actions */
.cp-pd-actions { padding: 14px 20px; border-top: 1px solid #dde3ee; display: flex; gap: 8px; justify-content: flex-end; flex-shrink: 0; background: #f5f7fb; }
.cp-pd-cancel, .cp-pd-save { padding: 9px 18px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; border: 1px solid transparent; transition: all .12s; }
.cp-pd-cancel { background: #fff; color: #3d4f6b; border-color: #dde3ee; }
.cp-pd-cancel:hover { background: #f0f4fa; }
.cp-pd-save { background: #534ab7; color: #fff; border-color: #534ab7; }
.cp-pd-save:hover { background: #3d3495; }

@media (max-width: 560px) {
  .cp-proj-drawer { width: 100vw; }
  .cp-pd-effects { grid-template-columns: 1fr; }
}

.cp2-init-area { padding-top: 6px; border-top: 1px solid var(--border); }
.cp2-init-card { display: flex; justify-content: space-between; align-items: center; padding: 5px 8px; background: #e8f0fb; border: 1px solid rgba(24,95,165,.15); border-radius: 6px; margin-bottom: 4px; font-size: 10px; }
.cp2-ic-name { color: var(--text-primary); flex: 1; }
.cp2-ic-ip { color: var(--purple-accent); font-weight: 600; font-size: 9px; flex-shrink: 0; }
.cp2-add-init{display:flex;align-items:center;justify-content:center;gap:5px;width:calc(100% - 20px);margin:4px 10px 10px;padding:7px;border-radius:6px;border:1px dashed var(--border2,#c5cfde);background:transparent;font-size:12px;font-weight:500;color:#534ab7;cursor:pointer;font-family:inherit;transition:all .13s}
.cp2-add-init:hover{background:#ededfc;border-color:#afa9ec}

.cp2-section { margin-bottom: 14px; }
.cp2-sec-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cp2-sec-pill { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.cp2-sec-weight { font-size: 10px; color: var(--text-tertiary); }

.cp2-cards-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 6px; }
.cp2-card { background: var(--bg-secondary); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; padding: 10px; }
.cp2-c-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.cp2-c-title { font-size: 10px; color: var(--text-secondary); line-height: 1.3; flex: 1; }
.cp2-c-sdg { font-size: 8px; color: var(--text-tertiary); background: var(--bg-card); padding: 1px 4px; border-radius: 3px; flex-shrink: 0; }
.cp2-c-val { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.cp2-c-unit { font-size: 10px; font-weight: 400; color: var(--text-tertiary); }
.cp2-c-chart { margin-bottom: 4px; }
.cp2-spark { width: 100%; height: 40px; display: block; }
.cp2-c-bottom { display: flex; justify-content: space-between; font-size: 10px; }
.cp2-c-vs { color: var(--text-tertiary); }
.cp2-c-target { font-size: 9px; color: var(--warning-amber); margin-top: 3px; }

.cp2-indirect-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; margin-bottom: 8px; }
.cp2-ind-chip { display: flex; align-items: center; gap: 4px; padding: 3px 8px; background: var(--bg-card); border-radius: 12px; font-size: 9px; border: 1px solid rgba(255,255,255,0.06); }
.cp2-ind-name { color: var(--text-tertiary); }
.cp2-ind-val { color: var(--text-primary); font-weight: 600; font-family: -apple-system, 'Inter', system-ui, sans-serif; }
.cp2-ind-acc { color: var(--text-tertiary); font-size: 7px; letter-spacing: -1px; }

.cp2-r-ics { text-align: center; padding: 12px; background: var(--bg-secondary); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; margin-bottom: 10px; }
.cp2-r-title { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.cp2-r-big { font-size: 36px; font-weight: 700; color: var(--arctic-cyan); line-height: 1; }
.cp2-r-sub { font-size: 10px; color: var(--text-tertiary); }
.cp2-r-delta { font-size: 11px; font-weight: 600; margin-top: 4px; }
.cp2-r-dims { margin-bottom: 10px; }
.cp2-r-dim { margin-bottom: 8px; }
.cp2-r-dim-head { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 3px; }
.cp2-r-dim-head span:first-child { color: var(--text-secondary); }
.cp2-r-dim-head span:last-child { color: var(--text-primary); font-weight: 600; }
.cp2-r-dim-track { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; }
.cp2-r-dim-fill { height: 4px; border-radius: 2px; }
.cp2-r-dim-delta { font-size: 9px; font-weight: 600; margin-top: 2px; }
.cp2-r-budget { background: var(--bg-secondary); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; padding: 10px; }
.cp2-r-brow { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-secondary); padding: 3px 0; }
.cp2-r-brow-total { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 6px; margin-top: 3px; font-weight: 600; color: var(--text-primary); }
.cp2-proj-summary { font-size: 11px; color: var(--text-tertiary); padding: 8px 0; }
.cp2-proj-list { display: flex; flex-direction: column; gap: 3px; }
.cp2-proj-item { display: flex; justify-content: space-between; font-size: 10px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.cp2-proj-item span:first-child { color: var(--text-secondary); }
.cp2-proj-capex { color: var(--arctic-cyan); font-family: -apple-system, 'Inter', system-ui, sans-serif; font-size: 10px; }
.cp2-proj-more { font-size: 9px; color: var(--text-tertiary); padding-top: 4px; }

/* Admin params editor */
.cp-ap-block { margin-bottom: 16px; }
.cp-ap-block-title { font-size: 12px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.cp-ap-sub { font-size: 10px; color: var(--text-tertiary); margin: 8px 0 4px; }
.cp-ap-table { width: 100%; border-collapse: collapse; font-size: 11px; margin-bottom: 4px; }
.cp-ap-table th { text-align: left; color: var(--text-tertiary); font-weight: 500; padding: 4px 6px; font-size: 10px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.cp-ap-table td { padding: 3px 6px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.cp-ap-name { color: var(--text-secondary); white-space: nowrap; }
.cp-ap-unit { color: var(--text-tertiary); font-size: 9px; }
.cp-ap-input { width: 90px; background: var(--bg-card); border: 1px solid rgba(255,255,255,0.1); border-radius: 4px; padding: 3px 6px; color: var(--text-primary); font-size: 11px; font-family: -apple-system, 'Inter', system-ui, sans-serif; }
.cp-ap-input:focus { border-color: var(--arctic-cyan); outline: none; }
.cp-ap-wide { width: 140px; }
.cp-ap-select { background: var(--bg-card); border: 1px solid rgba(255,255,255,0.1); border-radius: 4px; padding: 3px 6px; color: var(--text-primary); font-size: 10px; }

/* ICS Strip — fixed header inside right-area flex column */
.cp-ics-strip { background: #fff; border-bottom: 1px solid var(--border); padding: 8px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 0; flex-shrink: 0; z-index: 90; box-shadow: var(--shadow); }
@media (max-width: 1400px) {
  .cp-ics-strip { font-size: 11px; padding: 6px 10px; }
  .cp-ics-num   { font-size: 22px !important; }
  .cp-bbv       { font-size: 14px !important; }
  .cp-bbl       { font-size: 10px !important; }
  .cp-budget-strip { display: none !important; }
}
@media (max-width: 1100px) {
  .cp-ics-strip .cp-isep:nth-of-type(2) { display: none; }
}
.cp-ics-main { text-align: center; min-width: 120px; flex-shrink: 0; padding: 4px 14px 4px 0; border-right: 1px solid var(--border); margin-right: 10px; display:flex;flex-direction:column;justify-content:center; }
.cp-ics-lbl { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .4px; }
.cp-ics-num { font-size: 36px; font-weight: 800; line-height: 1; letter-spacing: -1.5px; }
.cp-ics-sub { font-size: 10px; color: var(--text-tertiary); margin-top: 2px; }
.cp-ics-dt { font-size: 11px; font-weight: 700; margin-top: 3px; display:inline-flex;align-items:center;gap:2px;padding:2px 8px;border-radius:20px; }
.cp-isep { width: 1px; background: var(--border); align-self: stretch; flex-shrink: 0; margin: 0 8px; }
.cp-blocks-row { display: flex; gap: 8px; flex: 1; margin-left: 8px; }
.cp-bb { flex: 1; border-radius: 8px; padding: 8px 12px; border: 1px solid var(--border); background: var(--bg-secondary); display:flex;flex-direction:column; }
.cp-bbl { font-size: 10px; font-weight: 600; margin-bottom: 2px; text-transform: uppercase; letter-spacing: .3px; }
.cp-bbv { font-size: 24px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.cp-bbd { font-size: 11px; font-weight: 600; margin-top: 2px; }
.cp-bbbar { height: 3px; background: var(--bg-tertiary); border-radius: 2px; margin-top: 5px; }
.cp-bbfill { height: 3px; border-radius: 2px; transition: width .4s; }
.cp-ics-note { display: none; }
/* Budget strip in ICS bar */
.cp-budget-strip { display: flex; flex-direction:column; gap: 3px; justify-content:center; min-width:120px; padding: 0 8px; }
.cp-bs-item { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.cp-bs-lbl { font-size: 11px; color: var(--text-secondary); }
.cp-bs-val { font-size: 13px; font-weight: 700; }
.cp-dg { color: #1a7a3b; }
.cp-dr { color: #c0392b; }
/* Sub-indicator dots inside G/S/E blocks */
.cp-bb-dots { display: flex; align-items: center; gap: 6px; margin-top: 3px; flex-wrap: wrap; }
.cp-bb-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cp-bb-dot-lbl { font-size: 8px; color: var(--text-tertiary); margin-right: 4px; }

/* Legend */
.cp-legend { display: flex; gap: 12px; font-size: 10px; color: var(--text-tertiary); margin-bottom: 10px; flex-wrap: wrap; align-items: center; padding:8px 0; }
.cp-leg-item { display: flex; align-items: center; gap: 4px; }
.cp-leg-bar { width: 14px; height: 8px; background: var(--bg-tertiary); border: .5px solid #185fa5; border-radius: 2px; }
.cp-leg-line { width: 14px; height: 2px; border-radius: 1px; background: #185fa5; }
.cp-leg-dash { width: 14px; height: 0; border-top: 1.5px dashed var(--text-tertiary); }
.cp-leg-target { width: 14px; height: 0; border-top: 1px dashed #d35400; }
.cp-leg-hint { color: var(--text-tertiary); font-size: 10px; }

/* Chart sections (expandable) */
.cp-cs { margin-bottom: 12px; background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.cp-cs-hdr { padding: 12px 16px; display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; border-bottom: 1px solid var(--border); }
.cp-cs-hdr:hover { background: var(--bg-secondary); }
.cp-cs-pill { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; flex-shrink: 0; }
.cp-cs-idx { font-size: 18px; font-weight: 800; letter-spacing: -1px; }
.cp-cs-sub { font-size: 11px; color: var(--text-tertiary); flex: 1; margin-left: 4px; }
.cp-cs-count { font-size: 10px; color: var(--text-secondary); background: var(--bg-tertiary); padding: 2px 8px; border-radius: 12px; cursor: pointer; }
.cp-cs-arrow { font-size: 11px; color: var(--text-tertiary); transition: transform .15s; margin-left: 4px; }
.cp-cs-arrow.open { transform: rotate(90deg); }
.cp-cs-body { padding: 0; }

/* OLD chart cards — replaced by table (kept for reference)
.cp-chart-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.cp-chart-card { background: #0d1117; border: 1px solid #30363d; border-radius: 7px; padding: 6px 7px; }
.cp-cc-name { font-size: 9px; font-weight: 500; color: #c9d1d9; margin-bottom: 2px; line-height: 1.2; }
.cp-cc-vals { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3px; }
.cp-cc-num { font-size: 16px; font-weight: 700; font-family: -apple-system, 'Inter', system-ui, sans-serif; }
.cp-cc-unit { font-size: 8px; color: #6e7681; }
.cp-cc-dir { font-size: 9px; font-weight: 500; }
.cp-cc-target { font-size: 8px; color: #f0883e; margin-top: 2px; }
.cp-svg-chart { width: 100%; height: auto; display: block; }
*/

/* Indirect indicators */
.cp-ind-section { border-top: 0.5px solid #21262d; }
.cp-ind-section-hdr {
  padding: 8px 16px;
  font-size: 11px;
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-secondary);
  user-select: none;
}
.cp-ind-section-hdr:hover { color: var(--text-secondary); background: var(--bg-tertiary); }
.cp-ind-caret {
  font-size: 9px;
  transition: transform .15s;
  display: inline-block;
}
.cp-ind-caret.cp-caret-open { transform: rotate(90deg); }
.cp-ind-header { font-size: 9px; color: #6e7681; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.cp-ind-header::after { content: ''; flex: 1; height: 1px; background: #21262d; }
.cp-ind-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.cp-ind-card { background: #0d1117; border: 1px solid #21262d; border-radius: 6px; padding: 6px 7px; }
.cp-ind-name { font-size: 9px; font-weight: 500; color: #c9d1d9; margin-bottom: 2px; line-height: 1.3; }
.cp-ind-sdg { font-size: 8px; color: #484f58; margin-bottom: 3px; }
.cp-ind-val { font-size: 13px; font-weight: 500; font-family: -apple-system, 'Inter', system-ui, sans-serif; }
.cp-ind-unit { font-size: 8px; color: #6e7681; }
.cp-ind-formula { font-size: 8px; color: #484f58; line-height: 1.3; margin-bottom: 4px; font-family: -apple-system, 'Inter', system-ui, sans-serif; }
.cp-ind-bar { height: 3px; background: #21262d; border-radius: 2px; margin-bottom: 3px; }
.cp-ind-bar-fill { height: 3px; border-radius: 2px; transition: width .4s; }
.cp-ind-bottom { display: flex; justify-content: space-between; align-items: center; }
.cp-ind-score { font-size: 8px; color: #6e7681; }
.cp-ind-acc { font-size: 8px; padding: 1px 5px; border-radius: 4px; font-weight: 500; }
.cp-acc-hi { background: #091409; color: #3fb950; }
.cp-acc-mid { background: #1a1008; color: #f0883e; }
.cp-acc-lo { background: #1a0a0a; color: #f85149; }

/* Initiative modal */
.cp-init-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; }
.cp-im-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.cp-im-panel { position: relative; z-index: 1; width: 460px; max-height: 90vh; overflow-y: auto; background: #161b22; border: 1px solid #30363d; border-radius: 10px; }
.cp-im-header { padding: 10px 14px; background: #1c2128; border-bottom: 1px solid #30363d; display: flex; justify-content: space-between; align-items: center; }
.cp-im-title { font-size: 13px; font-weight: 600; color: #e6edf3; }
.cp-im-close { width: 22px; height: 22px; border: 1px solid #30363d; border-radius: 5px; background: transparent; color: #8b949e; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cp-im-section { padding: 10px 14px; border-bottom: 1px solid #21262d; }
.cp-im-label { font-size: 9px; color: #6e7681; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px; }
.cp-im-desc { width: 100%; background: #0d1117; border: 1px solid #30363d; border-radius: 6px; padding: 7px 9px; color: #c9d1d9; font-size: 11px; font-family: inherit; resize: none; outline: none; }
.cp-im-desc:focus { border-color: #58a6ff; }
.cp-im-effects { display: flex; flex-direction: column; gap: 6px; }
.cp-im-ef { display: grid; grid-template-columns: 100px 1fr 40px; align-items: center; gap: 6px; }
.cp-im-ef span:first-child { font-size: 10px; color: #8b949e; }
.cp-im-ef input[type=range] { width: 100%; }
.cp-im-ev { font-size: 11px; font-weight: 600; text-align: right; font-family: -apple-system, 'Inter', system-ui, sans-serif; }
.cp-im-cost-bar { padding: 8px 14px; background: #1c2128; border-bottom: 1px solid #21262d; }
.cp-im-cost { font-size: 12px; font-weight: 600; color: #a371f7; }
.cp-im-ai-btn { width: 100%; padding: 8px; background: #1c2128; border: 1px solid #30363d; border-radius: 7px; color: #a371f7; font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; }
.cp-im-ai-btn:hover { background: #21262d; }
.cp-im-score { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.cp-im-crit { display: flex; justify-content: space-between; font-size: 10px; color: #8b949e; padding: 2px 0; }
.cp-im-stars { color: #e3b341; letter-spacing: -1px; }
.cp-im-comment { font-size: 10px; color: #8b949e; background: #0d1117; border-radius: 5px; padding: 6px 8px; margin-top: 6px; line-height: 1.5; border-left: 2px solid #e3b341; }
.cp-im-footer { padding: 10px 14px; display: flex; gap: 8px; }
.cp-im-cancel { flex: 1; padding: 7px; border: 1px solid #30363d; border-radius: 6px; background: transparent; color: #8b949e; font-size: 11px; cursor: pointer; font-family: inherit; }
.cp-im-save { flex: 2; padding: 7px; background: #1f6feb; border: none; border-radius: 6px; color: #fff; font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; }
.cp-im-save:disabled { opacity: .4; cursor: not-allowed; }

/* Initiative modal — scale & block selectors */
.cp-im-scale { display: flex; flex-direction: column; gap: 4px; }
.cp-im-scale-opt { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 0; }
.cp-im-scale-opt input[type=radio] { accent-color: #58a6ff; margin: 0; }
.cp-im-sc-chip { font-size: 11px; font-weight: 600; color: #e6edf3; min-width: 110px; }
.cp-im-sc-hint { font-size: 9px; color: #6e7681; }
.cp-im-blocks { display: flex; gap: 6px; }
.cp-im-block-opt { cursor: pointer; }
.cp-im-block-opt input[type=radio] { display: none; }
.cp-im-bl-chip { display: inline-block; padding: 6px 14px; border-radius: 8px; font-size: 11px; font-weight: 600; border: 1px solid; transition: all .15s; }
.cp-im-block-opt input:checked + .cp-im-bl-chip { box-shadow: 0 0 0 2px rgba(88,166,255,0.4); }
.cp-im-effects-display { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.cp-im-pill { font-size: 10px; padding: 2px 8px; border-radius: 10px; border: 1px solid; font-family: -apple-system, 'Inter', system-ui, sans-serif; }
.cp-im-score-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cp-im-score { font-size: 18px; font-weight: 700; }
.cp-im-verdict { font-size: 12px; font-weight: 600; }
.cp-im-source-tag { font-size: 8px; padding: 1px 6px; border-radius: 4px; background: #21262d; color: #6e7681; }
.cp-im-ai-tag { background: #0d1a2d; color: #58a6ff; }

/* ── Revenue blocks: federal info rows ── */
.cp2-info-row { display:flex;align-items:center;justify-content:space-between;padding:6px 0;border-bottom:.5px solid rgba(255,255,255,0.05);gap:8px;cursor:help; }
.cp2-info-name { font-size:11px;color:var(--text-secondary);flex:1; }
.cp2-info-val { font-size:12px;font-weight:600;color:var(--text-tertiary);min-width:40px;text-align:right; }
.cp2-info-lock { font-size:9px;color:var(--text-tertiary);background:rgba(255,255,255,0.05);padding:2px 5px;border-radius:4px;white-space:nowrap;opacity:.7; }
.cp2-info-row:hover .cp2-info-lock { opacity:1;color:var(--warning-amber); }

/* ══ INDICATORS TABLE REDESIGN ══════════════════════════ */

/* Table wrapper */
.cp-ind-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.cp-ind-table thead tr {
  border-bottom: 1px solid var(--border);
}
.cp-ind-table th {
  padding: 8px 14px;
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: left;
  font-weight: 500;
  letter-spacing: .4px;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--bg-secondary);
}

/* Status dot */
.cp-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* Data rows */
.cp-ind-row {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.cp-ind-row:hover { background: var(--bg-secondary); }
.cp-ind-row.cp-row-expanded { background: #e8f0fb; }
.cp-ind-row td { padding: 10px 14px; vertical-align: middle; }

.cp-ind-row-name {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}
.cp-ind-row-unit {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 1px;
}
.cp-ind-row-val {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -1px;
  text-align: right;
  white-space: nowrap;
  line-height: 1;
}
.cp-ind-row-delta {
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}
.cp-ind-row-prog {
  width: 110px;
  padding: 6px 12px 6px 8px;
}
.cp-ind-row-spark {
  width: 60px;
  text-align: right;
  padding: 6px 8px;
}

/* Progress bar */
.cp-prog-wrap {
  position: relative;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  margin-bottom: 3px;
}
.cp-prog-fill {
  height: 6px;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.cp-prog-target {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 12px;
  background: #d35400;
  border-radius: 1px;
  transform: translateX(-50%);
}
.cp-prog-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-tertiary);
}

/* Expanded chart row */
.cp-exp-row { background: var(--bg-tertiary); }
.cp-exp-inner {
  display: flex;
  gap: 14px;
  padding: 12px 14px 16px;
}
.cp-exp-stats {
  flex-shrink: 0;
  width: 120px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cp-exp-stat {
  background: #fff;
  border-radius: 6px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.cp-exp-stat span {
  font-size: 9px;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}
.cp-exp-stat strong {
  font-size: 13px;
  font-family: -apple-system, 'Inter', system-ui, sans-serif;
  font-weight: 500;
}

/* Indirect cards (compact 4-column grid) */
.cp-ind-grid-sm {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 8px 10px;
}
.cp-ind-sm-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
}
.cp-ind-sm-name {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-bottom: 3px;
  line-height: 1.2;
}
.cp-ind-sm-val {
  font-size: 14px;
  font-weight: 500;
  font-family: -apple-system, 'Inter', system-ui, sans-serif;
}
.cp-ind-sm-unit {
  font-size: 8px;
  color: #484f58;
}

/* ══ POLITICAL CAPITAL v2 ════════════════════════════════ */
.cp-pk-block{padding:4px 10px;min-width:110px;cursor:pointer;transition:background .15s;display:flex;flex-direction:column;justify-content:center;gap:2px}
.cp-pk-block:hover{background:var(--bg-hover,#f0f4fa)}
.cp-pk-lbl{font-size:9px;color:var(--text-tertiary,#8294ad);text-transform:uppercase;letter-spacing:.4px}
.cp-pk-row{display:flex;align-items:baseline;gap:5px}
.cp-pk-num{font-size:20px;font-weight:800;line-height:1;font-variant-numeric:tabular-nums}
.cp-pk-pill{font-size:9px;padding:2px 6px;border-radius:4px;font-weight:600}
.cp-pk-dots{display:flex;gap:3px;align-items:center;margin-top:2px}
.cp-pk-hint{font-size:8px;color:var(--text-tertiary,#8294ad)}
.cp-pk-impact-dots{display:flex;gap:2px;align-items:center;flex-shrink:0}

/* ══ POLITRATING DASHBOARD v2.1 (новая аналитика) ═══════ */
.pr-root { padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #f5f7fb; }
.pr-overall { background: #fff; border: 1px solid #dde3ee; border-radius: 10px; padding: 16px 20px; box-shadow: 0 1px 4px rgba(15,25,35,.08); display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.pr-ov-score { text-align: center; flex-shrink: 0; }
.pr-ov-val { font-size: 42px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.pr-ov-lbl { font-size: 10px; color: #8294ad; text-transform: uppercase; letter-spacing: .5px; margin-top: 4px; }
.pr-ov-delta { font-size: 13px; font-weight: 700; margin-top: 4px; }
.pr-ov-gauge { flex: 1; min-width: 220px; max-width: 320px; }
.pr-ov-gauge-bar { height: 10px; background: #eaeff6; border-radius: 5px; overflow: hidden; }
.pr-ov-gauge-fill { height: 100%; border-radius: 5px; transition: width .5s; }
.pr-ov-gauge-zones { display: flex; justify-content: space-between; font-size: 9px; color: #8294ad; margin-top: 4px; }
.pr-ov-status { padding: 6px 14px; border-radius: 10px; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.pr-ov-status.stable { background: #eaf3de; color: #1a7a3b; }
.pr-ov-status.risk   { background: #faeeda; color: #7a4f00; }
.pr-ov-status.crisis { background: #fcebeb; color: #b91c1c; }
.pr-ov-summary { flex: 1 1 220px; font-size: 12px; color: #3d4f6b; line-height: 1.6; }

.pr-ai { padding: 10px 14px; background: #eeedfe; border-radius: 10px; font-size: 11px; color: #5b4fcf; display: flex; gap: 8px; line-height: 1.6; }
.pr-ai strong { color: #0f1923; }

.pr-grid-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pr-stk { background: #fff; border: 1px solid #dde3ee; border-radius: 10px; padding: 12px 14px; box-shadow: 0 1px 4px rgba(15,25,35,.08); }
.pr-stk-hdr { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pr-stk-ico { font-size: 18px; }
.pr-stk-name { font-size: 12px; font-weight: 700; flex: 1; min-width: 0; }
.pr-stk-weight { font-size: 10px; color: #8294ad; font-weight: 600; }
.pr-stk-score { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.pr-stk-delta { font-size: 11px; font-weight: 700; }
.pr-stk-bar { height: 5px; background: #eaeff6; border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.pr-stk-bar-fill { height: 100%; border-radius: 3px; transition: width .4s; }
.pr-stk-drivers { margin-bottom: 6px; }
.pr-stk-drv-title { font-size: 9px; font-weight: 700; color: #8294ad; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 4px; }
.pr-stk-drv { display: flex; align-items: center; gap: 6px; padding: 2px 0; font-size: 11px; }
.pr-stk-drv-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #3d4f6b; }
.pr-stk-drv-bar { width: 60px; height: 4px; background: #eaeff6; border-radius: 2px; overflow: hidden; flex-shrink: 0; }
.pr-stk-drv-fill { height: 100%; border-radius: 2px; }
.pr-stk-drv-val { font-size: 10px; font-weight: 700; width: 38px; text-align: right; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.pr-stk-risk { padding: 5px 8px; border-radius: 6px; font-size: 10px; display: flex; align-items: center; gap: 4px; margin-top: 6px; line-height: 1.4; }
.pr-stk-risk.ok     { background: #eaf3de; color: #1a7a3b; }
.pr-stk-risk.warn   { background: #faeeda; color: #7a4f00; }
.pr-stk-risk.danger { background: #fcebeb; color: #b91c1c; }

.pr-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pr-sens, .pr-thresh { background: #fff; border: 1px solid #dde3ee; border-radius: 10px; padding: 12px 14px; box-shadow: 0 1px 4px rgba(15,25,35,.08); }
.pr-sens-title, .pr-thresh-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.pr-sens-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #eaeff6; font-size: 11px; }
.pr-sens-row:last-child { border-bottom: none; }
.pr-sens-action { flex: 1; font-weight: 600; color: #0f1923; min-width: 0; }
.pr-sens-effects { display: flex; gap: 3px; flex-wrap: wrap; }
.pr-sens-eff { font-size: 9px; padding: 1px 6px; border-radius: 3px; font-weight: 600; white-space: nowrap; }
.pr-sens-eff.up { background: #eaf3de; color: #1a7a3b; }
.pr-sens-eff.dn { background: #fcebeb; color: #b91c1c; }
.pr-sens-net { font-size: 12px; font-weight: 700; width: 50px; text-align: right; font-variant-numeric: tabular-nums; flex-shrink: 0; }

.pr-thresh-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 11px; border-bottom: 1px solid #eaeff6; }
.pr-thresh-item:last-child { border-bottom: none; }
.pr-thresh-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pr-thresh-dot.green { background: #1a7a3b; }
.pr-thresh-dot.amber { background: #f59e0b; }
.pr-thresh-dot.red   { background: #b91c1c; }
.pr-thresh-cond { flex: 1; min-width: 0; color: #3d4f6b; }
.pr-thresh-effect { font-weight: 700; font-size: 10px; white-space: nowrap; }
.pr-thresh-effect.pos { color: #1a7a3b; }
.pr-thresh-effect.neg { color: #b91c1c; }

@media (max-width: 820px) {
  .pr-grid-cards { grid-template-columns: 1fr; }
  .pr-grid2 { grid-template-columns: 1fr; }
}

/* ══ POLITICAL PANEL (full factor analysis) ═════════════ */
.cp-pk-panel{display:grid;grid-template-columns:1fr 1fr;height:100%;min-height:480px}
.cp-pk-left{border-right:1px solid #21262d;display:flex;flex-direction:column;overflow-y:auto}
.cp-pk-fa{display:flex;flex-direction:column;overflow-y:auto}
.cp-pk-hdr{padding:10px 14px;border-bottom:1px solid #21262d;display:flex;align-items:center;gap:12px}
.cp-pk-bar-bg{height:6px;background:#21262d;border-radius:3px;margin-bottom:4px;position:relative;overflow:visible}
.cp-pk-bar-fill{height:6px;border-radius:3px;transition:width .4s}
.cp-pk-zone-m{position:absolute;top:-3px;width:1.5px;height:12px;border-radius:1px}
.cp-pk-effects{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:8px 14px;border-bottom:1px solid #21262d}
.cp-pk-eff{background:#161b22;border-radius:5px;padding:6px 8px;border:0.5px solid #21262d}
.cp-pk-eff-lbl{font-size:8px;color:#484f58;margin-bottom:2px}
.cp-pk-eff-val{font-size:11px;font-weight:500}
.cp-pk-sh-list{flex:1;overflow-y:auto}
.cp-pk-sh-row{border-bottom:0.5px solid #21262d;cursor:pointer;transition:background .12s;padding:6px 14px}
.cp-pk-sh-row:hover{background:#1c2128}
.cp-pk-sh-sel{background:#0d1a2d;border-left:2px solid;padding-left:12px}
.cp-pk-fa-placeholder{flex:1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;color:#484f58;font-size:10px;padding:30px;text-align:center}
.cp-pk-fa-hdr{padding:10px 14px;border-bottom:1px solid #21262d;display:flex;align-items:center;gap:10px}
.cp-pk-fa-body{flex:1;overflow-y:auto;padding:10px 14px}
.cp-pk-fa-sec{font-size:8px;color:#484f58;text-transform:uppercase;letter-spacing:.4px;margin-bottom:7px;margin-top:12px;display:flex;align-items:center;gap:6px}
.cp-pk-fa-sec:first-child{margin-top:0}
.cp-pk-fa-sec::after{content:'';flex:1;height:0.5px;background:#21262d}
.cp-pk-wf-row{display:flex;align-items:center;gap:6px;margin-bottom:4px}
.cp-pk-wf-lbl{font-size:10px;color:#8294ad;width:125px;flex-shrink:0;text-align:right;line-height:1.2}
.cp-pk-wf-bars{flex:1;position:relative;height:14px}
.cp-pk-wf-val{font-size:10px;font-weight:500;width:32px;text-align:right;flex-shrink:0}
.cp-pk-wf-type{font-size:8px;color:#8294ad;width:36px;flex-shrink:0}
.cp-pk-fa-cards{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-bottom:4px}
.cp-pk-fa-card{background:#f5f7fb;border-radius:6px;padding:8px 10px;border:1px solid #dde3ee}
.cp-pk-fa-card-n{font-size:9px;color:#8294ad;margin-bottom:3px;line-height:1.2}

/* ══ LIGHT THEME PATCH — remaining dark elements ═══════════════ */

/* Left panel sliders */
.cp2-left { background: var(--bg-deep, #ffffff) !important; border-right: 1px solid #dde3ee !important; }

/* Chart section overrides */
.cp-cs { background: var(--bg-deep, #ffffff) !important; border: 1px solid #dde3ee !important; }
.cp-cs-hdr:hover { background: #f5f7fb !important; }
.cp-cs-body { background: var(--bg-deep, #ffffff) !important; }

/* Indirect cards */
.cp-ind-card { background: #f5f7fb !important; border: 1px solid #dde3ee !important; }
.cp-ind-name { color: #3d4f6b !important; }
.cp-ind-sdg { color: #8294ad !important; }
.cp-ind-score { color: #3d4f6b !important; }

/* Legend overrides */
.cp-legend { color: #8294ad !important; }
.cp-leg-hint { color: #8294ad !important; }
.cp-bbbar, .cp-ind-bar { background: #dde3ee !important; }

/* Prosperity tree */
#cp2-tree { background: var(--bg-secondary, #f5f7fb) !important; }
#cp2-tree-detail { background: var(--bg-deep, #ffffff) !important; border-top: 1px solid #dde3ee !important; color: var(--text-primary) !important; }

/* Initiative modal */
.cp-init-modal { background: rgba(0,0,0,0.45) !important; }
.cp-im-panel { background: var(--bg-deep, #ffffff) !important; border: 1px solid #dde3ee !important; color: var(--text-primary) !important; }
.cp-im-header { background: #185fa5 !important; color: #fff !important; }
.cp-im-title { color: #fff !important; }
.cp-im-desc { background: #f5f7fb !important; border: 1px solid #dde3ee !important; color: var(--text-primary) !important; }
.cp-im-desc::placeholder { color: #8294ad !important; }
.cp-im-cancel { background: #f5f7fb !important; border: 1px solid #dde3ee !important; color: #3d4f6b !important; }
.cp-im-save { background: #185fa5 !important; color: #ffffff !important; border: none !important; }
.cp-im-section { border-bottom: 1px solid #dde3ee !important; }
.cp-im-label { color: #3d4f6b !important; }
.cp-im-scale label, .cp-im-block label { color: #3d4f6b !important; }
.cp-im-comment { background: #f5f7fb !important; border-left: 2px solid #7a4f00 !important; color: #3d4f6b !important; }
.cp-im-score-row { color: var(--text-primary) !important; }
.cp-im-crit { color: #3d4f6b !important; }

/* Old modals */
.modal { background: var(--bg-deep, #ffffff) !important; border: 1px solid #dde3ee !important; color: var(--text-primary) !important; box-shadow: 0 8px 32px rgba(15,25,35,.14) !important; }
.modal-header { background: #185fa5 !important; color: #ffffff !important; }
.modal-title { color: #ffffff !important; }
.form-input, .form-select, .form-textarea { background: #f5f7fb !important; border: 1px solid #dde3ee !important; color: var(--text-primary) !important; }
.form-input::placeholder, .form-textarea::placeholder { color: #8294ad !important; }
.modal-overlay { background: rgba(0,0,0,0.45) !important; }

/* Budget cards */
.budget-summary-value.income { color: #1a7a3b !important; }
.budget-summary-value.expense { color: #7a4f00 !important; }
.budget-summary-value.balance { color: #185fa5 !important; }
.budget-summary-value.negative { color: #b91c1c !important; }

/* Old system cards */
.budget-bar-card, .budget-summary-card, .forecast-chart-container,
.income-structure, .credit-type-card, .credit-summary-panel,
.credit-item, .decision-log, .simulation-panel,
.agent-mini, .news-feed, .quick-stat, .chart-card {
  background: #f5f7fb !important; border: 1px solid #dde3ee !important; color: var(--text-primary) !important;
}

/* Buttons */
.btn-primary, .add-event-btn, .info-continue-btn, .sim-btn.primary { background: #185fa5 !important; color: #ffffff !important; }
.btn-secondary, .sim-btn.secondary, .funds-preset { background: #f5f7fb !important; border: 1px solid #dde3ee !important; color: #3d4f6b !important; }

/* Project & event cards */
.project-card { background: #f5f7fb !important; border: 1px solid #dde3ee !important; }
.project-card:hover { background: #eaeff6 !important; }
.project-metric { background: #eaeff6 !important; }
.event-card { background: #f5f7fb !important; border: 1px solid #dde3ee !important; color: var(--text-primary) !important; }
.event-card-month { background: #e8f0fb !important; color: #185fa5 !important; }
.event-popup, .info-popup { background: var(--bg-deep, #fff) !important; border: 1px solid #dde3ee !important; box-shadow: 0 8px 32px rgba(15,25,35,.14) !important; }

/* Sliders global */
input[type="range"] { background: #dde3ee !important; height: 4px !important; }
input[type="range"]::-webkit-slider-thumb { background: #185fa5 !important; border: 2px solid #fff !important; box-shadow: 0 0 0 2px #185fa5 !important; width: 16px !important; height: 16px !important; }

/* Analysis views */
#cp2-an-indicators, #cp2-an-budget, #cp2-an-benchmark, #cp2-an-passport, #cp2-an-political { background: #f5f7fb !important; }

/* Results views */
#cp2-res-rounds, #cp2-res-projects, #cp2-res-export { background: #f5f7fb !important; }

/* ══ ARCTEK TOOLTIPS (cp-glossary.js) ══════════════════════ */
.at-tt { position: relative; display: inline-flex; align-items: center; gap: 3px; cursor: help; outline: none; }
.at-tt-icon { font-size: 11px; color: #8294ad; line-height: 1; opacity: .7; transition: opacity .15s; }
.at-tt:hover .at-tt-icon, .at-tt:focus .at-tt-icon { opacity: 1; color: #185fa5; }
.at-tt-popup { display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  width: 280px; max-width: 90vw; padding: 9px 11px; background: #fff; color: #0f1923;
  border: 1px solid #dde3ee; border-radius: 8px; box-shadow: 0 6px 20px rgba(15,25,35,.18);
  z-index: 9999; font-size: 11px; line-height: 1.5; text-align: left; white-space: normal; }
.at-tt-popup::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #fff; }
.at-tt:hover .at-tt-popup, .at-tt:focus .at-tt-popup, .at-tt:focus-within .at-tt-popup { display: block; }
.at-tt-title { display: block; font-weight: 700; color: #185fa5; margin-bottom: 4px; }
.at-tt-text { display: block; color: #3d4f6b; }
.at-tt-inline .at-tt-label { font: inherit; color: inherit; }

/* ══ STRATEGY EXPORT (cp-export.js) ═══════════════════════ */
.exp-root { padding: 4px 4px 16px; display: flex; flex-direction: column; gap: 12px; }
.exp-header { background: linear-gradient(135deg, #e6f1fb, #eeedfe); border-radius: 10px; padding: 14px 18px; border: 1px solid #dde3ee; }
.exp-header-title { font-size: 16px; font-weight: 700; color: #0c447c; margin-bottom: 4px; }
.exp-header-meta { font-size: 12px; color: #3d4f6b; }
.exp-content-descr { padding: 10px 14px; background: #fff; border: 1px solid #dde3ee; border-radius: 8px; font-size: 12px; color: #3d4f6b; line-height: 1.6; }
.exp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.exp-card { background: #fff; border: 1px solid #dde3ee; border-radius: 10px; padding: 16px 14px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; box-shadow: 0 1px 4px rgba(15,25,35,.06); transition: transform .15s, box-shadow .15s; }
.exp-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(15,25,35,.12); }
.exp-card-ico { font-size: 34px; }
.exp-card-title { font-size: 13px; font-weight: 700; color: #0f1923; }
.exp-card-desc { font-size: 11px; color: #8294ad; line-height: 1.5; flex: 1; }
.exp-card-btn { width: 100%; padding: 8px 14px; border: none; border-radius: 6px; font-size: 11px; font-weight: 700; cursor: pointer; font-family: inherit; color: #fff; transition: background .15s; }
.exp-card.docx .exp-card-btn { background: #1a7a3b; } .exp-card.docx .exp-card-btn:hover { background: #0f5028; }
.exp-card.pdf  .exp-card-btn { background: #b91c1c; } .exp-card.pdf  .exp-card-btn:hover { background: #8a1313; }
.exp-card.xlsx .exp-card-btn { background: #185fa5; } .exp-card.xlsx .exp-card-btn:hover { background: #0c447c; }
.exp-contents { background: #fff; border: 1px solid #dde3ee; border-radius: 8px; padding: 12px 16px; }
.exp-contents-title { font-size: 12px; font-weight: 700; color: #0c447c; margin-bottom: 8px; }
@media (max-width: 780px) {
  .exp-cards { grid-template-columns: 1fr; }
}

/* Tree inline dark color overrides */
#cp2-tree [style*="color:#e6edf3"], #cp2-tree [style*="color: #e6edf3"] { color: var(--text-primary) !important; }
#cp2-tree [style*="color:#8b949e"], #cp2-tree [style*="color:#484f58"], #cp2-tree [style*="color:#6e7681"] { color: #8294ad !important; }
#cp2-tree [style*="background:#21262d"], #cp2-tree [style*="background:#161b22"] { background: #f5f7fb !important; border: 1px solid #dde3ee !important; }

/* PK political panel overrides */
.cp-pk-panel { border: none !important; }
.cp-pk-left { border-right: 1px solid #dde3ee !important; background: #fff !important; }
.cp-pk-fa { background: #f5f7fb !important; }
.cp-pk-hdr { border-bottom: 1px solid #dde3ee !important; }
.cp-pk-effects { border-bottom: 1px solid #dde3ee !important; }
.cp-pk-eff { background: #f5f7fb !important; border: 1px solid #dde3ee !important; }
.cp-pk-eff-lbl { color: #8294ad !important; }
.cp-pk-sh-row { border-bottom: 1px solid #dde3ee !important; }
.cp-pk-sh-row:hover { background: #f5f7fb !important; }
.cp-pk-sh-sel { background: #e8f0fb !important; }
.cp-pk-fa-hdr { border-bottom: 1px solid #dde3ee !important; }
.cp-pk-fa-sec { color: #8294ad !important; }
.cp-pk-fa-sec::after { background: #dde3ee !important; }
.cp-pk-fa-placeholder { color: #8294ad !important; }

/* Flyout */
#cp-pk-flyout { background: #fff !important; border: 1px solid #dde3ee !important; box-shadow: 0 8px 24px rgba(15,25,35,.12) !important; }
#cp-pk-alert { background: #fef2f2 !important; border-top: 1px solid rgba(185,28,28,.15) !important; color: #b91c1c !important; }

/* ══ ANALYSIS TAB (unified KP dashboard + Leaflet map) ═══ */
.an-page{padding:16px 18px;display:flex;flex-direction:column;gap:13px;min-height:0;width:100%}
.an-row1{display:grid;grid-template-columns:272px 1fr;gap:13px;align-items:start}
.an-row2{display:grid;grid-template-columns:1fr 1fr;gap:13px}
.an-row3{}

/* Паспорт */
.an-passport-card{background:var(--bg-deep,#fff);border:1px solid var(--border,#dde3ee);border-radius:10px;padding:15px 17px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:7px}
.an-city-name{font-size:18px;font-weight:800;color:var(--arctic-cyan,#185fa5);letter-spacing:-.4px;line-height:1.1}
.an-city-region{font-size:12px;color:var(--text-tertiary,#8294ad);margin-bottom:1px}
.an-passport-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.an-pi{display:flex;flex-direction:column}
.an-pi-lbl{font-size:10px;color:var(--text-tertiary,#8294ad);text-transform:uppercase;letter-spacing:.3px}
.an-pi-val{font-size:13px;font-weight:700;color:var(--text-primary,#0f1923)}
.an-spec{font-size:12px;color:var(--text-secondary,#3d4f6b);line-height:1.5;border-top:1px solid var(--border,#dde3ee);padding-top:6px;margin-top:3px}
.an-spec strong{color:var(--arctic-cyan,#185fa5)}

/* Метрики */
.an-metrics-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.an-metric-card{background:var(--bg-deep,#fff);border:1px solid var(--border,#dde3ee);border-radius:10px;padding:12px 14px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:3px}
.an-metric-lbl{font-size:11px;color:var(--text-tertiary,#8294ad);font-weight:500}
.an-metric-val{font-size:24px;font-weight:800;letter-spacing:-1px;line-height:1}
.an-metric-unit{font-size:11px;color:var(--text-tertiary,#8294ad)}
.an-metric-trend{font-size:12px;font-weight:600;margin-top:2px}

/* Секция */
.an-sec-card{background:var(--bg-deep,#fff);border:1px solid var(--border,#dde3ee);border-radius:10px;padding:15px 17px;box-shadow:var(--shadow)}
.an-sec-hdr{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;gap:10px;flex-wrap:wrap}
.an-sec-title{font-size:14px;font-weight:700;color:var(--text-primary,#0f1923)}
.an-sec-sub{font-size:11px;color:var(--text-tertiary,#8294ad)}

/* Бюджет */
.an-bud-sec-lbl{font-size:11px;font-weight:600;color:var(--text-tertiary,#8294ad);text-transform:uppercase;letter-spacing:.4px;margin:7px 0 5px}
.an-bud-bar-row{display:flex;align-items:center;gap:8px;margin-bottom:4px}
.an-bud-lbl{font-size:12px;color:var(--text-secondary,#3d4f6b);width:105px;flex-shrink:0}
.an-bud-track{flex:1;height:7px;background:var(--bg-tertiary,#eaeff6);border-radius:4px}
.an-bud-fill{height:7px;border-radius:4px;transition:width .4s}
.an-bud-val{font-size:12px;font-weight:700;min-width:64px;text-align:right}
.an-budget-total{display:flex;justify-content:space-between;align-items:center;margin-top:9px;padding-top:8px;border-top:1px solid var(--border,#dde3ee);font-size:14px;font-weight:700}

/* Бенчмарк v2 */
.an-bench-sel{padding:4px 8px;border:1px solid var(--border,#dde3ee);border-radius:5px;font-size:12px;background:var(--bg-secondary,#f5f7fb);color:var(--text-primary,#0f1923);font-family:inherit}
.an-bench-leg2{display:flex;gap:14px;font-size:12px;color:var(--text-tertiary,#8294ad);margin-bottom:12px}
.an-bench-leg-item{display:flex;align-items:center;gap:5px}
.an-bench-dot2{width:9px;height:9px;border-radius:50%;flex-shrink:0}
.an-bench-ref-sq{width:9px;height:9px;border-radius:2px;background:var(--bg-tertiary,#eaeff6);border:0.5px solid var(--border2,#c5cfde);flex-shrink:0}
.an-bench-row2{display:grid;grid-template-columns:115px 1fr 100px;align-items:center;gap:10px;padding:9px 0;border-bottom:0.5px solid var(--border,#dde3ee)}
.an-bench-row2:last-child{border-bottom:none}
.an-bench-lbl2{font-size:13px;color:var(--text-secondary,#3d4f6b)}
.an-bench-cols{display:flex;flex-direction:column;gap:5px}
.an-bval-row{display:flex;align-items:center;gap:7px}
.an-bval-tag{font-size:11px;font-weight:500;color:#185fa5;width:22px;flex-shrink:0}
.an-bval-tag-ref{color:var(--text-tertiary,#8294ad)}
.an-btrack{flex:1;height:7px;background:var(--bg-tertiary,#eaeff6);border-radius:4px;overflow:hidden}
.an-bfill{height:7px;border-radius:4px;transition:width .4s ease}
.an-bfill-ref{background:var(--border2,#c5cfde)}
.an-bnum{font-size:12px;font-weight:500;min-width:42px;text-align:right;font-variant-numeric:tabular-nums}
.an-bnum-ref{color:var(--text-tertiary,#8294ad);font-weight:400}
.an-badge-wrap{display:flex;justify-content:flex-end}
.an-badge{font-size:11px;font-weight:500;padding:3px 9px;border-radius:20px;white-space:nowrap}
.an-badge-up{background:#eaf3de;color:#27500a}
.an-badge-dn{background:#fcebeb;color:#791f1f}
.an-badge-eq{background:var(--bg-tertiary,#eaeff6);color:var(--text-tertiary,#8294ad)}

/* ICS плитки */
.an-itabs{display:flex;gap:4px;margin-bottom:11px;flex-wrap:wrap}
.an-itab{padding:5px 12px;border-radius:5px;font-size:13px;font-weight:500;cursor:pointer;border:1px solid transparent;transition:all .12s;font-family:inherit;background:transparent;color:var(--text-secondary,#3d4f6b)}
.an-itab:hover:not(.on){background:var(--bg-secondary,#f5f7fb);color:var(--text-primary,#0f1923)}
.an-ics-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.an-mini{background:var(--bg-secondary,#f5f7fb);border:1px solid var(--border,#dde3ee);border-radius:7px;padding:9px 10px;position:relative;overflow:hidden}
.an-mini-direct{background:var(--bg-deep,#fff);box-shadow:var(--shadow)}
.an-mini-direct-bar{position:absolute;top:0;left:0;right:0;height:3px;border-radius:7px 7px 0 0;opacity:.3}
.an-mini-name{font-size:11px;color:var(--text-tertiary,#8294ad);margin-bottom:3px;line-height:1.3}
.an-mini-val{font-size:18px;font-weight:800;letter-spacing:-1px;line-height:1}
.an-mini-unit{font-size:10px;color:var(--text-tertiary,#8294ad);margin-top:1px}
.an-mini-row{display:flex;align-items:center;gap:5px;margin-top:5px}
.an-mini-delta{font-size:11px;font-weight:700}
.an-bar{flex:1;height:4px;background:var(--bg-tertiary,#eaeff6);border-radius:2px}
.an-bar-fill{height:4px;border-radius:2px;transition:width .4s}
.an-source-note{font-size:11px;color:var(--text-tertiary,#8294ad);margin-top:10px;padding-top:8px;border-top:1px solid var(--border,#dde3ee)}

/* Карта Leaflet */
.an-map-sidebar{width:264px;flex-shrink:0;background:var(--bg-deep,#fff);border-right:1px solid var(--border,#dde3ee);overflow-y:auto;display:flex;flex-direction:column}
.an-ms-sec{padding:10px 13px;border-bottom:1px solid var(--border,#dde3ee)}
.an-ms-title{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--text-tertiary,#8294ad);margin-bottom:7px}
.an-layer-row{display:flex;align-items:center;gap:7px;margin-bottom:5px;cursor:pointer;user-select:none}
.an-lchk{width:15px;height:15px;border-radius:4px;border:1.5px solid var(--border2,#c5cfde);display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:all .12s}
.an-lchk.on{background:var(--arctic-cyan,#185fa5);border-color:var(--arctic-cyan,#185fa5)}
.an-lchk.on::after{content:'✓';font-size:9px;color:#fff;font-weight:700}
.an-geo-row{display:flex;align-items:center;gap:6px;padding:4px 7px;border:1px solid var(--border,#dde3ee);border-radius:5px;background:var(--bg-secondary,#f5f7fb);margin-bottom:5px}
.an-geo-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0}
.an-geo-name{font-size:12px;color:var(--text-primary,#0f1923);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.an-geo-del{font-size:11px;color:var(--text-tertiary,#8294ad);cursor:pointer;padding:1px 5px;border-radius:3px;border:.5px solid var(--border,#dde3ee);background:transparent;font-family:inherit;transition:all .12s;flex-shrink:0}
.an-geo-del:hover{color:#b91c1c;border-color:#b91c1c;background:#fef2f2}
.an-upload-zone{display:block;border:1.5px dashed var(--border2,#c5cfde);border-radius:5px;padding:10px;text-align:center;cursor:pointer;transition:all .13s;margin-top:8px}
.an-upload-zone:hover{border-color:var(--arctic-cyan,#185fa5);background:#e8f0fb}
.an-upload-lbl{font-size:12px;font-weight:500;color:var(--arctic-cyan,#185fa5);margin-bottom:4px}
.an-upload-fmts{display:flex;gap:4px;justify-content:center}
.an-fmt{font-size:10px;padding:1px 6px;border-radius:3px;background:var(--bg-tertiary,#eaeff6);color:var(--text-secondary,#3d4f6b);border:.5px solid var(--border,#dde3ee)}
.an-upload-hint{font-size:10px;color:var(--arctic-cyan,#185fa5);margin-top:5px;line-height:1.4;background:#e8f0fb;padding:5px 7px;border-radius:4px;border:1px solid rgba(24,95,165,.12)}
.an-map-ctrl{position:absolute;top:10px;right:10px;z-index:1000;display:flex;flex-direction:column;gap:5px}
.an-mctrl{background:var(--bg-deep,#fff);border:1px solid var(--border,#dde3ee);border-radius:5px;padding:5px 10px;font-size:12px;font-weight:500;color:var(--text-primary,#0f1923);cursor:pointer;box-shadow:var(--shadow);font-family:inherit;white-space:nowrap;transition:all .12s}
.an-mctrl.on{background:#e8f0fb;color:var(--arctic-cyan,#185fa5);border-color:rgba(24,95,165,.2)}
.an-mctrl:hover:not(.on){background:var(--bg-secondary,#f5f7fb)}

/* ══ UNIFIED ACTION CARD ═════════════════════════════════ */

/* Modal overlay */
.cp-ac-modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:1000;display:flex;justify-content:flex-end;align-items:stretch}
.cp-ac-modal{width:420px;max-width:90vw;background:var(--bg-secondary,#f5f7fb);display:flex;flex-direction:column;box-shadow:-4px 0 24px rgba(0,0,0,.12);animation:cpModalSlideIn .25s ease}
@keyframes cpModalSlideIn{from{transform:translateX(100%)}to{transform:translateX(0)}}
.cp-ac-modal-hdr{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;background:var(--bg-card,#fff);border-bottom:1px solid var(--border,#dde3ee)}
.cp-ac-modal-title{font-size:15px;font-weight:600;color:var(--text-primary,#0f1923)}
.cp-ac-modal-close{width:30px;height:30px;border-radius:6px;border:none;background:transparent;font-size:20px;color:var(--text-tertiary,#8294ad);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .12s}
.cp-ac-modal-close:hover{background:var(--bg-tertiary,#eaeff6);color:var(--text-primary,#0f1923)}
.cp-ac-modal-body{flex:1;overflow-y:auto;padding:14px 16px}

.cp-ac{background:var(--bg-card,#fff);border:0.5px solid var(--border,#dde3ee);border-radius:10px;overflow:hidden;transition:border-color .2s;margin-bottom:10px}
.cp-ac.dirty{border-color:#EF9F27}

/* Header */
.cp-ac-hdr{padding:13px 15px 11px;border-bottom:0.5px solid var(--border,#dde3ee)}
.cp-ac-hdr-row{display:flex;align-items:flex-start;gap:9px;margin-bottom:9px}
.cp-ac-ico{width:34px;height:34px;border-radius:6px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:17px;background:#e8f0fb}
.cp-ac-name-wrap{flex:1;min-width:0}
.cp-ac-name-input{width:100%;font-size:14px;font-weight:500;color:var(--text-primary,#0f1923);line-height:1.3;border:none;background:transparent;outline:none;padding:0;font-family:inherit}
.cp-ac-name-input::placeholder{color:var(--text-tertiary,#8294ad)}
.cp-ac-sub{font-size:11px;color:var(--text-tertiary,#8294ad);margin-top:2px}
.cp-ac-scale{font-size:10px;font-weight:500;padding:3px 8px;border-radius:20px;white-space:nowrap;flex-shrink:0;margin-top:2px}
.cp-ac-gse{display:flex;gap:4px}
.cp-ac-chip{font-size:11px;font-weight:500;padding:3px 10px;border-radius:20px;cursor:pointer;border:1px solid transparent;user-select:none;transition:all .12s}
.cp-ac-chip-g-on{background:#E6F1FB;color:#0C447C;border-color:#85B7EB}
.cp-ac-chip-s-on{background:#EEEDFE;color:#26215C;border-color:#AFA9EC}
.cp-ac-chip-e-on{background:#EAF3DE;color:#173404;border-color:#97C459}
.cp-ac-chip-g-off,.cp-ac-chip-s-off,.cp-ac-chip-e-off{background:var(--bg-secondary,#f5f7fb);color:var(--text-tertiary,#8294ad)}

/* Dirty warning */
.cp-ac-warn{display:none;align-items:center;gap:7px;padding:7px 15px;background:#FAEEDA;border-bottom:0.5px solid #FAC775;font-size:12px;color:#633806}
.cp-ac-warn.show{display:flex}
.cp-ac-warn-dot{width:6px;height:6px;border-radius:50%;background:#BA7517;flex-shrink:0;animation:cpWarnBlink 1.2s infinite}
@keyframes cpWarnBlink{0%,100%{opacity:1}50%{opacity:.2}}

/* Mid */
.cp-ac-mid{padding:11px 15px;border-bottom:0.5px solid var(--border,#dde3ee);display:flex;align-items:center;gap:10px}
.cp-ac-cost-f{flex:1}
.cp-ac-lbl{font-size:10px;color:var(--text-tertiary,#8294ad);margin-bottom:3px;text-transform:uppercase;letter-spacing:.3px}
.cp-ac-cost-row{display:flex;align-items:baseline;gap:4px}
.cp-ac-cost-input{width:70px;font-size:17px;font-weight:500;color:var(--text-primary,#0f1923);font-variant-numeric:tabular-nums;border:none;background:transparent;outline:none;padding:0;font-family:inherit}
.cp-ac-cost-input:focus{border-bottom:1.5px solid var(--arctic-cyan,#185fa5)}
.cp-ac-budget-input{width:55px;font-size:15px;text-align:right}
.cp-ac-cost-u{font-size:12px;color:var(--text-tertiary,#8294ad)}
.cp-ac-map-btn{padding:5px 10px;border-radius:6px;border:0.5px solid #c5cfde;background:transparent;font-size:12px;color:var(--text-tertiary,#8294ad);cursor:pointer;display:flex;align-items:center;gap:4px;font-family:inherit;transition:all .13s;white-space:nowrap}
.cp-ac-map-btn.on{background:#e8f0fb;color:var(--arctic-cyan,#185fa5);border-color:rgba(24,95,165,.3)}
.cp-ac-pin-dot{width:7px;height:7px;border-radius:50%;background:currentColor;display:inline-block;flex-shrink:0}

/* Effects */
.cp-ac-eff{padding:11px 15px}
.cp-ac-eff-hdr{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.cp-ac-eff-title{font-size:10px;color:var(--text-tertiary,#8294ad);text-transform:uppercase;letter-spacing:.3px}
.cp-ac-ai-badge{font-size:10px;padding:2px 7px;border-radius:20px;background:#f0effe;color:#5b4fcf}
.cp-ac-eff-row{display:flex;align-items:center;gap:7px;margin-bottom:5px}
.cp-ac-eff-k{font-size:12px;font-weight:500;width:13px;flex-shrink:0}
.cp-ac-eff-track{flex:1;height:5px;background:var(--bg-tertiary,#eaeff6);border-radius:3px;position:relative;overflow:hidden}
.cp-ac-eff-pos{position:absolute;top:0;left:50%;height:5px;border-radius:2px}
.cp-ac-eff-neg{position:absolute;top:0;right:50%;height:5px;border-radius:2px}
.cp-ac-eff-v{font-size:12px;font-weight:500;min-width:28px;text-align:right;font-variant-numeric:tabular-nums}
.cp-ac-no-eval{font-size:12px;color:var(--text-tertiary,#8294ad);padding:8px 0}
.cp-ac-ai-text{margin-top:8px;background:var(--bg-secondary,#f5f7fb);border-radius:6px;padding:9px 11px;border:0.5px solid var(--border,#dde3ee)}
.cp-ac-ai-txt-row{display:flex;gap:6px;margin-bottom:5px;font-size:12px;line-height:1.5}
.cp-ac-ai-txt-row:last-child{margin-bottom:0}
.cp-ac-ai-key{font-weight:500;flex-shrink:0;width:14px}
.cp-ac-ai-txt{color:var(--text-secondary,#3d4f6b)}

/* Details */
.cp-ac-det{padding:9px 15px;border-top:0.5px solid var(--border,#dde3ee)}
.cp-ac-det-row{display:flex;align-items:center;gap:7px;font-size:12px;margin-bottom:6px}
.cp-ac-det-row:last-child{margin-bottom:0}
.cp-ac-det-ico{width:16px;text-align:center;font-size:13px;flex-shrink:0}
.cp-ac-det-lbl{color:var(--text-secondary,#3d4f6b);min-width:90px}
.cp-ac-det-val{font-size:12px;font-weight:500;color:var(--text-primary,#0f1923)}
.cp-ac-det-input{flex:1;font-size:12px;font-weight:500;color:var(--text-primary,#0f1923);border:none;background:transparent;outline:none;padding:0;font-family:inherit}
.cp-ac-det-input::placeholder{color:var(--text-tertiary,#8294ad);font-weight:400}
.cp-ac-tog-wrap{display:flex;gap:3px}
.cp-ac-tog{font-size:11px;padding:2px 8px;border-radius:20px;cursor:pointer;border:0.5px solid var(--border,#dde3ee);background:transparent;color:var(--text-tertiary,#8294ad);font-family:inherit;transition:all .12s}
.cp-ac-tog.on-yes{background:#EAF3DE;color:#27500A;border-color:#97C459}
.cp-ac-tog.on-no{background:var(--bg-secondary,#f5f7fb);color:var(--text-secondary,#3d4f6b);border-color:#c5cfde}
.cp-ac-infra-tags{display:flex;gap:3px;flex-wrap:wrap}
.cp-ac-itag{font-size:11px;padding:2px 7px;border-radius:20px;border:0.5px solid var(--border,#dde3ee);background:transparent;color:var(--text-tertiary,#8294ad);cursor:pointer;transition:all .12s;font-family:inherit}
.cp-ac-itag.on{border-color:#85B7EB;background:#e8f0fb;color:var(--arctic-cyan,#185fa5)}

/* Footer */
.cp-ac-ftr{padding:10px 15px;border-top:0.5px solid var(--border,#dde3ee);display:flex;align-items:center;gap:6px}
.cp-ac-ip{font-size:11px;font-weight:500;color:#5b4fcf;background:#f0effe;padding:3px 8px;border-radius:20px;white-space:nowrap}
.cp-ac-state{font-size:10px;padding:2px 7px;border-radius:20px}
.cp-ac-state-draft{background:var(--bg-secondary,#f5f7fb);color:var(--text-tertiary,#8294ad)}
.cp-ac-state-ok{background:#EAF3DE;color:#27500A}
.cp-ac-state-dirty{background:#FAEEDA;color:#633806}
.cp-ac-del{width:30px;height:30px;border-radius:6px;border:0.5px solid var(--border,#dde3ee);background:transparent;color:var(--text-tertiary,#8294ad);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .13s;flex-shrink:0}
.cp-ac-del:hover{background:#FCEBEB;border-color:#F09595;color:#A32D2D}
.cp-ac-btn-ai{flex:1;padding:7px;border-radius:6px;border:0.5px solid #c5cfde;background:var(--bg-secondary,#f5f7fb);font-size:12px;font-weight:500;color:#5b4fcf;cursor:pointer;font-family:inherit;transition:all .13s;white-space:nowrap}
.cp-ac-btn-ai:hover{background:#f0effe}
.cp-ac-btn-ai.needs{background:#FAEEDA;color:#633806;border-color:#FAC775}
.cp-ac-btn-ai.loading{opacity:.6;pointer-events:none}
.cp-ac-btn-add{flex:1;padding:7px;border-radius:6px;border:none;background:var(--arctic-cyan,#185fa5);font-size:12px;font-weight:500;color:#fff;cursor:pointer;font-family:inherit;transition:all .13s}
.cp-ac-btn-add:hover{background:#1a6abf}
.cp-ac-btn-add:disabled{background:var(--bg-tertiary,#eaeff6);color:var(--text-tertiary,#8294ad);cursor:not-allowed}

/* Target indicators picker */
.cp-ac-targets{padding:9px 15px;border-top:0.5px solid var(--border,#dde3ee)}
.cp-ac-targets-hdr{display:flex;align-items:center;gap:7px;font-size:12px;margin-bottom:6px}
.cp-ac-targets-grid{display:flex;flex-wrap:wrap;gap:4px}
.cp-ac-tgt-btn{font-size:10px;font-weight:500;padding:3px 8px;border-radius:20px;cursor:pointer;border:1px solid transparent;user-select:none;transition:all .12s;font-family:inherit;background:var(--bg-secondary,#f5f7fb);color:var(--text-tertiary,#8294ad)}
.cp-ac-tgt-btn.cp-ac-chip-g-on{background:#E6F1FB;color:#0C447C;border-color:#85B7EB}
.cp-ac-tgt-btn.cp-ac-chip-s-on{background:#EEEDFE;color:#26215C;border-color:#AFA9EC}
.cp-ac-tgt-btn.cp-ac-chip-e-on{background:#EAF3DE;color:#173404;border-color:#97C459}
.cp-ac-tgt-btn.cp-ac-chip-g-off,.cp-ac-tgt-btn.cp-ac-chip-s-off,.cp-ac-tgt-btn.cp-ac-chip-e-off{background:var(--bg-secondary,#f5f7fb);color:var(--text-tertiary,#8294ad);border-color:var(--border,#dde3ee)}

/* Top-3 indicator impacts */
.cp-ac-top3{margin-top:10px;background:var(--bg-secondary,#f5f7fb);border-radius:6px;padding:9px 11px;border:0.5px solid var(--border,#dde3ee)}
.cp-ac-top3-title{font-size:10px;font-weight:600;color:var(--text-tertiary,#8294ad);text-transform:uppercase;letter-spacing:.3px;margin-bottom:6px}
.cp-ac-top3-row{display:flex;align-items:center;gap:6px;margin-bottom:3px}
.cp-ac-top3-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}
.cp-ac-top3-name{font-size:12px;font-weight:500;color:var(--text-primary,#0f1923);flex:1}
.cp-ac-top3-delta{font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.cp-ac-top3-hint{font-size:11px;color:var(--text-tertiary,#8294ad);margin-left:12px;margin-bottom:5px;line-height:1.4}

/* ══ SLIDER GOAL MECHANIC ═══════════════════════════════ */
.cp2-sl-wrap{border:1px solid var(--border,#dde3ee);border-radius:6px;padding:9px 11px;background:var(--bg-secondary,#f5f7fb);transition:border-color .3s, background .3s;margin-bottom:10px}
.cp2-sl-wrap:last-of-type{margin-bottom:0}
.cp2-sl-wrap .cp2-sl-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}
.cp2-sl-wrap .cp2-sl-name{font-size:12px;font-weight:500;color:var(--text-secondary,#3d4f6b)}
.cp2-sl-wrap .cp2-sl-val{font-size:13px;font-weight:600;color:var(--arctic-cyan,#185fa5);white-space:nowrap}
.cp2-sl-wrap .cp2-slider{width:100%;margin:4px 0 2px}
/* (Per-slider add-init removed — button is now per-block) */
.cp2-sl-minmax{display:flex;justify-content:space-between;font-size:10px;color:var(--text-tertiary,#8294ad);margin-bottom:2px}

/* Green — goal covered */
.cp2-sl-wrap.cp2-sl-green{border-color:#3B6D11;background:#EAF3DE}
.cp2-sl-wrap.cp2-sl-green .cp2-slider::-webkit-slider-thumb{background:#3B6D11}
.cp2-sl-wrap.cp2-sl-green .cp2-sl-val{color:#3B6D11}

/* Yellow — partial coverage */
.cp2-sl-wrap.cp2-sl-yellow{border-color:#BA7517;background:#FAEEDA}
.cp2-sl-wrap.cp2-sl-yellow .cp2-slider::-webkit-slider-thumb{background:#BA7517}
.cp2-sl-wrap.cp2-sl-yellow .cp2-sl-val{color:#BA7517}

/* Goal note */
.cp2-sl-goal-note{font-size:10px;color:var(--text-tertiary,#8294ad);font-style:italic;margin-bottom:4px;min-height:14px}
.cp2-sl-goal-note:empty{display:none}
.cp2-sl-goal-note-green{color:#3B6D11;font-style:normal;font-weight:500}
.cp2-sl-goal-note-yellow{color:#BA7517;font-style:normal;font-weight:500}

/* Coverage bar */
.cp2-sl-cov-row{display:flex;align-items:center;gap:6px;margin-top:5px}
.cp2-sl-cov-lbl{font-size:10px;color:var(--text-tertiary,#8294ad);white-space:nowrap;width:54px;flex-shrink:0}
.cp2-sl-cov-track{flex:1;height:5px;background:var(--bg-tertiary,#eaeff6);border-radius:3px;overflow:hidden}
.cp2-sl-cov-fill{height:5px;border-radius:3px;background:var(--arctic-cyan,#185fa5);transition:width .4s ease}
.cp2-sl-cov-pct{font-size:11px;font-weight:500;min-width:50px;text-align:right;font-variant-numeric:tabular-nums;color:var(--text-secondary,#3d4f6b)}

/* Status pill */
.cp2-sl-status{display:inline-flex;align-items:center;gap:4px;font-size:10px;font-weight:500;padding:2px 8px;border-radius:20px;margin-top:4px;white-space:nowrap}
.cp2-sl-status-preview{background:var(--bg-tertiary,#eaeff6);color:var(--text-tertiary,#8294ad)}
.cp2-sl-status-partial{background:#FAEEDA;color:#633806}
.cp2-sl-status-covered{background:#EAF3DE;color:#27500A}

/* Federal info block */
.cp2-block-info .cp2-bh{opacity:.7;cursor:default}

/* ══ INITIATIVES DISPLAY ══════════════════════════════ */

/* Место 1: заголовок секции инициатив */
.cp2-init-section-hdr{display:flex;align-items:center;justify-content:space-between;padding:4px 10px 3px;margin-top:3px}
.cp2-ish-label{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:var(--text-tertiary,#8294ad)}
.cp2-ish-cov{font-size:10px;font-weight:600;padding:1px 7px;border-radius:20px}
.cov-green{background:#e6f7ed;color:#1a7a3b}
.cov-yellow{background:#fff6e0;color:#7a4f00}

/* Место 1: строка инициативы */
.cp2-il-row{display:flex;align-items:center;gap:5px;padding:4px 6px 4px 10px;border-radius:6px;cursor:pointer;transition:all .12s;margin:0 10px 4px;border:0.5px solid transparent;position:relative}
.cp2-il-row:hover{background:var(--bg-secondary,#e8f0fb);border-color:rgba(24,95,165,.15)}
.cp2-il-bar{position:absolute;left:0;top:3px;bottom:3px;width:3px;border-radius:2px}
.cp2-il-ico{font-size:13px;flex-shrink:0}
.cp2-il-name{flex:1;font-size:12px;font-weight:500;color:var(--text-primary,#0f1923);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.cp2-il-tag{font-size:9px;font-weight:600;padding:1px 5px;border-radius:20px;flex-shrink:0;white-space:nowrap}
.cp2-il-gse-wrap{display:flex;gap:3px;flex-shrink:0}
.cp2-il-gse{font-size:10px;font-weight:700;flex-shrink:0}
.cp2-il-edit,.cp2-il-fly{font-size:10px;padding:2px 5px;border-radius:4px;border:0.5px solid var(--border,#dde3ee);background:transparent;color:var(--text-tertiary,#8294ad);cursor:pointer;font-family:inherit;flex-shrink:0;transition:all .12s;display:none}
.cp2-il-row:hover .cp2-il-edit,
.cp2-il-row:hover .cp2-il-fly{display:block}
.cp2-il-edit:hover,.cp2-il-fly:hover{background:#e8f0fb;color:#185fa5;border-color:rgba(24,95,165,.2)}

/* Место 2: основная панель под картой */
.cp-mip{display:flex;flex-direction:column;min-height:200px;max-height:45vh;overflow:hidden;background:var(--bg-secondary,#f5f7fb);border-top:1px solid var(--border,#dde3ee)}
.cp-mip-hdr{padding:8px 14px;background:var(--bg-primary,#fff);border-bottom:1px solid var(--border,#dde3ee);display:flex;align-items:center;justify-content:space-between;flex-shrink:0;position:sticky;top:0;z-index:5}
.cp-mip-title{font-size:13px;font-weight:700;color:var(--text-primary,#0f1923)}
.cp-mip-meta{display:flex;align-items:center;gap:10px}
.cp-mip-count{font-size:11px;color:var(--text-tertiary,#8294ad);background:var(--bg-tertiary,#eaeff6);padding:2px 8px;border-radius:20px}
.cp-mip-capex{font-size:12px;font-weight:700;color:#534ab7}
.cp-mip-body{overflow-y:auto;flex:1}
.cp-mip-empty{padding:24px;text-align:center;font-size:13px;color:var(--text-tertiary,#8294ad);line-height:1.6}

/* Место 2: группа */
.cp-mip-group{border-bottom:1px solid var(--border,#dde3ee)}
.cp-mip-group:last-child{border-bottom:none}
.cp-mip-ghdr{padding:7px 14px;display:flex;align-items:center;gap:8px;cursor:pointer;background:var(--bg-primary,#fff);transition:background .12s;user-select:none;position:sticky;top:0;z-index:4}
.cp-mip-ghdr:hover{background:var(--bg-secondary,#f5f7fb)}
.cp-mip-gbar{width:3px;height:16px;border-radius:2px;flex-shrink:0}
.cp-mip-gname{font-size:12px;font-weight:700;flex:1}
.cp-mip-gn{font-size:11px;color:var(--text-tertiary,#8294ad);min-width:44px;text-align:right}
.cp-mip-giks{font-size:12px;font-weight:700;min-width:52px;text-align:right}
.cp-mip-garr{font-size:11px;color:var(--text-tertiary,#8294ad);margin-left:4px;transition:transform .2s}
.cp-mip-garr.open{transform:rotate(0deg)}
.cp-mip-gitems{padding:6px 14px 10px;display:flex;flex-direction:column;gap:6px}

/* Место 2: карточка инициативы */
.cp-mic{display:flex;gap:9px;align-items:flex-start;background:var(--bg-primary,#fff);border:0.5px solid var(--border,#dde3ee);border-radius:8px;padding:8px 10px;cursor:pointer;transition:all .13s}
.cp-mic:hover{background:#e8f0fb;border-color:rgba(24,95,165,.18)}
.cp-mic.cp-mic-highlight{background:#e8f0fb !important;border-color:#185fa5 !important;transition:none}
.cp-mic-ico{font-size:16px;flex-shrink:0;margin-top:1px}
.cp-mic-body{flex:1;min-width:0}
.cp-mic-top{display:flex;align-items:flex-start;gap:6px;margin-bottom:4px}
.cp-mic-name{font-size:13px;font-weight:700;color:var(--text-primary,#0f1923);flex:1;line-height:1.3}
.cp-mic-ip{font-size:10px;font-weight:600;padding:1px 6px;border-radius:20px;background:#ededfc;color:#534ab7;flex-shrink:0;white-space:nowrap}
.cp-mic-gse{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:3px}
.cp-mic-gchip{font-size:11px;font-weight:700;padding:1px 7px;border-radius:20px}
.cp-mic-ai{font-size:11px;color:var(--text-tertiary,#8294ad);line-height:1.4;margin-bottom:4px}
.cp-mic-foot{display:flex;align-items:center;justify-content:space-between;font-size:11px;margin-top:2px}
.cp-mic-status{font-weight:600}
.cp-mic-capex{color:var(--text-tertiary,#8294ad)}
.cp-mic-actions{display:flex;flex-direction:column;gap:4px;flex-shrink:0}
.cp-mic-btn{font-size:11px;padding:3px 8px;border-radius:5px;border:0.5px solid var(--border,#dde3ee);background:transparent;color:var(--text-tertiary,#8294ad);cursor:pointer;font-family:inherit;transition:all .12s;white-space:nowrap}
.cp-mic-btn:hover{background:#e8f0fb;color:#185fa5;border-color:rgba(24,95,165,.2)}
.cp-mic-del:hover{background:#fef2f2 !important;color:#b91c1c !important;border-color:#b91c1c !important}

/* Project info rows */
.cp2-proj-item{display:flex;justify-content:space-between;align-items:center;padding:5px 0;font-size:11px;color:var(--text-secondary,#3d4f6b);border-bottom:1px solid var(--border,#eef1f6)}
.cp2-proj-item:last-child{border-bottom:none}
.cp2-proj-capex{font-weight:600;color:var(--text-primary,#0f1923);white-space:nowrap}
.cp2-proj-more{font-size:10px;color:var(--text-tertiary,#8294ad);padding:4px 0}

/* ==================== SWOT MODULE ==================== */
/* Light theme, adapted from prototype ARCTEK_SWOT_v2_Full.html */

/* Local SWOT tokens (fall back to global vars where possible) */
#an-swot-view {
  --swot-arctic-blue:#185fa5;
  --swot-arctic-blue-dk:#0c447c;
  --swot-arctic-blue-lt:#e6f1fb;
  --swot-energy-green:#1a7a3b;
  --swot-energy-green-dk:#0f5226;
  --swot-energy-green-lt:#eaf3de;
  --swot-warning-amber:#7a4f00;
  --swot-warning-amber-dk:#5a3a00;
  --swot-warning-amber-lt:#faeeda;
  --swot-danger-red:#b91c1c;
  --swot-danger-red-lt:#fcebeb;
  --swot-purple:#5b4fcf;
  --swot-purple-lt:#eeedfe;
  --swot-text1:#0f1923;
  --swot-text2:#3d4f6b;
  --swot-text3:#8294ad;
  --swot-border:#dde3ee;
  --swot-border2:#c5cfde;
  --swot-bg-soft:#f5f7fb;
  --swot-bg-hover:#f0f4fa;
  --swot-shadow:0 1px 4px rgba(15,25,35,.08),0 0 0 1px rgba(15,25,35,.04);
  --swot-radius-sm:6px;
  --swot-radius-md:10px;
  --swot-radius-lg:16px;
  font-size:13px;
  color:var(--swot-text1);
}

/* ── VIEW TABS ── */
.swot-view-tabs{display:flex;gap:4px;margin-bottom:12px}
.swot-view-tab{padding:8px 16px;border-radius:6px 6px 0 0;border:1px solid var(--swot-border);border-bottom:none;background:#fff;font-size:12px;font-weight:600;color:var(--swot-text2);cursor:pointer;position:relative;font-family:inherit}
.swot-view-tab:hover{background:var(--swot-bg-hover)}
.swot-view-tab.active{background:#fff;color:var(--swot-arctic-blue);border-bottom:2px solid #fff;z-index:2;margin-bottom:-1px}
.swot-vt-badge{font-size:9px;background:var(--swot-danger-red);color:#fff;padding:1px 5px;border-radius:8px;margin-left:6px;font-weight:700;vertical-align:middle}

.swot-view-panel{background:#fff;border:1px solid var(--swot-border);border-radius:0 10px 10px 10px;padding:24px;box-shadow:var(--swot-shadow)}

/* ── BENCH BANNER ── */
#an-swot-view .bb{background:linear-gradient(135deg,var(--swot-purple-lt),var(--swot-arctic-blue-lt));border:1px solid var(--swot-border);border-radius:10px;padding:16px;margin-bottom:16px}
#an-swot-view .bb-hdr{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
#an-swot-view .bb-title{font-weight:700;font-size:13px;color:var(--swot-purple);display:flex;align-items:center;gap:6px}
#an-swot-view .bb-title::before{content:'✦'}
#an-swot-view .bb-from{font-size:11px;color:var(--swot-text2);background:rgba(255,255,255,.7);padding:4px 10px;border-radius:6px}
#an-swot-view .bb-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
#an-swot-view .bb-item{background:rgba(255,255,255,.7);border-radius:6px;padding:10px 12px;display:flex;gap:8px;font-size:12px;cursor:pointer;border:1px solid transparent;transition:all .15s;align-items:flex-start}
#an-swot-view .bb-item:hover{background:#fff;border-color:var(--swot-purple);transform:translateY(-1px)}
#an-swot-view .bb-icon{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:12px;font-weight:800}
#an-swot-view .bb-icon.S{background:var(--swot-energy-green-lt);color:var(--swot-energy-green)}
#an-swot-view .bb-icon.W{background:var(--swot-danger-red-lt);color:var(--swot-danger-red)}
#an-swot-view .bb-icon.O{background:var(--swot-arctic-blue-lt);color:var(--swot-arctic-blue)}
#an-swot-view .bb-icon.T{background:var(--swot-warning-amber-lt);color:var(--swot-warning-amber)}
#an-swot-view .bb-content{flex:1;min-width:0}
#an-swot-view .bb-content strong{font-weight:600;display:block;margin-bottom:2px;color:var(--swot-text1)}
#an-swot-view .bb-content small{font-size:11px;color:var(--swot-text2);display:block}
#an-swot-view .bb-add{font-size:10px;color:var(--swot-purple);font-weight:700;margin-top:4px;display:block}

/* ── SWOT GRID ── */
.swot-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.swot-grid .sq{background:var(--swot-bg-soft);border:1px solid var(--swot-border);border-radius:10px;padding:16px;min-height:260px;display:flex;flex-direction:column}
.swot-grid .sq.S{border-top:4px solid var(--swot-energy-green)}
.swot-grid .sq.W{border-top:4px solid var(--swot-danger-red)}
.swot-grid .sq.O{border-top:4px solid var(--swot-arctic-blue)}
.swot-grid .sq.T{border-top:4px solid var(--swot-warning-amber)}
.swot-grid .sq-hdr{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.swot-grid .sq-title{font-weight:700;font-size:13px;display:flex;align-items:center;gap:6px}
.swot-grid .sq.S .sq-title{color:var(--swot-energy-green-dk)}
.swot-grid .sq.W .sq-title{color:var(--swot-danger-red)}
.swot-grid .sq.O .sq-title{color:var(--swot-arctic-blue-dk)}
.swot-grid .sq.T .sq-title{color:var(--swot-warning-amber-dk)}
.swot-grid .sq-letter{width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:11px;color:#fff}
.swot-grid .sq.S .sq-letter{background:var(--swot-energy-green)}
.swot-grid .sq.W .sq-letter{background:var(--swot-danger-red)}
.swot-grid .sq.O .sq-letter{background:var(--swot-arctic-blue)}
.swot-grid .sq.T .sq-letter{background:var(--swot-warning-amber)}
.swot-grid .sq-count{font-size:11px;color:var(--swot-text3);font-variant-numeric:tabular-nums}
.swot-grid .sq-items{flex:1;display:flex;flex-direction:column;gap:6px;margin-bottom:12px;min-height:40px}

/* ── SWOT ITEM ── */
.swot-grid .si{background:#fff;border:1px solid var(--swot-border);border-radius:6px;padding:10px 12px;display:flex;flex-wrap:wrap;align-items:flex-start;gap:6px;font-size:12px;transition:all .15s;position:relative}
.swot-grid .si:hover{border-color:var(--swot-border2)}
.swot-grid .si-text{flex:1;min-width:0;color:var(--swot-text1);line-height:1.45;cursor:text}
.swot-grid .si-text small{display:block;color:var(--swot-text3);font-size:10px;margin-top:2px}
.swot-grid .si-text[contenteditable="true"]{background:var(--swot-bg-hover);border-radius:4px;padding:4px 6px;margin:-4px -6px;outline:2px solid var(--swot-arctic-blue);outline-offset:2px}
.swot-grid .si-text[contenteditable="true"] small{display:none}
.swot-grid .si-edit-hint{display:none;font-size:10px;color:var(--swot-arctic-blue);flex-basis:100%;margin-top:4px}
.swot-grid .si-text[contenteditable="true"] ~ .si-edit-hint{display:block}

.swot-grid .ai-b{display:inline-flex;align-items:center;gap:3px;font-size:10px;padding:2px 6px;border-radius:3px;font-weight:700;white-space:nowrap;cursor:help;flex-shrink:0}
.swot-grid .ai-b.ok{background:var(--swot-energy-green-lt);color:var(--swot-energy-green)}
.swot-grid .ai-b.ctx{background:var(--swot-arctic-blue-lt);color:var(--swot-arctic-blue-dk)}
.swot-grid .ai-b.vague{background:var(--swot-warning-amber-lt);color:var(--swot-warning-amber)}
.swot-grid .ai-b.q{background:var(--swot-purple-lt);color:var(--swot-purple)}
.swot-grid .ai-b.new{background:#eef1f6;color:var(--swot-text2)}

.swot-grid .si-actions{display:flex;gap:3px;opacity:0;transition:opacity .15s;flex-shrink:0}
.swot-grid .si:hover .si-actions{opacity:1}
.swot-grid .si-btn{width:22px;height:22px;border:1px solid var(--swot-border);background:#fff;border-radius:4px;cursor:pointer;font-size:11px;color:var(--swot-text3);display:flex;align-items:center;justify-content:center;padding:0;font-family:inherit}
.swot-grid .si-btn:hover{background:var(--swot-bg-hover);color:var(--swot-text1)}
.swot-grid .si-btn.del:hover{color:var(--swot-danger-red);border-color:var(--swot-danger-red)}
.swot-grid .si-btn.alex:hover{color:var(--swot-purple);border-color:var(--swot-purple)}

.swot-grid .si-comment{flex-basis:100%;margin-top:8px;padding:8px 10px;border-radius:6px;font-size:11px;line-height:1.5;display:flex;gap:6px}
.swot-grid .si-comment::before{content:'✦';color:var(--swot-purple);font-weight:800;flex-shrink:0}
.swot-grid .si-comment.info{background:var(--swot-arctic-blue-lt);color:var(--swot-arctic-blue-dk)}
.swot-grid .si-comment.warn{background:var(--swot-warning-amber-lt);color:var(--swot-warning-amber-dk)}
.swot-grid .si-comment.sug{background:var(--swot-purple-lt);color:var(--swot-purple)}

/* Add / buttons inside each quadrant */
.swot-grid .sq-add{display:flex;gap:6px;margin-bottom:8px}
.swot-grid .sq-add input{flex:1;padding:8px 10px;border:1px solid var(--swot-border);border-radius:6px;font-size:12px;background:#fff;font-family:inherit;outline:none;color:var(--swot-text1)}
.swot-grid .sq-add input:focus{border-color:var(--swot-arctic-blue)}
.swot-grid .sq-add button{padding:8px 12px;background:var(--swot-text1);color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;font-family:inherit}
.swot-grid .sq-add button:hover{background:var(--swot-arctic-blue)}
.swot-grid .sq-btns{display:flex;gap:6px;flex-wrap:wrap}
.swot-grid .sq-btn{padding:5px 10px;background:#fff;border:1px solid var(--swot-border);border-radius:6px;font-size:11px;color:var(--swot-text2);cursor:pointer;display:inline-flex;align-items:center;gap:4px;font-family:inherit}
.swot-grid .sq-btn:hover{border-color:var(--swot-purple);color:var(--swot-purple)}
.swot-grid .sq-btn.pri{background:var(--swot-purple);color:#fff;border-color:var(--swot-purple)}
.swot-grid .sq-btn.pri:hover{opacity:.9}

/* ── TOWS MATRIX ── */
.tows-matrix{display:grid;grid-template-columns:160px 1fr 1fr;gap:0;border:1px solid var(--swot-border);border-radius:10px;overflow:hidden;margin-top:8px}
.tows-corner{background:#eef1f6;padding:16px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:12px;color:var(--swot-text3);border-right:1px solid var(--swot-border);border-bottom:1px solid var(--swot-border)}
.tows-col-hdr{background:#eef1f6;padding:12px 16px;text-align:center;font-weight:700;font-size:12px;border-bottom:1px solid var(--swot-border);border-right:1px solid var(--swot-border)}
.tows-col-hdr:last-child{border-right:none}
.tows-row-hdr{background:#eef1f6;padding:12px 16px;font-weight:700;font-size:12px;border-right:1px solid var(--swot-border);border-bottom:1px solid var(--swot-border);display:flex;align-items:center;gap:8px}
.tows-row-hdr .sq-letter{width:20px;height:20px;font-size:10px;border-radius:50%;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800}
.tows-cell{padding:12px;border-right:1px solid var(--swot-border);border-bottom:1px solid var(--swot-border);background:#fff;display:flex;flex-direction:column}
.tows-cell:nth-child(3n){border-right:none}
.tows-cell-title{font-weight:700;font-size:12px;margin-bottom:8px}
.tows-cell.SO .tows-cell-title{color:var(--swot-energy-green)}
.tows-cell.ST .tows-cell-title{color:var(--swot-arctic-blue)}
.tows-cell.WO .tows-cell-title{color:var(--swot-warning-amber)}
.tows-cell.WT .tows-cell-title{color:var(--swot-danger-red)}
.tows-cell-body{flex:1;margin-bottom:8px}
.tows-strat{font-size:11px;padding:8px 10px;background:var(--swot-bg-soft);border-radius:6px;margin-bottom:6px;display:flex;gap:6px;line-height:1.4;align-items:flex-start;position:relative}
.tows-strat:last-child{margin-bottom:0}
.tows-strat-idx{font-weight:800;flex-shrink:0;width:16px;color:var(--swot-text2)}
.tows-strat strong{font-weight:700;color:var(--swot-text1)}
.tows-strat-del{position:absolute;right:6px;top:6px;width:18px;height:18px;border:none;background:transparent;color:var(--swot-text3);cursor:pointer;font-size:14px;line-height:1;opacity:0;transition:opacity .15s;border-radius:3px}
.tows-strat:hover .tows-strat-del{opacity:1}
.tows-strat-del:hover{background:var(--swot-danger-red-lt);color:var(--swot-danger-red)}
.tows-empty{color:var(--swot-text3);font-size:12px;font-style:italic;padding:8px 0}
.tows-cell .sq-btn{padding:5px 10px;background:#fff;border:1px solid var(--swot-border);border-radius:6px;font-size:11px;color:var(--swot-text2);cursor:pointer;align-self:flex-start;font-family:inherit}
.tows-cell .sq-btn.pri{background:var(--swot-purple);color:#fff;border-color:var(--swot-purple)}

/* ── VERSION HISTORY ── */
.vh-timeline{display:flex;flex-direction:column;gap:0;max-width:760px}
.vh-entry{display:flex;gap:16px;position:relative;padding:12px 0;border-bottom:1px solid var(--swot-border)}
.vh-entry:last-child{border-bottom:none}
.vh-dot{width:12px;height:12px;border-radius:50%;background:var(--swot-border2);border:2px solid #fff;flex-shrink:0;margin-top:4px;position:relative;z-index:1}
.vh-entry.current .vh-dot{background:var(--swot-arctic-blue);box-shadow:0 0 0 3px var(--swot-arctic-blue-lt)}
.vh-entry::before{content:'';position:absolute;left:5px;top:24px;bottom:-12px;width:2px;background:var(--swot-border)}
.vh-entry:last-child::before{display:none}
.vh-body{flex:1}
.vh-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}
.vh-title{font-weight:700;font-size:13px}
.vh-entry.current .vh-title{color:var(--swot-arctic-blue)}
.vh-time{font-size:11px;color:var(--swot-text3);font-variant-numeric:tabular-nums}
.vh-desc{font-size:12px;color:var(--swot-text2);margin-bottom:6px;line-height:1.5}
.vh-changes{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:6px}
.vh-change{font-size:10px;padding:2px 6px;border-radius:3px;font-weight:600}
.vh-change.add{background:var(--swot-energy-green-lt);color:var(--swot-energy-green)}
.vh-change.edit{background:var(--swot-arctic-blue-lt);color:var(--swot-arctic-blue-dk)}
.vh-change.del{background:var(--swot-danger-red-lt);color:var(--swot-danger-red)}
.vh-change.ai{background:var(--swot-purple-lt);color:var(--swot-purple)}
.vh-actions{display:flex;gap:6px;margin-top:4px}
.vh-btn{padding:4px 10px;border:1px solid var(--swot-border);background:#fff;border-radius:4px;font-size:11px;cursor:pointer;color:var(--swot-text2);font-weight:600;font-family:inherit}
.vh-btn:hover{border-color:var(--swot-arctic-blue);color:var(--swot-arctic-blue)}
.vh-btn.restore{border-color:var(--swot-warning-amber);color:var(--swot-warning-amber)}
.vh-btn.restore:hover{background:var(--swot-warning-amber);color:#fff}

/* ── SWOT FOOTER ── */
.swot-footer{margin-top:16px;padding:12px 16px;background:var(--swot-bg-soft);border-radius:10px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.swot-footer-info{font-size:11px;color:var(--swot-text3)}
.swot-footer-info strong{color:var(--swot-text1);font-size:12px}
.swot-footer-btns{display:flex;gap:8px;flex-wrap:wrap}
.swot-btn-p{background:var(--swot-arctic-blue);color:#fff;border:none;padding:8px 16px;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px;font-family:inherit}
.swot-btn-p:hover{background:var(--swot-arctic-blue-dk)}
.swot-btn-s{background:#fff;color:var(--swot-text2);border:1px solid var(--swot-border);padding:8px 16px;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px;font-family:inherit}
.swot-btn-s:hover{border-color:var(--swot-arctic-blue);color:var(--swot-arctic-blue)}

/* ── ALEX DRAWER ── */
.swot-drawer-overlay{position:fixed;inset:0;background:rgba(15,25,35,.35);z-index:998;display:none}
.swot-drawer-overlay.open{display:block}
.swot-alex-drawer{position:fixed;right:-420px;top:0;bottom:0;width:400px;background:#fff;box-shadow:-4px 0 24px rgba(15,25,35,.15);z-index:999;display:flex;flex-direction:column;transition:right .3s ease;font-size:13px;color:#0f1923}
.swot-alex-drawer.open{right:0}
.swot-alex-hdr{background:linear-gradient(135deg,#5b4fcf,#185fa5);color:#fff;padding:14px 16px;display:flex;align-items:center;gap:12px;flex-shrink:0}
.swot-alex-av{width:34px;height:34px;border-radius:50%;background:rgba(255,255,255,.22);display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:800}
.swot-alex-info{flex:1;min-width:0}
.swot-alex-name{font-weight:700;font-size:14px}
.swot-alex-role{font-size:10px;opacity:.85}
.swot-alex-close{background:rgba(255,255,255,.2);border:none;color:#fff;width:28px;height:28px;border-radius:50%;cursor:pointer;font-size:14px;display:flex;align-items:center;justify-content:center;font-family:inherit}
.swot-alex-close:hover{background:rgba(255,255,255,.35)}

.swot-alex-ctx{padding:12px 16px;background:#f5f7fb;font-size:12px;border-bottom:1px solid #dde3ee;flex-shrink:0}
.swot-alex-ctx-label{font-size:10px;text-transform:uppercase;letter-spacing:.5px;color:#8294ad;font-weight:700;margin-bottom:4px}
.swot-alex-ctx-text{font-weight:600;color:#0f1923}
.swot-alex-ctx-quad{display:inline-block;padding:2px 6px;border-radius:3px;font-size:10px;font-weight:700;margin-left:6px;color:#fff}
.swot-alex-ctx-quad.S{background:#1a7a3b}
.swot-alex-ctx-quad.W{background:#b91c1c}
.swot-alex-ctx-quad.O{background:#185fa5}
.swot-alex-ctx-quad.T{background:#7a4f00}

.swot-alex-msgs{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:#fff}
.alex-msg{max-width:85%;font-size:12px;line-height:1.5;padding:10px 14px;border-radius:12px}
.alex-msg.ai{background:#f5f7fb;color:#0f1923;align-self:flex-start;border-bottom-left-radius:4px}
.alex-msg.user{background:#185fa5;color:#fff;align-self:flex-end;border-bottom-right-radius:4px}
.alex-msg strong{font-weight:700}
.alex-msg-actions{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}
.alex-act-btn{padding:5px 10px;border-radius:4px;font-size:10px;font-weight:700;border:1px solid transparent;cursor:pointer;font-family:inherit}
.alex-act-btn.primary{background:#1a7a3b;color:#fff}
.alex-act-btn.primary:hover{background:#0f5226}
.alex-act-btn.secondary{background:#fff;border-color:#dde3ee;color:#3d4f6b}
.alex-act-btn.secondary:hover{border-color:#185fa5;color:#185fa5}

.swot-alex-input-bar{padding:12px;border-top:1px solid #dde3ee;display:flex;gap:8px;flex-shrink:0;background:#fff}
.swot-alex-input-bar input{flex:1;padding:8px 12px;border:1px solid #dde3ee;border-radius:6px;font-size:12px;outline:none;font-family:inherit;color:#0f1923}
.swot-alex-input-bar input:focus{border-color:#185fa5}
.swot-alex-input-bar button{padding:8px 14px;background:#5b4fcf;color:#fff;border:none;border-radius:6px;font-size:14px;font-weight:700;cursor:pointer;font-family:inherit}
.swot-alex-input-bar button:hover{background:#185fa5}

/* ── TOAST ── */
.swot-toast{position:fixed;bottom:20px;right:20px;background:#1a7a3b;color:#fff;padding:12px 20px;border-radius:10px;font-size:13px;font-weight:600;box-shadow:0 4px 16px rgba(15,25,35,.2);z-index:1001;display:none;max-width:340px}
.swot-toast.show{display:block;animation:swotToastIn .25s ease-out}
.swot-toast.warn{background:#7a4f00}
.swot-toast.info{background:#185fa5}
@keyframes swotToastIn{from{transform:translateX(100%);opacity:0}to{transform:translateX(0);opacity:1}}

/* ── Responsive ── */
@media (max-width: 900px) {
  .swot-grid{grid-template-columns:1fr}
  .tows-matrix{grid-template-columns:1fr}
  .swot-alex-drawer{width:100%;right:-100%}
}

/* ==================== SPATIAL MAP MODULE ==================== */
/* Google Maps-based spatial analysis for Анализ → Карта          */

#an-map-view {
  --sp-arctic-blue:#185fa5;
  --sp-arctic-blue-lt:#e6f1fb;
  --sp-green:#1a7a3b;
  --sp-green-lt:#eaf3de;
  --sp-amber:#7a4f00;
  --sp-amber-lt:#faeeda;
  --sp-red:#b91c1c;
  --sp-red-lt:#fcebeb;
  --sp-purple:#5b4fcf;
  --sp-purple-lt:#eeedfe;
  --sp-t1:#0f1923;
  --sp-t2:#3d4f6b;
  --sp-t3:#8294ad;
  --sp-border:#dde3ee;
  --sp-border2:#c5cfde;
  --sp-bg-soft:#f5f7fb;
  --sp-bg-hover:#f0f4fa;
  --sp-bg-tertiary:#eaeff6;
  --sp-shadow:0 1px 4px rgba(15,25,35,.08),0 0 0 1px rgba(15,25,35,.04);
  font-size:13px;
  color:var(--sp-t1);
}

/* Layout — container needs explicit height; spatial-layout needs to flex-fill */
#an-map-view{overflow:hidden}
.spatial-layout{display:flex;flex:1;width:100%;height:100%;min-height:500px;overflow:hidden;background:#fff;border:1px solid var(--sp-border);border-radius:10px;box-shadow:var(--sp-shadow)}
.spatial-sidebar{width:340px;border-right:1px solid var(--sp-border);display:flex;flex-direction:column;overflow:hidden;flex-shrink:0;background:#fff}
.spatial-sb-header{padding:12px 16px;border-bottom:1px solid var(--sp-border);background:var(--sp-bg-soft)}
.spatial-sb-title{font-weight:700;font-size:14px;margin-bottom:8px;color:var(--sp-t1)}
.spatial-mode-tabs{display:flex;gap:2px;background:var(--sp-bg-tertiary);padding:3px;border-radius:6px}
.spatial-mode-tab{flex:1;padding:6px 8px;border:none;border-radius:4px;font-size:11px;font-weight:600;color:var(--sp-t2);cursor:pointer;background:transparent;text-align:center;font-family:inherit}
.spatial-mode-tab:hover{background:var(--sp-bg-hover)}
.spatial-mode-tab.active{background:#fff;color:var(--sp-arctic-blue);box-shadow:var(--sp-shadow)}

.spatial-sb-body{flex:1;overflow-y:auto}
.spatial-sb-section{padding:12px 16px;border-bottom:1px solid var(--sp-border)}
.spatial-sb-section:last-child{border-bottom:none}
.spatial-sb-sec-title{font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:var(--sp-t3);font-weight:700;margin-bottom:8px;display:flex;align-items:center;justify-content:space-between}

/* Layer rows */
.spatial-layer-row{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:6px;cursor:pointer;margin-bottom:2px;transition:background .12s}
.spatial-layer-row:hover{background:var(--sp-bg-hover)}
.spatial-layer-chk{width:16px;height:16px;border:2px solid var(--sp-border2);border-radius:3px;display:flex;align-items:center;justify-content:center;font-size:10px;color:transparent;flex-shrink:0;font-weight:700}
.spatial-layer-chk.on{border-color:var(--sp-arctic-blue);background:var(--sp-arctic-blue);color:#fff}
.spatial-layer-dot{width:12px;height:12px;border-radius:3px;flex-shrink:0}
.spatial-layer-info{flex:1;min-width:0}
.spatial-layer-name{font-size:12px;font-weight:600;color:var(--sp-t1)}
.spatial-layer-meta{font-size:10px;color:var(--sp-t3)}

/* Stat cards */
.spatial-stat-card{background:var(--sp-bg-soft);border-radius:6px;padding:10px 12px;margin-bottom:6px}
.spatial-stat-row{display:flex;justify-content:space-between;font-size:12px;margin-bottom:4px}
.spatial-stat-row:last-child{margin-bottom:0}
.spatial-stat-label{color:var(--sp-t2)}
.spatial-stat-val{font-weight:700;font-variant-numeric:tabular-nums;color:var(--sp-t1)}
.spatial-stat-val.bad{color:var(--sp-red)}
.spatial-stat-val.ok{color:var(--sp-amber)}
.spatial-stat-val.good{color:var(--sp-green)}

/* Insights (conflicts mode) */
.spatial-insight{padding:10px 12px;border-radius:6px;margin-bottom:6px;font-size:12px;display:flex;gap:8px;cursor:pointer;border:1px solid var(--sp-border);background:#fff;transition:all .15s}
.spatial-insight:hover{border-color:var(--sp-arctic-blue);transform:translateX(2px)}
.spatial-insight-icon{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;flex-shrink:0;font-weight:800}
.spatial-insight-icon.conflict{background:var(--sp-red-lt);color:var(--sp-red)}
.spatial-insight-icon.synergy{background:var(--sp-green-lt);color:var(--sp-green)}
.spatial-insight-icon.gap{background:var(--sp-amber-lt);color:var(--sp-amber)}
.spatial-insight-icon.bench{background:var(--sp-purple-lt);color:var(--sp-purple)}
.spatial-insight-body{flex:1;min-width:0}
.spatial-insight-title{font-weight:600;margin-bottom:2px;color:var(--sp-t1)}
.spatial-insight-desc{font-size:11px;color:var(--sp-t2);line-height:1.4}
.spatial-insight-actions{display:flex;gap:4px;margin-top:6px}
.spatial-insight-btn{padding:3px 8px;border:1px solid var(--sp-border);background:#fff;border-radius:4px;font-size:10px;font-weight:700;cursor:pointer;color:var(--sp-t2);font-family:inherit}
.spatial-insight-btn:hover{border-color:var(--sp-arctic-blue);color:var(--sp-arctic-blue)}
.spatial-insight-btn.swot{background:var(--sp-green);color:#fff;border-color:var(--sp-green)}
.spatial-insight-btn.swot:hover{background:#0f5226}
.spatial-insight-btn.disabled,.spatial-insight-btn[disabled]{background:var(--sp-bg-tertiary);color:var(--sp-t3);border-color:var(--sp-border);cursor:default}

/* Bench banner */
.spatial-bench-banner{padding:10px 12px;background:linear-gradient(135deg,var(--sp-purple-lt),var(--sp-arctic-blue-lt));border-radius:6px;margin-bottom:8px;font-size:11px}
.spatial-bench-banner-title{font-weight:700;color:var(--sp-purple);margin-bottom:4px}
.spatial-bench-banner-title::before{content:'✦ '}
.spatial-bench-banner-text{color:var(--sp-t2);line-height:1.4}

/* Legend */
.spatial-legend{display:flex;flex-wrap:wrap;gap:6px;padding:4px 0}
.spatial-legend-item{display:flex;align-items:center;gap:4px;font-size:10px;color:var(--sp-t2)}
.spatial-legend-swatch{width:14px;height:10px;border-radius:2px;border:1px solid rgba(0,0,0,.08)}

/* Type chips */
.spatial-type-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:10px;border:1px solid var(--sp-border);font-size:10px;color:var(--sp-t2);margin:2px 4px 2px 0;background:#fff}
.spatial-type-dot{width:8px;height:8px;border-radius:50%}
.spatial-type-count{font-weight:700;color:var(--sp-t1);margin-left:2px}

/* Map area */
.spatial-map-area{flex:1;position:relative;min-width:0}
#an-gmap{width:100%;height:100%}

/* Status bar overlay */
.spatial-status-bar{position:absolute;top:12px;left:50%;transform:translateX(-50%);background:#fff;border:1px solid var(--sp-border);border-radius:20px;padding:6px 14px;box-shadow:var(--sp-shadow);font-size:12px;color:var(--sp-t2);z-index:5}
.spatial-status-bar.success{background:var(--sp-green-lt);color:var(--sp-green);border-color:var(--sp-green)}
.spatial-status-bar.warn{background:var(--sp-amber-lt);color:var(--sp-amber);border-color:var(--sp-amber)}

/* API key prompt */
.spatial-apikey-prompt{position:absolute;inset:0;background:var(--sp-bg-soft);display:flex;align-items:center;justify-content:center;z-index:10}
.spatial-apikey-box{text-align:center;max-width:420px;padding:32px;background:#fff;border:1px solid var(--sp-border);border-radius:10px;box-shadow:var(--sp-shadow)}
.spatial-apikey-box h3{font-size:16px;margin-bottom:8px;color:var(--sp-t1);font-weight:700}
.spatial-apikey-box p{font-size:12px;color:var(--sp-t2);margin-bottom:16px;line-height:1.5}
.spatial-apikey-box input{width:100%;padding:10px;border:1px solid var(--sp-border);border-radius:6px;font-size:13px;margin-bottom:8px;font-family:inherit;outline:none;color:var(--sp-t1)}
.spatial-apikey-box input:focus{border-color:var(--sp-arctic-blue)}
.spatial-apikey-box button{padding:10px 20px;background:var(--sp-arctic-blue);color:#fff;border:none;border-radius:6px;font-size:13px;font-weight:600;cursor:pointer;width:100%;font-family:inherit}
.spatial-apikey-box button:hover{background:#0c447c}
.spatial-apikey-box .spatial-note{font-size:11px;color:var(--sp-t3);margin-top:8px}

/* Google Maps popup content */
.spatial-gm-popup{font-family:-apple-system,'Inter',system-ui,sans-serif;font-size:12px;min-width:200px;max-width:300px}
.spatial-gm-popup-title{font-weight:700;font-size:13px;color:var(--sp-arctic-blue);margin-bottom:4px}
.spatial-gm-popup-meta{color:var(--sp-t2);margin-bottom:6px;font-size:11px}
.spatial-gm-popup-stats{display:grid;grid-template-columns:1fr 1fr;gap:4px;font-size:11px}
.spatial-gm-popup-stat{background:var(--sp-bg-soft);padding:4px 8px;border-radius:4px}
.spatial-gm-popup-stat-label{color:var(--sp-t3);display:block;font-size:10px}
.spatial-gm-popup-stat-val{font-weight:700;color:var(--sp-t1)}
.spatial-gm-popup-effects{margin-top:6px;padding:6px 8px;background:var(--sp-bg-soft);border-radius:4px;font-size:11px;color:var(--sp-t2);line-height:1.4}

/* Responsive */
@media (max-width: 900px) {
  .spatial-layout{flex-direction:column}
  .spatial-sidebar{width:100%;border-right:none;border-bottom:1px solid var(--sp-border);max-height:40vh}
}

/* ==================== VISION MODULE ==================== */
/* Vision 2050 page + mini-compass in ICS strip              */

#cp2-vision {
  --vn-blue:#185fa5;
  --vn-blue-dk:#0c447c;
  --vn-blue-lt:#e6f1fb;
  --vn-green:#1a7a3b;
  --vn-green-dk:#0f5226;
  --vn-green-lt:#eaf3de;
  --vn-amber:#7a4f00;
  --vn-amber-lt:#faeeda;
  --vn-red:#b91c1c;
  --vn-red-lt:#fcebeb;
  --vn-purple:#5b4fcf;
  --vn-purple-lt:#eeedfe;
  --vn-t1:#0f1923;
  --vn-t2:#3d4f6b;
  --vn-t3:#8294ad;
  --vn-border:#dde3ee;
  --vn-border2:#c5cfde;
  --vn-bg-soft:#f5f7fb;
  --vn-bg-hover:#f0f4fa;
  --vn-bg-tertiary:#eaeff6;
  --vn-shadow:0 1px 4px rgba(15,25,35,.08),0 0 0 1px rgba(15,25,35,.04);
  font-size:13px;
  color:var(--vn-t1);
}

.vision-layout{display:grid;grid-template-columns:1fr 320px;gap:12px;padding:12px;align-items:start;max-width:1400px;margin:0 auto}
.vision-main{background:#fff;border:1px solid var(--vn-border);border-radius:10px;box-shadow:var(--vn-shadow);overflow:hidden}
.vision-side{position:sticky;top:12px;display:flex;flex-direction:column;gap:12px}

/* Hero — statement */
.v-hero{padding:24px;background:linear-gradient(135deg,var(--vn-blue-lt) 0%,var(--vn-purple-lt) 100%);border-bottom:1px solid var(--vn-border)}
.v-hero-label{font-size:11px;text-transform:uppercase;letter-spacing:1px;color:var(--vn-blue-dk);font-weight:700;margin-bottom:8px}
.v-hero-input{width:100%;font-size:19px;font-weight:700;color:var(--vn-t1);background:#fff;border:1px solid var(--vn-border);border-radius:10px;padding:14px 16px;font-family:inherit;outline:none;line-height:1.4;resize:none}
.v-hero-input:focus{border-color:var(--vn-blue);box-shadow:0 0 0 3px var(--vn-blue-lt)}
.v-hero-input::placeholder{color:var(--vn-t3);font-weight:400}
.v-hero-footer{display:flex;align-items:center;justify-content:space-between;margin-top:10px;gap:10px;flex-wrap:wrap}
.v-hero-hint{font-size:11px;color:var(--vn-blue-dk);font-style:italic}
.v-hero-ver{font-size:10px;color:var(--vn-t3);background:rgba(255,255,255,.7);padding:3px 8px;border-radius:4px}

/* Sections */
.v-section{padding:20px 24px;border-bottom:1px solid var(--vn-border)}
.v-section:last-child{border-bottom:none}
.v-sec-title{font-size:14px;font-weight:700;margin-bottom:4px;color:var(--vn-t1)}
.v-sec-sub{font-size:11px;color:var(--vn-t3);margin-bottom:16px}

/* Lines */
.v-lines{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}
.v-line{border:1px solid var(--vn-border);border-radius:10px;padding:16px;background:#fff;position:relative;transition:border-color .15s}
.v-line:hover{border-color:var(--vn-border2)}
/* Line color coding aligned with ICS domains: G (blue) / S (purple) / E (green) */
.v-line.g{border-left:4px solid var(--vn-blue)}
.v-line.s{border-left:4px solid var(--vn-purple)}
.v-line.e{border-left:4px solid var(--vn-green)}
.v-line-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;gap:8px}
.v-line-label{font-size:10px;color:var(--vn-t3);text-transform:uppercase;letter-spacing:.5px}
.v-line-name{font-size:13px;font-weight:700}
.v-line.g .v-line-name{color:var(--vn-blue-dk)}
.v-line.s .v-line-name{color:var(--vn-purple)}
.v-line.e .v-line-name{color:var(--vn-green-dk)}
.v-line-progress{font-size:11px;font-weight:700;padding:3px 8px;border-radius:10px;font-variant-numeric:tabular-nums;flex-shrink:0}
.v-line-text{width:100%;border:none;font-size:12px;color:var(--vn-t1);background:var(--vn-bg-soft);border-radius:6px;padding:10px;font-family:inherit;resize:vertical;min-height:70px;outline:none;line-height:1.5;box-sizing:border-box}
.v-line-text:focus{background:#fff;outline:1px solid var(--vn-blue)}
.v-line-swot{margin-top:8px;display:flex;flex-wrap:wrap;gap:4px}
.v-swot-chip{font-size:10px;padding:3px 7px;border-radius:4px;background:var(--vn-bg-soft);color:var(--vn-t2);display:inline-flex;align-items:center;gap:3px;border:1px solid transparent;transition:all .15s;max-width:100%}
.v-swot-chip:hover{border-color:var(--vn-purple);color:var(--vn-purple)}
.v-swot-chip .q{font-weight:800;font-size:9px;padding:1px 4px;border-radius:3px;color:#fff;flex-shrink:0}
.v-swot-chip .q.S{background:var(--vn-green)}
.v-swot-chip .q.O{background:var(--vn-blue)}
.v-swot-chip .q.W{background:var(--vn-red)}
.v-swot-chip .q.T{background:var(--vn-amber)}
.v-swot-empty{font-size:10px;color:var(--vn-t3);font-style:italic}

/* KPIs */
.horizon-sw{display:flex;background:var(--vn-bg-soft);padding:3px;border-radius:10px;width:fit-content;margin-bottom:16px;max-width:100%;overflow-x:auto}
.horizon-btn{padding:8px 14px;border-radius:6px;border:none;font-size:12px;color:var(--vn-t2);cursor:pointer;background:transparent;display:flex;flex-direction:column;align-items:center;gap:2px;min-width:110px;font-family:inherit;white-space:nowrap}
.horizon-btn:hover{background:var(--vn-bg-hover)}
.horizon-btn.active{background:#fff;color:var(--vn-blue);font-weight:700;box-shadow:var(--vn-shadow)}
.horizon-btn-year{font-size:10px;color:inherit;opacity:.7}

.kpi-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}
.kpi-card{border:1px solid var(--vn-border);border-radius:10px;padding:14px 10px;text-align:center;background:#fff;position:relative;transition:all .15s}
.kpi-card:hover{border-color:var(--vn-border2)}
.kpi-card-name{font-size:11px;color:var(--vn-t3);margin-bottom:6px;font-weight:600;line-height:1.3;min-height:28px}
.kpi-current{font-size:11px;color:var(--vn-t2);margin-bottom:2px}
.kpi-current-val{font-weight:700;color:var(--vn-t1)}
.kpi-arrow{font-size:10px;color:var(--vn-t3);margin:4px 0}
.kpi-input-wrap{margin-bottom:2px}
.kpi-input{width:86px;font-size:20px;font-weight:800;color:var(--vn-blue);text-align:center;border:none;border-bottom:2px solid var(--vn-border);background:transparent;font-family:inherit;font-variant-numeric:tabular-nums;outline:none;padding:4px 0}
.kpi-input:focus{border-bottom-color:var(--vn-blue)}
.kpi-unit{font-size:10px;color:var(--vn-t3);line-height:1.3;min-height:26px}
.kpi-horizon-badge{display:inline-block;font-size:9px;background:var(--vn-blue);color:#fff;padding:2px 6px;border-radius:3px;margin-top:6px;font-weight:700;letter-spacing:.3px}
.kpi-realism{margin-top:6px;font-size:10px;font-weight:700;padding:3px 8px;border-radius:4px;display:inline-block}
.kpi-realism.conservative{background:var(--vn-blue-lt);color:var(--vn-blue-dk)}
.kpi-realism.realistic{background:var(--vn-green-lt);color:var(--vn-green)}
.kpi-realism.ambitious{background:var(--vn-amber-lt);color:var(--vn-amber)}
.kpi-realism.unrealistic{background:var(--vn-red-lt);color:var(--vn-red)}
.kpi-realism.pending{background:var(--vn-bg-tertiary);color:var(--vn-t3)}
.kpi-ai-comment{margin-top:6px;font-size:10px;color:var(--vn-purple);line-height:1.3;padding:4px 6px;background:var(--vn-purple-lt);border-radius:4px;text-align:left}

/* Compass detail */
.compass-detail{display:flex;gap:20px;align-items:center;margin-bottom:16px}
.compass-big-ring{width:80px;height:80px;border-radius:50%;position:relative;flex-shrink:0}
.compass-big-pct{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}
.compass-big-num{font-size:22px;font-weight:800;font-variant-numeric:tabular-nums}
.compass-big-label{font-size:9px;color:var(--vn-t3);text-transform:uppercase}
.compass-right{flex:1;min-width:0}
.compass-right h3{font-size:14px;font-weight:700;margin-bottom:4px;color:var(--vn-t1)}
.compass-right p{font-size:12px;color:var(--vn-t2);line-height:1.5}

.compass-kpis{display:flex;flex-direction:column;gap:6px}
.compass-kpi-row{display:flex;align-items:center;gap:8px;font-size:12px;flex-wrap:wrap}
.compass-kpi-name{width:140px;color:var(--vn-t2);flex-shrink:0}
.compass-kpi-bar{flex:1;height:8px;background:var(--vn-bg-tertiary);border-radius:4px;overflow:hidden;min-width:100px}
.compass-kpi-fill{height:100%;border-radius:4px;transition:width .5s}
.compass-kpi-fill.green{background:var(--vn-green)}
.compass-kpi-fill.amber{background:#f59e0b}
.compass-kpi-fill.red{background:var(--vn-red)}
.compass-kpi-pct{width:42px;text-align:right;font-weight:700;font-variant-numeric:tabular-nums;font-size:11px}
.compass-kpi-tgt{font-size:10px;color:var(--vn-t3);margin-left:4px}

/* Footer */
.v-footer{padding:16px 24px;background:var(--vn-bg-soft);display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.v-footer-info{font-size:11px;color:var(--vn-t3)}
.v-footer-info strong{color:var(--vn-t1)}
.v-footer-btns{display:flex;gap:8px;flex-wrap:wrap}
.v-btn-p{background:var(--vn-blue);color:#fff;border:none;padding:8px 16px;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;font-family:inherit}
.v-btn-p:hover{background:var(--vn-blue-dk)}
.v-btn-s{background:#fff;color:var(--vn-t2);border:1px solid var(--vn-border);padding:8px 16px;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;font-family:inherit}
.v-btn-s:hover{border-color:var(--vn-blue);color:var(--vn-blue)}

/* Alex side card */
.v-alex-card{background:#fff;border:1px solid var(--vn-border);border-radius:10px;box-shadow:var(--vn-shadow);overflow:hidden}
.v-alex-hdr{background:linear-gradient(135deg,var(--vn-purple),var(--vn-blue));color:#fff;padding:14px 16px;display:flex;align-items:center;gap:10px}
.v-alex-av{width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,.22);display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:800}
.v-alex-info{flex:1;min-width:0}
.v-alex-name{font-weight:700;font-size:13px}
.v-alex-role{font-size:10px;opacity:.85}
.v-alex-sec{padding:12px 16px;border-bottom:1px solid var(--vn-border)}
.v-alex-sec:last-child{border-bottom:none}
.v-alex-sec-title{font-size:10px;text-transform:uppercase;letter-spacing:.5px;color:var(--vn-t3);font-weight:700;margin-bottom:8px}
.v-alex-action{width:100%;padding:10px;border:1px solid var(--vn-purple);background:var(--vn-purple-lt);color:var(--vn-purple);border-radius:6px;font-size:12px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;margin-bottom:6px;font-family:inherit}
.v-alex-action:hover{background:var(--vn-purple);color:#fff}
.v-alex-action.primary{background:var(--vn-purple);color:#fff}
.v-alex-action.primary:hover{background:var(--vn-blue);border-color:var(--vn-blue)}
.v-alex-action:last-child{margin-bottom:0}

/* SWOT suggestions */
.swot-sug{padding:10px;background:var(--vn-bg-soft);border-radius:6px;margin-bottom:6px;font-size:12px}
.swot-sug:last-child{margin-bottom:0}
.swot-sug-hdr{display:flex;align-items:center;gap:6px;margin-bottom:4px;font-weight:600;color:var(--vn-t1)}
.swot-sug-target{font-size:10px;padding:2px 6px;border-radius:3px;font-weight:700;color:#fff}
.swot-sug-target.line{background:var(--vn-purple)}
.swot-sug-target.warn{background:var(--vn-amber)}
.swot-sug-text{font-size:11px;color:var(--vn-t1);margin-bottom:4px;line-height:1.4}
.swot-sug-reason{font-size:10px;color:var(--vn-t3);font-style:italic;margin-bottom:6px}
.swot-sug-actions{display:flex;gap:4px}
.swot-sug-btn{flex:1;padding:5px 8px;border:1px solid var(--vn-border);background:#fff;border-radius:4px;font-size:10px;font-weight:700;cursor:pointer;color:var(--vn-t2);text-align:center;font-family:inherit}
.swot-sug-btn.accept{background:var(--vn-green);color:#fff;border-color:var(--vn-green)}
.swot-sug-btn.accept:hover{background:var(--vn-green-dk)}
.swot-sug-btn:hover{opacity:.9}
.swot-sug-btn:disabled{opacity:.6;cursor:default}

/* Version list */
.ver-list{display:flex;flex-direction:column;gap:6px}
.ver-item{padding:8px 10px;background:var(--vn-bg-soft);border-radius:6px;font-size:11px;display:flex;align-items:center;gap:8px;transition:all .15s}
.ver-item:hover{background:var(--vn-bg-hover)}
.ver-item.current{border-left:3px solid var(--vn-blue);background:var(--vn-blue-lt)}
.ver-dot{width:8px;height:8px;border-radius:50%;background:var(--vn-border2);flex-shrink:0}
.ver-item.current .ver-dot{background:var(--vn-blue)}
.ver-info{flex:1;min-width:0}
.ver-title{font-weight:600;color:var(--vn-t1)}
.ver-item.current .ver-title{color:var(--vn-blue)}
.ver-time{color:var(--vn-t3);font-size:10px}
.ver-restore{font-size:10px;color:var(--vn-amber);font-weight:700;cursor:pointer;white-space:nowrap}
.ver-restore:hover{color:var(--vn-red)}

/* ICS-strip mini compass */
.cp-ics-strip .cp-ics-cell{padding:2px 8px;flex-shrink:0}
.cp-vc-wrap{display:flex;align-items:center;gap:8px;cursor:pointer;padding:2px 4px;border-radius:6px;transition:background .12s}
.cp-vc-wrap:hover{background:rgba(24,95,165,.08)}
.cp-vc-ring{position:relative;width:40px;height:40px;flex-shrink:0}
.cp-vc-pct{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:800;font-variant-numeric:tabular-nums}
.cp-vc-info{display:flex;flex-direction:column;line-height:1.2;min-width:0}
.cp-vc-label{font-size:9px;color:var(--vn-t3,#8294ad);text-transform:uppercase;letter-spacing:.4px}
.cp-vc-status{font-size:11px;font-weight:700}
.cp-vc-risk{font-size:9px;color:var(--vn-t3,#8294ad);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100px}

/* Responsive */
@media (max-width:1100px){
  .vision-layout{grid-template-columns:1fr}
  .v-lines{grid-template-columns:1fr}
  .kpi-grid{grid-template-columns:repeat(2,1fr)}
  .vision-side{position:static}
}

/* ── AI Goal Suggestions per Vision line ── */
.v-line-ai-btn{width:100%;margin-top:10px;padding:8px 12px;background:var(--vn-bg-soft,#f5f7fb);border:1px dashed var(--vn-border2,#c5cfde);border-radius:6px;font-size:11px;font-weight:600;color:var(--vn-purple,#5b4fcf);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:all .15s;font-family:inherit}
.v-line-ai-btn:hover{background:var(--vn-purple-lt,#eeedfe);border-color:var(--vn-purple,#5b4fcf);border-style:solid}
.v-line-suggestions{margin-top:8px;padding:12px;background:linear-gradient(135deg,var(--vn-purple-lt,#eeedfe) 0%,var(--vn-blue-lt,#e6f1fb) 100%);border-radius:10px;border:1px solid var(--vn-border,#dde3ee)}
.v-sug-header{font-size:11px;font-weight:700;color:var(--vn-purple,#5b4fcf);margin-bottom:8px;display:flex;align-items:center;gap:6px}
.v-sug-loading{font-size:12px;color:var(--vn-t2,#3d4f6b);padding:8px 0;text-align:center;font-style:italic}
.v-sug-item{display:flex;gap:8px;padding:8px 10px;background:rgba(255,255,255,.75);border-radius:6px;margin-bottom:6px;font-size:12px;line-height:1.45;cursor:pointer;border:1px solid transparent;transition:all .15s}
.v-sug-item:last-child{margin-bottom:0}
.v-sug-item:hover{background:#fff;border-color:var(--vn-purple,#5b4fcf)}
.v-sug-item.selected{background:#fff;border-color:var(--vn-purple,#5b4fcf)}
.v-sug-check{width:18px;height:18px;border:2px solid var(--vn-border2,#c5cfde);border-radius:4px;display:flex;align-items:center;justify-content:center;font-size:11px;color:transparent;flex-shrink:0;margin-top:1px;transition:all .15s;font-weight:800}
.v-sug-item.selected .v-sug-check{background:var(--vn-purple,#5b4fcf);border-color:var(--vn-purple,#5b4fcf);color:#fff}
.v-sug-body{flex:1;min-width:0}
.v-sug-goal{font-weight:600;color:var(--vn-t1,#0f1923);margin-bottom:2px}
.v-sug-mechanism{font-size:11px;color:var(--vn-t2,#3d4f6b)}
.v-sug-ref{font-size:10px;color:var(--vn-t3,#8294ad);font-style:italic;margin-top:2px}
.v-sug-footer{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap}
.v-sug-footer button{flex:1;min-width:100px;padding:7px 10px;border-radius:6px;font-size:11px;font-weight:700;cursor:pointer;border:1px solid var(--vn-border,#dde3ee);background:#fff;color:var(--vn-t2,#3d4f6b);font-family:inherit}
.v-sug-footer button:hover{border-color:var(--vn-purple,#5b4fcf);color:var(--vn-purple,#5b4fcf)}
.v-sug-footer button.primary{background:var(--vn-purple,#5b4fcf);color:#fff;border-color:var(--vn-purple,#5b4fcf)}
.v-sug-footer button.primary:hover{opacity:.9}

/* ==================== KAT — Complex Territorial Analysis ==================== */
#an-map-view {
  --kat-blue:#185fa5;
  --kat-blue-dk:#0c447c;
  --kat-blue-lt:#e6f1fb;
  --kat-green:#1a7a3b;
  --kat-green-lt:#eaf3de;
  --kat-amber:#7a4f00;
  --kat-amber-lt:#faeeda;
  --kat-red:#b91c1c;
  --kat-red-lt:#fcebeb;
  --kat-purple:#5b4fcf;
  --kat-purple-lt:#eeedfe;
  --kat-t1:#0f1923;
  --kat-t2:#3d4f6b;
  --kat-t3:#8294ad;
  --kat-border:#dde3ee;
  --kat-border2:#c5cfde;
  --kat-bg:#fff;
  --kat-bg2:#f5f7fb;
  --kat-bg3:#eaeff6;
  --kat-hover:#f0f4fa;
  --kat-shadow:0 1px 4px rgba(15,25,35,.08),0 0 0 1px rgba(15,25,35,.04);
  font-size:13px;
  color:var(--kat-t1);
}

.kat-layout{display:flex;flex:1;width:100%;height:100%;min-height:500px;overflow:hidden;background:var(--kat-bg);border:1px solid var(--kat-border);border-radius:10px;box-shadow:var(--kat-shadow)}
.kat-sidebar{width:380px;border-right:1px solid var(--kat-border);display:flex;flex-direction:column;flex-shrink:0}
.kat-sb-header{padding:10px 14px;border-bottom:1px solid var(--kat-border);background:var(--kat-bg2)}
.kat-sb-title{font-weight:700;font-size:13px;margin-bottom:6px;color:var(--kat-t1)}
.kat-an-tabs{display:flex;gap:1px;background:var(--kat-bg3);padding:2px;border-radius:6px}
.kat-an-tab{flex:1;padding:5px 4px;border:none;border-radius:4px;font-size:10px;font-weight:600;color:var(--kat-t3);cursor:pointer;background:transparent;text-align:center;min-width:58px;line-height:1.3;font-family:inherit}
.kat-an-tab:hover{background:var(--kat-hover);color:var(--kat-t2)}
.kat-an-tab.active{background:var(--kat-bg);color:var(--kat-blue);box-shadow:var(--kat-shadow)}

.kat-sb-body{flex:1;overflow-y:auto}
.kat-sb-sec{padding:10px 14px;border-bottom:1px solid var(--kat-border)}
.kat-sb-sec:last-child{border-bottom:none}
.kat-sb-sec-title{font-size:10px;text-transform:uppercase;letter-spacing:.5px;color:var(--kat-t3);font-weight:700;margin-bottom:6px;display:flex;align-items:center;justify-content:space-between}

/* Provision */
.kat-prov-group{margin-bottom:12px}
.kat-prov-group-title{font-size:12px;font-weight:700;margin-bottom:6px;display:flex;align-items:center;gap:6px;color:var(--kat-t1)}
/* Masterplan 3.1 — территориальная доступность */
.kat-acc-wrap{margin-top:2px}
.kat-acc-hdr{font-size:10px;text-transform:uppercase;letter-spacing:.5px;color:var(--kat-t3,#8294ad);font-weight:700;margin-bottom:8px}
.kat-acc-row{display:flex;align-items:center;gap:6px;margin-bottom:6px;font-size:11px}
.kat-acc-name{width:130px;flex-shrink:0;color:var(--kat-t2,#3d4f6b);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kat-acc-r{color:#8294ad;font-size:9px}
.kat-acc-obj{width:42px;flex-shrink:0;color:#8294ad;font-size:10px;text-align:right}
.kat-acc-bar{flex:1;height:5px;background:#eaeff6;border-radius:3px;overflow:hidden;min-width:40px}
.kat-acc-fill{height:100%;border-radius:3px;transition:width .3s}
.kat-acc-pct{width:34px;flex-shrink:0;text-align:right;font-weight:700;font-size:11px}
.kat-acc-map{flex-shrink:0;border:none;background:transparent;cursor:pointer;font-size:12px;padding:0 2px}
.kat-acc-st{width:58px;flex-shrink:0;text-align:right;font-size:10px;font-weight:600}
.kat-acc-note{margin-top:8px;padding:7px 9px;background:#fcebeb;color:#b91c1c;border-radius:6px;font-size:10px;line-height:1.4}
.kat-acc-note.ok{background:#eaf3de;color:#1a7a3b}
.kat-prov-row{display:flex;align-items:center;gap:8px;margin-bottom:5px;font-size:11px}
.kat-prov-name{width:110px;color:var(--kat-t2);flex-shrink:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kat-prov-bar{flex:1;height:7px;background:var(--kat-bg3);border-radius:4px;overflow:hidden;position:relative}
.kat-prov-fill{height:100%;border-radius:4px;transition:width .5s}
.kat-prov-fill.crit{background:var(--kat-red)}
.kat-prov-fill.low{background:#f59e0b}
.kat-prov-fill.ok{background:var(--kat-green)}
.kat-prov-pct{width:36px;text-align:right;font-weight:700;font-variant-numeric:tabular-nums;font-size:10px}
.kat-prov-pct.crit{color:var(--kat-red)}
.kat-prov-pct.low{color:var(--kat-amber)}
.kat-prov-pct.ok{color:var(--kat-green)}
.kat-prov-badge{font-size:9px;padding:1px 5px;border-radius:3px;font-weight:700;margin-left:4px}
.kat-prov-badge.crit{background:var(--kat-red-lt);color:var(--kat-red)}
.kat-prov-swot{font-size:9px;color:var(--kat-purple);cursor:pointer;margin-left:auto;font-weight:700;white-space:nowrap;padding:1px 4px;border-radius:3px}
.kat-prov-swot:hover{background:var(--kat-purple-lt);text-decoration:none}

/* Zone balance table */
.kat-zone-table{width:100%;border-collapse:collapse;font-size:11px}
.kat-zone-table th{text-align:left;padding:4px 6px;font-size:10px;color:var(--kat-t3);border-bottom:1px solid var(--kat-border);font-weight:700}
.kat-zone-table td{padding:5px 6px;border-bottom:1px solid var(--kat-border)}
.kat-zone-table tr:last-child td{border-bottom:none}
.kat-zone-bar-cell{width:100px}
.kat-zone-bar{height:6px;background:var(--kat-bg3);border-radius:3px;overflow:hidden}
.kat-zone-bar-fill{height:100%;border-radius:3px}
.kat-zone-status{font-size:10px;font-weight:700;text-align:center;white-space:nowrap}
.kat-zone-status.deficit{color:var(--kat-red)}
.kat-zone-status.ok{color:var(--kat-green)}
.kat-zone-status.excess{color:var(--kat-amber)}

/* Constraint cards */
.kat-constraint{padding:8px 10px;border-radius:6px;margin-bottom:5px;font-size:11px;border:1px solid var(--kat-border);background:var(--kat-bg);display:flex;gap:8px;cursor:pointer;transition:all .15s}
.kat-constraint:hover{border-color:var(--kat-blue);transform:translateX(2px)}
.kat-constraint-icon{width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;flex-shrink:0;font-weight:800}
.kat-constraint-icon.danger{background:var(--kat-red-lt);color:var(--kat-red)}
.kat-constraint-icon.warn{background:var(--kat-amber-lt);color:var(--kat-amber)}
.kat-constraint-icon.info{background:var(--kat-blue-lt);color:var(--kat-blue)}
.kat-constraint-body{flex:1;min-width:0}
.kat-constraint-title{font-weight:600;margin-bottom:2px;color:var(--kat-t1)}
.kat-constraint-desc{font-size:10px;color:var(--kat-t2);line-height:1.4}
.kat-constraint-actions{display:flex;gap:3px;margin-top:4px;flex-wrap:wrap}
.kat-c-btn{padding:2px 6px;border:1px solid var(--kat-border);background:var(--kat-bg);border-radius:3px;font-size:9px;font-weight:700;cursor:pointer;color:var(--kat-t2);font-family:inherit}
.kat-c-btn:hover{border-color:var(--kat-blue);color:var(--kat-blue)}
.kat-c-btn.swot{background:var(--kat-green);color:#fff;border-color:var(--kat-green)}
.kat-c-btn.swot:hover{background:#0f5226;color:#fff}
.kat-c-btn.disabled,.kat-c-btn[disabled]{opacity:.55;cursor:default;background:var(--kat-bg3);color:var(--kat-t3);border-color:var(--kat-border)}

/* Potential cards */
.kat-potential{padding:10px 12px;border-radius:10px;margin-bottom:6px;border:1px solid var(--kat-border);background:var(--kat-bg);cursor:pointer;transition:all .15s}
.kat-potential:hover{border-color:var(--kat-blue)}
.kat-potential-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px;gap:8px}
.kat-potential-name{font-weight:700;font-size:12px;color:var(--kat-t1)}
.kat-potential-area{font-size:10px;color:var(--kat-t3);font-weight:600;white-space:nowrap}
.kat-potential-status{font-size:10px;color:var(--kat-t2);margin-bottom:4px}
.kat-potential-tags{display:flex;gap:3px;flex-wrap:wrap;margin-bottom:6px}
.kat-pot-tag{font-size:9px;padding:2px 5px;border-radius:3px;font-weight:600}
.kat-pot-tag.green{background:var(--kat-green-lt);color:var(--kat-green)}
.kat-pot-tag.amber{background:var(--kat-amber-lt);color:var(--kat-amber)}
.kat-pot-tag.red{background:var(--kat-red-lt);color:var(--kat-red)}
.kat-pot-tag.blue{background:var(--kat-blue-lt);color:var(--kat-blue)}
.kat-potential-ai{font-size:10px;color:var(--kat-purple);padding:6px 8px;background:var(--kat-purple-lt);border-radius:6px;margin-bottom:6px;line-height:1.4}
.kat-potential-ai::before{content:'✦ ';font-weight:800}

/* Diagnosis card */
.kat-diag-card{padding:14px;background:linear-gradient(135deg,var(--kat-purple-lt),var(--kat-blue-lt));border-radius:10px;margin-bottom:8px}
.kat-diag-title{font-weight:700;font-size:13px;color:var(--kat-purple);margin-bottom:8px;display:flex;align-items:center;gap:6px}
.kat-diag-title::before{content:'✦'}
.kat-diag-text{font-size:12px;color:var(--kat-t1);line-height:1.6;margin-bottom:8px}
.kat-diag-text strong{font-weight:700}
.kat-diag-priority{display:flex;gap:8px;align-items:flex-start;margin-bottom:6px;font-size:11px}
.kat-diag-priority:last-child{margin-bottom:0}
.kat-diag-num{width:20px;height:20px;border-radius:50%;background:var(--kat-blue);color:#fff;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:800;flex-shrink:0}
.kat-diag-priority-text{flex:1;line-height:1.4;color:var(--kat-t1)}
.kat-diag-actions{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap}
.kat-diag-btn{padding:6px 12px;border-radius:6px;font-size:11px;font-weight:700;cursor:pointer;border:1px solid var(--kat-border);background:var(--kat-bg);color:var(--kat-t2);font-family:inherit}
.kat-diag-btn:hover{border-color:var(--kat-blue);color:var(--kat-blue)}
.kat-diag-btn.primary{background:var(--kat-purple);color:#fff;border-color:var(--kat-purple)}
.kat-diag-btn.primary:hover{background:var(--kat-blue);border-color:var(--kat-blue)}

/* Stat mini */
.kat-stat-mini{display:grid;grid-template-columns:1fr 1fr;gap:4px}
.kat-stat-mini-item{background:var(--kat-bg2);padding:5px 8px;border-radius:4px;font-size:11px;display:flex;justify-content:space-between;gap:6px}
.kat-stat-mini-val{font-weight:700;font-variant-numeric:tabular-nums;color:var(--kat-t1)}
.kat-stat-mini-val.bad{color:var(--kat-red)}
.kat-stat-mini-val.ok{color:var(--kat-amber)}
.kat-stat-mini-val.good{color:var(--kat-green)}

/* Map */
.kat-map-area{flex:1;position:relative;min-width:0}
#kat-gmap{width:100%;height:100%}
.kat-status-bar{position:absolute;top:12px;left:50%;transform:translateX(-50%);background:#fff;border:1px solid var(--kat-border);border-radius:20px;padding:6px 14px;box-shadow:var(--kat-shadow);font-size:12px;color:var(--kat-t2);z-index:5;max-width:80%;text-align:center}
.kat-status-bar.success{border-color:#1a7a3b;color:#1a7a3b}
.kat-status-bar.error{border-color:#b91c1c;color:#b91c1c}

/* Map toolbar (top-left, floats over map) */
.kat-map-toolbar{position:absolute;top:10px;left:10px;z-index:6;display:flex;gap:6px;background:rgba(255,255,255,.94);padding:5px;border:1px solid var(--kat-border);border-radius:8px;box-shadow:var(--kat-shadow);backdrop-filter:blur(6px)}
.kat-tb-btn{display:inline-flex;align-items:center;gap:4px;padding:6px 10px;background:#fff;border:1px solid var(--kat-border);border-radius:6px;font-size:11px;font-weight:600;color:var(--kat-t1);cursor:pointer;font-family:inherit;white-space:nowrap;transition:all .15s}
.kat-tb-btn:hover{background:var(--kat-bg2);border-color:var(--kat-blue);color:var(--kat-blue)}
.kat-tb-btn.kat-tb-ghost{color:var(--kat-t3);font-weight:500}
.kat-tb-btn.kat-tb-ghost:hover{color:var(--kat-red);border-color:var(--kat-red)}
.kat-tb-btn input[type="file"]{display:none}

/* In-panel upload button (zoning empty state) */
.kat-upload-btn{display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 14px;background:var(--kat-blue);color:#fff;border-radius:8px;font-size:12px;font-weight:600;cursor:pointer;transition:background .15s;margin-top:4px}
.kat-upload-btn:hover{background:var(--kat-blue-dk)}

/* API key prompt */
.kat-apikey-prompt{position:absolute;inset:0;background:var(--kat-bg2);display:flex;align-items:center;justify-content:center;z-index:10}
.kat-apikey-box{text-align:center;max-width:420px;padding:32px;background:#fff;border:1px solid var(--kat-border);border-radius:10px;box-shadow:var(--kat-shadow)}
.kat-apikey-box h3{font-size:15px;margin-bottom:6px;color:var(--kat-t1);font-weight:700}
.kat-apikey-box p{font-size:11px;color:var(--kat-t2);margin-bottom:12px;line-height:1.5}
.kat-apikey-box input{width:100%;padding:8px;border:1px solid var(--kat-border);border-radius:6px;font-size:12px;margin-bottom:6px;font-family:inherit;outline:none;color:var(--kat-t1)}
.kat-apikey-box input:focus{border-color:var(--kat-blue)}
.kat-apikey-box button{padding:8px 16px;background:var(--kat-blue);color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;width:100%;font-family:inherit}
.kat-apikey-box button:hover{background:var(--kat-blue-dk)}

/* Responsive */
@media (max-width:900px){
  .kat-layout{flex-direction:column}
  .kat-sidebar{width:100%;border-right:none;border-bottom:1px solid var(--kat-border);max-height:50vh}
}

/* ==================== MANAGEMENT FLOW — Nav arrows + toolbar ==================== */
.step-arrow{color:#8294ad;font-size:11px;margin:0 2px;font-weight:700;display:inline-flex;align-items:center}

/* Projects internal toggle (charts/tree/map) — toolbar row between ICS strip and active view */
.cp-projects-toolbar{display:flex;gap:6px;padding:8px 14px;background:#fff;border-bottom:1px solid #dde3ee;flex-shrink:0;position:relative;z-index:70;align-items:center}

/* When tab-map is placed inside cp2-right-area (Projects → Карта), compact its inner
   layout so the Google Maps fills the available vertical space instead of 550px + gaps. */
.cp2-right-area > #tab-map{display:flex;flex-direction:column;padding:0;flex:1;min-height:0;height:100%}
.cp2-right-area > #tab-map > .section:first-of-type{margin:0;border:none;border-radius:0;display:flex;flex-direction:column;flex:1;min-height:0;height:100%}
.cp2-right-area > #tab-map > .section:first-of-type > .section-body{flex:1;min-height:0;padding:0;display:flex;flex-direction:column;gap:0}
.cp2-right-area > #tab-map #map{flex:1 1 auto;min-height:600px;height:100%;border-radius:0;border:none;width:auto}
/* Hide decorative tooltip/indicator/status divs when they have no content, so they don't steal flex space */
.cp2-right-area > #tab-map #mapTooltip,
.cp2-right-area > #tab-map #placementIndicator,
.cp2-right-area > #tab-map #mapStatusInfo{display:none}
.cp2-right-area > #tab-map #mapTooltip.show,
.cp2-right-area > #tab-map #placementIndicator.show,
.cp2-right-area > #tab-map #mapStatusInfo:not(:empty){display:block;flex-shrink:0}
/* Initiatives panel is already shown in left sidebar — hide duplicate inside map view */
.cp2-right-area > #tab-map > #cp-map-inits-panel{display:none !important}
.cp2-right-area > #tab-map > .section:not(:first-of-type){display:none !important}
.cp-projects-toolbar::before{content:'Вид:';font-size:10px;text-transform:uppercase;letter-spacing:.4px;color:#8294ad;font-weight:700;margin-right:8px;align-self:center}
.cp-pt-btn{padding:6px 12px;border:1px solid #dde3ee;background:#fff;border-radius:6px;font-size:12px;font-weight:600;color:#3d4f6b;cursor:pointer;display:inline-flex;align-items:center;gap:6px;font-family:inherit;transition:all .15s}
.cp-pt-btn:hover{background:#f0f4fa;border-color:#c5cfde;color:#185fa5}
.cp-pt-btn.active{background:#e6f1fb;border-color:#185fa5;color:#0c447c;font-weight:700}
.cp-pt-ico{font-size:13px}

/* ==================== RISKS MODULE ==================== */
#cp2-risks{
  --rk-blue:#185fa5;--rk-blue-dk:#0c447c;--rk-blue-lt:#e6f1fb;
  --rk-green:#1a7a3b;--rk-green-lt:#eaf3de;
  --rk-amber:#7a4f00;--rk-amber-lt:#faeeda;
  --rk-red:#b91c1c;--rk-red-lt:#fcebeb;
  --rk-purple:#5b4fcf;--rk-purple-lt:#eeedfe;
  --rk-t1:#0f1923;--rk-t2:#3d4f6b;--rk-t3:#8294ad;
  --rk-border:#dde3ee;--rk-bg:#fff;--rk-bg2:#f5f7fb;--rk-bg3:#eaeff6;
  --rk-shadow:0 1px 4px rgba(15,25,35,.08),0 0 0 1px rgba(15,25,35,.04);
  font-size:13px;color:var(--rk-t1);
}
.risk-page{padding:12px;max-width:1400px;margin:0 auto}
.risk-header{display:flex;align-items:flex-start;justify-content:space-between;background:#fff;border:1px solid var(--rk-border);border-radius:10px;padding:14px 18px;margin-bottom:12px;box-shadow:var(--rk-shadow);gap:12px;flex-wrap:wrap}
.risk-header-left{flex:1;min-width:240px}
.risk-header-title{font-size:16px;font-weight:700;color:var(--rk-t1);margin-bottom:4px}
.risk-header-sub{font-size:12px;color:var(--rk-t2);line-height:1.5}
.risk-header-right{display:flex;align-items:center;gap:14px}
.risk-counter{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.risk-counter-num{font-size:22px;font-weight:800;color:var(--rk-red)}
.risk-counter-lbl{font-size:10px;color:var(--rk-t3);text-transform:uppercase;letter-spacing:.5px}
.risk-add-btn{padding:8px 14px;background:var(--rk-red);color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;font-family:inherit}
.risk-add-btn:hover{background:#8a1414}

.risk-layout{display:grid;grid-template-columns:1fr 360px;gap:12px;align-items:start}
@media (max-width:1100px){.risk-layout{grid-template-columns:1fr}}

/* Register */
.risk-register{background:#fff;border:1px solid var(--rk-border);border-radius:10px;padding:14px;box-shadow:var(--rk-shadow)}
.risk-register-title{font-size:13px;font-weight:700;margin-bottom:10px;color:var(--rk-t1)}
.risk-empty{font-size:12px;color:var(--rk-t3);padding:16px;text-align:center;font-style:italic}
.risk-card{display:block;background:var(--rk-bg2);border:1px solid var(--rk-border);border-radius:10px;margin-bottom:8px;padding:10px 12px;transition:all .2s}
.risk-card:hover{border-color:#c5cfde}
.risk-card.on{background:var(--rk-red-lt);border-color:var(--rk-red)}
.risk-card-flash{animation:riskFlash 1s}
@keyframes riskFlash{0%,100%{box-shadow:0 0 0 rgba(185,28,28,.5)}50%{box-shadow:0 0 0 8px rgba(185,28,28,.2)}}
.risk-card-top{display:flex;gap:10px;align-items:flex-start}
.risk-toggle{position:relative;display:inline-block;width:36px;height:20px;flex-shrink:0;margin-top:2px}
.risk-toggle input{opacity:0;width:0;height:0}
.risk-toggle-slider{position:absolute;inset:0;background:#c5cfde;border-radius:10px;cursor:pointer;transition:background .2s}
.risk-toggle-slider::before{content:'';position:absolute;left:2px;top:2px;width:16px;height:16px;background:#fff;border-radius:50%;transition:transform .2s;box-shadow:0 1px 2px rgba(0,0,0,.2)}
.risk-toggle input:checked + .risk-toggle-slider{background:var(--rk-red)}
.risk-toggle input:checked + .risk-toggle-slider::before{transform:translateX(16px)}
.risk-card-body{flex:1;min-width:0}
.risk-card-name{font-weight:700;font-size:13px;color:var(--rk-t1);margin-bottom:2px}
.risk-card-desc{font-size:11px;color:var(--rk-t2);line-height:1.45;margin-bottom:4px}
.risk-card-meta{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin-bottom:4px}
.risk-source{font-size:9px;padding:1px 6px;border-radius:3px;background:var(--rk-bg3);color:var(--rk-t2);font-weight:600;text-transform:uppercase;letter-spacing:.3px}
.risk-eff-chip{font-size:10px;padding:2px 6px;border-radius:4px;background:var(--rk-blue-lt);color:var(--rk-blue-dk);font-weight:600}
.risk-eff-empty{font-size:10px;color:var(--rk-t3);font-style:italic}
.risk-card-actions{display:flex;gap:3px;flex-shrink:0}
.risk-mini-btn{width:24px;height:24px;border:1px solid var(--rk-border);background:#fff;border-radius:5px;cursor:pointer;color:var(--rk-t3);font-size:12px;font-family:inherit;display:flex;align-items:center;justify-content:center;padding:0}
.risk-mini-btn:hover{border-color:var(--rk-purple);color:var(--rk-purple)}
.risk-mini-btn.del:hover{border-color:var(--rk-red);color:var(--rk-red)}

.risk-controls{display:flex;gap:8px;margin-top:6px;align-items:center;flex-wrap:wrap}
.risk-ctrl{display:flex;align-items:center;gap:4px;font-size:10px}
.risk-ctrl label{color:var(--rk-t3);font-weight:700;text-transform:uppercase;letter-spacing:.3px}
.risk-ctrl select{padding:3px 6px;border:1px solid var(--rk-border);border-radius:4px;font-size:11px;font-weight:600;background:#fff;cursor:pointer;min-width:96px;font-family:inherit;color:var(--rk-t1)}
.risk-ctrl select.prob-high{background:var(--rk-red-lt);color:var(--rk-red);border-color:var(--rk-red)}
.risk-ctrl select.prob-medium{background:var(--rk-amber-lt);color:var(--rk-amber);border-color:#f59e0b}
.risk-ctrl select.prob-low{background:var(--rk-green-lt);color:var(--rk-green);border-color:var(--rk-green)}
.risk-ctrl select.sev-critical{background:var(--rk-red);color:#fff;border-color:var(--rk-red)}
.risk-ctrl select.sev-high{background:var(--rk-red-lt);color:var(--rk-red);border-color:var(--rk-red)}
.risk-ctrl select.sev-medium{background:var(--rk-amber-lt);color:var(--rk-amber);border-color:#f59e0b}
.risk-ctrl select.sev-low{background:var(--rk-blue-lt);color:var(--rk-blue);border-color:var(--rk-blue)}

/* Heatmap */
.risk-heatmap{background:#fff;border:1px solid var(--rk-border);border-radius:10px;padding:14px;position:relative;box-shadow:var(--rk-shadow);margin-bottom:10px}
.risk-heatmap-title{font-size:13px;font-weight:700;margin-bottom:12px;color:var(--rk-t1)}
.hm-axis-y{position:absolute;left:-6px;top:50%;transform:rotate(-90deg) translateY(-50%);transform-origin:left top;font-size:10px;color:var(--rk-t3);text-transform:uppercase;letter-spacing:.5px;display:none}
.hm-axis-x{font-size:10px;color:var(--rk-t3);text-transform:uppercase;letter-spacing:.5px;text-align:right;margin-bottom:4px}
.hm-grid{display:flex;flex-direction:column;gap:3px}
.hm-row{display:grid;grid-template-columns:70px repeat(4, 1fr);gap:3px;align-items:stretch}
.hm-header{font-size:10px;color:var(--rk-t3);text-align:center;font-weight:700}
.hm-col-label,.hm-row-label{padding:4px;text-align:center;font-size:10px;color:var(--rk-t3);font-weight:700;text-transform:uppercase;letter-spacing:.3px;display:flex;align-items:center;justify-content:center}
.hm-row-label{background:var(--rk-bg3);border-radius:4px}
.hm-cell{min-height:52px;border-radius:6px;padding:4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:1px solid rgba(0,0,0,.05)}
.hm-cell-count{font-size:14px;font-weight:800;color:var(--rk-t1);opacity:.75}
.hm-cell-dots{display:flex;flex-wrap:wrap;gap:2px;max-width:100%;justify-content:center}
.risk-dot{width:8px;height:8px;border-radius:50%;background:var(--rk-t3);cursor:pointer;transition:transform .12s}
.risk-dot:hover{transform:scale(1.4)}
.risk-dot.on{background:var(--rk-red);box-shadow:0 0 0 2px rgba(185,28,28,.25)}

/* Stats */
.risk-stats{background:#fff;border:1px solid var(--rk-border);border-radius:10px;padding:14px;box-shadow:var(--rk-shadow)}
.risk-stats-title{font-size:13px;font-weight:700;margin-bottom:8px;color:var(--rk-t1)}
.risk-stat-row{display:flex;justify-content:space-between;align-items:center;padding:5px 0;font-size:12px;border-bottom:1px solid var(--rk-border)}
.risk-stat-row:last-child{border-bottom:none}
.risk-stat-row span{color:var(--rk-t2)}
.risk-stat-row b{font-weight:700;color:var(--rk-t1);font-variant-numeric:tabular-nums}
.risk-stat-row b.bad{color:var(--rk-red)}
.risk-stat-row b.warn{color:var(--rk-amber)}
.risk-stat-row b.ok{color:var(--rk-green)}

/* ==================== SCENARIOS MODULE ==================== */
#cp2-scenarios{
  --sc-blue:#185fa5;--sc-blue-dk:#0c447c;--sc-blue-lt:#e6f1fb;
  --sc-green:#1a7a3b;--sc-green-lt:#eaf3de;
  --sc-amber:#7a4f00;--sc-amber-lt:#faeeda;
  --sc-red:#b91c1c;--sc-red-lt:#fcebeb;
  --sc-t1:#0f1923;--sc-t2:#3d4f6b;--sc-t3:#8294ad;
  --sc-border:#dde3ee;--sc-bg2:#f5f7fb;
  --sc-shadow:0 1px 4px rgba(15,25,35,.08),0 0 0 1px rgba(15,25,35,.04);
  font-size:13px;color:var(--sc-t1);
}
.sc-page{padding:12px;max-width:1400px;margin:0 auto}
.sc-header{background:#fff;border:1px solid var(--sc-border);border-radius:10px;padding:14px 18px;margin-bottom:12px;box-shadow:var(--sc-shadow)}
.sc-title{font-size:16px;font-weight:700;color:var(--sc-t1);margin-bottom:4px}
.sc-sub{font-size:12px;color:var(--sc-t2);line-height:1.5}

.sc-summary-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:12px}
.sc-card{background:#fff;border:1px solid var(--sc-border);border-radius:10px;padding:14px 18px;box-shadow:var(--sc-shadow);position:relative;overflow:hidden}
.sc-card::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:var(--sc-t3)}
.sc-card.inert::before{background:#8294ad}
.sc-card.target::before{background:var(--sc-blue)}
.sc-card.risk::before{background:var(--sc-red)}
.sc-card-label{font-size:10px;text-transform:uppercase;letter-spacing:.5px;color:var(--sc-t3);font-weight:700;margin-bottom:6px}
.sc-card-value{font-size:28px;font-weight:800;line-height:1;color:var(--sc-t1);font-variant-numeric:tabular-nums;margin-bottom:4px}
.sc-card.inert .sc-card-value{color:#8294ad}
.sc-card.target .sc-card-value{color:var(--sc-blue)}
.sc-card.risk .sc-card-value{color:var(--sc-red)}
.sc-card-delta{font-size:11px;color:var(--sc-t3);font-weight:600}
.sc-card-delta.good{color:var(--sc-green)}
.sc-card-delta.bad{color:var(--sc-red)}

.sc-chart-box{background:#fff;border:1px solid var(--sc-border);border-radius:10px;padding:14px;box-shadow:var(--sc-shadow);margin-bottom:12px}
.sc-chart-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;gap:8px}
.sc-chart-title{font-size:13px;font-weight:700;color:var(--sc-t1)}
.sc-kpi-sel{padding:6px 10px;border:1px solid var(--sc-border);border-radius:6px;font-size:12px;background:#fff;cursor:pointer;font-family:inherit;color:var(--sc-t1)}
#sc-chart{width:100%;height:260px;display:block}
.sc-chart-legend{display:flex;gap:18px;flex-wrap:wrap;margin-top:10px;padding-top:10px;border-top:1px solid var(--sc-border);font-size:11px;color:var(--sc-t2)}
.sc-leg-item{display:flex;align-items:center;gap:6px}
.sc-leg-line{width:24px;height:2px;border-radius:1px}
.sc-leg-line.inert{background:#8294ad;border-top:2px dashed #8294ad;height:0}
.sc-leg-line.target{background:var(--sc-blue);height:3px}
.sc-leg-line.risk{background:var(--sc-red);border-top:2px dashed var(--sc-red);height:0}

.sc-section-title{font-size:12px;font-weight:700;color:var(--sc-t1);margin-bottom:10px;text-transform:uppercase;letter-spacing:.3px}

.sc-table-box{background:#fff;border:1px solid var(--sc-border);border-radius:10px;padding:14px;box-shadow:var(--sc-shadow);margin-bottom:12px;overflow-x:auto}
.sc-table{width:100%;border-collapse:collapse;font-size:12px}
.sc-table th,.sc-table td{text-align:right;padding:7px 10px;border-bottom:1px solid var(--sc-border);white-space:nowrap;font-variant-numeric:tabular-nums}
.sc-table th{font-weight:700;color:var(--sc-t3);text-transform:uppercase;letter-spacing:.3px;font-size:10px}
.sc-table th:first-child,.sc-table td:first-child{text-align:left}
.sc-table tr:last-child td{border-bottom:none}
.sc-table tr:hover td{background:var(--sc-bg2)}
.sc-ind-name{color:var(--sc-t2);font-weight:500;max-width:220px;overflow:hidden;text-overflow:ellipsis}
.sc-d{font-size:11px;font-weight:700;margin-left:6px}
.sc-d.good{color:var(--sc-green)}
.sc-d.bad{color:var(--sc-red)}

.sc-sens-box{background:#fff;border:1px solid var(--sc-border);border-radius:10px;padding:14px;box-shadow:var(--sc-shadow)}
.sc-sens-list{display:flex;flex-direction:column;gap:4px}
.sc-sens-row{display:grid;grid-template-columns:220px 1fr 60px;gap:10px;align-items:center;font-size:12px}
.sc-sens-label{color:var(--sc-t2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sc-sens-bar-wrap{height:16px;background:var(--sc-bg2);border-radius:3px;position:relative;overflow:hidden}
.sc-sens-bar{height:100%;border-radius:3px;transition:width .4s}
.sc-sens-bar.bad{background:var(--sc-red)}
.sc-sens-bar.good{background:var(--sc-green)}
.sc-sens-bar.left{margin-left:auto}
.sc-sens-delta{text-align:right;font-weight:700;font-variant-numeric:tabular-nums}
.sc-sens-delta.bad{color:var(--sc-red)}
.sc-sens-delta.good{color:var(--sc-green)}
.sc-sens-hint{margin-top:10px;padding:8px 12px;background:var(--sc-blue-lt);color:var(--sc-blue-dk);border-radius:6px;font-size:12px;line-height:1.4}

@media (max-width:900px){
  .sc-summary-strip{grid-template-columns:1fr}
  .sc-sens-row{grid-template-columns:1fr 60px;grid-template-rows:auto auto}
  .sc-sens-label{grid-column:1 / span 2}
}

/* ==================== АРКТУР — AI-советник ==================== */
/* Replaces old ai-assistant-fab / ai-assistant-panel */

/* FAB (floating action button) */
.arcturus-fab{
  position:fixed;bottom:24px;right:24px;z-index:9000;
  width:56px;height:56px;border-radius:50%;border:none;cursor:pointer;
  background:linear-gradient(135deg,#185fa5 0%,#534ab7 50%,#1a7a3b 100%);
  box-shadow:0 4px 20px rgba(24,95,165,.35),0 0 0 0 rgba(83,74,183,.3);
  display:flex;align-items:center;justify-content:center;
  transition:all .3s;
  animation:arcFabPulse 3s ease-in-out infinite;
}
.arcturus-fab:hover{transform:scale(1.08);box-shadow:0 6px 28px rgba(24,95,165,.45)}
.arcturus-fab.open{animation:none;background:#3d4f6b}
@keyframes arcFabPulse{
  0%,100%{box-shadow:0 4px 20px rgba(24,95,165,.35),0 0 0 0 rgba(83,74,183,.3)}
  50%{box-shadow:0 4px 20px rgba(24,95,165,.35),0 0 0 8px rgba(83,74,183,0)}
}
.arcturus-fab svg{width:28px;height:28px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* Overlay */
.arcturus-overlay{position:fixed;inset:0;background:rgba(15,25,35,.15);z-index:9001;opacity:0;pointer-events:none;transition:opacity .25s}
.arcturus-overlay.open{opacity:1;pointer-events:auto}

/* Side panel */
.arcturus-panel{
  position:fixed;top:0;right:-440px;width:420px;height:100vh;z-index:9002;
  background:#fff;border-left:1px solid #dde3ee;
  box-shadow:-4px 0 32px rgba(15,25,35,.1);
  display:flex;flex-direction:column;
  transition:right .3s cubic-bezier(.4,0,.2,1);
  font-family:-apple-system,'Inter',system-ui,sans-serif;
  color:#0f1923;
  --arc-bg:#fff;--arc-bg2:#f5f7fb;--arc-bg3:#eaeff6;
  --arc-blue:#185fa5;--arc-blue-lt:#e6f1fb;--arc-purple:#5b4fcf;
  --arc-green:#1a7a3b;--arc-red:#b91c1c;--arc-amber:#7a4f00;
  --arc-t1:#0f1923;--arc-t2:#3d4f6b;--arc-t3:#8294ad;
  --arc-border:#dde3ee;--arc-r:6px;--arc-rm:10px;
}
.arcturus-panel.open{right:0}
.arcturus-panel *{box-sizing:border-box}

/* Header */
.arcturus-panel .arc-header{
  padding:16px 20px;
  background:linear-gradient(135deg,#0c447c 0%,#185fa5 40%,#534ab7 100%);
  color:#fff;display:flex;align-items:center;gap:12px;flex-shrink:0;
}
.arcturus-panel .arc-avatar{
  width:40px;height:40px;border-radius:50%;
  background:rgba(255,255,255,.15);
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
  position:relative;
}
.arcturus-panel .arc-avatar svg{width:22px;height:22px;fill:none;stroke:#fff;stroke-width:1.5}
.arcturus-panel .arc-avatar-pulse{position:absolute;inset:-2px;border-radius:50%;border:2px solid rgba(255,255,255,.3);animation:arcAvatarPulse 2s ease-in-out infinite}
@keyframes arcAvatarPulse{0%,100%{opacity:.5;transform:scale(1)}50%{opacity:0;transform:scale(1.3)}}
.arcturus-panel .arc-info{flex:1;min-width:0}
.arcturus-panel .arc-name{font-size:15px;font-weight:700;letter-spacing:.3px}
.arcturus-panel .arc-status{font-size:11px;opacity:.85;display:flex;align-items:center;gap:4px;margin-top:1px}
.arcturus-panel .arc-status-dot{width:6px;height:6px;border-radius:50%;background:#4ade80}
.arcturus-panel .arc-close{background:none;border:none;color:rgba(255,255,255,.75);font-size:18px;cursor:pointer;padding:4px 8px;border-radius:var(--arc-r);font-family:inherit}
.arcturus-panel .arc-close:hover{background:rgba(255,255,255,.15);color:#fff}

/* Context bar */
.arcturus-panel .arc-context{
  padding:10px 20px;background:var(--arc-bg2);border-bottom:1px solid var(--arc-border);
  font-size:11px;color:var(--arc-t2);display:flex;align-items:center;gap:8px;flex-shrink:0;
}
.arcturus-panel .arc-ctx-icon{font-size:14px;flex-shrink:0}
.arcturus-panel .arc-ctx-text{flex:1;min-width:0}
.arcturus-panel .arc-ctx-text strong{color:var(--arc-blue);font-weight:700}
.arcturus-panel .arc-ctx-badge{font-size:9px;padding:2px 6px;border-radius:3px;font-weight:700;background:var(--arc-blue-lt);color:var(--arc-blue);text-transform:uppercase;letter-spacing:.3px;flex-shrink:0}

/* Messages area */
.arcturus-panel .arc-messages{flex:1;overflow-y:auto;padding:16px 20px;display:flex;flex-direction:column;gap:12px;background:#fff}

/* Message bubble */
.arcturus-panel .arc-msg{display:flex;gap:8px;max-width:95%}
.arcturus-panel .arc-msg.user{align-self:flex-end;flex-direction:row-reverse}
.arcturus-panel .arc-msg-avatar{width:28px;height:28px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:12px;margin-top:2px;font-weight:700}
.arcturus-panel .arc-msg.assistant .arc-msg-avatar{background:linear-gradient(135deg,var(--arc-blue),var(--arc-purple));color:#fff}
.arcturus-panel .arc-msg.user .arc-msg-avatar{background:var(--arc-bg3);color:var(--arc-t2)}
.arcturus-panel .arc-msg-body{flex:1;min-width:0}
.arcturus-panel .arc-msg-bubble{padding:10px 14px;border-radius:var(--arc-rm);font-size:12px;line-height:1.6;word-wrap:break-word}
.arcturus-panel .arc-msg.assistant .arc-msg-bubble{background:var(--arc-bg2);color:var(--arc-t1)}
.arcturus-panel .arc-msg.user .arc-msg-bubble{background:var(--arc-blue);color:#fff}
.arcturus-panel .arc-msg-bubble strong{font-weight:700}
.arcturus-panel .arc-msg-time{font-size:9px;color:var(--arc-t3);margin-top:3px}
.arcturus-panel .arc-msg.user .arc-msg-time{text-align:right}

/* Typing indicator */
.arcturus-panel .arc-typing{display:flex;gap:4px;padding:10px 14px;background:var(--arc-bg2);border-radius:var(--arc-rm);width:60px}
.arcturus-panel .arc-typing-dot{width:6px;height:6px;border-radius:50%;background:var(--arc-t3);animation:arcTyping .8s ease-in-out infinite}
.arcturus-panel .arc-typing-dot:nth-child(2){animation-delay:.15s}
.arcturus-panel .arc-typing-dot:nth-child(3){animation-delay:.3s}
@keyframes arcTyping{0%,100%{opacity:.3;transform:translateY(0)}50%{opacity:1;transform:translateY(-3px)}}

/* Quick actions */
.arcturus-panel .arc-quick{padding:8px 20px;border-top:1px solid var(--arc-border);background:var(--arc-bg);flex-shrink:0;display:flex;flex-wrap:wrap;gap:4px}
.arcturus-panel .arc-quick-btn{
  padding:6px 10px;border:1px solid var(--arc-border);border-radius:16px;
  font-size:11px;color:var(--arc-t2);background:var(--arc-bg);cursor:pointer;
  display:inline-flex;align-items:center;gap:4px;transition:all .15s;white-space:nowrap;
  font-family:inherit;
}
.arcturus-panel .arc-quick-btn:hover{border-color:var(--arc-blue);color:var(--arc-blue);background:var(--arc-blue-lt)}
.arcturus-panel .arc-quick-btn .qi{font-size:12px}

/* Input bar */
.arcturus-panel .arc-input-bar{
  padding:12px 20px 16px;border-top:1px solid var(--arc-border);
  background:var(--arc-bg);flex-shrink:0;display:flex;gap:8px;align-items:flex-end;
}
.arcturus-panel .arc-input{
  flex:1;padding:10px 14px;border:1px solid var(--arc-border);border-radius:var(--arc-rm);
  font-size:13px;font-family:inherit;resize:none;outline:none;color:var(--arc-t1);background:#fff;
  min-height:42px;max-height:120px;line-height:1.4;
}
.arcturus-panel .arc-input:focus{border-color:var(--arc-blue);box-shadow:0 0 0 3px var(--arc-blue-lt)}
.arcturus-panel .arc-input::placeholder{color:var(--arc-t3)}
.arcturus-panel .arc-send{
  width:42px;height:42px;border-radius:50%;border:none;
  background:linear-gradient(135deg,var(--arc-blue),var(--arc-purple));
  color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;
  transition:all .15s;flex-shrink:0;
}
.arcturus-panel .arc-send:hover{transform:scale(1.05)}
.arcturus-panel .arc-send:active{transform:scale(.95)}
.arcturus-panel .arc-send svg{width:18px;height:18px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* Inline data blocks inside messages */
.arcturus-panel .arc-data{background:var(--arc-bg3);border-radius:var(--arc-r);padding:8px 10px;margin-top:6px;font-size:11px;font-variant-numeric:tabular-nums}
.arcturus-panel .arc-data-row{display:flex;justify-content:space-between;padding:2px 0}
.arcturus-panel .arc-data-row:not(:last-child){border-bottom:1px solid var(--arc-border)}
.arcturus-panel .arc-data-label{color:var(--arc-t2)}
.arcturus-panel .arc-data-val{font-weight:700;color:var(--arc-t1)}
.arcturus-panel .arc-data-val.good{color:var(--arc-green)}
.arcturus-panel .arc-data-val.bad{color:var(--arc-red)}
.arcturus-panel .arc-data-val.ok{color:var(--arc-amber)}

/* Inline insight cards */
.arcturus-panel .arc-insight{border:1px solid var(--arc-border);border-radius:var(--arc-rm);padding:10px 12px;margin-top:6px;background:var(--arc-bg)}
.arcturus-panel .arc-insight-title{font-weight:700;font-size:12px;margin-bottom:4px;color:var(--arc-blue)}
.arcturus-panel .arc-insight-text{font-size:11px;color:var(--arc-t2);line-height:1.5}
.arcturus-panel .arc-insight-actions{display:flex;gap:4px;margin-top:6px;flex-wrap:wrap}
.arcturus-panel .arc-insight-btn{padding:4px 10px;border:1px solid var(--arc-border);border-radius:4px;font-size:10px;font-weight:700;cursor:pointer;background:var(--arc-bg);color:var(--arc-t2);font-family:inherit}
.arcturus-panel .arc-insight-btn:hover{border-color:var(--arc-blue);color:var(--arc-blue)}
.arcturus-panel .arc-insight-btn.primary{background:var(--arc-blue);color:#fff;border-color:var(--arc-blue)}

/* Mobile responsive */
@media (max-width: 520px){
  .arcturus-panel{width:100vw;right:-100vw}
  .arcturus-panel.open{right:0}
}

/* Hide old AI Assistant FAB/panel if any legacy refs survive */
.ai-assistant-fab,.ai-assistant-panel{display:none !important}

/* ==================== BENCHMARK+ ==================== */
/* Scoped to #an-bench-view so it doesn't leak into other views */

#an-bench-view{
  --bp-bg:#fff;--bp-bg2:#f5f7fb;--bp-bg3:#eaeff6;--bp-hover:#f0f4fa;
  --bp-blue:#185fa5;--bp-blue-dk:#0c447c;--bp-blue-lt:#e6f1fb;
  --bp-green:#1a7a3b;--bp-green-lt:#eaf3de;
  --bp-amber:#7a4f00;--bp-amber-lt:#faeeda;
  --bp-red:#b91c1c;--bp-red-lt:#fcebeb;
  --bp-purple:#5b4fcf;--bp-purple-lt:#eeedfe;
  --bp-t1:#0f1923;--bp-t2:#3d4f6b;--bp-t3:#8294ad;
  --bp-border:#dde3ee;--bp-border2:#c5cfde;
  --bp-shadow:0 1px 4px rgba(15,25,35,.08),0 0 0 1px rgba(15,25,35,.04);
  font-size:13px;color:var(--bp-t1);
}

.bp-page{padding:12px;max-width:1400px;margin:0 auto}
.bp-main{background:#fff;border:1px solid var(--bp-border);border-radius:10px;box-shadow:var(--bp-shadow);overflow:hidden}
.bp-sec{padding:16px 20px;border-bottom:1px solid var(--bp-border)}
.bp-sec:last-child{border-bottom:none}
.bp-sec-title{font-size:14px;font-weight:700;margin-bottom:3px;color:var(--bp-t1)}
.bp-sec-sub{font-size:11px;color:var(--bp-t3);margin-bottom:12px}

/* Header: city chips */
.bp-header{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.bp-city-tag{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:16px;font-size:12px;font-weight:600;border:1px solid var(--bp-border);background:var(--bp-bg);cursor:default;color:var(--bp-t2)}
.bp-city-tag.ours{border-color:var(--bp-blue);background:var(--bp-blue-lt);color:var(--bp-blue-dk)}
.bp-city-tag .bp-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.bp-chip-remove{margin-left:4px;font-size:10px;cursor:pointer;opacity:.5;padding:0 2px}
.bp-chip-remove:hover{opacity:1}
.bp-add-sel{padding:5px 12px;border-radius:16px;border:1px dashed var(--bp-border2);background:var(--bp-bg);font-size:11px;color:var(--bp-t3);cursor:pointer;font-family:inherit;outline:none}
.bp-add-sel:hover{border-color:var(--bp-blue);color:var(--bp-blue);background:var(--bp-blue-lt)}

/* Top grid: radar + score */
.bp-top-grid{display:grid;grid-template-columns:1fr 320px;gap:16px}
@media (max-width:900px){.bp-top-grid{grid-template-columns:1fr}}

.bp-radar-wrap{position:relative;display:flex;align-items:center;justify-content:center;min-height:340px;background:var(--bp-bg2);border-radius:10px;padding:8px}
.bp-radar-wrap canvas{max-width:100%;height:auto}
.bp-radar-legend{position:absolute;top:10px;left:10px;display:flex;flex-direction:column;gap:4px;background:rgba(255,255,255,.85);padding:6px 10px;border-radius:6px;border:1px solid var(--bp-border)}
.bp-radar-leg-item{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--bp-t2);white-space:nowrap}
.bp-radar-leg-dot{width:12px;height:4px;border-radius:2px}
.bp-radar-leg-item strong{color:var(--bp-t1)}

/* Score card */
.bp-score-card{display:flex;flex-direction:column;gap:8px}
.bp-score-overall{padding:16px;background:linear-gradient(135deg,var(--bp-blue-lt),var(--bp-purple-lt));border-radius:10px;text-align:center}
.bp-score-overall-label{font-size:10px;color:var(--bp-blue-dk);text-transform:uppercase;letter-spacing:.5px;font-weight:700}
.bp-score-overall-val{font-size:38px;font-weight:800;color:var(--bp-blue-dk);font-variant-numeric:tabular-nums;margin:4px 0;line-height:1}
.bp-score-overall-of{font-size:11px;color:var(--bp-t3)}
.bp-score-overall-verdict{font-size:12px;font-weight:700;margin-top:6px;padding:4px 10px;border-radius:12px;display:inline-block}
.bp-score-overall-verdict.good{background:var(--bp-green-lt);color:var(--bp-green)}
.bp-score-overall-verdict.mid{background:var(--bp-amber-lt);color:var(--bp-amber)}
.bp-score-overall-verdict.bad{background:var(--bp-red-lt);color:var(--bp-red)}

.bp-score-domain{padding:10px 12px;border-radius:6px;display:flex;align-items:center;gap:10px;border:1px solid var(--bp-border)}
.bp-score-letter{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:12px;color:#fff;flex-shrink:0}
.bp-score-letter.G{background:var(--bp-blue)}
.bp-score-letter.S{background:var(--bp-purple)}
.bp-score-letter.E{background:var(--bp-green)}
.bp-score-info{flex:1;min-width:0}
.bp-score-name{font-size:11px;font-weight:600;color:var(--bp-t1)}
.bp-score-bar{height:6px;background:var(--bp-bg3);border-radius:3px;overflow:hidden;margin-top:3px}
.bp-score-fill{height:100%;border-radius:3px;transition:width .5s}
.bp-score-pct{font-size:16px;font-weight:800;font-variant-numeric:tabular-nums;flex-shrink:0;min-width:30px;text-align:right}

/* Gap analysis */
.bp-gap-header{display:grid;grid-template-columns:160px 60px 1fr 60px 70px 70px;gap:8px;padding:4px 10px;font-size:10px;color:var(--bp-t3);font-weight:700;text-transform:uppercase;letter-spacing:.3px}
.bp-gap-header span:nth-child(3){text-align:center}
.bp-gap-header span:nth-child(5),.bp-gap-header span:nth-child(6){text-align:center}
.bp-gap-list{display:flex;flex-direction:column;gap:4px}
.bp-gap-row{display:grid;grid-template-columns:160px 60px 1fr 60px 70px 70px;align-items:center;gap:8px;padding:8px 10px;border-radius:6px;border:1px solid var(--bp-border);font-size:12px;background:var(--bp-bg);transition:all .15s}
.bp-gap-row:hover{border-color:var(--bp-border2);background:var(--bp-hover)}
.bp-gap-name{font-weight:600;display:flex;align-items:center;gap:4px;color:var(--bp-t1)}
.bp-gap-domain{font-size:9px;padding:1px 5px;border-radius:3px;font-weight:700;flex-shrink:0}
.bp-gap-domain.G{background:var(--bp-blue-lt);color:var(--bp-blue)}
.bp-gap-domain.S{background:var(--bp-purple-lt);color:var(--bp-purple)}
.bp-gap-domain.E{background:var(--bp-green-lt);color:var(--bp-green)}
.bp-gap-val{font-weight:700;font-variant-numeric:tabular-nums;text-align:center}
.bp-gap-val.my{color:var(--bp-blue)}
.bp-gap-val.ref{color:var(--bp-t3)}
.bp-gap-bar-cell{position:relative;height:20px}
.bp-gap-bar-track{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);height:6px;background:var(--bp-bg3);border-radius:3px}
.bp-gap-bar-center{position:absolute;top:0;left:50%;width:1px;height:100%;background:var(--bp-border2)}
.bp-gap-bar-fill{position:absolute;top:50%;transform:translateY(-50%);height:6px;border-radius:3px}
.bp-gap-bar-fill.pos{background:var(--bp-green);right:50%}
.bp-gap-bar-fill.neg{background:var(--bp-red);left:50%}
.bp-gap-pct{font-weight:700;font-variant-numeric:tabular-nums;text-align:right;font-size:12px}
.bp-gap-pct.pos{color:var(--bp-green)}
.bp-gap-pct.neg{color:var(--bp-red)}
.bp-gap-swot{font-size:10px;padding:4px 6px;border-radius:4px;font-weight:700;cursor:pointer;border:none;text-align:center;font-family:inherit}
.bp-gap-swot.S{background:var(--bp-green);color:#fff}
.bp-gap-swot.W{background:var(--bp-red);color:#fff}
.bp-gap-swot:hover{opacity:.9}

/* Percentile */
.bp-pctl-legend{display:flex;justify-content:space-between;font-size:9px;color:var(--bp-t3);font-weight:700;text-transform:uppercase;letter-spacing:.3px;margin:0 0 4px 130px;padding-right:60px}
.bp-pctl-row{display:flex;align-items:center;gap:10px;margin-bottom:6px;font-size:12px}
.bp-pctl-name{width:120px;font-weight:600;flex-shrink:0;color:var(--bp-t1)}
.bp-pctl-track{flex:1;height:16px;background:linear-gradient(90deg,var(--bp-red-lt) 0%,var(--bp-amber-lt) 33%,var(--bp-green-lt) 66%,var(--bp-blue-lt) 100%);border-radius:8px;position:relative}
.bp-pctl-marker{position:absolute;top:-2px;width:24px;height:20px;border-radius:10px;background:var(--bp-blue);border:2px solid #fff;box-shadow:var(--bp-shadow);display:flex;align-items:center;justify-content:center;transform:translateX(-50%)}
.bp-pctl-marker-text{font-size:9px;font-weight:800;color:#fff;font-variant-numeric:tabular-nums}
.bp-pctl-val{width:54px;text-align:right;font-weight:700;font-variant-numeric:tabular-nums;font-size:11px}

/* AI panel */
.bp-ai-panel{padding:16px;background:linear-gradient(135deg,var(--bp-purple-lt),var(--bp-blue-lt));border-radius:10px}
.bp-ai-header{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.bp-ai-star{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,var(--bp-blue),var(--bp-purple));display:flex;align-items:center;justify-content:center;color:#fff;font-size:16px;flex-shrink:0;font-weight:800}
.bp-ai-name{font-weight:700;font-size:13px;color:var(--bp-purple)}
.bp-ai-role{font-size:10px;color:var(--bp-t3)}
.bp-ai-text{font-size:12px;color:var(--bp-t1);line-height:1.6;margin-bottom:10px}
.bp-ai-text strong{color:var(--bp-blue)}
.bp-ai-rec{display:flex;gap:8px;align-items:flex-start;padding:8px 10px;background:rgba(255,255,255,.65);border-radius:6px;margin-bottom:6px;font-size:12px}
.bp-ai-rec:last-child{margin-bottom:0}
.bp-ai-rec-num{width:22px;height:22px;border-radius:50%;background:var(--bp-blue);color:#fff;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;flex-shrink:0}
.bp-ai-rec-text{flex:1;line-height:1.5;color:var(--bp-t1)}
.bp-ai-rec-text strong{color:var(--bp-blue)}
.bp-ai-actions{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap}
.bp-ai-btn{padding:7px 14px;border-radius:6px;font-size:11px;font-weight:700;cursor:pointer;border:1px solid var(--bp-border);background:var(--bp-bg);color:var(--bp-t2);font-family:inherit}
.bp-ai-btn:hover{border-color:var(--bp-blue);color:var(--bp-blue)}
.bp-ai-btn.primary{background:var(--bp-purple);color:#fff;border-color:var(--bp-purple)}
.bp-ai-btn.primary:hover{background:var(--bp-blue);border-color:var(--bp-blue);color:#fff}

/* Footer */
.bp-foot{padding:12px 20px;background:var(--bp-bg2);display:flex;align-items:center;justify-content:space-between;font-size:11px;color:var(--bp-t3);flex-wrap:wrap;gap:10px}
.bp-foot strong{color:var(--bp-t1)}
.bp-foot-btns{display:flex;gap:6px}
.bp-btn-s{background:var(--bp-bg);color:var(--bp-t2);border:1px solid var(--bp-border);padding:6px 14px;border-radius:6px;font-size:11px;font-weight:600;cursor:pointer;font-family:inherit}
.bp-btn-s:hover{border-color:var(--bp-blue);color:var(--bp-blue)}

/* Responsive: stack gap rows */
@media (max-width:780px){
  .bp-gap-header,.bp-gap-row{grid-template-columns:1fr auto auto}
  .bp-gap-header span:nth-child(3),.bp-gap-header span:nth-child(4){display:none}
  .bp-gap-row .bp-gap-bar-cell,.bp-gap-row .bp-gap-val.ref{display:none}
}

/* ==================== KEY INDICATORS v3 ==================== */
/* Scoped under #an-kp-view to avoid collisions */

#an-kp-view{
  --kp-blue:#185fa5;--kp-blue-dk:#0c447c;--kp-blue-lt:#e6f1fb;
  --kp-green:#1a7a3b;--kp-green-lt:#eaf3de;
  --kp-amber:#7a4f00;--kp-amber-lt:#faeeda;
  --kp-red:#b91c1c;--kp-red-lt:#fcebeb;
  --kp-purple:#5b4fcf;--kp-purple-lt:#eeedfe;
  --kp-t1:#0f1923;--kp-t2:#3d4f6b;--kp-t3:#8294ad;
  --kp-border:#dde3ee;--kp-border2:#c5cfde;
  --kp-bg:#fff;--kp-bg2:#f5f7fb;--kp-bg3:#eaeff6;--kp-hover:#f0f4fa;
  --kp-shadow:0 1px 4px rgba(15,25,35,.08),0 0 0 1px rgba(15,25,35,.04);
  font-size:13px;color:var(--kp-t1);
}

.kp-page{padding:12px;max-width:1400px;margin:0 auto}

/* Controls */
.kp-controls{background:#fff;border:1px solid var(--kp-border);border-radius:10px;padding:8px 16px;display:flex;align-items:center;gap:12px;margin-bottom:10px;box-shadow:var(--kp-shadow);flex-wrap:wrap}
.kp-controls-title{font-size:14px;font-weight:700;color:var(--kp-t1)}
.kp-legend{display:flex;gap:12px;font-size:10px;color:var(--kp-t3)}
.kp-leg-item{display:flex;align-items:center;gap:4px}
.kp-leg-dot{width:10px;height:3px;border-radius:2px}
.kp-horizon-sel{padding:4px 10px;border:1px solid var(--kp-border);border-radius:6px;font-size:11px;background:#fff;cursor:pointer;font-family:inherit;color:var(--kp-t1)}
.kp-view-toggle{display:flex;gap:1px;background:var(--kp-bg3);padding:2px;border-radius:6px;margin-left:auto}
.kp-vt{padding:5px 12px;border:none;border-radius:4px;font-size:11px;font-weight:600;color:var(--kp-t2);cursor:pointer;background:transparent;font-family:inherit}
.kp-vt:hover{color:var(--kp-blue)}
.kp-vt.on{background:#fff;color:var(--kp-blue);box-shadow:var(--kp-shadow)}

/* Domains */
.kp-domains{display:flex;flex-direction:column;gap:10px}
.kp-domain{background:#fff;border:1px solid var(--kp-border);border-radius:10px;box-shadow:var(--kp-shadow);overflow:hidden}
.kp-domain-hdr{padding:12px 16px;display:flex;align-items:center;gap:10px}
.kp-domain-badge{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:12px;color:#fff;flex-shrink:0}
.kp-domain-badge.G{background:var(--kp-blue)}
.kp-domain-badge.S{background:var(--kp-purple)}
.kp-domain-badge.E{background:var(--kp-green)}
.kp-domain-name{font-size:13px;font-weight:700;flex:1;color:var(--kp-t1)}
.kp-domain-score{font-size:20px;font-weight:800;font-variant-numeric:tabular-nums}
.kp-domain-trend{font-size:11px;font-weight:700;margin-left:4px}

/* Cluster accordion */
.kp-cl{border-top:1px solid var(--kp-border)}
.kp-cl-hdr{padding:8px 16px;display:flex;align-items:center;gap:8px;cursor:pointer;user-select:none;flex-wrap:wrap}
.kp-cl-hdr:hover{background:var(--kp-hover)}
.kp-cl-chev{font-size:9px;color:var(--kp-t3);transition:transform .2s;width:12px;text-align:center;flex-shrink:0}
.kp-cl.open .kp-cl-chev{transform:rotate(90deg)}
.kp-cl-id{font-size:9px;font-weight:800;padding:2px 6px;border-radius:3px;flex-shrink:0}
.kp-cl-id.G{background:var(--kp-blue-lt);color:var(--kp-blue)}
.kp-cl-id.S{background:var(--kp-purple-lt);color:var(--kp-purple)}
.kp-cl-id.E{background:var(--kp-green-lt);color:var(--kp-green)}
.kp-cl-name{font-size:12px;font-weight:600;color:var(--kp-t1)}
.kp-cl-cnt{font-size:10px;color:var(--kp-t3);margin-left:6px}
.kp-cl-causal{font-size:10px;color:var(--kp-t3);margin-left:auto;max-width:360px;text-align:right;display:none}
.kp-cl.open .kp-cl-causal{display:block}
.kp-cl-body{display:none;padding:4px 16px 14px}
.kp-cl.open .kp-cl-body{display:block}

/* Cards view */
.kp-cards-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
@media (max-width:900px){.kp-cards-grid{grid-template-columns:1fr 1fr}}
@media (max-width:600px){.kp-cards-grid{grid-template-columns:1fr}}
.kp-card{padding:10px 12px;border:1px solid var(--kp-border);border-radius:6px;background:#fff;position:relative;transition:border-color .15s}
.kp-card:hover{border-color:var(--kp-border2)}
.kp-card-type{position:absolute;top:0;left:0;width:3px;height:100%;border-radius:3px 0 0 3px}
.kp-card-type.direct{background:var(--kp-blue)}
.kp-card-type.indirect{background:#f59e0b}
.kp-card-type.context{background:var(--kp-t3)}
.kp-card-top{display:flex;align-items:center;gap:4px;margin-bottom:4px}
.kp-card-name{font-size:11px;font-weight:600;flex:1;color:var(--kp-t1);line-height:1.3}
.kp-card-badge{font-size:8px;padding:1px 5px;border-radius:2px;font-weight:700;text-transform:uppercase;letter-spacing:.3px}
.kp-card-badge.direct{background:var(--kp-blue-lt);color:var(--kp-blue)}
.kp-card-badge.indirect{background:var(--kp-amber-lt);color:#f59e0b}
.kp-card-badge.context{background:var(--kp-bg3);color:var(--kp-t3)}
.kp-card-mid{display:flex;align-items:baseline;gap:6px;margin-bottom:4px;flex-wrap:wrap}
.kp-card-val{font-size:20px;font-weight:800;font-variant-numeric:tabular-nums;color:var(--kp-t1);line-height:1}
.kp-card-unit{font-size:10px;color:var(--kp-t3)}
.kp-card-delta{font-size:10px;font-weight:700;padding:2px 5px;border-radius:3px;margin-left:auto}
.kp-card-delta.up{background:var(--kp-green-lt);color:var(--kp-green)}
.kp-card-delta.dn{background:var(--kp-red-lt);color:var(--kp-red)}
.kp-card-delta.flat{background:var(--kp-bg3);color:var(--kp-t3)}
.kp-card-spark{height:24px;margin:3px 0}
.kp-card-spark canvas{display:block;width:100%}
.kp-card-year{font-size:9px;text-transform:uppercase;letter-spacing:.4px;color:var(--kp-t3);font-weight:700;margin:2px 0 1px}
.kp-card-base{font-size:10px;color:var(--kp-t3);margin-top:2px;font-variant-numeric:tabular-nums}
.kp-card-base b{color:var(--kp-t2);font-weight:700}
.kp-card-bench{font-size:10px;color:var(--kp-t3);margin-top:4px}
.kp-card-bench-diff{font-weight:700}
.kp-card-bench-diff.better{color:var(--kp-green)}
.kp-card-bench-diff.worse{color:var(--kp-red)}
.kp-card-note{font-size:9px;color:var(--kp-t3);font-style:italic;margin-top:3px;line-height:1.35}

/* Table view */
.kp-tbl-wrap{overflow-x:auto}
.kp-tbl{width:100%;border-collapse:collapse;font-size:12px;min-width:720px}
.kp-tbl th{text-align:left;padding:6px 8px;font-size:10px;color:var(--kp-t3);font-weight:700;text-transform:uppercase;letter-spacing:.3px;border-bottom:1px solid var(--kp-border);white-space:nowrap}
.kp-tbl th.r{text-align:right}
.kp-tbl th.c{text-align:center}
.kp-tbl td{padding:7px 8px;border-bottom:1px solid var(--kp-border);vertical-align:middle}
.kp-tbl tr:last-child td{border-bottom:none}
.kp-tbl tr:hover td{background:var(--kp-hover)}
.kp-tbl-name{font-weight:600;display:flex;align-items:center;gap:6px;color:var(--kp-t1)}
.kp-tbl-type{width:6px;height:6px;border-radius:50%;flex-shrink:0}
.kp-tbl-type.direct{background:var(--kp-blue)}
.kp-tbl-type.indirect{background:#f59e0b}
.kp-tbl-type.context{background:var(--kp-t3)}
.kp-tbl-val{text-align:right;font-weight:700;font-variant-numeric:tabular-nums}
.kp-tbl-yr{text-align:right;font-variant-numeric:tabular-nums;color:var(--kp-t2);font-size:11px}
.kp-tbl-delta{text-align:right;font-weight:700;font-size:11px}
.kp-tbl-delta.up{color:var(--kp-green)}
.kp-tbl-delta.dn{color:var(--kp-red)}
.kp-tbl-delta.flat{color:var(--kp-t3)}
.kp-tbl-spark{width:90px}
.kp-tbl-spark canvas{display:block;width:80px;height:20px}
.kp-tbl-bench{text-align:right;font-size:11px}
.kp-tbl-bench-diff{font-weight:700}
.kp-tbl-bench-diff.better{color:var(--kp-green)}
.kp-tbl-bench-diff.worse{color:var(--kp-red)}

/* AI insight row */
.kp-ai-row{padding:10px 16px;background:var(--kp-bg2);font-size:11px;color:var(--kp-t2);display:flex;align-items:flex-start;gap:8px;line-height:1.5;border-top:1px solid var(--kp-border)}
.kp-ai-star{color:var(--kp-purple);font-weight:800;flex-shrink:0;font-size:14px;line-height:1}
.kp-ai-text{flex:1}
.kp-ai-text strong{color:var(--kp-t1)}
.kp-ai-text a{color:var(--kp-blue);cursor:pointer;text-decoration:none;font-weight:600;white-space:nowrap}
.kp-ai-text a:hover{text-decoration:underline}

/* ══ МУЛЬТИПЛЕЕР (надстройка) ══════════════════════════════ */
.mp-game-bar{background:linear-gradient(135deg,#e6f1fb,#eef1f6);border-bottom:2px solid #185fa5;padding:8px 16px;display:flex;align-items:center;gap:12px;position:relative;z-index:48;flex-wrap:wrap}
.mp-gb-year{font-size:16px;font-weight:800;color:#185fa5}
.mp-gb-phase{font-size:10px;padding:3px 10px;border-radius:12px;font-weight:700}
.mp-ph-situation{background:#faeeda;color:#7a4f00}
.mp-ph-negotiate{background:#eeedfe;color:#5b4fcf}
.mp-ph-decision{background:#e6f1fb;color:#185fa5}
.mp-ph-result{background:#eaf3de;color:#1a7a3b}
.mp-ph-setup{background:#f4f6fa;color:#8294ad}
.mp-gb-pend{font-size:11px;font-weight:700;color:#7a4f00;background:#faeeda;padding:3px 9px;border-radius:10px}
.mp-gb-timer{font-size:18px;font-weight:800;color:#b91c1c;font-variant-numeric:tabular-nums}
.mp-gb-next{padding:6px 14px;border:none;border-radius:6px;background:#185fa5;color:#fff;font-size:11px;font-weight:700;cursor:pointer;font-family:inherit}
.mp-gb-next:hover{background:#0c447c}

.mp-event{position:relative;border-radius:10px;padding:12px 36px 12px 14px;color:#fff;background:linear-gradient(135deg,#1a1f2b,#2d3748);box-shadow:0 6px 24px rgba(15,25,35,.18);flex-shrink:0}
.mp-evt-crisis{background:linear-gradient(135deg,#5a1212,#8a1f1f)}
.mp-evt-opportunity{background:linear-gradient(135deg,#0a2a5e,#1a4a8a)}
.mp-evt-strategic{background:linear-gradient(135deg,#2d1a5e,#4a2f8a)}
.mp-event-label{font-size:8px;text-transform:uppercase;letter-spacing:1px;opacity:.55;margin-bottom:3px}
.mp-event-title{font-size:14px;font-weight:700;margin-bottom:4px}
.mp-event-text{font-size:11px;opacity:.8;line-height:1.5}
.mp-event-close{position:absolute;top:8px;right:10px;background:none;border:none;color:rgba(255,255,255,.6);font-size:14px;cursor:pointer}
.mp-event-close:hover{color:#fff}

.mp-side{position:fixed;right:14px;top:96px;width:330px;max-width:92vw;max-height:calc(100vh - 110px);overflow-y:auto;display:flex;flex-direction:column;gap:8px;z-index:55}
@media (max-width:1500px){.mp-side{width:300px}}
.mp-inbox{background:#fff;border:1px solid #dde3ee;border-radius:10px;box-shadow:0 6px 24px rgba(15,25,35,.18);font-size:12px;flex-shrink:0}
.mp-inbox-body{max-height:50vh !important}
.mp-inbox-bar{padding:9px 14px;font-weight:700;color:#0c447c;cursor:pointer;display:flex;align-items:center;gap:8px;border-bottom:1px solid #eaeff6}
.mp-inbox-count{background:#faeeda;color:#7a4f00;font-size:10px;padding:2px 7px;border-radius:10px;font-weight:700}
.mp-inbox-tgl{margin-left:auto;color:#8294ad}
.mp-inbox-body{max-height:50vh;overflow-y:auto;padding:8px 10px}
.mp-inbox-title{font-size:9px;text-transform:uppercase;letter-spacing:.4px;color:#8294ad;font-weight:700;margin:6px 0 4px}
.mp-inbox-item{border-left:4px solid #8294ad;background:#f5f7fb;border-radius:0 6px 6px 0;padding:7px 9px;margin-bottom:6px}
.mp-inbox-hdr{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:700}
.mp-inbox-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mp-inbox-team{font-size:9px;color:#8294ad;font-weight:400}
.mp-inbox-meta{font-size:10px;color:#3d4f6b;margin:3px 0 5px}
.mp-inbox-actions{display:flex;gap:4px}
.mp-rv{flex:1;padding:4px;border:1px solid #dde3ee;border-radius:5px;background:#fff;cursor:pointer;font-size:11px;font-family:inherit}
.mp-rv.ok:hover{background:#eaf3de}.mp-rv.no:hover{background:#fcebeb}.mp-rv.re:hover{background:#faeeda}.mp-rv.view:hover{background:#e6f1fb}
.mp-inbox-empty{font-size:11px;color:#8294ad;padding:10px;text-align:center}
.mp-inbox-appr{font-size:11px;padding:3px 0;display:flex;align-items:center;gap:6px;color:#3d4f6b}
.mp-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}

/* ==================== KPI tab (Анализ → 📋 КПЭ) ==================== */
.kpi-container { max-width:1280px; margin:0 auto; padding:16px 20px 40px; font-size:13px; line-height:1.5; color:#1a2332 }
.kpi-hero { background:#fff; border-radius:12px; padding:20px 24px; margin-bottom:16px;
  box-shadow:0 1px 3px rgba(13,66,117,.06); border:1px solid #e1e7ef;
  display:grid; grid-template-columns:1fr 2fr 1fr; gap:24px; align-items:center }
.kpi-hero-title-row { font-size:12px; color:#6b7585; text-transform:uppercase; letter-spacing:.5px; margin-bottom:8px }
.kpi-hero-h1 { font-size:18px; font-weight:700; color:#1a2332; margin:0 0 4px }
.kpi-hero-subtitle { font-size:12px; color:#6b7585 }
.kpi-score-block { text-align:center }
.kpi-score-num { font-size:56px; font-weight:800; color:#185FA5; line-height:1; letter-spacing:-1.5px }
.kpi-score-of { color:#9ca5b3; font-weight:500; font-size:24px }
.kpi-score-label { font-size:12px; color:#6b7585; margin-top:6px }
.kpi-score-cat { display:inline-block; padding:4px 12px; border-radius:12px; font-size:12px; font-weight:600; margin-top:8px }
.kpi-good { background:#dcfce7; color:#16a34a }
.kpi-fair { background:#fef3c7; color:#d97706 }
.kpi-poor { background:#fee2e2; color:#dc2626 }
.kpi-delta { text-align:right; font-size:13px }
.kpi-delta-val { font-weight:700; color:#185FA5; font-size:15px }
.kpi-delta-label { color:#6b7585; font-size:12px; margin-top:2px }
.kpi-info-bar { background:#f0f7ff; border-left:3px solid #185FA5; padding:10px 14px;
  border-radius:0 8px 8px 0; margin-bottom:16px; font-size:12px;
  display:flex; align-items:center; gap:10px }
.kpi-info-ico { font-size:16px }
.kpi-section-title { font-size:14px; font-weight:700; color:#1a2332; margin:24px 0 12px;
  display:flex; align-items:center; gap:8px }
.kpi-count-hint { font-size:11px; color:#9ca5b3; font-weight:500; margin-left:auto }
.kpi-bench-row { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; margin-bottom:24px }
.kpi-bench-card { background:#fff; border-radius:8px; padding:12px 14px; border:1px solid #e1e7ef; text-align:center }
.kpi-bench-card.kpi-bench-me { border:2px solid #185FA5; background:#e8f1fb }
.kpi-bench-name { font-size:11px; color:#6b7585; text-transform:uppercase; letter-spacing:.4px;
  font-weight:600; margin-bottom:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.kpi-bench-me .kpi-bench-name { color:#185FA5 }
.kpi-bench-val { font-size:22px; font-weight:800; color:#1a2332; line-height:1 }
.kpi-bench-me .kpi-bench-val { color:#185FA5 }
.kpi-groups { display:grid; grid-template-columns:repeat(2,1fr); gap:12px }
.kpi-group-card { background:#fff; border-radius:12px; border:1px solid #e1e7ef; box-shadow:0 1px 3px rgba(13,66,117,.06); overflow:hidden }
.kpi-group-header { padding:12px 14px 8px; border-bottom:1px solid #e1e7ef; display:flex; align-items:center; gap:10px }
.kpi-group-icon { width:32px; height:32px; border-radius:8px; background:#e8f1fb;
  display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0 }
.kpi-group-name { flex:1; font-size:13px; font-weight:600; color:#1a2332 }
.kpi-group-summary { display:flex; align-items:center; gap:8px; font-size:12px }
.kpi-group-score { font-weight:700; font-size:14px }
.kpi-light { width:8px; height:8px; border-radius:50% }
.kpi-light-g { background:#16a34a }
.kpi-light-y { background:#d97706 }
.kpi-light-r { background:#dc2626 }
.kpi-list { padding:4px }
.kpi-row { padding:8px 10px; border-radius:6px; cursor:pointer;
  display:grid; grid-template-columns:auto 1fr auto auto; gap:10px; align-items:center;
  transition:background .15s }
.kpi-row:hover { background:#f5f7fa }
.kpi-num { font-size:11px; color:#9ca5b3; font-weight:600; font-variant-numeric:tabular-nums; width:28px }
.kpi-label { font-size:12px; color:#1a2332; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.kpi-progress { width:70px; height:4px; background:#e1e7ef; border-radius:2px; overflow:hidden }
.kpi-fill { height:100% }
.kpi-fill-g { background:#16a34a }
.kpi-fill-y { background:#d97706 }
.kpi-fill-r { background:#dc2626 }
.kpi-row-score { font-size:13px; font-weight:700; width:32px; text-align:right; font-variant-numeric:tabular-nums }
.kpi-source-tag { font-size:10px; color:#9ca5b3; padding:1px 5px; background:#f5f7fa; border-radius:3px; margin-left:4px }
.kpi-footer-note { margin-top:32px; padding:16px; background:#fff; border-radius:8px;
  border:1px solid #e1e7ef; font-size:12px; color:#6b7585; line-height:1.6 }
.kpi-footer-note strong { color:#1a2332 }
.kpi-detail-panel { position:fixed; right:0; top:0; bottom:0; width:420px; background:#fff;
  border-left:1px solid #e1e7ef; box-shadow:-8px 0 24px rgba(13,66,117,.08);
  padding:20px 22px; overflow-y:auto; transform:translateX(100%);
  transition:transform .25s ease; z-index:100 }
.kpi-detail-panel.kpi-open { transform:translateX(0) }
.kpi-close-btn { position:absolute; top:14px; right:14px; background:none; border:none;
  font-size:20px; color:#6b7585; cursor:pointer; width:28px; height:28px; border-radius:6px }
.kpi-close-btn:hover { background:#f5f7fa }
.kpi-dp-num { font-size:11px; color:#185FA5; font-weight:700; letter-spacing:.5px; text-transform:uppercase }
.kpi-dp-h2 { font-size:18px; font-weight:700; margin:4px 0 12px; color:#1a2332; line-height:1.3; padding-right:30px }
.kpi-dp-current { background:#f5f7fa; border-radius:8px; padding:14px; margin-bottom:14px }
.kpi-dp-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; font-size:12px }
.kpi-dp-row:last-child { margin-bottom:0 }
.kpi-dp-label { color:#6b7585 }
.kpi-dp-val { font-weight:600; color:#1a2332; font-variant-numeric:tabular-nums }
.kpi-dp-big { font-size:18px }
.kpi-dp-progress { height:6px; background:#e1e7ef; border-radius:3px; overflow:hidden; margin:10px 0; position:relative }
.kpi-target-mark { position:absolute; top:-2px; bottom:-2px; width:2px; background:#185FA5 }
.kpi-dp-section { margin-top:18px }
.kpi-dp-section-title { font-size:11px; text-transform:uppercase; color:#6b7585; font-weight:600; letter-spacing:.5px; margin-bottom:8px }
.kpi-dp-formula { background:#f5f7fa; border-radius:8px; padding:10px 12px;
  font-family:'JetBrains Mono',monospace; font-size:11px; color:#1a2332; line-height:1.6;
  border:1px dashed #c7d2e0 }
.kpi-formula-var { color:#185FA5; font-weight:600 }
.kpi-dp-lever { background:#fff; border:1px solid #e1e7ef; border-radius:8px;
  padding:10px 12px; margin-bottom:6px; font-size:12px;
  display:flex; justify-content:space-between; align-items:center;
  cursor:pointer; transition:all .15s }
.kpi-dp-lever:hover { border-color:#185FA5; background:#f0f7ff }
.kpi-lev-arrow { color:#185FA5 }
.kpi-overlay { position:fixed; inset:0; background:rgba(13,35,50,.3); opacity:0;
  pointer-events:none; transition:opacity .25s; z-index:50 }
.kpi-overlay.kpi-open { opacity:1; pointer-events:auto }
@media (max-width:1100px) {
  .kpi-hero { grid-template-columns:1fr; text-align:center }
  .kpi-delta { text-align:center }
  .kpi-groups { grid-template-columns:1fr }
  .kpi-bench-row { grid-template-columns:repeat(2,1fr) }
  .kpi-detail-panel { width:100% }
}

/* ── KPI summary bar на Управлении ── */
.kpi-hero { cursor:pointer; transition:box-shadow .2s, transform .15s }
.kpi-hero:hover { box-shadow:0 4px 16px rgba(13,66,117,.12); transform:translateY(-1px) }
.kpi-mgmt-bar { display:grid; grid-template-columns:auto auto 1fr auto; gap:18px;
  align-items:center; background:#fff; border:1px solid #e1e7ef; border-radius:12px;
  padding:12px 18px; margin:14px 0 4px; cursor:pointer; box-shadow:0 1px 3px rgba(13,66,117,.06);
  transition:border-color .15s, box-shadow .15s, transform .15s }
.kpi-mgmt-bar:hover { border-color:#185FA5; box-shadow:0 4px 14px rgba(13,66,117,.1); transform:translateY(-1px) }
.kpi-mgmt-left {}
.kpi-mgmt-title { font-size:13px; font-weight:700; color:#1a2332 }
.kpi-mgmt-sub { font-size:11px; color:#6b7585; font-weight:500; margin-left:6px }
.kpi-mgmt-meta { font-size:11px; color:#6b7585; margin-top:3px }
.kpi-mgmt-score { display:flex; flex-direction:column; align-items:center; padding:0 14px;
  border-left:1px solid #e1e7ef; border-right:1px solid #e1e7ef }
.kpi-mgmt-score-num { font-size:32px; font-weight:800; line-height:1; letter-spacing:-1px }
.kpi-mgmt-score-of { font-size:14px; color:#9ca5b3; font-weight:500 }
.kpi-mgmt-cat { font-size:10px; padding:2px 8px; border-radius:8px; margin-top:6px; font-weight:600 }
.kpi-mgmt-attn { min-width:0 }
.kpi-mgmt-attn-label { font-size:10px; color:#6b7585; text-transform:uppercase; letter-spacing:.4px; font-weight:600; margin-bottom:5px }
.kpi-mgmt-chips { display:flex; gap:6px; flex-wrap:wrap }
.kpi-mgmt-chip { font-size:11px; padding:3px 8px; background:#fee2e2; color:#7a1f1f;
  border-radius:6px; cursor:pointer; transition:background .15s }
.kpi-mgmt-chip:hover { background:#fbbcbc }
.kpi-mgmt-arrow { font-size:12px; color:#185FA5; font-weight:600; white-space:nowrap }
@media (max-width:1100px) {
  .kpi-mgmt-bar { grid-template-columns:1fr; text-align:center }
  .kpi-mgmt-score { border:none; padding:8px 0 }
}
