:root {
  --navy: #0b2b3f;
  --navy-2: #113e54;
  --ink: #163447;
  --muted: #718596;
  --muted-2: #9aaab6;
  --line: #e3edf1;
  --line-2: #d5e4ea;
  --surface: #ffffff;
  --canvas: #f4f8fa;
  --blue: #1686ad;
  --blue-2: #36b3ce;
  --aqua: #1ab6a4;
  --green: #1a9b7b;
  --orange: #e99a3d;
  --red: #e26268;
  --violet: #7464cf;
  --shadow: 0 8px 30px rgba(20, 58, 77, .07);
  --radius: 16px;
  --radius-sm: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); }
body { font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
input, select, textarea { color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 9px; outline: none; transition: border .18s, box-shadow .18s; }
input:focus, select:focus, textarea:focus { border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(54, 179, 206, .13); }
input, select { height: 42px; padding: 0 13px; }
textarea { padding: 12px 13px; resize: vertical; min-height: 80px; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.mobile-only { display: none !important; }

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(450px, 1.05fr) minmax(400px, .95fr); background: #f9fcfd; }
.login-art { position: relative; overflow: hidden; display: flex; align-items: center; padding: 9vw; color: white; background: linear-gradient(145deg, #082d45 0%, #0e5d76 52%, #109b9a 100%); }
.login-art::before { content: ""; position: absolute; inset: auto -10% -22% -12%; height: 60%; border-radius: 50% 50% 0 0; background: radial-gradient(ellipse at 55% 30%, rgba(141, 243, 225, .3), transparent 60%), linear-gradient(180deg, rgba(20, 179, 182, .23), rgba(8, 64, 87, .4)); transform: rotate(-8deg); }
.login-art::after { content: ""; position: absolute; top: -30%; right: -18%; width: 70%; height: 100%; background: linear-gradient(155deg, transparent 45%, rgba(255,255,255,.05) 46%, transparent 47%); transform: rotate(20deg); }
.login-orb { position: absolute; border-radius: 50%; filter: blur(1px); opacity: .4; }
.orb-one { width: 280px; height: 280px; right: 8%; top: 12%; border: 1px solid rgba(174, 249, 240, .55); box-shadow: 0 0 0 22px rgba(174, 249, 240, .05), 0 0 0 44px rgba(174, 249, 240, .04); }
.orb-two { width: 130px; height: 130px; right: 34%; top: 27%; border: 1px solid rgba(174, 249, 240, .4); }
.login-copy { position: relative; z-index: 1; max-width: 500px; }
.eyebrow { display: block; color: var(--blue); font-size: 10px; letter-spacing: .16em; font-weight: 800; }
.login-copy .eyebrow { color: #8deee1; }
.login-copy h1 { margin: 18px 0 18px; font-size: clamp(45px, 6vw, 78px); letter-spacing: -.06em; line-height: .95; font-weight: 760; }
.login-copy p { max-width: 380px; margin: 0; color: rgba(255,255,255,.82); font-size: 19px; line-height: 1.65; }
.login-flow { display: flex; align-items: center; gap: 13px; margin-top: 50px; color: rgba(255,255,255,.76); font-size: 12px; }
.login-flow span { padding: 9px 13px; border: 1px solid rgba(255,255,255,.2); border-radius: 20px; background: rgba(255,255,255,.08); }
.login-flow i { color: #8deee1; font-style: normal; font-size: 20px; }
.login-panel { display: flex; flex-direction: column; justify-content: center; width: min(440px, 78%); margin: auto; }
.login-brand, .sidebar-brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: white; font-size: 21px; font-weight: 800; background: linear-gradient(145deg, #43d5c2, #167da9); box-shadow: 0 6px 15px rgba(17, 131, 156, .24); }
.brand-mark.large { width: 48px; height: 48px; font-size: 27px; border-radius: 15px; }
.login-brand strong { display: block; font-size: 18px; letter-spacing: -.02em; }
.login-brand small { display: block; color: var(--muted); margin-top: 4px; font-size: 11px; }
.demo-note { display: flex; align-items: center; gap: 9px; margin: 38px 0 18px; padding: 11px 13px; border: 1px solid #cfece7; border-radius: 9px; color: #33776f; background: #effbf8; font-size: 12px; }
.status-dot { width: 7px; height: 7px; display: inline-block; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(26, 155, 123, .13); }
.stack-form { display: grid; gap: 15px; }
.stack-form label, .form-grid label { display: grid; gap: 7px; color: #537080; font-size: 12px; font-weight: 600; }
.stack-form input { height: 47px; background: #fff; }
.primary-button, .secondary-button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 16px; border: 0; border-radius: 9px; font-weight: 700; white-space: nowrap; transition: transform .15s, box-shadow .15s, background .15s; }
.primary-button { color: white; background: linear-gradient(135deg, #1285a9, #1aa89b); box-shadow: 0 7px 17px rgba(19, 135, 158, .18); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(19, 135, 158, .25); }
.primary-button.full { width: 100%; height: 48px; margin-top: 8px; }
.secondary-button { color: #24647b; border: 1px solid #cfe2e9; background: #fff; }
.secondary-button:hover { border-color: #96c7d5; background: #f6fbfc; }
.login-accounts { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 25px; color: var(--muted); font-size: 11px; }
.login-accounts button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: #487286; background: #f5fafb; font-size: 11px; }
.login-accounts button:hover { color: var(--blue); border-color: #a9d6e0; }
.login-hint { margin-top: 25px; color: var(--muted-2); font-size: 11px; line-height: 1.7; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; z-index: 20; top: 0; bottom: 0; left: 0; width: 244px; display: flex; flex-direction: column; padding: 22px 14px 15px; color: rgba(225, 243, 248, .75); background: linear-gradient(180deg, #0b2b3f, #0b3447 72%, #09283b); }
.sidebar-brand { padding: 0 10px 20px; color: white; }
.sidebar-brand strong { display: block; font-size: 17px; letter-spacing: -.03em; }
.sidebar-brand small { display: block; margin-top: 4px; color: rgba(214, 237, 242, .54); font-size: 10px; }
.demo-ribbon { margin: 0 5px 18px; padding: 8px 10px; border: 1px solid rgba(111, 235, 211, .16); border-radius: 7px; color: #8deee1; background: rgba(83, 214, 191, .08); font-size: 10px; letter-spacing: .04em; }
.real-ribbon { color: #b7f2e7; border-color: rgba(111, 235, 211, .3); background: rgba(83, 214, 191, .14); }
.nav { overflow: auto; padding-right: 2px; }
.nav-label { margin: 17px 10px 7px; color: rgba(204, 231, 238, .4); font-size: 10px; letter-spacing: .1em; font-weight: 700; }
.nav-label:first-child { margin-top: 0; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px 11px; border: 0; border-radius: 9px; color: rgba(221, 242, 247, .7); background: transparent; text-align: left; font-size: 12px; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: linear-gradient(90deg, rgba(65, 196, 192, .23), rgba(65, 196, 192, .07)); box-shadow: inset 3px 0 var(--aqua); }
.nav-icon { width: 21px; color: #75d7cf; font-size: 16px; text-align: center; }
.sidebar-footer { margin-top: auto; padding-top: 17px; border-top: 1px solid rgba(213, 241, 244, .1); }
.side-help { display: flex; gap: 9px; align-items: flex-start; padding: 9px; border-radius: 9px; background: rgba(255,255,255,.05); }
.help-icon { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid rgba(141, 238, 225, .6); border-radius: 50%; color: #8deee1; font-size: 10px; }
.side-help strong { display: block; color: #deeff1; font-size: 11px; }
.side-help small { display: block; margin-top: 4px; color: rgba(220, 240, 244, .45); font-size: 10px; }
.side-reset { width: 100%; margin-top: 11px; padding: 9px; border: 0; border-radius: 8px; color: rgba(221, 242, 247, .55); background: transparent; font-size: 11px; }
.side-reset:hover { color: #ffbd9d; background: rgba(226, 98, 104, .08); }
.main-content { width: calc(100% - 244px); min-width: 0; margin-left: 244px; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.87); backdrop-filter: blur(12px); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.breadcrumb b { color: #becbd2; font-weight: 400; }
.breadcrumb strong { color: var(--ink); }
.topbar-actions { position: relative; display: flex; align-items: center; gap: 16px; }
.connection-state { display: flex; align-items: center; gap: 8px; color: #5a7d88; font-size: 11px; }
.icon-button { width: 35px; height: 35px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; color: #547584; background: white; font-size: 17px; }
.icon-button:hover { color: var(--blue); border-color: #b7d8e2; }
.user-menu { display: flex; align-items: center; gap: 9px; padding: 0; border: 0; color: var(--ink); background: transparent; text-align: left; }
.user-menu .avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: white; background: linear-gradient(135deg, #397fa0, #2db59e); font-weight: 700; }
.user-menu b, .user-menu small { display: block; }
.user-menu b { font-size: 11px; }
.user-menu small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.user-menu em { margin-left: 3px; color: var(--muted-2); font-style: normal; }
.user-menu-popover { position: absolute; z-index: 40; top: 47px; right: 0; width: 145px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: var(--shadow); }
.user-menu-popover button { width: 100%; padding: 9px 10px; border: 0; border-radius: 7px; color: #547584; background: transparent; text-align: left; font-size: 12px; }
.user-menu-popover button:hover { color: var(--blue); background: #f2f9fb; }
.toast-container { position: fixed; z-index: 100; top: 83px; right: 29px; display: grid; gap: 8px; width: min(360px, calc(100% - 40px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid #c9e5ed; border-radius: 10px; color: #2e6377; background: white; box-shadow: 0 12px 26px rgba(14, 67, 89, .12); font-size: 12px; line-height: 1.55; animation: toast-in .2s ease-out; }
.toast.error { color: #934d52; border-color: #f0c4c7; background: #fff9f9; }
.toast.success { color: #28705e; border-color: #bce3d8; background: #f7fffc; }
@keyframes toast-in { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }

.page { display: none; padding: 31px 34px 45px; }
.page.active { display: block; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.hero-heading { align-items: center; }
.page-heading h2 { margin: 7px 0 8px; color: var(--navy); font-size: 27px; letter-spacing: -.045em; line-height: 1.1; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.heading-actions { display: flex; align-items: center; gap: 10px; }
.tag, .source-chip, .manual-mark { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border-radius: 7px; color: #587480; background: #f1f6f8; font-size: 10px; font-weight: 700; white-space: nowrap; }
.demo-tag { color: #27786f; border: 1px solid #ccece5; background: #eefaf7; }
.real-tag { color: #167765; border: 1px solid #b8e4d8; background: #effbf7; }
.neutral-tag { color: #647985; border: 1px solid #dce8ec; background: #f8fbfc; }
.info-tag { color: #286a8a; border: 1px solid #c8e5ee; background: #eff9fc; }
.warning-tag { color: #9a651c; border: 1px solid #f1d8af; background: #fff8ec; }
.violet-tag { color: #6254ab; border: 1px solid #ded7fa; background: #f6f3ff; }
.secure-tag { color: #327d72; border: 1px solid #c9e9e1; background: #effbf7; }
.danger-text, .red-text { color: var(--red) !important; font-style: normal; }
.warning-text, .orange-text { color: var(--orange) !important; font-style: normal; }
.blue-text { color: var(--blue) !important; }
.green-text { color: var(--green) !important; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 12px; margin-bottom: 17px; }
.metric-card { min-height: 145px; padding: 17px 17px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.metric-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; font-style: normal; font-size: 15px; }
.metric-icon.blue { color: #267ea0; background: #e8f6fa; }
.metric-icon.violet { color: #6b5fc0; background: #f0edfd; }
.metric-icon.orange { color: #b27422; background: #fff2de; }
.metric-icon.green { color: #25866d; background: #e7f8f2; }
.metric-icon.cyan { color: #258aa0; background: #e7f8fb; }
.metric-icon.teal { color: #238a79; background: #e8f8f4; }
.metric-value { display: flex; align-items: baseline; gap: 4px; margin-top: 15px; color: var(--navy); }
.metric-value b { font-size: 30px; letter-spacing: -.06em; }
.metric-value span { color: var(--muted); font-size: 11px; }
.metric-value span strong { color: var(--ink); font-size: 17px; font-weight: 600; }
.metric-card small { display: block; margin-top: 8px; color: var(--muted-2); font-size: 10px; }
.dashboard-grid, .analytics-grid, .monitor-layout, .overflow-layout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; margin-top: 17px; }
.span-two { grid-column: span 2; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 13px; padding: 18px 20px 0; }
.panel-heading h3 { margin: 0; color: var(--navy); font-size: 14px; letter-spacing: -.025em; }
.panel-heading p { margin: 5px 0 0; color: var(--muted-2); font-size: 10px; line-height: 1.5; }
.legend-inline { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.legend-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; margin-left: 8px; }
.legend-dot:first-child { margin-left: 0; }
.legend-dot.blue { background: var(--blue); }
.legend-dot.green { background: var(--green); }
.text-button { padding: 0; border: 0; color: var(--blue); background: transparent; font-size: 11px; }
.text-button:hover { color: var(--aqua); }
.chart { width: 100%; min-height: 230px; }
.chart-large { height: 286px; }
.chart-medium { height: 245px; }
.alert-list { padding: 9px 18px 16px; }
.alert-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 2px; border-bottom: 1px solid #f0f4f6; }
.alert-item:last-child { border-bottom: 0; }
.alert-mark { width: 7px; height: 7px; flex: 0 0 auto; margin-top: 5px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px rgba(233,154,61,.12); }
.alert-mark.danger { background: var(--red); box-shadow: 0 0 0 3px rgba(226,98,104,.12); }
.alert-mark.gray { background: #93a5af; box-shadow: 0 0 0 3px rgba(147,165,175,.12); }
.alert-item b { display: block; overflow: hidden; color: #476879; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.alert-item p { margin: 4px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.alert-item time { display: block; margin-top: 5px; color: var(--muted-2); font-size: 9px; }
.empty-mini { padding: 27px 10px; color: var(--muted-2); text-align: center; font-size: 11px; }
.quick-flow { display: flex; align-items: center; gap: 35px; min-height: 180px; margin-top: 17px; padding: 24px 28px; overflow: hidden; background: linear-gradient(104deg, #fff, #f1fbfa); }
.flow-intro { width: 29%; flex: 0 0 29%; }
.flow-intro h3 { margin: 8px 0 7px; color: var(--navy); font-size: 17px; letter-spacing: -.04em; }
.flow-intro p { margin: 0 0 15px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.flow-intro .primary-button { min-height: 35px; padding: 0 13px; font-size: 11px; }
.flow-steps { display: flex; align-items: center; justify-content: space-between; flex: 1; gap: 10px; }
.flow-step { min-width: 105px; display: grid; gap: 7px; color: #6a8190; }
.flow-step b { color: #9ab5bf; font-size: 11px; letter-spacing: .08em; }
.flow-step span { color: var(--ink); font-size: 13px; font-weight: 700; }
.flow-step small { color: var(--muted-2); font-size: 10px; }
.flow-step.active b { color: var(--aqua); }
.flow-arrow { color: #8ecbc5; font-size: 20px; }

.map-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, .75fr); gap: 17px; }
.map-panel { overflow: hidden; }
.map-toolbar { display: flex; gap: 9px; padding: 14px; border-bottom: 1px solid var(--line); }
.search-box { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 9px; background: white; }
.search-box span { color: var(--muted-2); font-size: 19px; line-height: 1; }
.search-box input { width: 100%; height: 36px; padding: 0; border: 0; box-shadow: none; }
.map-toolbar .search-box { flex: 1; }
.map-toolbar select { width: 155px; }
.map-canvas { position: relative; height: min(68vh, 660px); min-height: 480px; overflow: hidden; background: linear-gradient(142deg, #f2f1dc, #e9f2ec 55%, #eff4e7); }
.map-canvas::before { content: ""; position: absolute; inset: 0; opacity: .32; background-image: linear-gradient(rgba(126,157,142,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(126,157,142,.18) 1px, transparent 1px); background-size: 45px 45px; }
.amap-container { display: none; position: absolute; z-index: 3; inset: 0; }
.map-canvas.real-map .amap-container { display: block; }
.map-canvas.real-map::before, .map-canvas.real-map #map-points-layer { display: none; }
.map-canvas.real-map .local-map-assets { display: none; }
.map-canvas.real-map .map-scale { z-index: 8; color: #496a73; background: rgba(255,255,255,.9); }
.amap-status-note { margin: 0; padding: 9px 15px; border-bottom: 1px solid #e4eff0; color: #55727b; background: #f6fbfb; font-size: 11px; line-height: 1.55; }
.amap-placement-bar { position: absolute; z-index: 20; top: 15px; left: 50%; display: flex; align-items: center; gap: 7px; max-width: calc(100% - 30px); padding: 7px 9px 7px 12px; border: 1px solid rgba(119,202,208,.9); border-radius: 9px; color: #19586a; background: rgba(255,255,255,.95); box-shadow: 0 4px 15px rgba(20,80,94,.2); transform: translateX(-50%); font-size: 10px; }
.amap-placement-bar span { max-width: 330px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amap-placement-bar button { min-height: 27px; padding: 0 9px; border: 1px solid #c7e0e5; border-radius: 6px; color: #416f7c; background: #fbfefe; font-size: 10px; cursor: pointer; }
.amap-placement-bar button:hover { border-color: var(--aqua); color: var(--blue); background: #f1fbfb; }
.amap-placement-bar button.primary-map-action { color: white; border-color: var(--blue); background: var(--blue); }
#local-placement-bar { pointer-events: none; }
#local-placement-bar button { pointer-events: auto; }
.amap-marker-dot { width: 22px; height: 22px; display: grid; place-items: center; border: 2px solid white; border-radius: 50% 50% 50% 0; color: white; background: var(--blue); box-shadow: 0 3px 7px rgba(34, 85, 100, .3); transform: rotate(-45deg); font-size: 10px; font-weight: 800; }
.amap-marker-dot span { transform: rotate(45deg); }
.amap-marker-dot.attached-facility-marker { border-radius: 50%; transform: none; box-shadow: 0 0 0 4px rgba(35,121,216,.24), 0 4px 12px rgba(8,42,91,.42); }
.amap-marker-dot.attached-facility-marker span { display: none; }
.amap-marker-dot.placement { background: #0aa39c; animation: amap-placement-pulse 1s ease-in-out infinite alternate; }
@keyframes amap-placement-pulse { from { box-shadow: 0 0 0 2px rgba(10,163,156,.18), 0 3px 7px rgba(34,85,100,.3); } to { box-shadow: 0 0 0 7px rgba(10,163,156,.05), 0 3px 7px rgba(34,85,100,.3); } }
.amap-marker-dot.problem { background: var(--orange); }
.amap-marker-dot.danger { background: var(--red); }
.amap-marker-dot.monitor { background: var(--aqua); }
.amap-marker-dot.offline { background: #879ba6; }
.map-canvas.local-lake-map { background: #eef2f1; aspect-ratio: 2560 / 1646; height: auto; min-height: 0; }
.map-canvas.amap-snapshot-view { aspect-ratio: auto; height: min(68vh, 660px); min-height: 480px; }
#map-asset-controls { position: relative; inset: auto; z-index: auto; margin: 10px 14px; flex-wrap: wrap; box-shadow: none; }
#map-asset-controls button { min-height: 36px; flex: 1; font-size: 12px; }
.map-info { padding: 0 15px 12px; color: #365e6f; font-size: 12px; line-height: 1.6; }
.map-info small { display: block; color: #627c87; }
.map-canvas.local-lake-map::before { display: none; }
.local-map-assets { position: absolute; z-index: 1; inset: 0; overflow: hidden; display: grid; place-items: center; background: #f7f8f5; }
.map-canvas.local-lake-map .local-map-assets, .map-canvas.local-lake-map #map-points-layer { transform: scale(var(--local-map-zoom, 1)); transform-origin: center center; }
.map-zoom-button { min-width: 36px; padding: 0 10px; font-size: 17px; line-height: 1; }
.map-zoom-button:disabled { cursor: not-allowed; opacity: .5; }
.map-base-image { position: absolute; z-index: 0; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; background: #f7f8f5; }
.map-asset-title, .map-asset-status { position: absolute; left: 15px; padding: 6px 9px; border-radius: 7px; color: #264b59; background: rgba(255,255,255,.88); box-shadow: 0 2px 8px rgba(20,55,65,.12); font-size: 11px; font-weight: 800; }
.map-asset-title { top: 15px; }
.map-asset-status { top: 48px; color: #5d747a; font-size: 9px; font-weight: 600; }
.map-asset-controls { position: absolute; z-index: 4; top: 15px; right: 15px; display: flex; gap: 5px; padding: 4px; border: 1px solid rgba(215,229,230,.9); border-radius: 9px; background: rgba(255,255,255,.9); box-shadow: 0 2px 8px rgba(20,55,65,.1); }
.map-asset-control { min-height: 27px; padding: 0 8px; border: 0; border-radius: 6px; color: #668089; background: transparent; font-size: 10px; cursor: pointer; }
.map-asset-control.active { color: white; background: var(--blue); }
.map-canvas.composite-view #map-base-image { display: none; }
.map-composite-view { position: absolute; z-index: 2; inset: 0; display: none; overflow: hidden; background: #edf3f1; }
.map-canvas.composite-view .map-composite-view { display: block; }
.map-composite-layer { position: absolute; overflow: hidden; border: 1px solid rgba(79,133,144,.42); border-radius: 8px; background: rgba(255,255,255,.65); box-shadow: 0 5px 16px rgba(30,74,83,.12); cursor: pointer; transition: outline .12s, box-shadow .12s; }
.map-composite-layer:hover, .map-composite-layer.selected { outline: 2px solid var(--aqua); box-shadow: 0 7px 20px rgba(22,132,139,.22); }
.map-composite-layer img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.map-composite-base { left: 0; top: 0; width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; }
.map-composite-base img { object-fit: contain; }
.map-composite-pipeline, .map-composite-overflow { z-index: 3; }
.map-canvas.semantic-view #map-base-image, .map-canvas.semantic-view .map-composite-view { display: none; }
.map-semantic-view { position: absolute; z-index: 2; inset: 0; display: none; overflow: hidden; background: #e7f0ed; }
.map-canvas.semantic-view .map-semantic-view { display: block; }
#map-feature-svg { display: block; width: 100%; height: 100%; }
#map-feature-point-layer { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.map-feature-point-button { position: absolute; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; transform: translate(-50%, -50%); pointer-events: auto; cursor: pointer; }
.map-feature-point-dot { display: block; width: 13px; height: 13px; border: 2px solid white; border-radius: 50%; background: var(--feature-color); box-shadow: 0 1px 6px rgba(10, 40, 60, .38); }
.map-feature-point-button.attached-facility .map-feature-point-dot { width: 18px; height: 18px; background: #2379d8; box-shadow: 0 0 0 4px rgba(35, 121, 216, .24), 0 2px 8px rgba(10, 40, 60, .5); }
.map-feature-point-button:hover, .map-feature-point-button.selected { z-index: 6; }
.map-feature-point-button.selected .map-feature-point-dot { box-shadow: 0 0 0 5px rgba(255, 201, 74, .65), 0 2px 8px rgba(10, 40, 60, .55); }
.map-feature-point-label { position: absolute; top: 0; left: 25px; padding: 2px 5px; border-radius: 4px; color: #254f5d; background: rgba(255, 255, 255, .92); font-size: 10px; font-weight: 800; white-space: nowrap; pointer-events: none; }
.map-canvas.placing-facility #map-feature-point-layer, .map-canvas.placing-facility .map-feature-point-button { pointer-events: none; }
.map-semantic-badge, .map-semantic-hint { position: absolute; z-index: 4; padding: 6px 9px; border-radius: 7px; color: #245869; background: rgba(255,255,255,.9); box-shadow: 0 2px 8px rgba(20,55,65,.12); font-size: 10px; font-weight: 800; pointer-events: none; }
.map-semantic-badge { display: none; }
.map-semantic-hint { right: 14px; bottom: 12px; color: #607b7b; font-size: 9px; font-weight: 600; }
.map-semantic-hint { pointer-events: auto; }
.map-semantic-hint a { color: #267b91; text-decoration: underline; }
.map-feature { cursor: pointer; outline: none; }
.map-feature polyline { fill: none; stroke: var(--feature-color); stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .9; }
.map-feature polygon { fill: var(--feature-color); stroke: var(--feature-color); stroke-width: .75; vector-effect: non-scaling-stroke; opacity: .28; }
.map-feature circle { fill: var(--feature-color); stroke: white; stroke-width: .45; vector-effect: non-scaling-stroke; }
.map-feature text { fill: #254f5d; font-size: 1.8px; font-weight: 800; paint-order: stroke; stroke: rgba(255,255,255,.95); stroke-width: .65px; stroke-linejoin: round; pointer-events: visiblePainted; }
.map-feature:hover polyline, .map-feature.selected polyline { stroke-width: 2.3; opacity: 1; }
.map-feature:hover polygon, .map-feature.selected polygon { opacity: .55; stroke-width: 1.2; }
.map-feature:hover circle, .map-feature.selected circle { stroke-width: .9; r: 2.2; }
.map-feature.selected text { fill: #0b4d66; font-size: 2.1px; }
.map-layer-badge { position: absolute; z-index: 2; top: 6px; left: 7px; padding: 4px 6px; border-radius: 5px; color: #315a68; background: rgba(255,255,255,.9); font-size: 9px; font-weight: 800; pointer-events: none; }
.map-records-layer { position: absolute; z-index: 4; inset: 0; pointer-events: none; }
.map-record-pin { position: absolute; min-width: 22px; max-width: 120px; padding: 3px 5px; border: 1px solid white; border-radius: 5px; color: white; background: rgba(26,145,161,.92); box-shadow: 0 2px 6px rgba(14,76,85,.28); font-size: 9px; line-height: 1.2; text-align: left; pointer-events: auto; cursor: pointer; }
.map-record-pin:hover { background: var(--blue); }
.map-composite-caption { position: absolute; z-index: 6; left: 14px; bottom: 12px; padding: 5px 8px; border-radius: 6px; color: #53747a; background: rgba(255,255,255,.84); font-size: 9px; pointer-events: none; }
.map-canvas.reference-view #map-points-layer { display: none; }
.map-canvas.local-lake-map #map-points-layer { position: absolute; z-index: 6; inset: 0; }
/* 覆盖画布的容器不可截获鼠标；只让实际的点位按钮参与命中测试。 */
#map-points-layer { pointer-events: none; }
#map-points-layer .map-point { pointer-events: auto; }
.map-empty-overlay, .map-scale, .map-asset-title, .map-asset-status { pointer-events: none; }
.map-feature polyline.map-feature-hit, .map-feature:hover polyline.map-feature-hit, .map-feature.selected polyline.map-feature-hit { stroke: transparent; stroke-width: 16px; opacity: 1; pointer-events: stroke; }
.map-feature circle.map-feature-point-hit { fill: transparent; stroke: transparent; pointer-events: all; }
.map-feature:focus-visible circle, .map-feature:focus-visible polygon { stroke: #123d58; stroke-width: 3px; }
.map-feature:focus-visible polyline:not(.map-feature-hit) { stroke: #123d58; stroke-width: 4px; }
.map-feature[aria-pressed="true"] { filter: drop-shadow(0 0 2px white); }
.map-canvas.placing-facility #map-feature-svg { cursor: crosshair; }
#map-report-pick-layer { pointer-events: none; }
.map-report-pick-ring { fill: rgba(220, 56, 45, .18); stroke: #d83d35; stroke-width: .6; vector-effect: non-scaling-stroke; }
.map-report-pick-core { fill: #d83d35; stroke: #fff; stroke-width: .45; vector-effect: non-scaling-stroke; }
.map-report-pick-label { fill: #7d211e; font-size: 1.8px; font-weight: 900; paint-order: stroke; stroke: #fff; stroke-width: .8px; stroke-linejoin: round; }

/* CAD本地矢量底图及稳定坐标交互 */
.map-canvas.local-lake-map .local-map-assets,
.map-canvas.local-lake-map #map-points-layer,
.map-canvas.semantic-view.local-lake-map .local-map-assets,
.map-canvas.semantic-view.local-lake-map #map-points-layer { transform: none; }
.map-canvas.semantic-view .map-semantic-view { background: #f2f7f6; }
#map-feature-svg { touch-action: none; cursor: grab; }
#map-feature-svg:active { cursor: grabbing; }
#map-cad-base-layer .trail-candidate { fill: none; stroke: #178f91; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .86; }
#map-cad-base-layer .site-edge-reference { fill: none; stroke: #627f87; stroke-width: .9; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .82; }
#map-cad-base-layer .cad-site-reference { pointer-events: stroke; }
.map-operation-segment { cursor: pointer; }
.map-operation-segment polyline { fill: none; stroke: var(--segment-color); stroke-width: 2.8; stroke-dasharray: var(--segment-dash, none); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .92; }
.map-operation-segment polygon { fill: var(--segment-color); fill-opacity: .13; stroke: var(--segment-color); stroke-width: 2; stroke-dasharray: var(--segment-dash, none); vector-effect: non-scaling-stroke; }
.map-operation-segment text, .map-feature text, .map-local-problem text { display: none; fill: #274958; font-size: 1.7px; font-weight: 800; paint-order: stroke; stroke: #fff; stroke-width: .6px; stroke-linejoin: round; pointer-events: none; }
.map-operation-segment:hover text, .map-operation-segment.selected text, .map-feature:hover text, .map-feature.selected text, .map-local-problem:hover text { display: block; }
.map-operation-segment.selected polyline { stroke-width: 4.2; }
.map-feature { cursor: pointer; }
.map-feature circle { fill: var(--feature-color); stroke: #fff; stroke-width: .4; vector-effect: non-scaling-stroke; }
.map-feature.attached-facility circle { fill: #2379d8; stroke-width: .7; }
.map-feature polyline { fill: none; stroke: var(--feature-color); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map-feature polygon { fill: var(--feature-color); fill-opacity: .18; stroke: var(--feature-color); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.map-feature.water-area polygon { fill: #7cc8df; fill-opacity: .32; stroke: #3596b8; stroke-width: 1.1; stroke-dasharray: 4 2; }
.map-feature.water-area.selected polygon, .map-feature.water-area:hover polygon { fill-opacity: .45; stroke-width: 1.8; }
.map-feature.unverified-feature { opacity: .9; }
.map-feature.water-area text { display: block; fill: #176784; font-size: 2.4px; font-weight: 900; stroke-width: .8px; pointer-events: none; }
.map-feature.plan-outfall-point circle { fill: #d95443; stroke: #fff; stroke-width: .55; vector-effect: non-scaling-stroke; }
.map-feature.plan-outfall-point text { display: none; fill: #713128; font-size: 1.5px; font-weight: 900; paint-order: stroke; stroke: #fff; stroke-width: .55px; pointer-events: none; }
#map-feature-svg.show-plan-point-labels .map-feature.plan-outfall-point text, #map-feature-svg .map-feature.plan-outfall-point.selected text { display: block; }
.map-feature-hit { fill: none; stroke: transparent; stroke-width: 13px; pointer-events: stroke; }
.map-local-problem { cursor: pointer; }
.map-local-problem circle { fill: #dc4c43; stroke: white; stroke-width: .5; vector-effect: non-scaling-stroke; }
.map-segment-draft polyline { fill: none; stroke: #d46d2f; stroke-width: 3; stroke-dasharray: 2 1; vector-effect: non-scaling-stroke; }
.map-segment-draft circle { fill: #e26a2c; stroke: white; stroke-width: .5; vector-effect: non-scaling-stroke; }
.map-feature-draft { pointer-events: none; }
.draft-feature-line { fill: none; stroke: #1478d4; stroke-width: 2.5; stroke-dasharray: 1.5 1; vector-effect: non-scaling-stroke; }
.draft-feature-polygon { fill: rgba(20,120,212,.16); stroke: #1478d4; stroke-width: 2; stroke-dasharray: 1.5 1; vector-effect: non-scaling-stroke; }
.draft-feature-point { fill: #1478d4; stroke: white; stroke-width: .6; vector-effect: non-scaling-stroke; }
.draft-feature-node { fill: #fff; stroke: #075fae; stroke-width: .6; vector-effect: non-scaling-stroke; }
.dashboard-period-panel { padding: 18px 20px; margin-bottom: 17px; }
.dashboard-period-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.dashboard-period-heading h3 { margin: 0; color: var(--navy); font-size: 14px; }
.dashboard-period-heading p { margin: 5px 0 0; color: var(--muted-2); font-size: 10px; }
.dashboard-period-controls { display: flex; align-items: flex-end; gap: 9px; }
.dashboard-period-controls label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; }
.dashboard-period-controls select, .dashboard-period-controls input { min-width: 118px; min-height: 35px; border: 1px solid var(--line); border-radius: 7px; padding: 0 9px; color: var(--ink); background: white; font: inherit; }
.dashboard-period-summary { margin-top: 16px; }
.dashboard-period-cards { display: grid; grid-template-columns: repeat(5, minmax(100px, 1fr)); gap: 8px; }
.period-stat-card { min-height: 79px; padding: 11px 12px; border: 1px solid #e8eff2; border-radius: 9px; background: #fbfdfe; }
.period-stat-card span, .period-stat-card small { display: block; color: var(--muted-2); font-size: 10px; }
.period-stat-card b { display: block; margin: 4px 0 3px; color: var(--navy); font-size: 21px; }
.period-stat-card.period-danger b { color: #c84d4d; }
.period-stat-card.period-warning b { color: #b87b25; }
.period-breakdowns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin-top: 15px; }
.period-breakdown h4 { margin: 0 0 7px; color: #45616d; font-size: 10px; }
.period-group-list { display: flex; flex-wrap: wrap; gap: 6px; }
.period-group-chip { display: inline-flex; align-items: center; gap: 9px; min-height: 26px; padding: 0 8px; border-radius: 7px; background: #f1f7f9; color: #526b76; font-size: 10px; }
.period-group-chip b { font-weight: 600; }
.period-group-chip em { color: #177f94; font-style: normal; font-weight: 800; }
.period-group-empty { color: #91a1a9; font-size: 10px; }
.dashboard-period-note { margin: 12px 0 0; color: #738891; font-size: 10px; line-height: 1.6; }
@media (max-width: 760px) {
  .dashboard-period-panel { padding: 14px; }
  .dashboard-period-heading { display: block; }
  .dashboard-period-controls { flex-wrap: wrap; margin-top: 12px; }
  .dashboard-period-controls label { flex: 1; }
  .dashboard-period-controls select, .dashboard-period-controls input { min-width: 0; width: 100%; }
  .dashboard-period-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .period-breakdowns { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .report-load-error { align-items: flex-start; flex-direction: column; }
  .facility-row-actions button { min-height: 34px; }
}
.map-professional-layers { position: relative; z-index: 4; display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin: 0 14px 10px; padding: 9px 11px; border: 1px solid #dce9e8; border-radius: 9px; color: #496873; background: #f8fbfa; font-size: 11px; }
.map-professional-layers b { color: #234e60; }
.map-professional-layers label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.map-professional-layers span { color: #7c9298; font-size: 10px; }
.operation-segment-card { position: relative; padding-left: 22px; }
.segment-merge-check { position: absolute; left: 7px; top: 10px; }
.source-reference-list { margin: 6px 0 12px; padding-left: 20px; color: #56717a; font-size: 12px; line-height: 1.7; }
.segment-geometry-card { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px; border: 1px solid #dce9e8; border-radius: 8px; background: #f5faf9; }
.segment-geometry-card div { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 4px; }
.segment-geometry-card span { color: #6b838a; font-size: 11px; }
#page-map.command-screen .map-professional-layers { color: #496873; background: rgba(249,252,251,.96); }
#page-map.command-screen .map-professional-layers b { color: #234e60; }
#page-map.command-screen .map-semantic-view { background: #f2f7f6; }
#page-map.command-screen .map-semantic-hint { color: #496873; background: rgba(255,255,255,.92); }
@media (max-width: 760px) {
  .map-professional-layers { gap: 7px 11px; margin: 0 8px 8px; padding: 8px; }
  .map-professional-layers span { flex-basis: 100%; }
  .segment-geometry-card div { min-width: 100%; }
}
.map-canvas.placing-facility .map-feature { pointer-events: none; }
.map-canvas.report-location-picking .map-feature { pointer-events: all; }
.map-directory-item.selected { border-left: 4px solid var(--blue); background: #edf7ff; }
#map-feature-directory, #map-asset-directory { max-height: 390px; overflow-y: auto; }
.map-filter-feedback { padding: 10px 16px; font-size: 12px; color: #42616b; background: #f0f8fa; }
.map-detail-heading { scroll-margin-top: 80px; }
.map-layout { align-items: start; }
.report-point-note { margin: 0; padding: 12px; background: #f0f8fa; border-radius: 8px; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.report-point-note strong, .report-point-note small { display: block; }
.import-progress { margin: 14px 0; padding: 16px; border: 1px solid #c7e0ed; border-radius: 10px; background: #f2f9fc; }
.import-progress-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 13px; }
.import-progress progress { display: block; width: 100%; height: 14px; accent-color: #198db2; }
.import-progress p { margin: 9px 0 0; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.import-progress.success { background: #edf9f3; border-color: #a0d6bd; }
.import-progress.error { background: #fff1f0; border-color: #e2aaa7; }
.import-progress.warning { background: #fff8e7; border-color: #e6cb83; }
.map-canvas.local-lake-map .map-scale { z-index: 7; }
.map-reference-panel { padding: 15px 16px 17px; border-top: 1px solid var(--line); background: #fbfdfd; }
.map-reference-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.map-reference-heading h3 { margin: 0 0 4px; color: var(--navy); font-size: 13px; }
.map-reference-heading p { margin: 0; color: var(--muted-2); font-size: 10px; line-height: 1.6; }
.map-reference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.map-reference-card { min-width: 0; padding: 10px; border: 1px solid #e4eeee; border-radius: 10px; background: white; }
.map-reference-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.map-reference-card-top strong { color: #416878; font-size: 11px; }
.map-reference-card-top a { color: var(--blue); font-size: 10px; text-decoration: none; }
.map-reference-image { height: 145px; overflow: hidden; border-radius: 7px; background: #f1f4f4; }
.map-reference-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.map-reference-card p { margin: 8px 0 0; color: var(--muted-2); font-size: 10px; line-height: 1.6; }
.map-route-reference-card { border-left: 3px solid #e18b45; }
.map-route-reference-image { display: block; }
.map-route-reference-caution { padding: 8px 9px; border-radius: 7px; color: #805d2b !important; background: #fff8ed; }
.map-route-reference-card .map-directory-actions { align-items: center; }
.map-route-reference-card .cell-sub { align-self: center; font-size: 9px; line-height: 1.5; }
.pipe-symbol { width: 15px; height: 3px; border-radius: 0; background: #d13cc7; }
.overflow-symbol { width: 9px; height: 9px; border-radius: 2px; background: #f04d42; }
.map-scale { position: absolute; z-index: 2; right: 14px; bottom: 12px; padding: 5px 8px; border-radius: 6px; color: #6d8984; background: rgba(255,255,255,.75); font-size: 9px; }
.monitor-chart-heading { align-items: center; flex-wrap: wrap; }
.monitor-chart-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: min(100%, 640px); }
.monitor-chart-controls select { min-height: 31px; max-width: 175px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 7px; color: var(--ink); background: #fff; font: inherit; font-size: 10px; }
.panel-note { margin: 0 20px 14px; padding: 9px 11px; border-radius: 7px; color: #627d87; background: #f5f9fa; font-size: 10px; line-height: 1.6; }
.field-hint { color: #82969d; font-size: 10px; font-weight: 400; line-height: 1.5; }
.report-verification-guide { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid #dce9e9; border-radius: 9px; background: #f6fbfa; }
.report-verification-guide div { display: grid; gap: 4px; }
.report-verification-guide b { color: #356873; font-size: 11px; }
.report-verification-guide span { color: #70878d; font-size: 10px; line-height: 1.55; }
.report-picked-location { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1px solid #b9dfd5; border-radius: 9px; color: #1f6255; background: #eff9f5; }
.report-picked-location-icon { display: grid; flex: 0 0 29px; width: 29px; height: 29px; place-items: center; border-radius: 50%; color: #fff; background: #24816f; font-size: 17px; }
.report-picked-location div { min-width: 0; flex: 1; }
.report-picked-location b { display: block; font-size: 11px; }
.report-picked-location p { margin: 3px 0 0; color: #527a72; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.report-picked-location .secondary-button { flex: 0 0 auto; }
.report-form-panel .inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.report-form-panel .inline-actions .form-tip { flex: 1 1 100%; }
.overflow-entry-panel { margin-top: 18px; }
.overflow-chart { height: 300px; }
.map-point { position: absolute; z-index: 4; width: 19px; height: 19px; display: grid; place-items: center; border: 2px solid white; border-radius: 50% 50% 50% 0; color: white; background: var(--blue); box-shadow: 0 3px 7px rgba(34, 85, 100, .28); transform: translate(-50%, -100%) rotate(-45deg); transition: transform .15s; }
.map-point span { transform: rotate(45deg); font-size: 9px; }
.map-point:hover, .map-point.selected { transform: translate(-50%, -100%) rotate(-45deg) scale(1.3); }
.map-point.problem { background: var(--orange); }
.map-point.danger { background: var(--red); }
.map-point.monitor { background: var(--aqua); }
.map-point.offline { background: #879ba6; }
.map-legend { display: flex; flex-wrap: wrap; gap: 13px; padding: 12px 16px 14px; color: var(--muted); font-size: 10px; }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.map-symbol { width: 9px; height: 9px; display: inline-block; border-radius: 50%; }
.river-symbol { background: var(--blue-2); }
.facility-symbol { background: var(--blue); }
.attached-facility-symbol { background: #2379d8; }
.monitor-symbol { background: var(--aqua); }
.problem-symbol { background: var(--orange); }
.alert-symbol { background: var(--red); }
.map-side { min-height: 600px; }
.map-side .panel-heading { padding-bottom: 4px; }
.empty-state { min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; color: var(--muted); text-align: center; }
.empty-state.compact { min-height: 300px; border: 0; box-shadow: none; }
.empty-icon { width: 45px; height: 45px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 14px; color: var(--blue); background: #eaf7fa; font-size: 23px; }
.empty-state b { color: var(--ink); font-size: 13px; }
.empty-state p { max-width: 240px; margin: 8px 0 15px; color: var(--muted-2); font-size: 11px; line-height: 1.7; }
.point-detail { padding: 14px 19px 22px; }
.point-detail-top { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.point-detail h3 { margin: 0; color: var(--navy); font-size: 15px; }
.point-detail .code { margin-top: 5px; color: var(--muted-2); font-size: 10px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 18px; padding: 14px 0; }
.detail-grid span { display: block; margin-bottom: 4px; color: var(--muted-2); font-size: 10px; }
.detail-grid b { display: block; color: #527383; font-size: 11px; font-weight: 600; }
.point-section-title { margin: 14px 0 8px; color: var(--muted); font-size: 10px; font-weight: 700; }
.point-alert { padding: 9px 10px; border-radius: 8px; color: #81521d; background: #fff8ec; font-size: 10px; line-height: 1.55; }
.point-sensor { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid #eff4f5; font-size: 11px; }
.point-sensor small { color: var(--muted); }
.point-sensor b { color: var(--ink); }
.map-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 18px 18px; }
.map-summary div { padding: 10px; border-radius: 9px; background: #f6fafb; text-align: center; }
.map-summary b, .map-summary span { display: block; }
.map-summary b { color: var(--navy); font-size: 17px; }
.map-summary span { margin-top: 3px; color: var(--muted-2); font-size: 9px; }
.map-detail-heading { margin-top: 5px; border-top: 1px solid var(--line); }
.map-directory { padding: 8px 15px 13px; }
.map-directory-item { padding: 11px 0; border-bottom: 1px solid #edf3f4; }
.map-directory-item:last-child { border-bottom: 0; }
.map-directory-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.map-directory-title { min-width: 0; }
.map-directory-title strong, .map-directory-title small { display: block; }
.map-directory-title strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.map-directory-title small { margin-top: 4px; color: var(--muted-2); font-size: 9px; line-height: 1.45; }
.map-directory-status { flex: 0 0 auto; color: #5c7d86; font-size: 9px; }
.map-directory-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.map-directory-actions button { min-height: 27px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 6px; color: #4f7a87; background: #fbfefe; font-size: 9px; cursor: pointer; }
.map-directory-actions button:hover { border-color: var(--aqua); color: var(--blue); background: #f0fbfb; }
.map-directory-actions button.primary-map-action { color: white; border-color: var(--blue); background: var(--blue); }
.danger-map-action { color: #a14d55 !important; border-color: #edc6c9 !important; background: #fff9f9 !important; }
.danger-map-action:hover { color: #9b303b !important; border-color: #d99097 !important; background: #fff1f2 !important; }
.map-directory-item.attached-facility-item { padding-left: 8px; border-left: 3px solid #2379d8; }
.attached-facility-label { color: #2379d8; }
.compact-button { min-height: 32px; padding: 0 11px; font-size: 11px; }
.map-directory-records { margin-top: 8px; padding: 7px 8px; border-radius: 6px; color: var(--muted-2); background: #f7fafb; font-size: 9px; line-height: 1.55; }
.map-directory-record { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 3px 0; }
.map-directory-record button { padding: 0; border: 0; color: var(--blue); background: transparent; font-size: 9px; cursor: pointer; }
.map-feature-summary { margin-bottom: 8px; color: #4d747c; }
.map-detail-actions { margin-top: 16px; }
.form-help { display: block; margin-top: 5px; color: var(--muted-2); font-size: 10px; line-height: 1.5; }

.map-command-summary { display: none; color: #a9d9e9; font-size: 12px; white-space: nowrap; }
#page-map.command-screen { position: fixed; z-index: 70; inset: 0; display: flex; flex-direction: column; padding: 0; overflow: hidden; color: #e9f8fc; background: #061c2a; }
#page-map.command-screen .page-heading { flex: 0 0 auto; align-items: center; gap: 16px; min-height: 88px; margin: 0; padding: 12px 22px; border-bottom: 1px solid rgba(94,190,219,.22); background: linear-gradient(100deg, #092638, #0d3c52 58%, #102e43); }
#page-map.command-screen .page-heading .eyebrow { color: #66d5da; }
#page-map.command-screen .page-heading h2 { margin: 4px 0; color: #f3fdff; font-size: 25px; }
#page-map.command-screen .page-heading p { color: #94c0cb; }
#page-map.command-screen .heading-actions { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
#page-map.command-screen .heading-actions .secondary-button, #page-map.command-screen .heading-actions .primary-button { min-height: 33px; padding: 0 10px; font-size: 11px; }
#page-map.command-screen .heading-actions .secondary-button { color: #d8f4fa; border-color: rgba(122,206,227,.37); background: rgba(14,72,95,.75); }
#page-map.command-screen .heading-actions .neutral-tag { color: #a9e9ed; border-color: rgba(112,205,218,.28); background: rgba(12,83,100,.6); }
#page-map.command-screen .map-command-summary { display: inline; margin: 0 9px; }
#page-map.command-screen .map-layout { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(325px, 24vw); gap: 0; }
#page-map.command-screen .map-panel { position: relative; height: 100%; min-height: 0; border: 0; border-radius: 0; background: #071d2c; }
#page-map.command-screen .map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; background: #071d2c; }
#page-map.command-screen .local-map-assets { background: #071d2c; }
#page-map.command-screen .map-canvas.local-lake-map .map-semantic-view { inset: auto; top: 50%; left: 50%; width: min(100%, calc((100dvh - 100px) * 1.555)); height: auto; aspect-ratio: 2560 / 1646; background: #071d2c; transform: translate(-50%, -50%); }
#page-map.command-screen .map-toolbar { position: absolute; z-index: 15; top: 12px; left: 12px; width: min(560px, calc(100% - 24px)); padding: 8px; border: 1px solid rgba(165,220,235,.36); border-radius: 11px; background: rgba(7,40,57,.93); box-shadow: 0 10px 24px rgba(0,0,0,.22); }
#page-map.command-screen .map-toolbar .search-box { min-width: 120px; }
#page-map.command-screen .map-toolbar select { width: 118px; }
#page-map.command-screen #map-asset-controls { position: absolute; z-index: 15; top: 74px; left: 12px; right: auto; width: min(560px, calc(100% - 24px)); margin: 0; border-color: rgba(165,220,235,.3); background: rgba(7,40,57,.9); }
#page-map.command-screen #map-asset-controls button { color: #c8e4ec; }
#page-map.command-screen #map-asset-controls button.active { color: #fff; background: #177da5; }
#page-map.command-screen .map-info { position: absolute; z-index: 15; bottom: 62px; left: 12px; max-width: min(480px, calc(100% - 24px)); padding: 10px 12px; border: 1px solid rgba(136,207,219,.22); border-radius: 9px; color: #ecfbff; background: rgba(6,37,53,.9); }
#page-map.command-screen .map-info small { color: #add1d9; }
#page-map.command-screen .amap-status-note { position: absolute; z-index: 15; bottom: 12px; left: 12px; max-width: min(560px, calc(100% - 24px)); padding: 7px 10px; border: 1px solid rgba(136,207,219,.18); border-radius: 8px; color: #bbdce1; background: rgba(6,37,53,.9); }
#page-map.command-screen .map-legend { position: absolute; z-index: 15; top: 126px; left: 12px; width: min(560px, calc(100% - 24px)); padding: 8px 10px; gap: 7px 12px; border: 1px solid rgba(136,207,219,.18); border-radius: 8px; color: #d8edf1; background: rgba(6,37,53,.88); }
#page-map.command-screen .map-reference-panel { display: none; }
#page-map.command-screen .map-side { min-height: 0; height: 100%; overflow: auto; border: 0; border-left: 1px solid rgba(105,186,211,.25); border-radius: 0; color: #d4edf3; background: #0b2738; box-shadow: none; }
#page-map.command-screen .map-side .panel-heading h3, #page-map.command-screen .map-side .point-detail h3, #page-map.command-screen .map-side .map-directory-title strong { color: #eefbff; }
#page-map.command-screen .map-side .panel-heading p, #page-map.command-screen .map-side .map-directory-title small, #page-map.command-screen .map-side .detail-grid span { color: #94bbc6; }
#page-map.command-screen .map-side .map-directory-item, #page-map.command-screen .map-side .point-detail-top { border-color: rgba(121,185,207,.18); }
#page-map.command-screen .map-side .map-directory-status, #page-map.command-screen .map-side .detail-grid b { color: #c3e4ec; }
#page-map.command-screen .map-side .map-summary div, #page-map.command-screen .map-side .map-directory-records, #page-map.command-screen .map-side .map-filter-feedback, #page-map.command-screen .map-side .report-point-note { color: #bfdce4; background: #14384b; }
#page-map.command-screen .map-side .map-summary b { color: #e8faff; }
#page-map.command-screen .map-side #map-feature-directory, #page-map.command-screen .map-side #map-asset-directory { max-height: none; }
#page-map.command-screen #map-live-directory { display: none; }
#page-map.command-screen .map-feature text, #page-map.command-screen .map-feature-point-label { display: none; }
#page-map.command-screen .map-feature:hover text, #page-map.command-screen .map-feature.selected text, #page-map.command-screen .map-feature-point-button:hover .map-feature-point-label, #page-map.command-screen .map-feature-point-button.selected .map-feature-point-label { display: block; }
#page-map.command-screen .map-feature:hover text, #page-map.command-screen .map-feature.selected text { font-size: .8px; stroke-width: .2px; }
#page-map.command-screen .map-side .map-directory-item.selected { background: #153d56; }
#page-map.command-screen .map-side .point-alert { color: #e5d1a3; background: #3c362e; }
#page-map.command-screen .map-side .empty-state { color: #a8cbd3; }
#page-map.command-screen .map-side .empty-state b { color: #e8faff; }
#page-map.command-screen .map-canvas.placing-facility #map-feature-svg { outline: 3px solid #37aef4; outline-offset: -3px; }

@media (max-width: 1000px) {
  #page-map.command-screen .map-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  #page-map.command-screen .page-heading p, #page-map.command-screen #amap-download-button, #page-map.command-screen #amap-layer-select { display: none; }
  #page-map.command-screen .map-toolbar { width: min(420px, calc(100% - 24px)); }
}

@media (max-width: 720px) {
  #page-map.command-screen { position: relative; min-height: 100dvh; overflow: visible; }
  #page-map.command-screen .page-heading { display: block; }
  #page-map.command-screen .heading-actions { justify-content: flex-start; margin-top: 10px; }
  #page-map.command-screen .map-command-summary { display: none; }
  #page-map.command-screen .map-layout { display: block; }
  #page-map.command-screen .map-panel { height: min(74dvh, 650px); }
  #page-map.command-screen .map-toolbar { top: 8px; left: 8px; width: calc(100% - 16px); }
  #page-map.command-screen #map-asset-controls { top: 69px; left: 8px; width: calc(100% - 16px); }
  #page-map.command-screen .map-legend { display: none; }
  #page-map.command-screen .map-info { bottom: 52px; left: 8px; }
  #page-map.command-screen .amap-status-note { bottom: 8px; left: 8px; }
  #page-map.command-screen .map-side { height: auto; max-height: none; }
}

.report-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 17px; align-items: start; }
.report-layout > * { min-width: 0; }
.report-form-panel { padding-bottom: 22px; }
.report-form-panel .panel-heading { padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.required { color: var(--red); font-style: normal; }
.source-chip { color: #2d7d74; background: #edf9f6; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 21px 21px 0; }
.form-grid .full-span { grid-column: 1 / -1; }
.form-grid .label-hint { color: var(--muted-2); font-weight: 400; }
@media (max-width: 1360px) {
  .report-layout { grid-template-columns: minmax(0, 1fr); }
  .report-form-panel, .scenario-panel { min-width: 0; }
}
@media (max-width: 820px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}
.upload-zone { position: relative; min-height: 148px; align-items: center; justify-items: center; padding: 22px; border: 1px dashed #acd7de; border-radius: 11px; color: #4e7887; background: #f4fbfc; text-align: center; cursor: pointer; }
.upload-zone:hover { border-color: var(--blue-2); background: #edf9fa; }
.upload-zone-invalid { border-color: #df7770; background: #fff7f6; }
.field-validation { color: #b24842; font-size: 11px; font-weight: 700; line-height: 1.5; }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { width: 37px; height: 37px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 50%; color: var(--blue); background: white; box-shadow: 0 3px 10px rgba(22,134,173,.12); font-size: 23px; }
.upload-zone strong { font-size: 12px; }
.upload-zone small { display: block; margin-top: 5px; color: var(--muted-2); font-size: 10px; font-weight: 400; }
.file-name { color: var(--green); font-size: 11px; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 5px; }
.form-tip { display: flex; align-items: flex-start; gap: 7px; color: var(--muted-2); font-size: 10px; line-height: 1.55; }
.form-tip i { width: 15px; height: 15px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid #a9cfd8; border-radius: 50%; color: var(--blue); font-style: normal; }
.scenario-panel { padding-bottom: 19px; }
.sparkle { color: var(--violet); font-size: 21px; }
.scenario-list { padding: 14px 18px 9px; }
.scenario-card { width: 100%; display: flex; align-items: center; gap: 11px; padding: 12px 9px; border: 1px solid transparent; border-radius: 10px; color: var(--ink); background: transparent; text-align: left; }
.scenario-card:hover { border-color: var(--line); background: #f7fbfc; }
.scenario-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; font-size: 16px; font-weight: 800; }
.scenario-icon.aqua { color: #24889b; background: #e8f8fb; }
.scenario-icon.red { color: #bf5b5e; background: #fff0f0; }
.scenario-icon.green { color: #348563; background: #ebfaf1; }
.scenario-card div { min-width: 0; flex: 1; }
.scenario-card b, .scenario-card small { display: block; }
.scenario-card b { font-size: 12px; }
.scenario-card small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.scenario-card i { color: #8bb7bf; font-style: normal; }
.evidence-note { margin: 16px 18px 0; padding: 14px; border-radius: 10px; background: linear-gradient(135deg, #f1fbfa, #f7f8ff); }
.evidence-note b { color: #346d7a; font-size: 11px; }
.evidence-note p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }

.filter-bar { display: flex; align-items: center; gap: 9px; padding: 12px; margin-bottom: 13px; }
.filter-bar .search-box { min-width: 240px; flex: 1; }
.filter-bar select { width: 155px; }
.issue-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 17px; }
.issue-kpis > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.kpi-label { color: var(--muted); font-size: 11px; }
.issue-kpis b { color: var(--navy); font-size: 22px; letter-spacing: -.05em; }
.table-panel { overflow: hidden; }
.table-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 20px 13px; }
.table-heading h3 { margin: 0; color: var(--navy); font-size: 14px; }
.table-heading span { color: var(--muted-2); font-size: 10px; }
.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; min-width: 850px; border-collapse: collapse; }
.data-table th { padding: 10px 20px; color: var(--muted-2); background: #fbfdfe; font-size: 10px; font-weight: 600; text-align: left; white-space: nowrap; }
.data-table td { padding: 13px 20px; border-top: 1px solid #eef3f5; color: #557482; font-size: 11px; vertical-align: middle; }
.data-table tr:hover td { background: #fbfefe; }
.cell-main { display: block; max-width: 210px; overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.cell-sub { display: block; margin-top: 4px; color: var(--muted-2); font-size: 10px; }
.status-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 6px; color: #63808b; background: #f1f6f8; font-size: 10px; white-space: nowrap; }
.status-pill.green { color: #287961; background: #eaf8f3; }
.status-pill.blue { color: #2c7592; background: #eaf7fb; }
.status-pill.orange { color: #9b681f; background: #fff5e5; }
.status-pill.red { color: #a34f56; background: #fff0f1; }
.status-pill.gray { color: #778991; background: #edf1f3; }
.table-action { padding: 5px 8px; border: 0; border-radius: 6px; color: var(--blue); background: #eef8fb; font-size: 10px; }
.table-action:hover { background: #dff3f7; }
.risk-score { display: inline-flex; align-items: center; gap: 5px; }
.risk-score i { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: var(--orange); }
.risk-score.red i { background: var(--red); }
.risk-score.green i { background: var(--green); }

.ai-context-bar, .workorder-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; margin-bottom: 17px; background: linear-gradient(105deg, #fff, #f2fbfa); }
.ai-context-bar h3, .workorder-head h3 { margin: 6px 0 5px; color: var(--navy); font-size: 17px; letter-spacing: -.035em; }
.ai-context-bar p, .workorder-head p { margin: 0; color: var(--muted); font-size: 11px; }
.ai-context-actions, .wo-head-right { display: flex; align-items: center; gap: 11px; }
.ai-review-layout { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr); gap: 17px; align-items: stretch; }
.image-evidence-panel, .ai-result-panel { min-height: 440px; overflow: hidden; }
.evidence-image { min-height: 300px; margin: 18px 20px 0; overflow: hidden; border-radius: 12px; background: #eaf4f3; }
.evidence-image img { width: 100%; height: 100%; min-height: 300px; display: block; object-fit: cover; }
.evidence-caption { display: grid; gap: 6px; padding: 12px 20px 20px; color: #6c8791; font-size: 10px; line-height: 1.55; }
.evidence-caption span:first-child { color: var(--ink); font-weight: 700; }
.ai-result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 20px; }
.ai-result-item { min-height: 69px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #fbfdfe; }
.ai-result-item.wide { grid-column: 1 / -1; }
.ai-result-item span { display: block; margin-bottom: 6px; color: var(--muted-2); font-size: 10px; }
.ai-result-item b, .ai-result-item p { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.55; }
.ai-result-item p { font-weight: 500; }
.confidence-meter { height: 6px; overflow: hidden; margin-top: 8px; border-radius: 10px; background: #e9f0f2; }
.confidence-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--green)); }
.json-toggle { padding: 0 20px 20px; }
.json-output { max-height: 210px; overflow: auto; margin: 12px 0 0; padding: 13px; border-radius: 9px; color: #b8e8e1; background: #132e3d; font-family: "SF Mono", Menlo, monospace; font-size: 10px; line-height: 1.6; white-space: pre-wrap; }
.error-box { margin: 17px 20px 0; padding: 12px; border: 1px solid #f2c7ca; border-radius: 9px; color: #964e55; background: #fff5f5; font-size: 11px; line-height: 1.6; }
.confirm-panel { margin-top: 17px; padding-bottom: 23px; }
.confirm-panel .panel-heading { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.manual-mark { color: #986722; background: #fff7e8; }
.check-line { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 8px !important; color: #567482 !important; }
.check-line input { width: 16px; height: 16px; accent-color: var(--aqua); }

.workorder-head { align-items: flex-start; }
.code-line { color: var(--blue); font-family: "SF Mono", Menlo, monospace; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.wo-head-right { align-items: flex-end; flex-direction: column; }
.wo-due { color: var(--muted); font-size: 10px; }
.wo-evidence-panel { margin-top: 17px; }
.wo-evidence { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 0 20px 20px; }
.wo-evidence-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #f7fbfc; }
.wo-evidence-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; color: var(--ink); font-size: 11px; }
.wo-evidence-label span { color: var(--muted-2); font-size: 9px; }
.wo-evidence-card > img { display: block; width: 100%; height: 180px; object-fit: cover; background: #eaf1f3; }
.image-load-error { object-fit: contain !important; padding: 24px; color: #b4583d; background: #fff5f1 !important; }
.wo-evidence-empty { display: grid; min-height: 180px; place-items: center; align-content: center; gap: 5px; color: var(--muted-2); background: #eef4f5; text-align: center; }
.wo-evidence-empty span { font-size: 24px; color: #a5bbc2; }
.wo-evidence-empty b { color: var(--muted); font-size: 11px; }
.wo-evidence-empty small { font-size: 9px; }
.workorder-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 17px; align-items: start; }
.timeline-panel { min-height: 450px; }
.timeline { padding: 22px 27px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 13px 1fr; gap: 13px; min-height: 65px; }
.timeline-item::before { content: ""; position: absolute; top: 12px; bottom: -7px; left: 5px; width: 1px; background: #d8e9ed; }
.timeline-item:last-child::before { display: none; }
.timeline-dot { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 3px; border: 2px solid white; border-radius: 50%; background: var(--blue-2); box-shadow: 0 0 0 2px #bfe5eb; }
.timeline-item:first-child .timeline-dot { background: var(--green); box-shadow: 0 0 0 2px #bce6d9; }
.timeline-content b { display: block; color: var(--ink); font-size: 12px; }
.timeline-content small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 10px; line-height: 1.5; }
.timeline-content p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.workorder-side { display: grid; gap: 17px; }
.assignee-card { display: flex; align-items: center; gap: 11px; padding: 18px 20px; }
.assignee-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: white; background: linear-gradient(135deg, #3e8ba0, #2cae96); font-weight: 700; }
.assignee-card b, .assignee-card small { display: block; }
.assignee-card b { color: var(--ink); font-size: 12px; }
.assignee-card small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.wo-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 20px 18px; }
.wo-dl span, .wo-dl b { display: block; }
.wo-dl span { color: var(--muted-2); font-size: 10px; }
.wo-dl b { margin-top: 4px; color: #567482; font-size: 11px; }
#wo-action-panel { padding-bottom: 17px; }
#wo-action-body { padding: 17px 20px 0; }
.action-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.workorder-tools { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.action-buttons .primary-button, .action-buttons .secondary-button { min-height: 35px; padding: 0 12px; font-size: 11px; }
.inline-form { display: grid; gap: 11px; }
.inline-form label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; }
.inline-form .primary-button { min-height: 38px; margin-top: 3px; }
.map-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.map-form-grid label { min-width: 0; }

.monitor-summary-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.monitor-stat { min-height: 111px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.monitor-stat span, .monitor-stat small { display: block; }
.monitor-stat span { color: var(--muted); font-size: 11px; }
.monitor-stat b { display: block; margin: 13px 0 4px; color: var(--navy); font-size: 25px; letter-spacing: -.05em; }
.monitor-stat small { color: var(--muted-2); font-size: 10px; }
.monitor-stat.green b { color: var(--green); }
.monitor-stat.orange b { color: var(--orange); }
.monitor-stat.gray b { color: #8197a1; }
.monitor-stat.blue b { color: var(--blue); }
.monitor-layout { margin-top: 17px; }
.monitor-layout .panel { min-width: 0; }
.monitor-layout .panel-heading select { width: 160px; height: 34px; font-size: 11px; }
.sensor-list { max-height: 305px; overflow: auto; padding: 8px 18px 16px; }
.sensor-item { display: flex; align-items: center; gap: 9px; padding: 11px 2px; border-bottom: 1px solid #eff4f5; cursor: pointer; }
.sensor-item:last-child { border-bottom: 0; }
.sensor-item:hover, .sensor-item.selected { background: #f6fbfc; }
.sensor-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #28879a; background: #e8f8fa; font-size: 14px; }
.sensor-item > div:nth-child(2) { min-width: 0; flex: 1; }
.sensor-item b, .sensor-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sensor-item b { color: var(--ink); font-size: 11px; }
.sensor-item small { margin-top: 4px; color: var(--muted-2); font-size: 9px; }
.sensor-value { color: var(--navy); font-size: 12px; font-weight: 800; text-align: right; }
.sensor-value small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 9px; font-weight: 500; }
.alert-table { padding: 5px 20px 16px; }
.alert-row { display: grid; grid-template-columns: 100px 1fr 150px 80px; align-items: center; gap: 13px; padding: 12px 0; border-top: 1px solid #eef3f5; }
.alert-row:first-child { border-top: 0; }
.alert-row b { display: block; color: var(--ink); font-size: 11px; }
.alert-row p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.alert-time { color: var(--muted-2); font-size: 10px; }

.overflow-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.overflow-kpis .metric-card { min-height: 133px; }
.overflow-layout { margin-top: 17px; }
.status-summary { padding: 17px 20px; }
.status-bar-row { display: flex; align-items: center; gap: 9px; margin: 16px 0; color: var(--muted); font-size: 10px; }
.status-bar-row b { width: 55px; color: var(--ink); font-size: 11px; }
.status-bar { height: 7px; flex: 1; overflow: hidden; border-radius: 9px; background: #edf2f4; }
.status-bar i { display: block; height: 100%; border-radius: inherit; background: var(--blue-2); }
.status-bar-row em { width: 23px; color: var(--ink); font-style: normal; text-align: right; }

.camera-note, .config-warning { display: flex; align-items: flex-start; gap: 12px; padding: 14px 17px; margin-bottom: 17px; border-color: #cfe7ed; background: #f2fbfc; }
.note-icon { width: 21px; height: 21px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--blue); background: #dff4f7; font-size: 11px; font-weight: 800; }
.camera-note b, .config-warning b { display: block; color: #3f6e7b; font-size: 11px; }
.camera-note p, .config-warning p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.camera-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.camera-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.camera-preview { position: relative; height: 190px; overflow: hidden; background: #eaf1f3; }
.camera-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.camera-preview.offline { display: grid; place-items: center; color: #7b8e97; background: linear-gradient(135deg, #edf1f2, #dfe7ea); }
.camera-preview.offline::before { content: "⌁"; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #b6c6cc; border-radius: 50%; font-size: 25px; }
.camera-overlay { position: absolute; top: 11px; left: 11px; }
.camera-body { padding: 15px 16px 16px; }
.camera-body h3 { margin: 0; color: var(--navy); font-size: 13px; }
.camera-body p { margin: 5px 0 13px; color: var(--muted); font-size: 10px; }
.camera-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted-2); font-size: 10px; }
.camera-actions { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.camera-upload { cursor: pointer; }

.facility-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 17px; }
.facility-entry-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 20px; margin-bottom: 17px; padding: 16px 19px; border-color: #cfe3e8; background: linear-gradient(115deg, #f6fbfc, #fff); }
.facility-entry-copy strong, .facility-entry-copy span { display: block; }
.facility-entry-copy strong { color: var(--navy); font-size: 13px; }
.facility-entry-copy span { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.facility-entry-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.facility-entry-actions button { min-height: 38px; white-space: nowrap; }
.facility-entry-panel .facility-role-note { grid-column: 1 / -1; margin: 0; }
.facility-summary-card { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.facility-summary-card b, .facility-summary-card span { display: block; }
.facility-summary-card b { color: var(--navy); font-size: 22px; }
.facility-summary-card span { margin-top: 6px; color: var(--muted); font-size: 10px; }
.facility-empty-note { display: flex; align-items: flex-start; gap: 13px; margin: 0 0 17px; padding: 16px 18px; border: 1px solid #cfe2e9; border-radius: 12px; color: #426a78; background: #f5fbfc; line-height: 1.65; }
.facility-empty-note::before { content: "i"; width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #197b98; background: #dff2f6; font-weight: 800; }
.facility-empty-note strong { display: block; color: var(--navy); font-size: 12px; }
.facility-empty-note p { margin: 4px 0 11px; font-size: 11px; }
.facility-empty-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.facility-empty-actions .primary-button, .facility-empty-actions .secondary-button { min-height: 32px; padding: 0 11px; font-size: 11px; }
.facility-role-note { margin: -9px 0 17px; padding: 11px 14px; border: 1px solid #cfe2e9; border-radius: 9px; color: #426a78; background: #f5fbfc; font-size: 11px; line-height: 1.6; }
.facility-editor-action.hidden { display: none; }
.facility-thumb { display: block; width: 58px; height: 42px; border-radius: 6px; object-fit: cover; background: #edf3f4; }
.facility-coordinate-note { color: #82969d; font-size: 10px; }
.facility-row-actions { display: flex; gap: 6px; }
.facility-row-actions button { min-height: 29px; padding: 0 9px; font-size: 10px; }
.facility-photo-upload { position: relative; display: inline-flex; align-items: center; min-height: 29px; padding: 0 9px; white-space: nowrap; cursor: pointer; }
.facility-photo-upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; }
.report-load-error { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 16px; padding: 13px 16px; border: 1px solid #f0c7c2; border-radius: 10px; color: #8d3832; background: #fff5f3; }
.report-load-error strong { display: block; font-size: 12px; }
.report-load-error p { margin: 4px 0 0; color: #a2544d; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.report-load-error .secondary-button { min-height: 33px; flex: 0 0 auto; }
.compact-filter { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.compact-filter .search-box { max-width: 400px; }
.coord { color: var(--muted-2); font-family: "SF Mono", Menlo, monospace; font-size: 9px; }

.data-import-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 17px; align-items: start; }
.data-import-form-panel { padding-bottom: 22px; }
.data-import-form-panel .panel-heading { padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.data-import-guide { min-height: 100%; padding-bottom: 20px; }
.import-steps { display: grid; gap: 13px; margin: 18px 20px 20px; padding: 0; list-style: none; }
.import-steps li { display: flex; align-items: center; gap: 10px; color: #557482; font-size: 11px; }
.import-steps b { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; color: #287b8f; background: #eaf7fa; font-size: 9px; }
.data-boundary-note { margin: 20px; padding: 13px; border: 1px solid #d6ece8; border-radius: 10px; background: #f4fbf9; }
.data-boundary-note b { color: #267b6e; font-size: 11px; }
.data-boundary-note p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.data-import-preview, .data-import-history { overflow: hidden; }
.data-import-preview { margin-top: 17px; }
.data-import-preview .table-scroll { max-height: 390px; }
.data-import-preview .data-table th, .data-import-preview .data-table td { white-space: nowrap; }
.import-errors { margin: 16px 20px 0; }
.import-errors ul { max-height: 160px; overflow: auto; margin: 8px 0 0; padding: 9px 12px 9px 27px; border: 1px solid #f2d2d4; border-radius: 9px; color: #9a555c; background: #fff9f9; font-size: 10px; line-height: 1.7; }
.import-error-head { color: #a14e56; font-size: 10px; font-weight: 700; }
.import-valid { padding: 10px 12px; border: 1px solid #c8e8de; border-radius: 9px; color: #317768; background: #f3fcf8; font-size: 10px; }
.import-warning { padding: 10px 12px; border: 1px solid #f0d59e; border-radius: 9px; color: #87621f; background: #fffaf0; font-size: 10px; line-height: 1.6; }
.data-import-history { margin-top: 17px; }

.knowledge-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 17px; align-items: start; }
.assistant-panel { min-height: 525px; padding-bottom: 20px; }
.assistant-hero { display: flex; align-items: center; gap: 12px; margin: 20px 20px 13px; padding: 17px; border-radius: 12px; background: linear-gradient(120deg, #eaf9f6, #f1f7ff); }
.assistant-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; color: white; background: linear-gradient(135deg, #2ab7a2, #418bc0); font-size: 18px; font-weight: 800; }
.assistant-hero h3 { margin: 0; color: var(--navy); font-size: 14px; }
.assistant-hero p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.knowledge-answer { min-height: 250px; max-height: 350px; overflow: auto; margin: 0 20px 14px; padding: 17px; border: 1px solid var(--line); border-radius: 11px; color: #567482; background: #fbfdfe; font-size: 12px; line-height: 1.75; white-space: pre-wrap; }
.knowledge-answer.empty-answer { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted-2); text-align: center; font-size: 11px; }
.knowledge-answer.empty-answer .empty-icon { width: 37px; height: 37px; margin-bottom: 8px; font-size: 18px; }
.source-list { display: grid; gap: 7px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.source-list b { color: var(--navy); font-size: 10px; }
.source-list span { display: block; color: var(--muted-2); font-size: 9px; }
.assistant-input { display: flex; gap: 8px; margin: 0 20px; }
.assistant-input input { flex: 1; }
.assistant-input .primary-button { min-width: 78px; }
.question-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 13px 20px 0; }
.question-chips button { padding: 6px 9px; border: 1px solid #d9e9ee; border-radius: 7px; color: #5b808c; background: white; font-size: 10px; }
.question-chips button:hover { color: var(--blue); background: #f1fafc; }
.knowledge-files-panel { min-height: 525px; }
.upload-small { min-height: 32px; padding: 0 10px; font-size: 10px; cursor: pointer; }
.upload-small input { display: none; }
.knowledge-file-list { padding: 13px 20px 20px; }
.knowledge-file { display: flex; align-items: flex-start; gap: 10px; padding: 13px 0; border-bottom: 1px solid #eff4f5; }
.file-badge { width: 28px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 7px; color: #2c8299; background: #eaf8fa; font-size: 9px; font-weight: 800; }
.knowledge-file > div:nth-child(2) { min-width: 0; flex: 1; }
.knowledge-file b { display: block; overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-file small { display: block; margin-top: 5px; color: var(--muted-2); font-size: 9px; }

.analytics-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 17px; width: fit-content; border: 1px solid var(--line); border-radius: 9px; background: white; }
.analytics-tabs button { min-height: 31px; padding: 0 15px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 11px; }
.analytics-tabs button.active { color: var(--blue); background: #eaf7fa; font-weight: 700; }
.analytics-tab { display: none; }
.analytics-tab.active { display: block; }
.analysis-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.analysis-kpi { padding: 15px 17px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.analysis-kpi span, .analysis-kpi small { display: block; }
.analysis-kpi span { color: var(--muted); font-size: 11px; }
.analysis-kpi b { display: block; margin: 12px 0 4px; color: var(--navy); font-size: 24px; }
.analysis-kpi small { color: var(--muted-2); font-size: 9px; }
.ranking-list { padding: 12px 20px 18px; }
.rank-item { display: flex; align-items: center; gap: 9px; padding: 12px 0; border-bottom: 1px solid #eff4f5; }
.rank-item:last-child { border-bottom: 0; }
.rank-num { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; color: #6b8490; background: #eff5f7; font-size: 10px; font-weight: 700; }
.rank-item:first-child .rank-num { color: #a47222; background: #fff2db; }
.rank-item > div:nth-child(2) { min-width: 0; flex: 1; }
.rank-item b { display: block; color: var(--ink); font-size: 11px; }
.rank-item small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 9px; }
.rank-count { color: var(--blue); font-size: 13px; font-weight: 800; }
.insight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; padding: 20px; }
.insight-card { min-height: 125px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdfe; }
.insight-card span { display: block; color: var(--muted); font-size: 10px; }
.insight-card b { display: block; margin-top: 12px; color: var(--navy); font-size: 23px; }
.insight-card p { margin: 5px 0 0; color: var(--muted-2); font-size: 9px; line-height: 1.5; }

.rules-layout { display: grid; grid-template-columns: minmax(230px, .55fr) minmax(0, 1.45fr); gap: 17px; align-items: start; }
.category-list { padding: 10px 18px 18px; }
.category-item { display: flex; align-items: center; gap: 9px; padding: 13px 2px; border-bottom: 1px solid #eff4f5; }
.category-item:last-child { border-bottom: 0; }
.category-color { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.category-item:nth-child(2) .category-color { background: var(--red); }
.category-item:nth-child(3) .category-color { background: var(--green); }
.category-item:nth-child(4) .category-color { background: var(--orange); }
.category-item:nth-child(5) .category-color { background: var(--violet); }
.category-item > div { min-width: 0; flex: 1; }
.category-item b { display: block; color: var(--ink); font-size: 11px; }
.category-item small { display: block; margin-top: 4px; overflow: hidden; color: var(--muted-2); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.samples-panel { margin-top: 17px; }
.model-config-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; margin-bottom: 17px; }
.model-card { position: relative; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.model-card h3 { margin: 0; padding-right: 68px; color: var(--navy); font-size: 14px; }
.model-card > .tag { position: absolute; top: 18px; right: 18px; }
.model-card p { margin: 8px 0 15px; color: var(--muted); font-size: 10px; }
.model-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; border-top: 1px solid #eff4f5; color: var(--muted-2); font-size: 10px; }
.model-line b { max-width: 170px; overflow: hidden; color: #557482; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.model-actions { display: flex; gap: 7px; margin-top: 13px; }
.model-actions button { min-height: 31px; padding: 0 10px; border-radius: 7px; font-size: 10px; }
.config-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 18px 20px 21px; }
.config-value { padding: 12px; border-radius: 9px; background: #f6fafb; }
.config-value span, .config-value b { display: block; }
.config-value span { color: var(--muted-2); font-size: 9px; }
.config-value b { margin-top: 6px; color: var(--ink); font-size: 11px; }
.role-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 17px; }
.role-cards > div { min-height: 78px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: var(--shadow); }
.role-cards b, .role-cards span { display: block; }
.role-cards b { color: var(--navy); font-size: 11px; }
.role-cards span { margin-top: 7px; color: var(--muted-2); font-size: 9px; line-height: 1.4; }
.audit-panel { margin-top: 17px; }
.audit-list { padding: 7px 20px 17px; max-height: 300px; overflow: auto; }
.audit-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-bottom: 1px solid #eff4f5; }
.audit-item:last-child { border-bottom: 0; }
.audit-time { width: 122px; flex: 0 0 auto; color: var(--muted-2); font-family: "SF Mono", Menlo, monospace; font-size: 9px; }
.audit-item b { display: block; color: var(--ink); font-size: 10px; }
.audit-item small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }

.modal-backdrop { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(7, 34, 48, .45); backdrop-filter: blur(4px); }
.modal { width: min(520px, 100%); max-height: 90vh; overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 20px 70px rgba(4, 38, 55, .23); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 20px 21px 14px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; color: var(--navy); font-size: 15px; }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.modal-body { padding: 18px 21px 21px; }
.modal-close { width: 28px; height: 28px; border: 0; border-radius: 7px; color: var(--muted); background: #f5f9fa; }
.modal-close:hover { color: var(--red); }

@media (max-width: 1250px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .monitor-summary-grid { grid-template-columns: repeat(3, 1fr); }
  .camera-grid { grid-template-columns: repeat(2, 1fr); }
  .model-config-list { grid-template-columns: 1fr 1fr; }
  .role-cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 920px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 12px 0 30px rgba(7, 42, 56, .18); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; z-index: 19; inset: 0; display: none; background: rgba(7, 34, 48, .35); }
  .sidebar-backdrop.open { display: block; }
  .main-content { width: 100%; margin-left: 0; }
  .topbar { padding: 0 20px; }
  .mobile-only { display: inline-grid !important; }
  .connection-state { display: none; }
  .page { padding: 25px 20px 38px; }
  .map-layout, .report-layout, .knowledge-layout, .data-import-layout { grid-template-columns: 1fr; }
  .map-side { min-height: 0; }
  .map-side .empty-state.compact { min-height: 220px; }
  .dashboard-grid, .analytics-grid, .monitor-layout, .overflow-layout { grid-template-columns: 1fr 1fr; }
  .span-two { grid-column: span 2; }
  .quick-flow { align-items: flex-start; flex-direction: column; gap: 20px; }
  .flow-intro { width: 100%; }
  .flow-steps { width: 100%; }
}

@media (max-width: 640px) {
  .login-screen { display: block; }
  .login-art { min-height: 260px; padding: 38px 28px; }
  .login-copy h1 { margin: 13px 0 10px; font-size: 48px; }
  .login-copy p { font-size: 14px; }
  .login-flow { margin-top: 23px; gap: 6px; }
  .login-flow span { padding: 7px 8px; font-size: 10px; }
  .login-flow i { font-size: 14px; }
  .login-panel { width: auto; padding: 37px 28px 35px; }
  .demo-note { margin-top: 30px; }
  .topbar { height: 62px; padding: 0 14px; }
  .breadcrumb { gap: 6px; font-size: 10px; }
  .topbar-actions { gap: 9px; }
  .user-menu small, .user-menu em { display: none; }
  .user-menu b { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page { padding: 22px 13px 32px; }
  .page-heading { display: block; margin-bottom: 18px; }
  .page-heading h2 { font-size: 23px; }
  .heading-actions { margin-top: 13px; }
  .metric-grid, .monitor-summary-grid, .overflow-kpis, .facility-summary, .role-cards, .model-config-list, .analysis-kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .metric-card { min-height: 126px; padding: 13px; }
  .metric-value { margin-top: 11px; }
  .metric-value b { font-size: 25px; }
  .metric-card small { font-size: 9px; }
  .dashboard-grid, .analytics-grid, .monitor-layout, .overflow-layout { display: block; margin-top: 9px; }
  .dashboard-grid > .panel, .analytics-grid > .panel, .monitor-layout > .panel, .overflow-layout > .panel { margin-top: 9px; }
  .span-two { grid-column: auto; }
  .panel-heading { padding: 15px 15px 0; }
  .chart-large { height: 240px; min-height: 200px; }
  .chart-medium { height: 220px; min-height: 190px; }
  .overflow-chart { height: 270px; min-height: 245px; }
  .monitor-chart-controls { width: 100%; justify-content: flex-start; }
  .monitor-chart-controls select { flex: 1 1 135px; max-width: 100%; }
  .report-verification-guide { align-items: flex-start; flex-direction: column; }
  .report-picked-location { align-items: flex-start; flex-wrap: wrap; }
  .report-picked-location div { flex: 1 1 calc(100% - 42px); }
  .report-picked-location .secondary-button { margin-left: 40px; }
  .quick-flow { margin-top: 9px; padding: 19px; }
  .flow-steps { overflow-x: auto; justify-content: flex-start; padding-bottom: 3px; }
  .flow-step { min-width: 92px; }
  .flow-arrow { flex: 0 0 auto; }
  .map-toolbar { flex-wrap: wrap; }
  .map-toolbar .search-box { min-width: 100%; }
  .map-toolbar select { width: calc(100% - 44px); }
  .map-canvas { min-height: 450px; height: 60vh; }
  .form-grid { grid-template-columns: 1fr; padding: 17px 15px 0; gap: 13px; }
  .map-form-grid { grid-template-columns: 1fr; }
  .form-grid .full-span { grid-column: auto; }
  .report-form-panel .inline-actions { align-items: stretch; }
  .report-form-panel .inline-actions button { flex: 1 1 100%; width: 100%; }
  .form-footer { align-items: stretch; flex-direction: column; }
  .form-footer .primary-button { width: 100%; }
  .filter-bar { align-items: stretch; flex-wrap: wrap; }
  .filter-bar .search-box { min-width: 100%; }
  .filter-bar select { flex: 1; width: auto; }
  .filter-bar .secondary-button { width: 100%; }
  #page-facilities .page-heading .heading-actions { display: flex; flex-wrap: wrap; }
  #page-facilities .page-heading .heading-actions > * { flex: 1 1 auto; }
  #page-facilities .table-scroll { overflow: visible; }
  #page-facilities .data-table { width: 100%; min-width: 0; border-collapse: separate; border-spacing: 0; }
  #page-facilities .data-table thead { display: none; }
  #page-facilities .data-table tbody { display: grid; gap: 10px; padding: 10px; }
  #page-facilities .data-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 12px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 4px 12px rgba(20, 64, 79, .05); }
  #page-facilities .data-table tbody td { display: flex; min-width: 0; flex-direction: column; gap: 4px; padding: 6px 2px; border: 0; overflow-wrap: anywhere; font-size: 11px; }
  #page-facilities .data-table tbody td::before { content: attr(data-label); color: var(--muted-2); font-size: 9px; font-weight: 700; }
  #page-facilities .data-table tbody td[data-label="设施名称 / 编号"], #page-facilities .data-table tbody td[data-label="位置"], #page-facilities .data-table tbody td[data-label="操作"] { grid-column: 1 / -1; }
  #page-facilities .data-table tbody td[colspan] { grid-column: 1 / -1; }
  #page-facilities .data-table tbody td[data-label="设施名称 / 编号"] .cell-main { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  #page-facilities .facility-row-actions { flex-wrap: wrap; width: 100%; }
  #page-facilities .facility-row-actions > * { flex: 1 1 125px; min-height: 38px; justify-content: center; }
  .issue-kpis { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .issue-kpis > div { padding: 12px; }
  .issue-kpis b { font-size: 19px; }
  .ai-context-bar, .workorder-head { display: block; padding: 17px; }
  .ai-context-actions, .wo-head-right { align-items: flex-start; justify-content: space-between; margin-top: 13px; flex-direction: row; }
  .ai-review-layout, .workorder-layout { display: block; }
  .wo-evidence { grid-template-columns: 1fr; padding: 0 15px 15px; }
  .ai-review-layout > .panel, .workorder-layout > .panel, .workorder-side > .panel { margin-top: 9px; }
  .image-evidence-panel, .ai-result-panel { min-height: 0; }
  .evidence-image { min-height: 230px; margin: 14px 15px 0; }
  .evidence-image img { min-height: 230px; }
  .ai-result-grid { padding: 15px; gap: 8px; }
  .confirm-panel { margin-top: 9px; }
  .ai-result-item { padding: 9px; }
  .camera-grid { grid-template-columns: 1fr; gap: 9px; }
  .camera-preview { height: 210px; }
  .knowledge-answer { margin: 0 15px 13px; }
  .assistant-input { margin: 0 15px; }
  .question-chips { padding: 12px 15px 0; }
  .data-import-preview .panel-heading { display: block; }
  .data-import-preview .heading-actions { align-items: center; justify-content: space-between; }
  .import-errors { margin: 13px 15px 0; }
  .insight-grid { grid-template-columns: 1fr 1fr; padding: 15px; gap: 8px; }
  .config-grid { grid-template-columns: 1fr 1fr; padding: 15px; gap: 8px; }
  .rules-layout { display: block; }
  .rules-layout > .panel { margin-top: 9px; }
  .audit-time { width: 96px; }
  .toast-container { top: 70px; right: 13px; width: calc(100% - 26px); }
}

@media (max-width: 860px) {
  .map-reference-grid { grid-template-columns: 1fr; }
  .map-reference-image { height: 180px; }
}

@media (max-width: 640px) {
  .map-asset-controls { top: auto; right: 10px; bottom: 10px; left: 10px; justify-content: center; }
  .map-asset-control { flex: 1; }
}

.frontline-home-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 22px; }
.frontline-action { display: flex; min-height: 136px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding: 22px; border: 1px solid #dcebed; border-radius: 16px; background: linear-gradient(135deg, #fff, #eff9f8); color: #174657; text-align: left; box-shadow: 0 8px 24px rgba(22, 79, 95, .06); cursor: pointer; }
.frontline-action > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: #d8f1ee; color: #13887f; font-size: 20px; }
.frontline-action b { font-size: 17px; }
.frontline-action small { color: #67808a; font-size: 12px; }
.manual-sampling-panel { margin-top: 18px; }
.manual-sample-form { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 20px; }
.manual-sample-form + .table-scroll { margin: 0 20px 18px; }

@media (max-width: 760px) {
  .frontline-home-actions { grid-template-columns: 1fr; gap: 10px; }
  .frontline-action { min-height: 96px; padding: 16px; }
  .manual-sample-form { grid-template-columns: 1fr; }
  .manual-sample-form + .table-scroll { margin: 0 10px 12px; }
  .facility-entry-panel { grid-template-columns: 1fr; padding: 14px; }
  .facility-entry-actions { justify-content: stretch; }
  .facility-entry-actions button { flex: 1 1 100%; }
  .facility-entry-panel .facility-role-note { grid-column: auto; }
}
