:root {
  color-scheme: dark;
  --bg: #071014;
  --panel: rgba(10, 21, 27, .96);
  --panel-2: #0d1b22;
  --line: rgba(165, 201, 214, .14);
  --muted: #81949d;
  --text: #eaf3f5;
  --accent: #22d3b5;
  --cyan: #35c5e8;
  --blue: #5688ff;
  --violet: #9d7bff;
  --green: #73d995;
  --orange: #ff9b59;
  --red: #ff646e;
  --sidebar: 330px;
  font-family: Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
.app-shell { display: grid; grid-template: 62px calc(100vh - 62px) / var(--sidebar) 1fr; height: 100vh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 24px; padding: 0 18px; border-bottom: 1px solid var(--line); background: #071116; z-index: 30; }
.brand { min-width: 286px; display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.brand > span:last-child { display: flex; flex-direction: column; letter-spacing: .14em; line-height: 1.05; font-family: Manrope, sans-serif; }
.brand strong { font-size: 15px; }
.brand small { font-size: 9px; color: var(--muted); margin-top: 4px; }
.brand-mark { position: relative; width: 32px; height: 34px; transform: rotate(30deg); display: block; }
.brand-mark span { position: absolute; width: 17px; height: 17px; border: 2px solid var(--accent); }
.brand-mark span:nth-child(1) { left: 0; top: 8px; }
.brand-mark span:nth-child(2) { right: 0; top: 0; }
.brand-mark span:nth-child(3) { right: 0; bottom: 0; }
.mode-switch { height: 38px; display: flex; padding: 3px; background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: 7px; }
.mode-button { min-width: 82px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; }
.mode-button.active { color: #071512; background: var(--accent); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-wrap { width: min(330px, 24vw); height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 7px; color: var(--muted); }
.search-wrap input, .layer-search input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; }
.search-wrap kbd { border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; font-size: 9px; color: var(--muted); white-space: nowrap; }
.weather-pill { height: 42px; display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 0 8px; }
.weather-pill > span:last-child { display: flex; flex-direction: column; text-align: left; }
.weather-pill strong { font-size: 13px; }
.weather-pill small { color: var(--muted); font-size: 9px; }
.icon-button, .profile-button { position: relative; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: rgba(255,255,255,.04); border-radius: 7px; }
.icon-button i { position: absolute; top: -5px; right: -5px; width: 16px; height: 16px; display: grid; place-items: center; background: var(--red); border-radius: 50%; font-size: 8px; font-style: normal; }
.profile-button { border-radius: 50%; background: linear-gradient(135deg, #1b7268, #154148); font-size: 11px; }
.sidebar { grid-row: 2; display: flex; min-height: 0; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line); z-index: 20; }
.sidebar-head { padding: 20px 18px 14px; display: flex; justify-content: space-between; align-items: flex-start; }
.eyebrow { color: var(--accent); font-size: 9px; letter-spacing: .16em; font-weight: 700; }
h1, h2 { font-family: Manrope, sans-serif; }
.sidebar h1 { margin: 6px 0 0; font-size: 17px; }
.layer-search { margin: 0 14px; height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: rgba(255,255,255,.025); }
.layer-summary { display: flex; justify-content: space-between; padding: 13px 18px 9px; color: var(--muted); font-size: 10px; border-bottom: 1px solid var(--line); }
.layer-summary b { color: var(--text); }
.layer-summary button { border: 0; background: none; color: var(--accent); font-size: 10px; }
.layer-list { overflow-y: auto; flex: 1; scrollbar-color: #1f3a42 transparent; scrollbar-width: thin; }
.layer-group { border-bottom: 1px solid var(--line); }
.group-title { width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 17px 9px; border: 0; background: transparent; color: var(--muted); text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.group-title b { margin-left: auto; font-weight: 400; transition: transform .2s; }
.layer-group.collapsed .group-title b { transform: rotate(-90deg); }
.layer-group.collapsed .group-items { display: none; }
.layer-row { display: grid; grid-template-columns: 30px 1fr 26px; align-items: center; gap: 8px; min-height: 48px; padding: 5px 13px 5px 18px; }
.layer-row:hover { background: rgba(255,255,255,.025); }
.layer-row.hidden-by-search { display: none; }
.toggle { width: 27px; height: 15px; position: relative; }
.toggle input { opacity: 0; position: absolute; }
.toggle span { position: absolute; inset: 0; border-radius: 20px; background: #233138; transition: .2s; }
.toggle span:after { content: ""; position: absolute; width: 11px; height: 11px; top: 2px; left: 2px; border-radius: 50%; background: #85959c; transition: .2s; }
.toggle input:checked + span { background: color-mix(in srgb, var(--layer-color) 55%, #142a2b); }
.toggle input:checked + span:after { left: 14px; background: var(--layer-color); }
.layer-meta { min-width: 0; }
.layer-meta strong { display: block; font-size: 11px; font-weight: 600; }
.layer-meta small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.layer-menu { border: 0; background: transparent; color: var(--muted); }
.opacity-wrap { grid-column: 2 / 4; display: none; align-items: center; gap: 8px; padding-bottom: 4px; }
.layer-row.expanded .opacity-wrap { display: flex; }
.opacity-wrap input { width: 100%; accent-color: var(--layer-color); }
.opacity-wrap output { width: 30px; color: var(--muted); font-size: 8px; }
.sidebar-footer { padding: 12px 14px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 8px; border-top: 1px solid var(--line); }
.primary-action, .secondary-action, .upload-button { min-height: 36px; display: inline-flex; justify-content: center; align-items: center; gap: 6px; border-radius: 5px; padding: 0 12px; font-size: 10px; font-weight: 700; }
.primary-action { border: 0; background: var(--accent); color: #061713; }
.secondary-action { border: 1px solid var(--line); background: rgba(255,255,255,.035); color: var(--text); }
.map-stage { position: relative; min-width: 0; overflow: hidden; background: #0c1b20; }
#map { position: absolute; inset: 0; }
.map-tint { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 60% 45%, transparent 20%, rgba(4,10,13,.25) 100%); }
.map-display-bar { position: absolute; top: 84px; left: 16px; display: flex; align-items: stretch; gap: 6px; padding: 5px; background: rgba(7,17,22,.9); border: 1px solid var(--line); border-radius: 6px; backdrop-filter: blur(12px); }
.map-display-bar label { min-width: 132px; display: flex; flex-direction: column; gap: 1px; padding: 3px 8px; border-right: 1px solid var(--line); }
.map-display-bar label span { color: var(--muted); font-size: 7px; letter-spacing: .09em; }
.map-display-bar select { min-width: 0; padding: 0; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 9px; font-weight: 600; }
.display-toggle { padding: 0 9px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 9px; }
.display-toggle.active { color: var(--accent); background: rgba(34,211,181,.1); }
.osm-live-status { position: absolute; top: 84px; right: 70px; min-width: 170px; height: 43px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid rgba(255,155,89,.25); border-radius: 6px; background: rgba(7,17,22,.92); text-align: left; }
.osm-live-status > i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 9px var(--orange); }.osm-live-status.connected { border-color: rgba(115,217,149,.25); }.osm-live-status.connected > i { background: var(--green); box-shadow: 0 0 9px var(--green); }
.osm-live-status.loading > i { animation: osmPulse 1s infinite alternate; }
.osm-live-status span { display: flex; flex-direction: column; gap: 2px; }.osm-live-status strong { font-size: 8px; letter-spacing: .06em; }.osm-live-status small { color: var(--muted); font-size: 7px; }
@keyframes osmPulse { to { opacity:.25; transform:scale(.75); } }
.map-legend { position: absolute; left: 16px; bottom: 87px; width: 178px; padding: 9px 10px; background: rgba(7,17,22,.88); border: 1px solid var(--line); border-radius: 6px; backdrop-filter: blur(10px); }
.map-legend header { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 8px; letter-spacing: .1em; }
.map-legend header button { width: 22px; border: 0; background: transparent; color: var(--muted); }
.map-legend.collapsed #legendItems { display: none; }
#legendItems { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 9px; margin-top: 8px; }
.legend-item { min-width: 0; display: flex; align-items: center; gap: 6px; color: #b9c8cd; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend-item i { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--legend-color); box-shadow: 0 0 8px color-mix(in srgb, var(--legend-color) 55%, transparent); }
.map-readout { position: absolute; right: 23px; bottom: 80px; display: flex; gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: rgba(7,17,22,.82); color: var(--muted); font-size: 7px; }
.map-readout span { padding: 5px 7px; border-right: 1px solid var(--line); }.map-readout span:last-child { border-right: 0; color: var(--accent); }
.map-tooltip { position: absolute; z-index: 15; display: none; max-width: 210px; padding: 8px 10px; pointer-events: none; background: rgba(5,14,18,.95); border: 1px solid rgba(34,211,181,.25); border-radius: 5px; box-shadow: 0 8px 30px rgba(0,0,0,.35); font-size: 9px; }
.map-tooltip.visible { display: block; }.map-tooltip strong { display: block; margin-bottom: 3px; }.map-tooltip small { color: var(--muted); }
.district-label { pointer-events: none; transform: translate(-50%,-50%); color: #d6e4e7; text-shadow: 0 1px 5px #071014, 0 0 10px #071014; font: 600 10px Inter,sans-serif; letter-spacing: .05em; white-space: nowrap; opacity: .84; }
.district-label:before { content: ""; display: block; width: 4px; height: 4px; margin: 0 auto 3px; background: var(--accent); border: 1px solid #dffff8; border-radius: 50%; box-shadow: 0 0 8px var(--accent); }
.maplibregl-ctrl-bottom-left { left: 10px; }
.maplibregl-ctrl-bottom-right { display: none; }
.maplibregl-ctrl-attrib { font-size: 8px !important; background: rgba(6,15,18,.72) !important; color: #aab9bf !important; }
.maplibregl-ctrl-attrib a { color: #aee8dc !important; }
.kpi-strip { position: absolute; top: 16px; left: 16px; right: 16px; display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); max-width: 820px; gap: 8px; pointer-events: none; }
.kpi-strip article { height: 58px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: rgba(7,17,22,.86); border: 1px solid var(--line); backdrop-filter: blur(12px); border-radius: 6px; }
.kpi-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 5px; background: color-mix(in srgb, currentColor 18%, transparent); }
.kpi-icon.cyan { color: var(--cyan); }.kpi-icon.blue { color: var(--blue); }.kpi-icon.violet { color: var(--violet); }.kpi-icon.green { color: var(--green); }
.kpi-strip article > div { display: grid; grid-template-columns: auto auto; align-items: end; column-gap: 7px; }
.kpi-strip small { grid-column: 1 / -1; color: var(--muted); font-size: 7px; letter-spacing: .09em; }
.kpi-strip strong { font-size: 14px; margin-top: 2px; }
.kpi-strip em { font-size: 8px; color: var(--muted); font-style: normal; padding-bottom: 2px; }.kpi-strip em.good { color: var(--green); }.kpi-strip em.warn { color: var(--orange); }
.map-tools { position: absolute; right: 16px; top: 110px; width: 38px; display: flex; flex-direction: column; background: rgba(7,17,22,.9); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.map-tools button { width: 38px; height: 36px; border: 0; background: transparent; font-size: 16px; }
.map-tools button:hover, .map-tools button.active { color: var(--accent); background: rgba(34,211,181,.11); }
.map-tools span { height: 1px; background: var(--line); }
.compass { position: absolute; right: 15px; top: 76px; width: 40px; height: 28px; display: flex; justify-content: center; align-items: center; cursor: pointer; }
.compass b { position: absolute; top: -4px; color: var(--red); font-size: 8px; }.compass span { font-size: 14px; color: #d7e7e9; }
.timeline-panel { position: absolute; left: 24px; right: 24px; bottom: 18px; height: 58px; display: grid; grid-template-columns: 38px 92px 1fr 62px; grid-template-rows: 1fr 14px; align-items: center; gap: 0 12px; padding: 7px 12px; background: rgba(7,17,22,.92); border: 1px solid var(--line); border-radius: 6px; backdrop-filter: blur(12px); }
.timeline-panel > button:first-child { width: 34px; height: 34px; grid-row: 1 / 3; border: 1px solid rgba(34,211,181,.35); border-radius: 50%; background: rgba(34,211,181,.1); color: var(--accent); }
.timeline-info { grid-row: 1 / 3; display: flex; flex-direction: column; }
.timeline-info strong { font-family: Manrope; font-size: 14px; }.timeline-info small { font-size: 8px; color: var(--muted); }
.timeline-panel input { width: 100%; accent-color: var(--accent); }
.timeline-labels { display: flex; justify-content: space-between; font-size: 7px; color: var(--muted); }
.live-button { grid-row: 1 / 3; height: 28px; border: 1px solid rgba(255,100,110,.25); background: rgba(255,100,110,.08); color: #ff858c; border-radius: 4px; font-size: 8px; font-weight: 700; }
.live-button i { display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: var(--red); }
.scenario-fab { position: absolute; right: 24px; bottom: 88px; height: 38px; border: 1px solid rgba(34,211,181,.3); background: rgba(7,25,26,.92); color: var(--accent); border-radius: 6px; padding: 0 13px; font-size: 10px; font-weight: 700; }
.analysis-fab { position: absolute; right: 160px; bottom: 88px; height: 38px; border: 1px solid rgba(86,136,255,.32); background: rgba(10,19,34,.92); color: #8eafff; border-radius: 6px; padding: 0 13px; font-size: 10px; font-weight: 700; }
.scenario-card { position: absolute; right: 24px; bottom: 138px; width: 280px; padding: 16px; background: rgba(7,17,22,.96); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 18px 50px rgba(0,0,0,.35); transform: translateX(calc(100% + 40px)); transition: transform .25s; }
.scenario-card.open { transform: translateX(0); }
.scenario-head { display: flex; justify-content: space-between; margin-bottom: 13px; }.scenario-head h2 { margin: 4px 0 0; font-size: 15px; }.scenario-head button, .panel-close { border: 0; background: none; color: var(--muted); font-size: 20px; }
.scenario-card label { display: grid; grid-template-columns: 1fr auto; margin: 9px 0; font-size: 9px; color: var(--muted); }.scenario-card output { color: var(--text); }.scenario-card input { grid-column: 1 / -1; margin-top: 6px; accent-color: var(--accent); }
.scenario-result { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; margin-top: 4px; border-top: 1px solid var(--line); font-size: 9px; color: var(--muted); }.scenario-result strong { color: var(--orange); font-size: 13px; }
.scenario-card > .primary-action { width: 100%; }
.detail-panel { position: absolute; top: 16px; right: 70px; width: 280px; max-height: calc(100% - 100px); padding: 18px; background: rgba(7,17,22,.96); border: 1px solid var(--line); border-radius: 7px; transform: translateX(calc(100% + 100px)); transition: transform .25s; overflow: auto; }
.detail-panel.open { transform: translateX(0); }
.panel-close { position: absolute; right: 12px; top: 10px; }
.detail-panel h2 { margin: 6px 28px 0 0; font-size: 18px; }.detail-panel > p { color: var(--muted); font-size: 10px; margin: 5px 0 12px; }
.detail-hero { height: 96px; border-radius: 5px; background: linear-gradient(135deg, rgba(34,211,181,.2), rgba(86,136,255,.08)), radial-gradient(circle at 70% 30%, #27464a, #102126); position: relative; overflow: hidden; }
.detail-hero:before { content: ""; position: absolute; width: 65px; height: 70px; left: 100px; bottom: -10px; border: 2px solid rgba(95,225,199,.45); transform: rotate(45deg); }
.detail-panel dl { margin: 12px 0; }.detail-panel dl div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }.detail-panel dt { color: var(--muted); font-size: 9px; }.detail-panel dd { margin: 0; font-size: 10px; font-weight: 600; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.data-view { position: absolute; inset: 0; display: none; padding: 28px; background: rgba(7,16,20,.98); overflow: auto; }
.data-view.open { display: block; }
.data-view-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }.data-view-head h2 { margin: 5px 0 0; }.data-view-head button { border: 1px solid var(--line); background: transparent; border-radius: 5px; padding: 9px 12px; }
.data-table-wrap { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 11px; } th, td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--line); } th { color: var(--muted); background: rgba(255,255,255,.025); font-size: 9px; letter-spacing: .06em; } td small { color: var(--muted); } .status-badge { display: inline-block; padding: 3px 7px; border-radius: 20px; color: var(--green); background: rgba(115,217,149,.1); font-size: 8px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 30px; background: rgba(2,8,10,.72); backdrop-filter: blur(7px); }
.modal-backdrop.open { display: grid; }
.manager-modal { width: min(880px, 100%); max-height: min(720px, 94vh); display: flex; flex-direction: column; background: #0a161c; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 30px 100px rgba(0,0,0,.55); }
.manager-modal > header { position: relative; padding: 21px 24px 15px; }.manager-modal h2 { margin: 5px 0 0; font-size: 20px; }
.manager-tabs { display: flex; padding: 0 24px; border-bottom: 1px solid var(--line); }.manager-tabs button { padding: 11px 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 10px; }.manager-tabs button.active { color: var(--accent); border-color: var(--accent); }
.manager-body { min-height: 0; overflow: auto; padding: 20px 24px 24px; }.tab-panel { display: none; }.tab-panel.active { display: block; }
.manager-toolbar, .alert-compose { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }.manager-toolbar div, .alert-compose div { display: flex; flex-direction: column; gap: 4px; }.manager-toolbar small, .alert-compose small { color: var(--muted); font-size: 9px; }
.upload-button { background: rgba(34,211,181,.1); border: 1px solid rgba(34,211,181,.25); color: var(--accent); cursor: pointer; }.upload-button input { display: none; }
.source-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }.source-card { display: grid; grid-template-columns: 34px 1fr auto; gap: 9px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }.source-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 5px; background: rgba(34,211,181,.08); color: var(--accent); }.source-card strong { display: block; font-size: 10px; }.source-card small { color: var(--muted); font-size: 8px; }.source-card .status-badge { justify-self: end; }
.manager-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.alerts-list { display: grid; gap: 8px; }.alert-row { display: grid; grid-template-columns: 8px 1fr auto; gap: 12px; padding: 12px; align-items: center; border: 1px solid var(--line); border-radius: 6px; }.alert-row > i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }.alert-row.critical > i { background: var(--red); }.alert-row strong { display: block; font-size: 10px; }.alert-row small { color: var(--muted); font-size: 8px; }.alert-row time { color: var(--muted); font-size: 8px; }
.quality-score { display: flex; gap: 14px; align-items: center; padding: 14px; margin-bottom: 15px; border: 1px solid rgba(34,211,181,.2); background: rgba(34,211,181,.05); border-radius: 6px; }.quality-score > strong { font-family: Manrope; font-size: 32px; color: var(--accent); }.quality-score span { display: flex; flex-direction: column; gap: 3px; }.quality-score small { color: var(--muted); font-size: 8px; }
.quality-list { display: grid; gap: 10px; }.quality-row { display: grid; grid-template-columns: 150px 1fr 35px; align-items: center; gap: 10px; font-size: 9px; }.quality-track { height: 5px; background: #1a2a31; border-radius: 5px; overflow: hidden; }.quality-track i { display: block; height: 100%; background: var(--accent); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.settings-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 9px; color: var(--muted); }.settings-grid select { height: 38px; padding: 0 10px; color: var(--text); background: #102128; border: 1px solid var(--line); border-radius: 5px; }
.switch-row { margin-top: 13px; padding: 12px 0; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); }.switch-row span { display: flex; flex-direction: column; gap: 4px; font-size: 10px; }.switch-row small { color: var(--muted); font-size: 8px; }.switch-row input { accent-color: var(--accent); }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 150; max-width: 420px; padding: 10px 14px; background: #12272b; border: 1px solid rgba(34,211,181,.3); border-radius: 6px; font-size: 10px; opacity: 0; transform: translate(-50%, 15px); transition: .2s; pointer-events: none; }.toast.show { opacity: 1; transform: translate(-50%, 0); }
.analysis-modal { width: min(990px,100%); }
.analysis-overview { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; padding: 0 24px 16px; }
.analysis-overview article { padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.02); }
.analysis-overview small { display: block; color: var(--muted); font-size: 7px; letter-spacing: .08em; }.analysis-overview strong { display: block; margin-top: 5px; font-size: 12px; }
.analysis-body { padding: 0 24px 24px; overflow: auto; }
.analysis-section { padding: 15px 0; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }.section-heading h3 { margin: 4px 0 0; font-family: Manrope; font-size: 14px; }
.sync-status { display: flex; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.018); }
.sync-status > i { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 12px var(--orange); }.sync-status.connected > i { background: var(--green); box-shadow: 0 0 12px var(--green); }
.sync-status span { display: flex; flex-direction: column; gap: 3px; }.sync-status b { font-size: 10px; }.sync-status small { color: var(--muted); font-size: 8px; }
.analysis-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.analysis-tool { min-height: 96px; display: flex; flex-direction: column; align-items: flex-start; padding: 11px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.018); text-align: left; }
.analysis-tool:hover, .analysis-tool.active { border-color: color-mix(in srgb,var(--tool-color) 45%,transparent); background: color-mix(in srgb,var(--tool-color) 8%,transparent); }
.analysis-tool > i { width: 27px; height: 27px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 5px; color: var(--tool-color); background: color-mix(in srgb,var(--tool-color) 12%,transparent); font-style: normal; }
.analysis-tool strong { font-size: 9px; }.analysis-tool small { margin-top: 4px; color: var(--muted); font-size: 7px; line-height: 1.4; }
.output-actions { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }.output-actions button { min-height: 38px; padding: 8px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.025); font-size: 8px; }
.analysis-result { position: absolute; z-index: 16; top: 146px; right: 68px; width: 270px; padding: 16px; background: rgba(7,17,22,.96); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 20px 60px rgba(0,0,0,.4); transform: translateX(calc(100% + 90px)); transition: transform .25s; }
.analysis-result.open { transform: translateX(0); }.analysis-result > button { position: absolute; right: 10px; top: 8px; border: 0; background: transparent; color: var(--muted); font-size: 18px; }
.analysis-result h2 { margin: 5px 25px 5px 0; font-size: 16px; }.analysis-result > p { margin: 0 0 10px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.analysis-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; }.analysis-metrics article { padding: 7px; background: rgba(255,255,255,.035); border-radius: 4px; }.analysis-metrics small { display: block; color: var(--muted); font-size: 6px; }.analysis-metrics strong { display: block; margin-top: 4px; font-size: 10px; }
.mini-chart { height: 72px; display: flex; align-items: flex-end; gap: 4px; margin: 12px 0 8px; padding-top: 8px; border-bottom: 1px solid var(--line); }.mini-chart i { flex: 1; min-height: 5px; background: linear-gradient(to top,var(--accent),#5688ff); border-radius: 2px 2px 0 0; opacity: .8; }
.model-disclaimer { display: block; color: #9baeb5; font-size: 7px; line-height: 1.45; }
.field-mode:after { content: "SAHA MODU"; position: absolute; left: 50%; top: 14px; transform: translateX(-50%); padding: 5px 9px; border-radius: 20px; background: var(--accent); color: #051713; font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.mobile-only { display: none; }
@media (max-width: 1050px) {
  :root { --sidebar: 300px; }
  .brand { min-width: 255px; }
  .search-wrap { display: none; }
  .kpi-strip { right: 70px; grid-template-columns: repeat(2, minmax(140px, 1fr)); max-width: 450px; }
  .map-display-bar { top: 146px; }
  .osm-live-status { top: 146px; right: 16px; min-width: 150px; }
}
@media (max-width: 760px) {
  html, body { overflow: hidden; }
  .app-shell { display: block; }
  .topbar { height: 58px; padding: 0 10px; gap: 10px; }
  .mobile-only { display: grid; }
  .brand { min-width: 0; margin-right: auto; }.brand-mark { transform: rotate(30deg) scale(.8); }.brand small { display: none; }
  .mode-switch, .weather-pill, #notificationButton { display: none; }
  .sidebar { position: fixed; inset: 58px auto 0 0; width: min(340px, 90vw); transform: translateX(-100%); transition: transform .25s; box-shadow: 20px 0 60px rgba(0,0,0,.45); }.sidebar.open { transform: translateX(0); }
  .map-stage { position: fixed; inset: 58px 0 0; }
  .kpi-strip { top: 10px; left: 10px; right: 56px; display: flex; overflow-x: auto; }.kpi-strip article { min-width: 138px; }
  .map-display-bar { top: 78px; left: 10px; right: 56px; max-width: 270px; overflow-x: auto; }.map-display-bar label { min-width: 120px; }.map-display-bar .display-toggle { white-space: nowrap; min-width: 72px; }
  .osm-live-status { top: 129px; left: 10px; right: auto; min-width: 155px; }
  .map-tools { right: 10px; top: 86px; }.compass { right: 9px; top: 54px; }
  .map-legend { left: 10px; bottom: 78px; width: 150px; }.map-readout { display: none; }
  .timeline-panel { left: 10px; right: 10px; bottom: 10px; grid-template-columns: 32px 65px 1fr; padding: 6px 8px; }.timeline-panel .live-button { display: none; }.timeline-labels { display: none; }.timeline-panel input { grid-row: 1 / 3; }.timeline-info strong { font-size: 12px; }
  .scenario-fab { right: 10px; bottom: 78px; }.scenario-card { right: 10px; bottom: 125px; width: calc(100% - 20px); }
  .analysis-fab { right: 148px; bottom: 78px; }
  .analysis-overview { grid-template-columns: repeat(2,1fr); padding: 0 15px 12px; }.analysis-body { padding: 0 15px 15px; }.analysis-grid { grid-template-columns: repeat(2,1fr); }.output-actions { grid-template-columns: repeat(2,1fr); }
  .analysis-result { top: auto; left: 10px; right: 10px; bottom: 128px; width: auto; }
  .detail-panel { top: auto; right: 10px; left: 10px; bottom: 78px; width: auto; max-height: 56%; transform: translateY(calc(100% + 100px)); }.detail-panel.open { transform: translateY(0); }
  .modal-backdrop { padding: 8px; }.manager-modal { max-height: 96vh; }.manager-tabs { overflow-x: auto; padding: 0 12px; }.manager-tabs button { white-space: nowrap; }.manager-body { padding: 15px; }.source-grid, .settings-grid { grid-template-columns: 1fr; }
  .data-view { padding: 16px; }.data-table-wrap { overflow-x: auto; } table { min-width: 650px; }
}
