/* ============================================================
   UAV MONITOR — Design System v0.7
   ============================================================ */

:root {
    --bg: #0d1421;
    --panel: #1a2540;
    --border: #2c3a5c;
    --text: #e8edf7;
    --muted: #8fa0be;
    --gold: #f0b429;
    --gold-2: #fbbf24;
    --red: #b91c1c;
    --red-2: #dc2626;
    --orange: #f97316;
    --success: #4ade80;
    --warning: #fbbf24;
    --error: #f87171;

    --r-card: 14px;
    --r-btn: 8px;
    --r-pill: 999px;

    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;

    --shadow: 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, .25);

    --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html, body {
    font-family: var(--font);
    font-size: 13px;
    line-height: 1.4;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
}

/* ---------- Тонкая шапка ---------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    height: 44px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .5px;
}

.logo-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: var(--r-pill);
    background: rgba(74, 222, 128, .12);
    color: var(--success);
    font-size: 10px;
    font-weight: 600;
}

.live-badge .dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .4; transform: scale(1.4); }
}

/* Новый layout: карта 3/5 + журнал 1/5 + карточка 1/5 */
.dash-layout {
    display: grid;
    /* Карта 3, карточка 1.2, журнал 1.2 */
    grid-template-columns: 3fr 1.2fr 1.2fr;
    gap: 8px;
    padding: 8px;
    height: calc(100vh - 44px);
    overflow: hidden;
}

@media (max-width: 1280px) {
    .dash-layout { grid-template-columns: 3fr 1fr 1fr; }
}

@media (max-width: 1280px) {
    .dash-layout { grid-template-columns: 3fr 1.2fr 1.2fr; }
}

@media (max-width: 1024px) {
    .dash-layout { grid-template-columns: 1fr; height: auto; }
    html, body { overflow: auto; }
}

.col { min-height: 0; min-width: 0; }

.col-map {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    overflow: hidden;
    min-height: 400px;
    height: 100%;
}

#map { width: 100%; height: 100%; min-height: 400px; }

#map { width: 100%; height: 100%; min-height: 400px; }

.col-journal {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.col-detail {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Панели с сворачиванием */
.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;
}

.panel-header {
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    color: var(--gold-2);
}

.panel-header:hover { background: rgba(255,255,255,.03); }

.panel-body {
    padding: 8px 10px 10px;
    border-top: 1px solid var(--border);
}

.panel-arrow { font-size: 10px; }

/* Журнал */
.journal {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    min-height: 0;
}

.journal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    font-weight: 600;
    color: var(--gold-2);
    flex-shrink: 0;
}

.journal-count {
    background: var(--gold);
    color: #0d1421;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 700;
}

.journal-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px;
    min-height: 0;
}

.journal-list::-webkit-scrollbar { width: 5px; }
.journal-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.journal-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .1s;
    border-left: 3px solid transparent;
}

.journal-item:hover { background: rgba(255,255,255,.04); }

.journal-item.selected {
    background: rgba(240, 180, 41, .12);
    border-left-color: var(--gold);
}

.journal-toggle { display: flex; align-items: center; }
.journal-toggle input { accent-color: var(--gold); cursor: pointer; }

.journal-icon {
    width: 24px; height: 24px;
    border-radius: 5px;
    background: var(--red-2);
    display: grid;
    place-items: center;
    font-size: 12px;
    flex-shrink: 0;
}

.journal-info { flex: 1; min-width: 0; }

.journal-title {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.journal-sub {
    font-size: 9.5px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Карточка деталей */
.detail-panel {
    flex: 1;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.detail-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}

.detail-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.detail-content::-webkit-scrollbar { width: 5px; }
.detail-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.detail-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--panel);
    z-index: 5;
}

.detail-icon {
    width: 32px; height: 32px;
    border-radius: 6px;
    background: var(--red-2);
    display: grid;
    place-items: center;
    font-size: 15px;
    flex-shrink: 0;
}

.detail-title {
    font-size: 12px;
    font-weight: 600;
}

.detail-sub {
    font-size: 10px;
    color: var(--muted);
    margin-top: 1px;
}

.detail-body { padding: 10px; }

.detail-dl {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 4px 8px;
    font-size: 11px;
    margin-bottom: 10px;
}

.detail-dl dt { color: var(--muted); }
.detail-dl dd { color: var(--text); word-break: break-word; }
.detail-dl .gold { color: var(--gold-2); }

.detail-description {
    background: rgba(13,20,33,.6);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.5;
    color: var(--muted);
    margin-bottom: 10px;
    border-left: 2px solid var(--gold);
}

/* ---------- KPI 2×2, компактные ---------- */
.kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    height: 130px;
    flex-shrink: 0;
}

.kpi {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.kpi-label {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 3px;
}

.kpi-value {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.kpi-danger .kpi-value { color: var(--red-2); }
.kpi-warn .kpi-value { color: var(--warning); }
.kpi-gold .kpi-value { color: var(--gold); }
.kpi-ok .kpi-value { color: var(--success); }

/* ---------- Меню фильтров ---------- */
.filters-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;
}

.filters-header {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    color: var(--gold-2);
}

.filters-header:hover { background: rgba(255,255,255,.03); }

.filters-body {
    padding: 8px 12px 12px;
    border-top: 1px solid var(--border);
    max-height: 320px;
    overflow-y: auto;
}

.filter-group-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--muted);
    margin-bottom: 6px;
    font-weight: 600;
}

.filter-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px 8px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    padding: 3px 4px;
    cursor: pointer;
    border-radius: 4px;
    color: var(--text);
    user-select: none;
}

.filter-checkbox:hover { background: rgba(255,255,255,.04); }

.filter-checkbox input {
    width: 13px; height: 13px;
    accent-color: var(--gold);
    cursor: pointer;
    flex-shrink: 0;
}

.filter-reset {
    margin-top: 6px;
    font-size: 10px;
    padding: 3px 8px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 4px;
    cursor: pointer;
}

.filter-reset:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- Лента ---------- */
.feed {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    min-height: 0;
    padding-right: 4px;
}

.feed::-webkit-scrollbar { width: 5px; }
.feed::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ---------- Карточка инцидента ---------- */
.drone-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    border-left: 3px solid var(--red-2);
    overflow: hidden;
    flex-shrink: 0;
}

.drone-card.type-hybrid { border-left-color: var(--gold); }
.drone-card.type-aircraft { border-left-color: var(--red-2); }
.drone-card.type-helicopter { border-left-color: var(--warning); }

.drone-card.expanded { border-color: var(--gold); }

.drone-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    cursor: pointer;
    user-select: none;
}

.drone-header:hover { background: rgba(255,255,255,.03); }

.report-toggle { display: flex; align-items: center; padding: 2px; }
.report-checkbox {
    width: 16px; height: 16px;
    accent-color: var(--gold);
    cursor: pointer;
}

.drone-icon {
    width: 32px; height: 32px;
    border-radius: 6px;
    background: var(--red-2);
    display: grid;
    place-items: center;
    font-size: 16px;
    flex-shrink: 0;
}

.drone-title {
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 1px;
}

.drone-sub {
    font-size: 10px;
    color: var(--muted);
}

.expand-arrow {
    color: var(--muted);
    font-size: 11px;
    padding: 2px 6px;
}

.drone-card.expanded .expand-arrow { color: var(--gold); }

.drone-expanded {
    padding: 8px 12px 12px;
    border-top: 1px solid var(--border);
}

.drone-data {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 4px 8px;
    font-size: 11.5px;
    margin-bottom: 8px;
}

.drone-data dt { color: var(--muted); }
.drone-data dd { color: var(--text); }
.drone-data .gold { color: var(--gold-2); }

.drone-description {
    background: rgba(13,20,33,.6);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--muted);
    margin-bottom: 10px;
    border-left: 2px solid var(--gold);
}

/* Слои */
.layer-controls {
    background: rgba(13,20,33,.5);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.layer-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--muted);
    margin-bottom: 2px;
}

.layer-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    cursor: pointer;
    padding: 3px 4px;
    border-radius: 4px;
}

.layer-toggle:hover { background: rgba(255,255,255,.04); }
.layer-toggle input { accent-color: var(--gold); cursor: pointer; }

.layer-dot {
    display: inline-block;
    width: 9px; height: 9px;
    border-radius: 50%;
}

/* Прогноз */
.forecast {
    background: rgba(13,20,33,.6);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 10px;
}

.forecast-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}

.forecast-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 5px 7px;
    border-radius: 4px;
    margin-bottom: 3px;
    font-size: 11px;
    border-left: 3px solid transparent;
    transition: background .1s;
}

.forecast-main {
    display: flex;
    align-items: center;
    gap: 6px;
}

.forecast-row .dot-indicator {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--muted);
    flex-shrink: 0;
}

.forecast-row .city-name {
    font-weight: 600;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forecast-row .angle-info {
    font-size: 9.5px;
    color: var(--muted);
    background: rgba(255,255,255,.05);
    padding: 1px 4px;
    border-radius: 3px;
    font-variant-numeric: tabular-nums;
}

.forecast-row .prob {
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.forecast-row .eta {
    font-size: 10.5px;
    color: var(--gold-2);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Зоны */
.forecast-row.zone-red {
    background: rgba(220, 38, 38, .10);
    border-left-color: #dc2626;
}
.forecast-row.zone-red .dot-indicator { background: #dc2626; box-shadow: 0 0 8px #dc2626; }
.forecast-row.zone-red .prob { color: #fca5a5; }

.forecast-row.zone-orange {
    background: rgba(249, 115, 22, .08);
    border-left-color: #f97316;
}
.forecast-row.zone-orange .dot-indicator { background: #f97316; box-shadow: 0 0 6px #f97316; }
.forecast-row.zone-orange .prob { color: #fdba74; }

.forecast-row.zone-yellow {
    background: rgba(251, 191, 36, .06);
    border-left-color: #fbbf24;
}
.forecast-row.zone-yellow .dot-indicator { background: #fbbf24; }
.forecast-row.zone-yellow .prob { color: #fbbf24; }

.forecast-row.zone-green {
    background: rgba(74, 222, 128, .04);
    border-left-color: #4ade80;
}
.forecast-row.zone-green .dot-indicator { background: #4ade80; }
.forecast-row.zone-green .prob { color: #86efac; }

/* Объекты внутри зоны */
.obj-line {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding-left: 13px;
}

.obj-chip {
    font-size: 10px;
    padding: 1px 5px;
    background: rgba(255,255,255,.06);
    border-radius: 3px;
    color: var(--muted);
}

/* Обратная связь */
.feedback-btns {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.fb-btn {
    width: 20px; height: 20px;
    border-radius: 3px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    display: grid;
    place-items: center;
}

.fb-btn:hover { border-color: var(--gold); color: var(--gold); }
.fb-btn.fb-ok.active { background: #15803d; border-color: #15803d; color: white; }
.fb-btn.fb-no.active { background: #b91c1c; border-color: #b91c1c; color: white; }

.forecast-row.fb-confirmed {
    background: rgba(21, 128, 61, .15) !important;
    border-left-color: #15803d !important;
}
.forecast-row.fb-confirmed .city-name::after {
    content: " ✓";
    color: #4ade80;
}

.forecast-row.fb-denied { opacity: 0.4; }
.forecast-row.fb-denied .city-name { text-decoration: line-through; }

/* Вложения */
.attachments-section {
    border-top: 1px dashed var(--border);
    padding-top: 8px;
    margin-top: 8px;
}

.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 6px;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 7px;
    background: rgba(13, 20, 33, .5);
    border-radius: 5px;
    color: var(--text);
    text-decoration: none;
    font-size: 11px;
}

.attachment-item:hover { background: rgba(240, 180, 41, .1); }
.att-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-size { font-size: 10px; color: var(--muted); }

.btn, .btn-attach {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    border-radius: 5px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
    transition: all .15s;
}

.btn:hover, .btn-attach:hover { border-color: var(--gold); color: var(--gold); }

.btn-danger {
    background: var(--red-2);
    color: white;
    border-color: var(--red-2);
}
.btn-danger:hover { background: var(--red); color: white; }

.card-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

/* Метки на карте */
.city-point-wrapper, .obj-marker-wrapper { background: transparent !important; border: none !important; }

.city-point {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #64748b;
    border: 2px solid #0d1421;
    box-shadow: 0 2px 6px rgba(0,0,0,.5);
    cursor: pointer;
    transition: transform .15s;
}

.city-point:hover { transform: scale(1.6); }

.city-point.zone-green { background: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,.7); }
.city-point.zone-yellow { background: #fbbf24; box-shadow: 0 0 8px rgba(251,191,36,.8); }
.city-point.zone-orange { background: #f97316; box-shadow: 0 0 10px rgba(249,115,22,.85); }
.city-point.zone-red {
    background: #dc2626;
    box-shadow: 0 0 12px rgba(220,38,38,.9);
    animation: pulse 1.4s infinite;
}

.obj-marker {
    width: 20px; height: 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 11px;
    border: 2px solid #0d1421;
    box-shadow: 0 2px 6px rgba(0,0,0,.5);
    cursor: pointer;
}

.obj-marker.zone-red {
    box-shadow: 0 0 14px rgba(220,38,38,.9);
    animation: pulse 1.4s infinite;
}
.obj-marker.zone-orange { box-shadow: 0 0 10px rgba(249,115,22,.85); }
.obj-marker.zone-yellow { box-shadow: 0 0 8px rgba(251,191,36,.8); }

.city-tooltip {
    background: var(--panel) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,.5) !important;
}
.city-tooltip::before { display: none !important; }

/* Карточка НП */
.settlement-card {
    position: absolute;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90%;
    height: 100%;
    background: var(--panel);
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 24px rgba(0,0,0,.5);
    z-index: 1000;
    overflow-y: auto;
    transition: right .25s ease;
}

.settlement-card.visible { right: 0; }

.settlement-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--panel);
    z-index: 10;
}

.settlement-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--gold-2);
}

.settlement-card-region {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

.btn-close { padding: 4px 8px; font-size: 14px; }

.settlement-card-body { padding: 14px; }

.sc-section {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.sc-section:last-child { border-bottom: none; }

.sc-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.sc-dl {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 5px 8px;
    font-size: 12px;
}

.sc-dl dt { color: var(--muted); }
.sc-dl dd { color: var(--text); }

.sc-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sc-item {
    background: rgba(13,20,33,.5);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px;
    font-size: 11px;
}

.sc-item-name {
    font-weight: 700;
    color: var(--gold-2);
    margin-bottom: 3px;
}

.sc-item-detail { color: var(--muted); line-height: 1.5; }

.sc-empty {
    color: var(--muted);
    font-size: 11px;
    font-style: italic;
    padding: 6px 0;
}

/* Кнопки в углу карты */
.leaflet-bar a {
    background: var(--panel) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}
.leaflet-bar a:hover {
    background: var(--gold) !important;
    color: #0d1421 !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--border);
}
/* Тип БПЛА */
.drone-type-block {
    background: rgba(240, 180, 41, .06);
    border: 1px solid rgba(240, 180, 41, .25);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 10px;
}

.drone-type-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold-2);
    margin-bottom: 6px;
}

.drone-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px 8px;
    font-size: 10.5px;
    color: var(--muted);
}

.drone-type-grid b {
    color: var(--text);
    font-weight: 600;
}
/* Переключатель режима ETA */
.eta-mode-block {
    background: rgba(240, 180, 41, .05);
    border: 1px solid rgba(240, 180, 41, .2);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 10px;
}

.eta-mode-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--gold-2);
    margin-bottom: 6px;
}

.eta-mode-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11.5px;
    transition: background .15s;
}

.eta-mode-radio:hover { background: rgba(255, 255, 255, .04); }

.eta-mode-radio input {
    accent-color: var(--gold);
    cursor: pointer;
}

.eta-mode-radio > span:first-of-type {
    flex: 1;
}

.eta-mode-hint {
    font-size: 10px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* Метаданные строки прогноза */
.forecast-meta {
    font-size: 10px;
    color: var(--muted);
    padding-left: 13px;
    font-variant-numeric: tabular-nums;
}
/* ============================================================
   Логин
   ============================================================ */
.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--bg);
}

.login-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 32px 28px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}

.login-logo { text-align: center; margin-bottom: 24px; }

.login-logo-img {
    width: 56px; height: 56px;
    object-fit: contain; margin-bottom: 8px;
}

.login-logo-title {
    font-size: 18px; font-weight: 700;
    letter-spacing: 1px; color: var(--text);
}

.login-logo-sub {
    font-size: 11px; color: var(--muted); margin-top: 2px;
}

.login-field {
    display: flex; flex-direction: column; gap: 4px;
    margin-bottom: 14px;
}

.login-field span {
    font-size: 11px; color: var(--muted);
    text-transform: uppercase; letter-spacing: .5px;
}

.login-field input {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit; font-size: 14px;
    padding: 10px 12px; border-radius: 8px; outline: none;
    transition: border-color .15s;
}

.login-field input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(240, 180, 41, .15);
}

.login-btn {
    width: 100%; padding: 11px; font-size: 14px;
    margin-top: 8px; justify-content: center;
}

.login-error {
    background: rgba(220, 38, 38, .12);
    border: 1px solid rgba(220, 38, 38, .4);
    color: #fca5a5; font-size: 12px;
    padding: 8px 10px; border-radius: 6px;
    margin-bottom: 12px;
}

/* Кнопка "Выйти" в шапке */
.user-info {
    display: flex; align-items: center; gap: 10px;
    font-size: 11px; color: var(--muted);
}

.user-name { color: var(--text); font-weight: 500; }

.btn-logout {
    padding: 4px 10px; font-size: 11px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 5px;
    cursor: pointer;
}

.btn-logout:hover {
    border-color: var(--red-2); color: var(--red-2);
}
