/* ============================================================
   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-pagination {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 4px 4px;
}

.journal-pagination button {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--panel-2);
    color: var(--text);
    cursor: pointer;
}

.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);
}
/* ============================================================
   Ручной ввод
   ============================================================ */
.btn-add-manual {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: var(--gold);
    color: #0d1421;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
}

.btn-add-manual:hover { background: var(--gold-2); }

.badge-manual {
    display: inline-block;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(240, 180, 41, .2);
    color: var(--gold-2);
    font-weight: 600;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.manual-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.manual-modal.visible { display: flex; }

.manual-modal-content {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .8);
}

.manual-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--gold-2);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.manual-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.manual-row label, .manual-full {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.manual-row span, .manual-full span {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.manual-row input,
.manual-full input,
.manual-full textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 6px;
    outline: none;
    transition: border-color .15s;
}

.manual-row input:focus,
.manual-full input:focus,
.manual-full textarea:focus {
    border-color: var(--gold);
}

.manual-full { margin-bottom: 12px; }

.manual-full textarea { resize: vertical; }

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

/* KPI — диапазон суток */
.kpi-day-range {
    font-size: 9.5px;
    color: var(--muted);
    text-align: center;
    padding: 4px 0 6px;
    font-variant-numeric: tabular-nums;
}

/* Подписи радиусов на карте */
.radius-label-wrapper { background: transparent !important; border: none !important; }

.radius-label {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-50%, -50%);
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    background: rgba(13, 20, 33, .92);
    border: 1px solid;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}

.radius-label-red {
    color: #fca5a5;
    border-color: #dc2626;
}

.radius-label-green {
    color: #86efac;
    border-color: #4ade80;
}
/* Поля date/time в форме ручного ввода */
.manual-row input[type="date"],
.manual-row input[type="time"] {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 6px;
    outline: none;
    transition: border-color .15s;
    color-scheme: dark;   /* тёмный вид нативного пикера */
}

.manual-row input[type="date"]:focus,
.manual-row input[type="time"]:focus {
    border-color: var(--gold);
}
/* ============================================================
   WOW-ЭФФЕКТЫ + НОВАЯ КАРТОЧКА
   ============================================================ */

/* Пульсация зон */
@keyframes zonePulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.35; }
}

.pulsing-zone {
    animation: zonePulse 2s ease-in-out infinite;
}

/* Бегущая точка */
.moving-drone {
    filter: drop-shadow(0 0 8px currentColor);
}

.moving-drone-glow {
    animation: droneGlow 1.5s ease-in-out infinite;
}

@keyframes droneGlow {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.5; }
}

/* Shimmer-эффект для высоких угроз */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.forecast-row.high-threat {
    background: linear-gradient(90deg,
        rgba(220, 38, 38, .05) 0%,
        rgba(220, 38, 38, .25) 50%,
        rgba(220, 38, 38, .05) 100%);
    background-size: 200% 100%;
    animation: shimmer 2.5s ease-in-out infinite;
}

/* Красная рамка тревоги */
@keyframes alertPulse {
    0%, 100% { box-shadow: inset 0 0 0 2px rgba(220, 38, 38, 0); }
    50% { box-shadow: inset 0 0 0 2px rgba(220, 38, 38, .7); }
}

.dash-layout.alert-active {
    animation: alertPulse 2s ease-in-out infinite;
}

/* Glassmorphism */
.panel, .journal, .detail-panel, .settlement-card {
    background: rgba(26, 37, 64, .85) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Пульсирующий LIVE */
.live-badge .dot {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, .7);
    animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .7); }
    70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* ============================================================
   МЕДИА-ГАЛЕРЕЯ
   ============================================================ */
.media-block {
    margin-bottom: 12px;
    position: relative;
}

.media-container {
    position: relative;
    background: rgba(13, 20, 33, .9);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-content {
    max-width: 100%;
    max-height: 320px;
    display: block;
    cursor: pointer;
    transition: transform .2s;
}

.media-content:hover { transform: scale(1.01); }

.media-nav {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.media-nav > * { pointer-events: auto; }

.media-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(13, 20, 33, .85);
    color: white;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: grid;
    place-items: center;
    line-height: 1;
    transition: all .15s;
}

.media-arrow:hover {
    background: var(--gold);
    color: #0d1421;
    border-color: var(--gold);
    transform: scale(1.1);
}

.media-counter {
    background: rgba(13, 20, 33, .9);
    color: white;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.media-fullscreen {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(13, 20, 33, .85);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all .15s;
}

.media-fullscreen:hover {
    background: var(--gold);
    color: #0d1421;
    border-color: var(--gold);
}

.media-placeholder {
    color: var(--muted);
    font-size: 12px;
    padding: 40px 20px;
    text-align: center;
}

.media-empty-line {
    height: 2px;
    background: linear-gradient(90deg,
        transparent, var(--border) 50%, transparent);
    margin: 8px 0;
}

/* Fullscreen модалка */
.media-fullscreen {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.media-fullscreen.visible { display: flex; }

.media-fullscreen-content {
    max-width: 95%;
    max-height: 95%;
}

.fs-img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 8px;
}

.fs-video {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 8px;
}

.media-fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(13, 20, 33, .85);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.media-fullscreen-close:hover {
    background: var(--red-2);
    border-color: var(--red-2);
}

/* ============================================================
   БЛОКИ ИНФОРМАЦИИ И ВРЕМЕНИ
   ============================================================ */
.info-block {
    background: rgba(13, 20, 33, .4);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.info-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--gold-2);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.forecast-header {
    margin-bottom: 8px;
}

.forecast-time-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 10.5px;
    color: var(--muted);
    background: rgba(13, 20, 33, .4);
    padding: 6px 8px;
    border-radius: 6px;
    margin-top: 6px;
    border-left: 2px solid var(--gold);
}

.forecast-time-info b {
    color: var(--text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Стилистика детальной карточки — плавное появление */
.detail-content {
    animation: fadeIn .3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ============================================================
   Пульсация маркера старта
   ============================================================ */
@keyframes markerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.pulsing-marker {
    animation: markerPulse 1.6s ease-in-out infinite;
}

/* Красный туман вокруг маркера */
.start-haze {
    animation: hazeGrow 2s ease-in-out infinite;
}

@keyframes hazeGrow {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.35; }
}

/* Радарный сектор */
.radar-wedge {
    animation: radarGlow 1.8s ease-in-out infinite;
}

@keyframes radarGlow {
    0%, 100% { opacity: 0.08; }
    50% { opacity: 0.22; }
}

/* Пульсация красной зоны */
.pulsing-zone-red {
    animation: zonePulseRed 2s ease-in-out infinite;
}

@keyframes zonePulseRed {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.35; }
}
/* Оранжевый треугольник-маркер */
.incident-triangle-wrapper {
    background: transparent !important;
    border: none !important;
}

.incident-triangle {
    filter: drop-shadow(0 0 6px rgba(249, 115, 22, .8));
    transition: transform .2s;
    cursor: pointer;
}

.incident-triangle:hover {
    transform: scale(1.15);
}
/* ============================================================
   Легенда на карте
   ============================================================ */
.map-legend {
    background: rgba(13, 20, 33, .92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 11px;
    color: var(--text);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .6);
    min-width: 170px;
    max-width: 220px;
    max-height: 60vh;
    overflow-y: auto;
}

.legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--gold-2);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border);
}

.legend-toggle {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.legend-toggle:hover {
    color: var(--gold);
    border-color: var(--gold);
}

.legend-group {
    margin-bottom: 8px;
}

.legend-group:last-child {
    margin-bottom: 0;
}

.legend-group-title {
    font-size: 9px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
    font-weight: 600;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
    font-size: 11px;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, .15);
}

.legend-body {
    transition: all .2s ease;
}

/* Скроллбар внутри легенды */
.map-legend::-webkit-scrollbar {
    width: 4px;
}
.map-legend::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}
/* ============================================================
   TIMELINE
   ============================================================ */
.col-map {
    position: relative;
}

.timeline-panel {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 720px;
    background: rgba(13, 20, 33, .94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .7);
    z-index: 500;
    pointer-events: auto;
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.tl-btn {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}

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

.tl-time {
    flex: 1;
    text-align: center;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 700;
    color: var(--gold-2);
    font-variant-numeric: tabular-nums;
    letter-spacing: .5px;
}

.tl-speed {
    display: flex;
    gap: 3px;
}

.tl-speed-btn {
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.tl-speed-btn.active {
    background: var(--gold);
    color: #0d1421;
    border-color: var(--gold);
}

.tl-speed-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.timeline-track {
    position: relative;
}

.timeline-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg,
        var(--gold) 0%,
        var(--gold) var(--pct, 0%),
        var(--border) var(--pct, 0%),
        var(--border) 100%);
    outline: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold-2);
    border: 3px solid #fff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .6);
    transition: transform .15s;
}

.timeline-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 0 6px rgba(240, 180, 41, .3);
}

.timeline-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold-2);
    border: 3px solid #fff;
    cursor: pointer;
}

.timeline-marks {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--muted);
    margin-top: 4px;
    padding: 0 4px;
    font-variant-numeric: tabular-nums;
}

/* Пульсация точки на timeline */
.timeline-dot {
    animation: tlDotPulse 1.4s ease-in-out infinite;
}

@keyframes tlDotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

/* Хвост (пройденный путь) */
.timeline-trail {
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, .7));
}
/* ============================================================
   РЛС и МОГ — ромбы
   ============================================================ */
.obj-marker.obj-type-rls {
    border-radius: 0 !important;
    transform: rotate(45deg);
}

.obj-marker.obj-type-mog {
    border-radius: 0 !important;
    transform: rotate(45deg);
}

/* ============================================================
   Timeline — переносим в правый нижний угол, компактнее
   ============================================================ */
.timeline-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    left: auto;
    transform: none;
    width: 360px;
    max-width: calc(100% - 40px);
    background: rgba(13, 20, 33, .94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .7);
    z-index: 500;
    pointer-events: auto;
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.tl-btn {
    padding: 3px 7px;
    border-radius: 5px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}

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

.tl-time {
    flex: 1;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--gold-2);
    font-variant-numeric: tabular-nums;
}

.tl-speed-btn {
    padding: 2px 6px;
    font-size: 9px;
}

.timeline-slider {
    height: 4px;
}

.timeline-slider::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
}

.timeline-marks {
    font-size: 8px;
    margin-top: 2px;
}
/* ============================================================
   Модалка объекта
   ============================================================ */
.object-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.object-modal.visible { display: flex; }

.object-modal-content {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .8);
}

.object-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 700;
    color: var(--gold-2);
    position: sticky;
    top: 0;
    background: var(--panel);
    z-index: 5;
}

.object-modal-body {
    padding: 16px;
}

/* ============================================================
   Ромбы РЛС и МОГ — чистые, без иконки
   ============================================================ */
.obj-diamond-wrapper {
    background: transparent !important;
    border: none !important;
}

.obj-diamond {
    width: 14px;
    height: 14px;
    transform: rotate(45deg);
    border: 2px solid;
    background: rgba(13, 20, 33, .4);
    box-shadow: 0 0 8px rgba(59, 130, 246, .5);
    cursor: pointer;
    transition: all .2s;
    margin: 1px;
}

.obj-diamond:hover {
    transform: rotate(45deg) scale(1.25);
}

.obj-diamond.rls {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, .25);
    box-shadow: 0 0 10px rgba(59, 130, 246, .6);
}

.obj-diamond.mog {
    border-color: #dc2626;
    background: rgba(220, 38, 38, .25);
    box-shadow: 0 0 10px rgba(220, 38, 38, .6);
}

/* Пульсация при попадании в зону риска — только меняем тень,
   НЕ трогаем transform */
.obj-diamond.zone-red {
    animation: diamondPulseRed 1.4s ease-in-out infinite;
}

.obj-diamond.zone-orange {
    animation: diamondPulseOrange 1.6s ease-in-out infinite;
}

.obj-diamond.zone-yellow {
    animation: diamondPulseYellow 2s ease-in-out infinite;
}

@keyframes diamondPulseRed {
    0%, 100% { box-shadow: 0 0 10px rgba(220, 38, 38, .6); }
    50% { box-shadow: 0 0 22px rgba(220, 38, 38, 1); }
}

@keyframes diamondPulseOrange {
    0%, 100% { box-shadow: 0 0 10px rgba(249, 115, 22, .5); }
    50% { box-shadow: 0 0 18px rgba(249, 115, 22, .95); }
}

@keyframes diamondPulseYellow {
    0%, 100% { box-shadow: 0 0 8px rgba(251, 191, 36, .4); }
    50% { box-shadow: 0 0 16px rgba(251, 191, 36, .85); }
}

/* Стандартные маркеры объектов (убежище, ПВР) */
.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;
    transition: transform .15s;
}

.obj-marker:hover {
    transform: scale(1.15);
}

.obj-marker.zone-red { box-shadow: 0 0 14px rgba(220,38,38,.9); }
.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); }

/* ============================================================
   Timeline внутри карточки (вместо карты)
   ============================================================ */
.timeline-panel-inline {
    background: rgba(13, 20, 33, .6);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
    animation: fadeIn .3s ease;
}

.timeline-panel-inline .timeline-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.timeline-panel-inline .tl-btn {
    padding: 3px 8px;
    font-size: 11px;
}

.timeline-panel-inline .tl-time {
    flex: 1;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--gold-2);
    font-variant-numeric: tabular-nums;
}

.timeline-panel-inline .tl-speed-btn {
    padding: 2px 6px;
    font-size: 9px;
}

.timeline-panel-inline .timeline-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg,
        var(--gold) 0%,
        var(--gold) var(--pct, 0%),
        var(--border) var(--pct, 0%),
        var(--border) 100%);
    outline: none;
    cursor: pointer;
    margin: 4px 0 0;
}

.timeline-panel-inline .timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold-2);
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .6);
}

.timeline-panel-inline .timeline-marks {
    display: flex;
    justify-content: space-between;
    font-size: 8px;
    color: var(--muted);
    margin-top: 2px;
    padding: 0 2px;
    font-variant-numeric: tabular-nums;
}

/* Скрываем старую панель на карте (если осталась) */
.timeline-panel:not(.timeline-panel-inline) {
    display: none !important;
}

/* ============================================================
   СВЕТЛАЯ ТЕМА
   ============================================================ */
body.light-theme {
    --bg: #f0f4f8;
    --panel: #ffffff;
    --border: #d0d8e0;
    --text: #1a2540;
    --muted: #6b7a92;
    --gold: #d99400;
    --gold-2: #b87400;
    --red-2: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
}

body.light-theme .leaflet-tile-pane {
    filter: none !important;
}

body.light-theme .topbar {
    background: #ffffff;
    border-bottom-color: var(--border);
}

body.light-theme .login-card,
body.light-theme .manual-modal-content,
body.light-theme .object-modal-content {
    background: #ffffff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .15);
}

body.light-theme .panel,
body.light-theme .journal,
body.light-theme .detail-panel,
body.light-theme .settlement-card {
    background: #ffffff !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.light-theme .city-tooltip {
    background: #ffffff !important;
    color: #1a2540 !important;
    border-color: var(--border) !important;
}

body.light-theme .leaflet-bar a {
    background: #ffffff !important;
    color: #1a2540 !important;
    border-color: var(--border) !important;
}

body.light-theme .map-legend {
    background: rgba(255, 255, 255, .95);
    color: #1a2540;
}

body.light-theme .timeline-panel,
body.light-theme .timeline-panel-inline {
    background: rgba(255, 255, 255, .95);
    color: #1a2540;
}

body.light-theme .live-badge {
    background: rgba(22, 163, 74, .12);
    color: #16a34a;
}

body.light-theme .manual-row input,
body.light-theme .manual-full input,
body.light-theme .manual-full textarea,
body.light-theme .login-field input {
    background: #f8fafc;
    color: #1a2540;
    color-scheme: light;
}

body.light-theme .detail-description,
body.light-theme .info-block,
body.light-theme .forecast,
body.light-theme .layer-controls {
    background: rgba(240, 244, 248, .6);
    color: #1a2540;
}

body.light-theme .journal-item:hover { background: rgba(0, 0, 0, .04); }
body.light-theme .journal-item.selected {
    background: rgba(217, 148, 0, .12);
}

/* Иконка на кнопке */
.btn-logout { transition: all .15s; }

#theme-toggle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all .2s;
    padding: 0;
}

#theme-toggle:hover {
    border-color: var(--gold);
    transform: rotate(20deg);
}

/* ============================================================
   МОГ — стрелка направления
   ============================================================ */
.mog-heading-arrow {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 12px solid #f0b429;
    transform-origin: 50% 80%;
    margin-top: -22px;
    margin-left: -5px;
    filter: drop-shadow(0 0 4px rgba(240, 180, 41, .9));
    pointer-events: none;
    z-index: 10;
}

/* Улучшение отображения МОГ-трека */
.leaflet-interactive.mog-track {
    stroke-linejoin: round;
    stroke-linecap: round;
}

/* ============================================================
   МОГ — бейдж счётчика точек
   ============================================================ */
.mog-count-badge {
    position: absolute;
    top: -12px;
    left: 100%;
    margin-left: -6px;
    min-width: 22px;
    height: 14px;
    padding: 0 4px;
    border-radius: 7px;
    background: #dc2626;
    color: #ffffff;
    font-family: var(--font);
    font-size: 9px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    letter-spacing: -0.3px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .6),
                0 0 0 1px rgba(255, 255, 255, .15);
    pointer-events: none;
    z-index: 20;
    font-variant-numeric: tabular-nums;
}

/* Светлая тема */
body.light-theme .mog-count-badge {
    background: #b91c1c;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25),
                0 0 0 1px rgba(255, 255, 255, .6);
}

/* Если точек очень много — делаем ярче */
.mog-count-badge.high {
    background: #f0b429;
    color: #0d1421;
    font-weight: 800;
}

/* ============================================================
   Счётчики в фильтрах объектов
   ============================================================ */
.filter-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-count {
    margin-left: auto;
    padding: 0 5px;
    min-width: 22px;
    height: 14px;
    line-height: 14px;
    border-radius: 7px;
    background: rgba(240, 180, 41, .15);
    color: var(--gold-2);
    font-size: 9.5px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    letter-spacing: -0.2px;
}

/* Пустая категория — серый фон, приглушённый текст */
.filter-checkbox.filter-empty .filter-count {
    background: rgba(143, 160, 190, .12);
    color: var(--muted);
}

.filter-checkbox.filter-empty > span:first-of-type {
    color: var(--muted);
    opacity: 0.7;
}

/* При наведении — подсветка счётчика */
.filter-checkbox:hover .filter-count {
    background: rgba(240, 180, 41, .3);
}

/* Светлая тема */
body.light-theme .filter-count {
    background: rgba(217, 148, 0, .15);
    color: #b87400;
}
body.light-theme .filter-checkbox.filter-empty .filter-count {
    background: rgba(107, 122, 146, .12);
    color: #8a94a8;
}
/* ============================================================
   Кнопка прицела и режим создания
   ============================================================ */
.tools-control a {
    background: var(--panel) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
    transition: all .15s;
}

.tools-control a:hover {
    background: var(--gold) !important;
    color: #0d1421 !important;
    border-color: var(--gold) !important;
}

.map-data-status {
    max-width: 280px;
    padding: 8px 12px;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    background: rgba(30, 41, 59, 0.94);
    color: #fde68a;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#create-mode-btn.active {
    background: var(--gold) !important;
    color: #0d1421 !important;
    border-color: var(--gold) !important;
    animation: createPulse 1.5s ease-in-out infinite;
}

@keyframes createPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(240, 180, 41, .7); }
    50% { box-shadow: 0 0 0 8px rgba(240, 180, 41, 0); }
}

/* Подсказка на карте */
.map-hint {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(240, 180, 41, .95);
    color: #0d1421;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .6);
    z-index: 800;
    display: none;
    animation: fadeIn .3s ease;
    pointer-events: none;
}
/* ============================================================
   ПЕРЕКРЕСТИЕ В ЦЕНТРЕ КАРТЫ
   ============================================================ */
.map-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    pointer-events: none;
    z-index: 700;
    display: none;
}

.crosshair-h {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(220, 38, 38, .9);
    transform: translateY(-50%);
    box-shadow: 0 0 8px rgba(220, 38, 38, .8);
}

.crosshair-v {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: rgba(220, 38, 38, .9);
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(220, 38, 38, .8);
}

.crosshair-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc2626;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px #dc2626;
    animation: crosshairPulse 1.6s ease-in-out infinite;
}

@keyframes crosshairPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.5); }
}

/* ============================================================
   КНОПКИ ПРИЦЕЛА
   ============================================================ */
.crosshair-control {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.crosshair-pin,
.crosshair-cancel {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 2px solid var(--gold);
    background: rgba(13, 20, 33, .95);
    color: var(--gold-2);
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .7);
    transition: all .15s;
    display: grid;
    place-items: center;
}

.crosshair-pin:hover {
    background: var(--gold);
    color: #0d1421;
    transform: scale(1.1);
}

.crosshair-cancel {
    border-color: var(--red-2);
    color: var(--red-2);
}

.crosshair-cancel:hover {
    background: var(--red-2);
    color: white;
}
