:root {
    --navy-950: #06162c;
    --navy-900: #0a213d;
    --navy-850: #0c294b;
    --navy-800: #11345a;
    --blue-700: #1565d8;
    --blue-600: #2477ec;
    --blue-500: #3b8cff;
    --blue-100: #eaf3ff;
    --cyan-500: #19bcd7;
    --green-500: #18ae78;
    --green-100: #e7f8f1;
    --amber-500: #f4a62a;
    --amber-100: #fff5df;
    --red-500: #e94c58;
    --red-100: #ffeaed;
    --indigo-500: #6c69e8;
    --ink: #17283f;
    --muted: #687c94;
    --line: #dce5ef;
    --line-soft: #eaf0f6;
    --surface: #ffffff;
    --canvas: #eef3f8;
    --shadow: 0 5px 18px rgba(22, 44, 77, .07);
    --radius: 13px;
    --sidebar: 222px;
    font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; margin: 0; }
body { color: var(--ink); background: var(--canvas); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: currentColor; }
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 1100; width: var(--sidebar); display: flex; flex-direction: column;
    color: #d9e7f7; background: linear-gradient(180deg, var(--navy-950), #071b34 55%, #061428); box-shadow: 6px 0 28px rgba(3, 17, 34, .12);
}
.brand { height: 76px; display: flex; align-items: center; gap: 12px; padding: 0 21px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #2c91f7, #1161bd); box-shadow: inset 0 0 0 2px rgba(255,255,255,.24), 0 6px 12px rgba(0,0,0,.2); overflow: hidden; }
.brand-mark::before { content: ""; position: absolute; width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; }
.brand-mark span { position: absolute; left: 7px; right: 7px; height: 3px; background: #fff; border-radius: 100%; transform: rotate(-8deg); }
.brand-mark span:nth-child(1) { top: 13px; }
.brand-mark span:nth-child(2) { top: 18px; left: 10px; }
.brand-mark span:nth-child(3) { top: 23px; left: 14px; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.22; }
.brand-copy strong { color: #fff; font-size: 17px; letter-spacing: -.4px; }
.brand-copy small { margin-top: 4px; color: #a9bdd4; font-size: 11px; letter-spacing: -.3px; white-space: nowrap; }
.system-label { display: flex; align-items: center; gap: 7px; margin: 17px 16px 9px; color: #6f8dac; font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.system-label b { margin-left: auto; padding: 3px 5px; color: #62e4b3; background: rgba(44, 209, 148, .1); border: 1px solid rgba(64, 218, 160, .18); border-radius: 4px; font-size: 8px; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: #2bd89b; box-shadow: 0 0 0 4px rgba(43,216,155,.12); animation: pulse 2.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(43,216,155,0); } }
.main-nav { display: flex; flex-direction: column; gap: 4px; padding: 0 10px; }
.nav-item { position: relative; min-height: 45px; display: flex; align-items: center; gap: 13px; padding: 0 13px; color: #9db2c9; border-radius: 9px; font-size: 13px; font-weight: 700; transition: .18s ease; }
.nav-item::before { content: ""; position: absolute; left: -10px; width: 3px; height: 22px; border-radius: 0 4px 4px 0; background: transparent; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); transform: translateX(1px); }
.nav-item.is-active { color: #fff; background: linear-gradient(90deg, rgba(35,119,236,.35), rgba(35,119,236,.12)); box-shadow: inset 0 0 0 1px rgba(66,144,255,.18); }
.nav-item.is-active::before { background: #4a9bff; box-shadow: 0 0 10px rgba(65,151,255,.65); }
.nav-item .icon { width: 19px; height: 19px; }
.nav-item em { margin-left: auto; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; color: #fff; background: var(--red-500); border-radius: 10px; font-size: 10px; font-style: normal; }
.sidebar-footer { margin-top: auto; padding: 14px; border-top: 1px solid rgba(255,255,255,.07); }
.agency-card { display: flex; align-items: center; gap: 10px; padding: 9px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); border-radius: 9px; }
.agency-logo { width: 32px; height: 32px; display: grid; place-items: center; color: #1c3a60; background: #f5f8fc; border-radius: 7px; font-size: 10px; font-weight: 900; }
.agency-card div { display: flex; flex-direction: column; }
.agency-card strong { color: #d7e4f2; font-size: 11px; }
.agency-card small { margin-top: 3px; color: #738ca6; font-size: 9px; }
.legacy-link { display: flex; justify-content: space-between; margin-top: 8px; padding: 7px 3px; color: #718aa6; font-size: 10px; }
.legacy-link:hover { color: #cad9e8; }

.main-frame { width: calc(100% - var(--sidebar)); min-width: 0; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 1000; height: 76px; display: flex; align-items: center; gap: 20px; padding: 0 27px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); box-shadow: 0 2px 12px rgba(25,52,84,.04); backdrop-filter: blur(12px); }
.page-heading { min-width: 210px; display: flex; flex-direction: column; }
.page-heading span { color: var(--blue-600); font-size: 9px; font-weight: 900; letter-spacing: 1.2px; }
.page-heading h1 { margin: 3px 0 0; color: #173250; font-size: 20px; letter-spacing: -.8px; }
.topbar-spacer { flex: 1; }
.training-chip { display: flex; align-items: center; gap: 7px; padding: 7px 10px; color: #92620d; background: #fff8e8; border: 1px solid #f1dfaf; border-radius: 8px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.training-chip span { width: 6px; height: 6px; background: #f2aa2c; border-radius: 50%; }
.top-weather { display: flex; align-items: baseline; padding-right: 20px; border-right: 1px solid var(--line); white-space: nowrap; }
.top-weather b { color: #122d4b; font-size: 18px; }
.top-weather > span { color: #49647f; font-size: 12px; }
.top-weather small { margin-left: 8px; color: var(--muted); font-size: 10px; }
.top-clock { display: flex; flex-direction: column; text-align: right; line-height: 1.2; white-space: nowrap; }
.top-clock b { color: #173250; font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.top-clock small { margin-top: 3px; color: #7c8fa3; font-size: 9px; }
.icon-button { flex: 0 0 auto; width: 37px; height: 37px; display: grid; place-items: center; padding: 0; color: #607790; background: #f5f8fb; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; transition: .18s; }
.icon-button:hover { color: var(--blue-600); border-color: #afcdeb; background: #eff6ff; }
.icon-button.is-loading .icon { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mobile-menu { display: none; }
.operator { display: flex; align-items: center; gap: 9px; padding-left: 17px; border-left: 1px solid var(--line); }
.operator > span { width: 35px; height: 35px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #173d66, #0a2341); border-radius: 50%; font-size: 12px; font-weight: 900; }
.operator div { display: flex; flex-direction: column; white-space: nowrap; }
.operator strong { color: #213a56; font-size: 11px; }
.operator small { margin-top: 3px; color: #8796a8; font-size: 9px; }

.page-content { min-height: calc(100vh - 76px); padding: 21px 24px 30px; }
.page-toolbar { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 15px; }
.breadcrumb { color: #7b8fa5; font-size: 10px; font-weight: 600; }
.breadcrumb b { padding: 0 5px; color: #b2bfcc; }
.page-description { margin: 5px 0 0; color: #39536d; font-size: 12px; font-weight: 600; }
.update-state { display: flex; align-items: center; gap: 10px; padding: 6px 10px; color: #56708b; background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 8px; }
.update-state > div { display: flex; flex-direction: column; line-height: 1; }
.update-state small { color: #8a9bad; font-size: 8px; }
.update-state b { margin-top: 4px; font-size: 11px; font-variant-numeric: tabular-nums; }

.summary-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.summary-card { min-width: 0; min-height: 91px; display: flex; align-items: center; gap: 11px; padding: 13px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); }
.summary-icon { flex: 0 0 auto; width: 39px; height: 39px; display: grid; place-items: center; color: var(--blue-600); background: var(--blue-100); border-radius: 10px; font-size: 21px; font-weight: 900; }
.summary-icon.cyan { color: #05a7c2; background: #e7f9fc; }
.summary-icon.indigo { color: var(--indigo-500); background: #efefff; }
.summary-icon.amber { color: #d78911; background: var(--amber-100); }
.summary-icon.green { color: #14966b; background: var(--green-100); }
.summary-icon.weather-sun { color: #ee9e16; background: linear-gradient(145deg, #fff6dc, #fff0ba); }
.summary-card > div:last-child { min-width: 0; display: flex; flex-direction: column; }
.summary-card span { color: #74889f; font-size: 10px; font-weight: 700; }
.summary-card strong { display: flex; align-items: baseline; gap: 3px; margin-top: 3px; color: #172f4c; font-size: 20px; letter-spacing: -.5px; white-space: nowrap; }
.summary-card strong small { color: #60758c; font-size: 10px; font-weight: 700; }
.summary-card em { margin-top: 4px; overflow: hidden; color: #8a9bae; font-size: 9px; font-style: normal; white-space: nowrap; text-overflow: ellipsis; }
.summary-card em.positive { color: #15966b; }
.summary-card em.attention { color: #d78611; }
.summary-card em i { display: inline-block; width: 5px; height: 5px; margin-right: 4px; background: currentColor; border-radius: 50%; vertical-align: 1px; }

.dashboard-grid, .report-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-span-2 { grid-column: span 2; }
.panel-header { min-height: 55px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; border-bottom: 1px solid var(--line-soft); }
.panel-header > div:first-child { min-width: 0; }
.panel-kicker { display: block; margin-bottom: 2px; color: var(--blue-600); font-size: 8px; font-weight: 900; letter-spacing: 1px; }
.panel-header h2 { margin: 0; color: #1b3552; font-size: 14px; letter-spacing: -.4px; }
.data-source, .text-link { color: #748ba3; font-size: 9px; white-space: nowrap; }
.text-link { color: var(--blue-600); font-weight: 700; }
.text-link:hover { text-decoration: underline; }
.panel-weather { grid-column: span 2; }
.weather-current { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 12px 18px 8px; }
.weather-main { display: flex; align-items: center; gap: 12px; }
.giant-weather { font-size: 50px; filter: drop-shadow(0 4px 8px rgba(244,173,42,.2)); }
.weather-main div { display: grid; grid-template-columns: auto auto; align-items: end; column-gap: 8px; }
.weather-main strong { grid-column: 1 / -1; color: #5f748a; font-size: 10px; }
.weather-main b { color: #1a3552; font-size: 38px; letter-spacing: -2px; line-height: 1.1; }
.weather-main small { align-self: end; padding-bottom: 5px; color: #7a8da1; font-size: 9px; }
.weather-current dl { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 0; }
.weather-current dl div { display: flex; flex-direction: column; align-items: center; padding: 9px 5px; background: #f7f9fc; border-radius: 7px; }
.weather-current dt { color: #8a9bad; font-size: 8px; }
.weather-current dd { margin: 4px 0 0; color: #334e6a; font-size: 11px; font-weight: 800; }
.weather-current dd.good { color: #159a6d; }
.forecast-row { display: grid; grid-template-columns: repeat(6, 1fr); margin: 0 12px 12px; padding: 7px 0; background: #f8fafc; border: 1px solid var(--line-soft); border-radius: 9px; }
.forecast-row > div { display: flex; flex-direction: column; align-items: center; gap: 3px; border-right: 1px solid var(--line-soft); }
.forecast-row > div:last-child { border-right: 0; }
.forecast-row span { color: #7d8fa3; font-size: 8px; }
.forecast-row b { font-size: 18px; font-weight: 400; }
.forecast-row strong { color: #304a66; font-size: 11px; }
.forecast-row small { color: #4c91e8; font-size: 8px; }
.map-wrap { position: relative; height: 266px; }
.leaflet-map { width: 100%; height: 100%; background: #e6eef5; }
.map-legend { position: absolute; z-index: 500; right: 10px; bottom: 10px; display: flex; gap: 9px; padding: 7px 9px; background: rgba(255,255,255,.92); border: 1px solid rgba(193,207,221,.8); border-radius: 7px; box-shadow: 0 3px 12px rgba(25,45,70,.12); }
.map-legend span, .map-control-card > span { display: flex; align-items: center; gap: 5px; color: #60758c; font-size: 8px; font-weight: 700; }
.marker-dot { width: 7px; height: 7px; border-radius: 50%; }
.marker-dot.aws { background: #287be4; }
.marker-dot.water { background: #13b5c9; }
.marker-dot.gate { background: #f0a128; }
.leaflet-control-attribution { font-size: 7px !important; }
.facility-marker { width: 27px !important; height: 27px !important; display: grid !important; place-items: center; color: #fff; border: 2px solid #fff; border-radius: 50% 50% 50% 10%; box-shadow: 0 3px 8px rgba(13,38,64,.3); transform: rotate(-45deg); font-size: 9px; font-weight: 900; }
.facility-marker span { transform: rotate(45deg); }
.facility-marker.aws { background: #2579e1; }
.facility-marker.water { background: #11aec2; }
.facility-marker.gate { background: #eda226; }
.leaflet-popup-content { margin: 11px 13px !important; }
.map-popup { min-width: 155px; }
.map-popup span { color: #71869d; font-size: 9px; }
.map-popup strong { display: block; margin: 3px 0 7px; color: #183653; font-size: 13px; }
.map-popup dl { margin: 0; display: grid; gap: 3px; }
.map-popup dl div { display: flex; justify-content: space-between; gap: 14px; font-size: 9px; }
.map-popup dt { color: #758aa1; }
.map-popup dd { margin: 0; color: #274663; font-weight: 800; }
.compact-table { max-height: 322px; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 9px 11px; color: #6f839a; background: #f6f9fc; border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 800; text-align: left; white-space: nowrap; }
td { padding: 8px 11px; color: #435c75; border-bottom: 1px solid #edf1f5; font-size: 9px; white-space: nowrap; }
tbody tr:hover { background: #f7fbff; }
td strong { color: #203d5a; font-size: 10px; }
td small { display: block; margin-top: 2px; color: #8b9daf; font-size: 8px; }
td code { color: #4d6680; font-size: 9px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; color: #5a7086; background: #f1f5f8; border-radius: 12px; font-size: 8px; font-weight: 800; }
.status-pill i { width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.status-pill.normal { color: #158b65; background: var(--green-100); }
.status-pill.attention { color: #c47c0c; background: var(--amber-100); }
.status-pill.error { color: #cf4350; background: var(--red-100); }
.chart-legend { display: flex; gap: 10px; }
.chart-legend span { color: #7e90a4; font-size: 8px; }
.chart-legend span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 2px; }
.chart-legend .today::before { background: #2d82e8; }
.chart-legend .yesterday::before { background: #a8c8ed; }
.chart-box { position: relative; height: 195px; padding: 11px 12px 12px; }
.chart-box.tall { height: 270px; }
.chart-box canvas { width: 100%; height: 100%; }
.gauge-list { padding: 5px 14px 9px; }
.gauge-row { display: grid; grid-template-columns: 78px 1fr 47px 18px; align-items: center; gap: 8px; min-height: 41px; border-bottom: 1px solid var(--line-soft); }
.gauge-row:last-child { border-bottom: 0; }
.gauge-row > div:first-child { display: flex; flex-direction: column; }
.gauge-row strong { color: #29445f; font-size: 10px; }
.gauge-row small { margin-top: 2px; color: #94a3b2; font-size: 7px; }
.gauge-bar { height: 5px; background: #ebf0f5; border-radius: 5px; overflow: hidden; }
.gauge-bar span { display: block; height: 100%; background: linear-gradient(90deg, #2b83e8, #22b6cc); border-radius: inherit; }
.gauge-row b { color: #24405c; font-size: 10px; text-align: right; }
.trend { font-style: normal; font-weight: 900; text-align: center; }
.trend.stable { color: #9aabba; }
.trend.up { color: var(--amber-500); }
.trend.down { color: var(--green-500); }
.event-list { padding: 4px 14px 8px; }
.event-item { display: grid; grid-template-columns: 7px 1fr auto; align-items: start; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.event-item:last-child { border-bottom: 0; }
.event-level { width: 7px; height: 7px; margin-top: 4px; background: var(--blue-500); border: 2px solid #d9e9ff; border-radius: 50%; box-sizing: content-box; }
.event-level.attention { background: var(--amber-500); border-color: #ffefd0; }
.event-level.warning { background: var(--red-500); border-color: #ffdce0; }
.event-level.success { background: var(--green-500); border-color: #d6f3e9; }
.event-item div { min-width: 0; }
.event-item strong { display: block; overflow: hidden; color: #29435e; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.event-item p { margin: 3px 0 0; overflow: hidden; color: #8394a6; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.event-item time { color: #9aabba; font-size: 8px; white-space: nowrap; }

/* GIS */
.map-page-layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); min-height: calc(100vh - 147px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.map-side-panel { display: flex; flex-direction: column; border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.map-search { display: flex; align-items: center; gap: 7px; margin: 14px; padding: 0 10px; height: 40px; border: 1px solid #cfdbe7; border-radius: 8px; }
.map-search .icon { width: 17px; color: #7b90a5; }
.map-search input { width: 100%; height: 100%; padding: 0; border: 0; outline: 0; color: #2e4964; font-size: 11px; }
.map-filter-title, .facility-list-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 14px 9px; }
.map-filter-title strong, .facility-list-head strong { color: #29445f; font-size: 10px; }
.map-filter-title button { padding: 0; color: var(--blue-600); background: none; border: 0; font-size: 9px; cursor: pointer; }
.facility-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 14px 14px; border-bottom: 1px solid var(--line-soft); }
.facility-filters label { display: grid; grid-template-columns: auto 25px 1fr auto; align-items: center; gap: 5px; min-height: 36px; padding: 5px 7px; background: #f7f9fc; border: 1px solid #ebf0f5; border-radius: 7px; cursor: pointer; }
.facility-filters label:has(input:checked) { background: #f1f7ff; border-color: #c9ddf7; }
.facility-filters input { width: 13px; height: 13px; accent-color: var(--blue-600); }
.facility-icon { width: 23px; height: 23px; display: grid; place-items: center; color: #fff; background: var(--blue-600); border-radius: 6px; font-size: 8px; font-weight: 900; }
.facility-icon.water { background: #15b2c5; }
.facility-icon.gate { background: #ed9d21; }
.facility-icon.rain { background: #626fdd; }
.facility-icon.snow { background: #73a9d5; }
.facility-icon.cctv { background: #405570; }
.facility-filters b { color: #506880; font-size: 9px; }
.facility-filters em { color: #899aac; font-size: 8px; font-style: normal; }
.facility-list-head { padding-top: 12px; }
.facility-list-head strong b { color: var(--blue-600); }
.facility-list-head span { color: #8b9cae; font-size: 8px; }
.facility-list { flex: 1; max-height: calc(100vh - 410px); overflow: auto; padding: 0 8px 12px; }
.facility-list-item { width: 100%; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; padding: 10px 7px; background: transparent; border: 0; border-bottom: 1px solid var(--line-soft); text-align: left; cursor: pointer; }
.facility-list-item:hover { background: #f5f9fe; }
.facility-list-item > span:first-child { width: 28px; height: 28px; display: grid; place-items: center; color: #fff; background: var(--blue-600); border-radius: 8px; font-size: 8px; font-weight: 900; }
.facility-list-item[data-type="water"] > span:first-child { background: #13aec2; }
.facility-list-item[data-type="gate"] > span:first-child { background: #ec9e26; }
.facility-list-item div { min-width: 0; display: flex; flex-direction: column; }
.facility-list-item strong { overflow: hidden; color: #29445f; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.facility-list-item small { margin-top: 3px; color: #8799ab; font-size: 8px; }
.facility-list-item > em { width: 6px; height: 6px; background: var(--green-500); border-radius: 50%; font-style: normal; }
.facility-list-item > em.attention { background: var(--amber-500); }
.facility-list-item > em.error { background: var(--red-500); }
.map-canvas-panel { position: relative; min-width: 0; }
.full-map { position: absolute; inset: 0; }
.map-overlay-status { position: absolute; z-index: 500; top: 14px; left: 50%; display: flex; align-items: center; gap: 7px; transform: translateX(-50%); padding: 8px 12px; color: #4e6680; background: rgba(255,255,255,.94); border: 1px solid #d4dfe9; border-radius: 8px; box-shadow: 0 4px 16px rgba(22,43,68,.14); font-size: 9px; }
.map-overlay-status b { color: var(--blue-600); }
.map-control-card { position: absolute; z-index: 500; right: 14px; bottom: 14px; width: 160px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; background: rgba(255,255,255,.95); border: 1px solid #d4dfe9; border-radius: 10px; box-shadow: 0 5px 18px rgba(22,43,68,.14); }
.map-control-card strong, .map-control-card small { grid-column: 1 / -1; }
.map-control-card strong { color: #2b4662; font-size: 10px; }
.map-control-card small { color: #8395a7; font-size: 8px; line-height: 1.55; }

/* Observations */
.data-panel { min-height: calc(100vh - 147px); }
.data-tabs { display: flex; gap: 3px; padding: 11px 14px 0; border-bottom: 1px solid var(--line); }
.data-tabs button { position: relative; min-height: 39px; padding: 0 17px; color: #6e8298; background: transparent; border: 0; font-size: 10px; font-weight: 800; cursor: pointer; }
.data-tabs button::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: transparent; }
.data-tabs button.is-active { color: var(--blue-600); }
.data-tabs button.is-active::after { background: var(--blue-600); }
.filter-bar { display: flex; align-items: flex-end; gap: 9px; padding: 13px 14px; background: #f8fafc; border-bottom: 1px solid var(--line); }
.filter-bar label { display: flex; flex-direction: column; gap: 5px; }
.filter-bar label > span { color: #6d8298; font-size: 8px; font-weight: 800; }
.filter-bar input, .filter-bar select, .report-toolbar select { height: 35px; padding: 0 10px; color: #3f5871; background: #fff; border: 1px solid #d2dde8; border-radius: 7px; outline: none; font-size: 10px; }
.filter-bar input:focus, .filter-bar select:focus { border-color: #7fb2ee; box-shadow: 0 0 0 3px rgba(48,128,232,.08); }
.date-range { display: flex; align-items: center; gap: 5px; }
.date-range b { color: #9aaaba; font-weight: 400; }
.search-field { flex: 1; min-width: 180px; }
.search-field > div { display: flex; align-items: center; height: 35px; padding: 0 9px; background: #fff; border: 1px solid #d2dde8; border-radius: 7px; }
.search-field .icon { width: 15px; color: #8396a9; }
.search-field input { flex: 1; height: 100%; border: 0; }
.button { min-height: 35px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border-radius: 7px; font-size: 9px; font-weight: 800; cursor: pointer; transition: .16s; }
.button .icon { width: 14px; }
.button.primary { color: #fff; background: var(--blue-600); border: 1px solid var(--blue-600); }
.button.primary:hover { background: #145fca; }
.button.secondary { color: #526a82; background: #fff; border: 1px solid #cad6e2; }
.button.secondary:hover { color: var(--blue-600); border-color: #90b8e6; }
.button.danger { color: #fff; background: var(--red-500); border: 1px solid var(--red-500); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button.full { width: 100%; }
.data-summary { display: flex; align-items: center; justify-content: space-between; min-height: 53px; padding: 9px 14px; }
.data-summary > div:first-child { display: flex; flex-direction: column; }
.data-summary strong { color: #29445f; font-size: 12px; }
.data-summary span { margin-top: 3px; color: #8294a6; font-size: 8px; }
.data-summary span b { color: var(--blue-600); }
.quality-badges { display: flex; gap: 12px; }
.quality-badges span { display: flex; align-items: center; gap: 5px; }
.quality-badges i, .donut-wrap dl i { width: 6px; height: 6px; border-radius: 50%; }
.quality-badges i.normal, .donut-wrap dl i.normal { background: var(--green-500); }
.quality-badges i.delay, .donut-wrap dl i.delay { background: var(--amber-500); }
.observation-table { max-height: calc(100vh - 344px); border-top: 1px solid var(--line); }
.observation-table th { position: sticky; top: 0; z-index: 1; }
.observation-table td { padding-top: 7px; padding-bottom: 7px; }
.observation-table tr.is-hidden { display: none; }
.quality-ok { display: inline-block; padding: 3px 6px; color: #148961; background: var(--green-100); border-radius: 9px; font-size: 8px; font-weight: 800; }
.table-footer { min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-top: 1px solid var(--line-soft); }
.table-footer > span { color: #8799aa; font-size: 8px; }
.pagination { display: flex; gap: 3px; }
.pagination button { width: 27px; height: 27px; padding: 0; color: #6f8398; background: #fff; border: 1px solid var(--line); border-radius: 5px; font-size: 9px; cursor: pointer; }
.pagination button.is-current { color: #fff; background: var(--blue-600); border-color: var(--blue-600); }
.pagination button:disabled { color: #c2ccd6; }

/* Gates */
.control-summary { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-bottom: 11px; }
.control-notice { display: flex; align-items: center; gap: 12px; padding: 12px 15px; background: #fff9ea; border: 1px solid #f0dda9; border-radius: 10px; }
.control-notice > span { width: 31px; height: 31px; display: grid; place-items: center; color: #a86b0c; background: #ffe8af; border-radius: 50%; font-size: 17px; font-weight: 900; }
.control-notice div { min-width: 0; }
.control-notice strong { color: #6f4c17; font-size: 11px; }
.control-notice p { margin: 3px 0 0; color: #98743c; font-size: 9px; }
.gate-kpis { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.gate-kpis > div { min-width: 83px; display: grid; grid-template-columns: auto auto; align-content: center; justify-content: center; padding: 8px 14px; border-right: 1px solid var(--line-soft); }
.gate-kpis > div:last-child { border-right: 0; }
.gate-kpis span { grid-column: 1/-1; color: #7c8fa2; font-size: 8px; }
.gate-kpis strong { margin-top: 2px; color: #27425f; font-size: 18px; }
.gate-kpis small { align-self: end; margin: 0 0 3px 3px; color: #91a0af; font-size: 8px; }
.gate-kpis .normal strong { color: var(--green-500); }
.gate-kpis .attention strong { color: var(--amber-500); }
.gate-kpis .error strong { color: var(--red-500); }
.gate-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.segmented { display: inline-flex; padding: 3px; background: #dfe7ef; border-radius: 8px; }
.segmented button { min-width: 54px; height: 29px; padding: 0 10px; color: #667c92; background: transparent; border: 0; border-radius: 6px; font-size: 9px; font-weight: 800; cursor: pointer; }
.segmented button.is-active { color: #24435f; background: #fff; box-shadow: 0 2px 5px rgba(29,49,72,.12); }
.segmented.small button { min-width: 42px; height: 26px; }
.gate-global-state { display: flex; align-items: center; gap: 9px; }
.gate-global-state small { color: #8799ab; font-size: 8px; }
.gate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.gate-group.is-hidden { display: none; }
.gate-group > header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.gate-group > header > div { display: flex; align-items: center; gap: 9px; }
.location-pin { width: 30px; height: 30px; display: grid; place-items: center; color: var(--blue-600); background: var(--blue-100); border-radius: 8px; font-size: 17px; }
.gate-group h2 { margin: 0; color: #233f5c; font-size: 12px; }
.gate-group header small { display: block; margin-top: 3px; color: #8698a9; font-size: 8px; }
.more-button { color: #8193a5; background: transparent; border: 0; cursor: pointer; }
.gate-devices { padding: 8px; }
.gate-device { display: grid; grid-template-columns: 42px 1fr 55px; align-items: center; gap: 9px; min-height: 78px; margin-bottom: 7px; padding: 8px; background: #f7faff; border: 1px solid #e4edf5; border-left: 3px solid var(--blue-500); border-radius: 8px; }
.gate-device:last-child { margin-bottom: 0; }
.gate-device.attention { border-left-color: var(--amber-500); background: #fffbf2; }
.gate-device.error { border-left-color: var(--red-500); background: #fff7f8; }
.gate-state-icon { position: relative; width: 40px; height: 40px; display: grid; place-items: center; background: #e7eef6; border-radius: 9px; overflow: hidden; }
.gate-state-icon > span { position: absolute; top: 7px; bottom: 7px; left: 9px; width: 4px; background: #647b93; border-radius: 2px; box-shadow: 17px 0 0 #647b93; }
.gate-state-icon i { width: 19px; height: 4px; background: var(--blue-600); border-radius: 2px; transform-origin: right center; }
.gate-state-icon i.open { transform: rotate(-38deg); }
.gate-state-icon i.closed { transform: rotate(0); background: var(--red-500); }
.gate-info { min-width: 0; }
.gate-info > strong { display: block; overflow: hidden; color: #2a4561; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.gate-info > small { display: block; margin-top: 3px; color: #8a9bac; font-size: 7px; }
.gate-info > div { display: flex; align-items: center; gap: 7px; margin-top: 7px; }
.gate-info > div span { color: #8093a5; font-size: 8px; }
.gate-info > div b { color: var(--blue-600); font-size: 9px; }
.gate-device.error .comm-label { color: var(--red-500); font-weight: 900; }
.gate-device.attention .comm-label { color: #ce8310; font-weight: 900; }
.gate-actions { display: flex; flex-direction: column; gap: 4px; }
.gate-actions button { height: 27px; color: #667d94; background: #fff; border: 1px solid #ccd8e4; border-radius: 5px; font-size: 8px; font-weight: 800; cursor: pointer; }
.gate-actions button:hover { border-color: var(--blue-500); }
.gate-actions .open.is-current { color: #fff; background: var(--blue-600); border-color: var(--blue-600); }
.gate-actions .close.is-current { color: #fff; background: var(--red-500); border-color: var(--red-500); }
.control-log { margin-top: 12px; }
.command-close { color: #ca4450; }
.modal-backdrop { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 20px; background: rgba(3,15,29,.68); backdrop-filter: blur(3px); }
.modal-backdrop[hidden] { display: none; }
.confirm-modal { position: relative; width: min(430px, 100%); padding: 27px; background: #fff; border-radius: 15px; box-shadow: 0 24px 80px rgba(0,0,0,.32); text-align: center; }
.modal-close { position: absolute; top: 12px; right: 14px; color: #8394a6; background: transparent; border: 0; font-size: 22px; cursor: pointer; }
.modal-symbol { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 9px; color: #b56d08; background: #fff0c9; border-radius: 50%; font-size: 23px; font-weight: 900; }
.confirm-modal > small { color: #c27b10; font-size: 9px; font-weight: 900; letter-spacing: .4px; }
.confirm-modal h2 { margin: 4px 0 10px; color: #1e3855; font-size: 18px; }
.confirm-modal p { margin: 0; color: #526b83; font-size: 11px; line-height: 1.6; }
.confirm-modal p strong { color: var(--red-500); }
.modal-warning { margin: 15px 0 11px; padding: 10px; color: #806025; background: #fff9e9; border: 1px solid #f2dfad; border-radius: 7px; font-size: 9px; line-height: 1.5; }
.confirm-modal > label { display: flex; justify-content: center; align-items: center; gap: 6px; color: #536b82; font-size: 9px; }
.confirm-modal input { accent-color: var(--blue-600); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.toast { position: fixed; z-index: 3500; right: 24px; bottom: 24px; width: 315px; display: flex; align-items: center; gap: 10px; padding: 13px; color: #fff; background: #163b60; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; box-shadow: 0 14px 40px rgba(5,22,39,.28); transform: translateY(130%); opacity: 0; transition: .25s ease; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast > span { width: 28px; height: 28px; display: grid; place-items: center; color: #0c5d41; background: #5ee0ad; border-radius: 50%; font-weight: 900; }
.toast div { display: flex; flex-direction: column; }
.toast strong { font-size: 10px; }
.toast p { margin: 3px 0 0; color: #b9cde0; font-size: 8px; }

/* Alerts */
.alert-overview { display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px; margin-bottom: 12px; }
.alert-hero { min-height: 130px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; padding: 20px; color: #fff; background: linear-gradient(135deg, #0e8163, #159d78); border-radius: var(--radius); box-shadow: 0 7px 22px rgba(17,137,101,.2); }
.alert-shield { width: 52px; height: 52px; display: grid; place-items: center; color: #0f845f; background: #dbfff1; border: 5px solid rgba(255,255,255,.18); border-radius: 50%; font-size: 24px; font-weight: 900; }
.alert-hero span { color: #a9f1d9; font-size: 8px; font-weight: 900; letter-spacing: 1px; }
.alert-hero h2 { margin: 4px 0; font-size: 18px; }
.alert-hero p { margin: 0; color: #d4f6e9; font-size: 9px; }
.alert-hero time { grid-column: 2; color: #b7ead9; font-size: 8px; }
.advisory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.advisory-grid > div { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.advisory-grid span { color: #72879c; font-size: 9px; }
.advisory-grid b { margin-top: 4px; color: #2b4662; font-size: 11px; }
.advisory-grid i { position: absolute; top: 14px; right: 14px; width: 7px; height: 7px; background: var(--green-500); border-radius: 50%; box-shadow: 0 0 0 4px var(--green-100); }
.alert-layout { display: grid; grid-template-columns: 1fr 310px; gap: 12px; }
.alert-layout > aside { display: flex; flex-direction: column; gap: 12px; }
.alert-timeline { padding: 12px 18px 18px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 15px 1fr; gap: 11px; padding-bottom: 20px; }
.timeline-item::before { content: ""; position: absolute; top: 13px; bottom: 0; left: 5px; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-item > i { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 2px; background: var(--blue-500); border: 3px solid #dcecff; border-radius: 50%; box-sizing: content-box; }
.timeline-item.attention > i { background: var(--amber-500); border-color: #ffedc9; }
.timeline-item.warning > i { background: var(--red-500); border-color: #ffdee1; }
.timeline-item.success > i { background: var(--green-500); border-color: #d8f5ea; }
.timeline-item span { color: #8b9cad; font-size: 8px; }
.timeline-item h3 { margin: 3px 0 4px; color: #28445f; font-size: 11px; }
.timeline-item p { margin: 0; color: #708499; font-size: 9px; line-height: 1.55; }
.timeline-item button { margin-top: 6px; padding: 0; color: var(--blue-600); background: transparent; border: 0; font-size: 8px; font-weight: 800; cursor: pointer; }
.contact-panel > a { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; margin: 0 12px; padding: 11px 3px; border-bottom: 1px solid var(--line-soft); }
.contact-panel > a:last-child { border-bottom: 0; }
.contact-panel > a > span { width: 32px; height: 32px; display: grid; place-items: center; color: var(--blue-600); background: var(--blue-100); border-radius: 8px; font-size: 9px; font-weight: 900; }
.contact-panel > a div { display: flex; flex-direction: column; }
.contact-panel > a strong { color: #2c4762; font-size: 10px; }
.contact-panel > a small { margin-top: 3px; color: #8799aa; font-size: 8px; }
.contact-panel > a > b { color: var(--blue-600); font-size: 8px; }
.alert-rule { padding: 15px; }
.alert-rule > span { color: var(--blue-600); font-size: 8px; font-weight: 900; }
.alert-rule strong { display: block; margin-top: 4px; color: #27435f; font-size: 13px; }
.alert-rule p { margin: 7px 0; color: #788b9e; font-size: 9px; line-height: 1.55; }
.alert-rule a { color: var(--blue-600); font-size: 8px; font-weight: 800; }

/* Reports */
.report-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; padding-right: 13px; }
.report-toolbar .data-tabs { padding-top: 0; border-bottom: 0; }
.report-toolbar > div:last-child { display: flex; gap: 7px; }
.report-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-bottom: 11px; }
.report-kpis article { display: flex; flex-direction: column; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.report-kpis span { color: #788c9f; font-size: 9px; }
.report-kpis strong { margin-top: 5px; color: #203d5a; font-size: 21px; }
.report-kpis strong small { color: #62798f; font-size: 9px; }
.report-kpis em { margin-top: 5px; color: #8496a8; font-size: 8px; font-style: normal; }
.report-kpis em b { color: var(--green-500); }
.report-kpis em.positive { color: var(--green-500); }
.report-grid { grid-template-columns: repeat(3, 1fr); }
.uptime-list { padding: 8px 15px 14px; }
.uptime-list > div { display: grid; grid-template-columns: 1fr auto; gap: 7px; padding: 10px 0; }
.uptime-list span { color: #48627c; font-size: 9px; font-weight: 800; }
.uptime-list span b { color: #899aab; font-size: 7px; font-weight: 500; }
.uptime-list strong { color: #2b4762; font-size: 9px; }
.uptime-list i { grid-column: 1 / -1; height: 6px; background: #eaf0f5; border-radius: 5px; overflow: hidden; }
.uptime-list i em { display: block; height: 100%; background: linear-gradient(90deg, #1eb987, #3ed6a4); border-radius: inherit; }
.uptime-list i em.warning { background: linear-gradient(90deg, #f0a329, #ffc561); }
.donut-wrap { display: flex; align-items: center; justify-content: space-around; gap: 15px; padding: 22px 15px; }
.donut { width: 116px; height: 116px; display: grid; place-items: center; background: conic-gradient(var(--green-500) 0 99.2%, var(--amber-500) 99.2% 99.75%, var(--red-500) 99.75%); border-radius: 50%; }
.donut::before { content: ""; position: absolute; width: 82px; height: 82px; background: #fff; border-radius: 50%; }
.donut span { position: relative; z-index: 1; color: #23415d; font-size: 20px; font-weight: 900; }
.donut small { font-size: 9px; }
.donut-wrap dl { min-width: 110px; margin: 0; }
.donut-wrap dl div { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.donut-wrap dt { display: flex; align-items: center; gap: 5px; color: #667d93; font-size: 8px; }
.donut-wrap dd { margin: 0; color: #334f69; font-size: 8px; font-weight: 800; }
.donut-wrap dl i.error { background: var(--red-500); }

/* Settings */
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 12px; }
.settings-main, .settings-side { display: flex; flex-direction: column; gap: 12px; }
.integration-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
.integration-grid > div { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; min-height: 65px; padding: 9px 11px; background: #f8fafc; border: 1px solid #e7edf3; border-radius: 9px; }
.integration-logo { width: 39px; height: 39px; display: grid; place-items: center; color: #fff; background: var(--blue-600); border-radius: 9px; font-size: 8px; font-weight: 900; }
.integration-logo.kma { background: #287ec8; }
.integration-logo.jua { color: #234363; background: #fff; border: 1px solid #ccd8e4; }
.integration-logo.sms { background: #675fd4; }
.integration-logo.map { background: #159b70; }
.integration-grid > div > div { display: flex; flex-direction: column; }
.integration-grid strong { color: #28445f; font-size: 10px; }
.integration-grid small { margin-top: 3px; color: #8597a9; font-size: 8px; }
.integration-grid em { display: flex; align-items: center; gap: 4px; color: var(--green-500); font-size: 8px; font-style: normal; font-weight: 800; }
.integration-grid em i { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.integration-grid em.waiting { color: var(--amber-500); }
.row-action { color: var(--blue-600); background: transparent; border: 0; font-size: 8px; font-weight: 800; cursor: pointer; }
.text-good { color: var(--green-500); font-weight: 800; }
.text-warning { color: var(--amber-500); font-weight: 800; }
.text-error { color: var(--red-500); font-weight: 800; }
.config-card { padding-bottom: 13px; }
.config-card > label:not(.toggle-row) { display: flex; align-items: center; justify-content: space-between; margin: 0 13px; padding: 10px 2px; border-bottom: 1px solid var(--line-soft); }
.config-card > label > span { color: #526b83; font-size: 9px; font-weight: 700; }
.config-card select { height: 31px; padding: 0 8px; color: #526b83; background: #fff; border: 1px solid #cedae5; border-radius: 6px; font-size: 8px; }
.toggle-row { position: relative; display: flex; align-items: center; justify-content: space-between; margin: 0 13px; padding: 11px 2px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.toggle-row > span { display: flex; flex-direction: column; }
.toggle-row b { color: #405b75; font-size: 9px; }
.toggle-row small { margin-top: 3px; color: #8b9cac; font-size: 7px; font-weight: 400; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-row > i { position: relative; width: 34px; height: 19px; background: #c7d1dc; border-radius: 11px; transition: .2s; }
.toggle-row > i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: .2s; }
.toggle-row input:checked + i { background: var(--blue-600); }
.toggle-row input:checked + i::after { left: 18px; }
.config-card .button.full { width: calc(100% - 26px); margin: 13px 13px 0; }
.system-info { padding: 15px; }
.system-info > span { color: var(--blue-600); font-size: 8px; font-weight: 900; }
.system-info strong { display: block; margin-top: 4px; color: #29445f; font-size: 12px; }
.system-info small { display: block; margin-top: 4px; color: #8496a8; font-size: 8px; }
.system-info div { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding: 8px; color: #178b65; background: var(--green-100); border-radius: 7px; font-size: 8px; font-weight: 800; }
.system-info div i { width: 6px; height: 6px; background: var(--green-500); border-radius: 50%; }

/* Users */
.users-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 12px; }
.users-main .panel-header { min-height: 66px; }
.user-actions { display: flex; align-items: center; gap: 8px; }
.user-search { width: 210px; height: 35px; margin: 0; }
.user-cell { display: flex; align-items: center; gap: 8px; }
.user-cell > span { width: 28px; height: 28px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #337ed1, #1a4d85); border-radius: 50%; font-size: 9px; font-weight: 900; }
.user-cell > div { display: flex; flex-direction: column; }
.role-badge { display: inline-block; padding: 4px 7px; color: #5549b6; background: #eeebff; border-radius: 10px; font-size: 8px; font-weight: 800; }
.role-badge.operator { color: #1768bd; background: #e8f3ff; }
.role-badge.facility { color: #137c5c; background: #e6f8f1; }
.role-badge.viewer { color: #5c7085; background: #eef2f6; }
.role-badge.vendor { color: #b67410; background: #fff3dc; }
.users-side { display: flex; flex-direction: column; gap: 12px; }
.role-list { padding: 7px 13px 12px; }
.role-list > div { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 9px; padding: 10px 1px; border-bottom: 1px solid var(--line-soft); }
.role-list > div:last-child { border-bottom: 0; }
.role-list i { width: 8px; height: 8px; background: #695fd7; border-radius: 50%; }
.role-list i.operator { background: var(--blue-500); }
.role-list i.facility { background: var(--green-500); }
.role-list i.viewer { background: #8295a8; }
.role-list i.vendor { background: var(--amber-500); }
.role-list span { display: flex; flex-direction: column; }
.role-list strong { color: #38536d; font-size: 9px; }
.role-list small { margin-top: 3px; color: #8b9cad; font-size: 7px; }
.role-list b { color: #536b82; font-size: 9px; }
.access-note { padding: 15px; }
.access-note > span { color: var(--blue-600); font-size: 8px; font-weight: 900; }
.access-note strong { display: block; margin-top: 4px; color: #29445f; font-size: 12px; }
.access-note p { margin: 8px 0 12px; color: #788b9e; font-size: 9px; line-height: 1.6; }

@media (max-width: 1380px) {
    :root { --sidebar: 200px; }
    .summary-strip { grid-template-columns: repeat(3, 1fr); }
    .summary-card { min-height: 78px; }
    .training-chip { display: none; }
    .top-weather small { display: none; }
    .dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-grid .panel-span-2 { grid-column: span 2; }
    .dashboard-grid .panel-weather { grid-column: span 1; }
    .weather-current { align-items: flex-start; padding: 10px 13px; }
    .weather-current dl { grid-template-columns: repeat(2, 1fr); }
    .forecast-row { grid-template-columns: repeat(3, 1fr); }
    .forecast-row > div:nth-child(3) { border-right: 0; }
    .gate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
    :root { --sidebar: 182px; }
    .topbar { gap: 12px; padding: 0 18px; }
    .operator div, .top-clock small { display: none; }
    .page-content { padding: 18px; }
    .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid .panel-weather, .dashboard-grid .panel-span-2 { grid-column: span 2; }
    .gate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gate-kpis > div { min-width: 67px; padding: 8px 9px; }
    .alert-overview { grid-template-columns: 1fr; }
    .alert-layout { grid-template-columns: 1fr 280px; }
    .report-grid { grid-template-columns: repeat(2, 1fr); }
    .settings-layout, .users-layout { grid-template-columns: 1fr 280px; }
    .integration-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    :root { --sidebar: 230px; }
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
    .sidebar.is-open { transform: translateX(0); }
    .main-frame { width: 100%; margin-left: 0; }
    .mobile-menu { display: grid; }
    .topbar { height: 66px; }
    .page-heading { min-width: 0; }
    .page-heading span { display: none; }
    .page-heading h1 { font-size: 17px; }
    .top-weather, .operator { display: none; }
    .page-content { min-height: calc(100vh - 66px); }
    .summary-strip { grid-template-columns: repeat(2, 1fr); }
    .map-page-layout { grid-template-columns: 250px 1fr; min-height: 690px; }
    .facility-filters { grid-template-columns: 1fr; }
    .facility-list { max-height: 360px; }
    .filter-bar { flex-wrap: wrap; }
    .search-field { flex-basis: 240px; }
    .control-summary { grid-template-columns: 1fr; }
    .gate-kpis { justify-content: stretch; }
    .gate-kpis > div { flex: 1; }
    .alert-layout, .settings-layout, .users-layout { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .topbar { gap: 9px; padding: 0 12px; }
    .top-clock { display: none; }
    .page-content { padding: 12px; }
    .page-toolbar { align-items: center; }
    .page-description { display: none; }
    .summary-strip { grid-template-columns: 1fr 1fr; gap: 7px; }
    .summary-card { min-height: 72px; padding: 9px; }
    .summary-icon { width: 33px; height: 33px; font-size: 17px; }
    .summary-card strong { font-size: 16px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-grid .panel-weather, .dashboard-grid .panel-span-2 { grid-column: span 1; }
    .weather-current { flex-direction: column; }
    .weather-current dl { width: 100%; }
    .forecast-row { overflow-x: auto; grid-template-columns: repeat(6, 68px); }
    .map-page-layout { display: flex; flex-direction: column; min-height: 0; }
    .map-side-panel { border-right: 0; border-bottom: 1px solid var(--line); }
    .facility-filters { grid-template-columns: 1fr 1fr; }
    .facility-list { max-height: 180px; }
    .map-canvas-panel { height: 520px; }
    .map-control-card { display: none; }
    .data-tabs { overflow-x: auto; }
    .data-tabs button { flex: 0 0 auto; }
    .filter-bar label, .filter-bar .search-field { flex: 1 1 100%; }
    .filter-bar input, .filter-bar select, .search-field > div { width: 100%; }
    .date-range input { width: calc(50% - 10px); }
    .filter-bar > .button { flex: 1; }
    .quality-badges { display: none; }
    .gate-grid { grid-template-columns: 1fr; }
    .gate-toolbar { align-items: flex-start; gap: 8px; flex-direction: column; }
    .control-notice { align-items: flex-start; }
    .gate-kpis { overflow-x: auto; }
    .gate-kpis > div { min-width: 78px; }
    .alert-hero { grid-template-columns: auto 1fr; }
    .advisory-grid { grid-template-columns: repeat(2, 1fr); }
    .report-toolbar { align-items: stretch; flex-direction: column; padding: 0 10px 10px; }
    .report-toolbar > div:last-child { justify-content: space-between; }
    .report-kpis { grid-template-columns: repeat(2, 1fr); }
    .report-grid { grid-template-columns: 1fr; }
    .report-grid .panel-span-2 { grid-column: span 1; }
    .integration-grid { grid-template-columns: 1fr; }
    .user-actions { width: 100%; flex-wrap: wrap; }
    .users-main .panel-header { align-items: flex-start; flex-direction: column; }
    .user-search { width: 100%; }
    .toast { right: 12px; bottom: 12px; width: calc(100% - 24px); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
