/* =========================================================
   Wrop — 45G 无线网络优化工作台
   UI 设计语言：浅色玻璃浮层 / 专业蓝 / 高信息密度
   ========================================================= */

:root {
  --ink: #0f1626;
  --ink-2: #35425a;
  --muted: #6b7a90;
  --faint: #93a0b4;
  --line: rgba(15, 26, 48, .085);
  --line-strong: rgba(15, 26, 48, .14);
  --glass: rgba(255, 255, 255, .80);
  --glass-strong: rgba(255, 255, 255, .93);
  --glass-soft: rgba(255, 255, 255, .62);
  --brand: #1657e8;
  --brand-ink: #0d3fb0;
  --brand-soft: rgba(22, 87, 232, .10);
  --teal: #00a894;
  --amber: #e08a00;
  --amber-soft: rgba(224, 138, 0, .12);
  --red: #dc3b45;
  --red-soft: rgba(220, 59, 69, .10);
  --green: #12855f;
  --green-soft: rgba(18, 133, 95, .11);
  --r-lg: 18px;
  --r-md: 13px;
  --r-sm: 9px;
  --shadow-lg: 0 24px 64px -20px rgba(10, 24, 50, .38), 0 2px 8px rgba(10, 24, 50, .06);
  --shadow-md: 0 12px 32px -14px rgba(10, 24, 50, .34), 0 1px 3px rgba(10, 24, 50, .06);
  --shadow-sm: 0 2px 8px rgba(10, 24, 50, .10);
  --ease: cubic-bezier(.22, .68, .32, 1);
  --rail-w: 66px;
  --panel-w: 388px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

/* 作者样式里的 display 会覆盖 hidden 属性，这里统一兜底 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0b1220;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--brand); text-decoration: none; }

.ic {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}
.ic.xs { width: 13px; height: 13px; stroke-width: 1.9; }

/* ---------- 地图容器 ---------- */
#cesiumContainer {
  position: fixed;
  inset: 0;
  background: radial-gradient(120% 100% at 50% 0%, #16233c 0%, #070c15 70%);
}
.cesium-widget canvas { outline: none; }
#cesiumContainer canvas.can-rotate { cursor: grab !important; }
.cesium-viewer-bottom { right: 10px !important; left: auto !important; bottom: 4px !important; }
.cesium-widget-credits {
  font-size: 9px !important;
  opacity: .62;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
  padding: 0 4px !important;
  pointer-events: auto;
}
.cesium-credit-textContainer, .cesium-credit-logoContainer { display: inline; }
.cesium-widget-credits img { max-height: 14px; vertical-align: middle; }

/* ---------- 启动遮罩 ---------- */
.boot {
  position: fixed; inset: 0; z-index: 9000;
  display: grid; place-content: center; justify-items: center; gap: 18px;
  background: radial-gradient(90% 70% at 50% 30%, #1a2742 0%, #080d16 72%);
  color: #dce6f7;
  transition: opacity .5s var(--ease), visibility .5s;
}
.boot.is-hidden { opacity: 0; visibility: hidden; }
.boot-mark { display: flex; align-items: center; gap: 12px; }
.boot-title {
  font-size: 26px; font-weight: 700; letter-spacing: .06em;
  background: linear-gradient(96deg, #8fc0ff, #4ff0d4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.boot-bar { width: 168px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.boot-bar i { display: block; width: 40%; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #3d8bff, #4ff0d4); animation: bootslide 1.15s infinite var(--ease); }
@keyframes bootslide { 0% { transform: translateX(-110%); } 100% { transform: translateX(300%); } }
.boot-tip { font-size: 12px; color: #8ea2c0; letter-spacing: .02em; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: fixed; top: 14px; left: 14px; right: 14px; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 10px;
  background: var(--glass-strong);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  cursor: pointer; user-select: none;
  transition: transform .2s var(--ease);
}
.brand:active { transform: scale(.985); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(136deg, #2f7bff 0%, #0f6ef0 48%, #00b39b 100%);
  box-shadow: 0 4px 12px -4px rgba(22, 87, 232, .7);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 16.5px; letter-spacing: .04em; font-weight: 750; }
.brand-text small { font-size: 10px; color: var(--muted); letter-spacing: .04em; margin-top: 2px; }

/* ---------- 顶栏菜单 ---------- */
.menubar {
  display: flex; align-items: center; gap: 2px;
  padding: 5px;
  background: var(--glass-strong);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  flex: none;
}
.menubar-btn {
  padding: 7px 11px; border: none; border-radius: var(--r-sm);
  background: none; color: var(--ink); cursor: pointer;
  font-size: 12.5px; font-weight: 500; letter-spacing: .02em; white-space: nowrap;
  transition: background .14s var(--ease), color .14s var(--ease);
}
.menubar-btn:hover { background: rgba(15,26,48,.055); }
.menubar-btn.is-open { background: var(--brand-soft); color: var(--brand); }

.search {
  position: relative;
  flex: 1 1 auto; max-width: 560px;
  display: flex; align-items: center; gap: 9px;
  height: 50px; padding: 0 14px;
  background: var(--glass-strong);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  transition: box-shadow .22s var(--ease), border-color .22s;
}
.search:focus-within { box-shadow: 0 0 0 3px rgba(22, 87, 232, .16), var(--shadow-md); border-color: rgba(22, 87, 232, .4); }
.search .ic { color: var(--muted); }
.search input {
  flex: 1; min-width: 0; border: none; background: none; outline: none;
  font-size: 14px; color: var(--ink);
}
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search kbd {
  font-size: 11px; color: var(--faint);
  border: 1px solid var(--line-strong); border-bottom-width: 2px;
  border-radius: 6px; padding: 1px 6px; background: #fff;
}

.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  max-height: 46vh; overflow: auto;
  background: var(--glass-strong);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  padding: 6px;
  animation: pop .18s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.99); } to { opacity: 1; transform: none; } }
.sr-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 10px; border-radius: 9px; cursor: pointer;
  transition: background .14s;
}
.sr-item:hover, .sr-item.is-active { background: var(--brand-soft); }
.sr-item .ic { color: var(--brand); margin-top: 2px; }
.sr-item b { font-weight: 600; font-size: 13.5px; display: block; }
.sr-item small { color: var(--muted); font-size: 11.5px; }
.sr-empty { padding: 16px 12px; color: var(--muted); font-size: 13px; text-align: center; }
.sr-head { padding: 6px 10px 4px; font-size: 11px; color: var(--faint); letter-spacing: .06em; }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.net-badge {
  display: flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px;
  background: var(--glass-strong); border-radius: 999px;
  box-shadow: var(--shadow-sm); font-size: 12px; color: var(--ink-2);
  border: 1px solid rgba(255,255,255,.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.net-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.net-badge.is-off i { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }

.icon-btn {
  width: 34px; height: 34px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--glass-strong);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background .16s, color .16s, transform .16s;
}
.icon-btn:hover { color: var(--brand); background: #fff; }
.icon-btn:active { transform: scale(.94); }
.icon-btn.ghost { background: transparent; border-color: transparent; box-shadow: none; width: 32px; height: 32px; }
.icon-btn.ghost:hover { background: rgba(15,26,48,.06); }
.icon-btn.sm { width: 26px; height: 26px; }
.icon-btn.sm .ic { width: 15px; height: 15px; }

/* ---------- 左侧工具轨 ---------- */
.rail {
  position: fixed; left: 14px; top: 50%; transform: translateY(-50%); z-index: 45;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: var(--rail-w); padding: 9px 0;
  background: var(--glass-strong);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
}
.rail-btn {
  position: relative;
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-2); font-size: 10px; letter-spacing: .03em;
  transition: background .16s, color .16s;
}
.rail-btn .ic { width: 21px; height: 21px; }
.rail-btn:hover { background: rgba(15,26,48,.055); color: var(--ink); }
.rail-btn.is-active { color: var(--brand); background: var(--brand-soft); }
.rail-btn.is-active::before {
  content: ""; position: absolute; left: -9px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 3px; background: var(--brand);
}
.rail-btn .dot {
  position: absolute; top: 8px; right: 9px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); border: 2px solid #fff;
}
.rail-sep { width: 26px; height: 1px; background: var(--line-strong); margin: 4px 0; }

/* ---------- 面板 ---------- */
.panel {
  position: fixed; left: calc(14px + var(--rail-w) + 12px);
  top: 78px; bottom: calc(46px + var(--safe-b)); z-index: 42;
  width: var(--panel-w);
  display: flex; flex-direction: column;
  background: var(--glass-strong);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px) saturate(1.7);
  -webkit-backdrop-filter: blur(22px) saturate(1.7);
  overflow: hidden;
  animation: slidein .26s var(--ease);
}
@keyframes slidein { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }

/* 面板右缘的拖拽把手：只改宽度，不改位置；双击复位 */
.panel-resize {
  position: absolute; top: 0; right: 0; bottom: 0; width: 10px;
  cursor: col-resize; touch-action: none;
}
.panel-resize::after {
  content: ""; position: absolute; top: 50%; right: 3px; transform: translateY(-50%);
  width: 3px; height: 40px; border-radius: 3px;
  background: rgba(15, 26, 48, .14);
  transition: background .15s var(--ease), height .15s var(--ease);
}
.panel-resize:hover::after, .panel-resize.is-dragging::after {
  background: var(--brand); height: 64px;
}

.panel-head {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 16px 14px 12px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-title { flex: 1; min-width: 0; }
.panel-title h2 { font-size: 16px; font-weight: 700; letter-spacing: .01em; }
.panel-title p { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.panel-body {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 14px 16px 22px;
}
.panel-body::-webkit-scrollbar { width: 9px; }
.panel-body::-webkit-scrollbar-thumb { background: rgba(15,26,48,.16); border-radius: 9px; border: 3px solid transparent; background-clip: content-box; }
.panel-body::-webkit-scrollbar-thumb:hover { background: rgba(15,26,48,.28); background-clip: content-box; }

/* 通用区块 */
.sec { margin-bottom: 20px; }
.sec:last-child { margin-bottom: 4px; }
.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 9px;
}
.sec-head h3 { font-size: 11.5px; font-weight: 650; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.sec-head .hint { font-size: 11px; color: var(--faint); }

/* 列表卡片 */
.list { display: flex; flex-direction: column; gap: 6px; }
.list-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 11px;
  border-radius: 11px;
  background: rgba(255,255,255,.6);
  border: 1px solid var(--line);
  transition: border-color .16s, background .16s, transform .16s;
}
.list-row:hover { background: #fff; border-color: var(--line-strong); }
.list-row.is-on { border-color: rgba(22,87,232,.42); background: rgba(22,87,232,.055); }
.row-main { flex: 1; min-width: 0; }
.row-main b { display: block; font-size: 13px; font-weight: 600; }
.row-main small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.row-ic {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
.row-ic.teal { background: rgba(0,168,148,.12); color: var(--teal); }
.row-ic.amber { background: var(--amber-soft); color: var(--amber); }
.row-ic .ic { width: 17px; height: 17px; }

/* 开关 */
.switch {
  position: relative; width: 38px; height: 22px; flex: none;
  border-radius: 999px; background: rgba(15,26,48,.16);
  transition: background .2s var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.24);
  transition: transform .2s var(--ease);
}
.switch.is-on { background: var(--brand); }
.switch.is-on::after { transform: translateX(16px); }

/* 分段控件 */
.seg {
  display: flex; gap: 3px; padding: 3px;
  background: rgba(15,26,48,.055); border-radius: 11px;
}
.seg button {
  flex: 1; height: 30px; border-radius: 8px;
  font-size: 12.5px; color: var(--ink-2); font-weight: 550;
  transition: background .16s, color .16s, box-shadow .16s;
  white-space: nowrap;
}
.seg button.is-on { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }
.seg.sm button { height: 26px; font-size: 12px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 15px; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 16px -8px rgba(22, 87, 232, .8);
  transition: background .16s, transform .16s, opacity .16s;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-ink); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: rgba(15,26,48,.055); color: var(--ink-2); box-shadow: none; }
.btn.ghost:hover { background: rgba(15,26,48,.1); color: var(--ink); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn .ic { width: 16px; height: 16px; }

/* 输入 */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 11px;
  border-radius: 10px; border: 1px solid var(--line-strong);
  background: #fff; font-size: 13px; outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.textarea { height: auto; min-height: 76px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(22,87,232,.55); box-shadow: 0 0 0 3px rgba(22,87,232,.13);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.field-row { display: flex; gap: 10px; }
.field-row > * { flex: 1; min-width: 0; }

/* 徽标 */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .01em;
  background: rgba(15,26,48,.06); color: var(--ink-2);
}
.pill.brand { background: var(--brand-soft); color: var(--brand); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.teal { background: rgba(0,168,148,.12); color: var(--teal); }

/* 空态 */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 34px 16px; text-align: center; color: var(--muted);
}
.empty .ic { width: 30px; height: 30px; color: var(--faint); stroke-width: 1.4; }
.empty b { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.empty small { font-size: 11.5px; line-height: 1.6; max-width: 250px; }

/* ---------- 任务 ---------- */
.task-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 14px;
}
.stat {
  padding: 10px 11px; border-radius: 12px;
  background: rgba(255,255,255,.66); border: 1px solid var(--line);
}
.stat b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.stat small { font-size: 10.5px; color: var(--muted); }
.stat.warn b { color: var(--amber); }
.stat.ok b { color: var(--green); }

.task-list { display: flex; flex-direction: column; gap: 7px; }
.task {
  position: relative;
  padding: 11px 12px 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
  transition: border-color .16s, box-shadow .16s, background .16s;
  overflow: hidden;
}
.task:hover { background: #fff; border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.task::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--faint);
}
.task[data-p="p0"]::before { background: var(--red); }
.task[data-p="p1"]::before { background: var(--amber); }
.task[data-p="p2"]::before { background: var(--brand); }
.task[data-p="p3"]::before { background: #b9c3d2; }
.task.is-done { opacity: .62; }
.task.is-done .task-title { text-decoration: line-through; color: var(--muted); }
.task-top { display: flex; align-items: flex-start; gap: 8px; }
.task-check {
  width: 18px; height: 18px; flex: none; margin-top: 1px;
  border-radius: 6px; border: 1.7px solid var(--line-strong); background: #fff;
  display: grid; place-items: center; color: #fff;
  transition: background .16s, border-color .16s;
}
.task-check .ic { width: 11px; height: 11px; stroke-width: 3; opacity: 0; }
.task.is-done .task-check { background: var(--green); border-color: var(--green); }
.task.is-done .task-check .ic { opacity: 1; }
.task-title { flex: 1; font-size: 13.5px; font-weight: 600; line-height: 1.42; word-break: break-word; }
.task-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; padding-left: 26px; align-items: center; }
.task-meta .pill { height: 20px; font-size: 10.5px; }
.task-site { display: inline-flex; align-items: center; gap: 3px; cursor: pointer; color: var(--brand); font-size: 10.5px; font-weight: 600; }
.task-site:hover { text-decoration: underline; }
.task-ops { display: flex; gap: 2px; opacity: 0; transition: opacity .16s; }
.task:hover .task-ops { opacity: 1; }
.task-ops .icon-btn { width: 26px; height: 26px; background: transparent; box-shadow: none; border: none; }
.task-ops .icon-btn .ic { width: 15px; height: 15px; }
.overdue { color: var(--red) !important; font-weight: 600; }

/* ---------- 数据 / DuckDB ---------- */
.dropzone {
  border: 1.6px dashed rgba(22,87,232,.34);
  border-radius: 14px; padding: 22px 16px;
  text-align: center; cursor: pointer;
  background: linear-gradient(180deg, rgba(22,87,232,.045), rgba(22,87,232,.015));
  transition: border-color .18s, background .18s, transform .18s;
}
.dropzone:hover, .dropzone.is-over {
  border-color: var(--brand);
  background: rgba(22,87,232,.09);
}
.dropzone.is-over { transform: scale(1.01); }
/* 程序化触发的文件选择框：不能用 hidden / display:none，Safari 会拒绝 click() */
.file-input-ghost {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  border: 0; opacity: 0; pointer-events: none;
}
.dropzone .ic { width: 26px; height: 26px; color: var(--brand); }
.dropzone b { display: block; margin-top: 8px; font-size: 13px; }
.dropzone small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); line-height: 1.6; }
.fmt-chips { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 10px; }
.fmt-chips span {
  font-size: 10px; padding: 2px 6px; border-radius: 5px;
  background: rgba(15,26,48,.06); color: var(--ink-2); font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.data-layer {
  padding: 10px 11px; border-radius: 11px;
  background: rgba(255,255,255,.72); border: 1px solid var(--line);
  display: flex; gap: 10px; align-items: center;
}
.data-layer b { font-size: 12.5px; display: block; word-break: break-all; }
.data-layer small { font-size: 10.5px; color: var(--muted); display: block; margin-top: 2px; }
.data-layer .grow { flex: 1; min-width: 0; }

.sql-out {
  max-height: 190px; overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; line-height: 1.6;
  background: #0f1626; color: #cfe0f8;
  border-radius: 10px; padding: 10px 11px;
  white-space: pre;
}
.sql-out table { border-collapse: collapse; font-size: 11px; }
.sql-out th, .sql-out td { padding: 3px 9px 3px 0; text-align: left; white-space: nowrap; }
.sql-out th { color: #7fa4d6; font-weight: 600; }

.engine-box {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border-radius: 10px;
  background: rgba(15,26,48,.045); font-size: 11.5px; color: var(--ink-2);
}
.engine-box .spinner { width: 14px; height: 14px; }

/* 恢复上次导入提示条（数据面板，IndexedDB 本地缓存） */
.restore-bar {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; margin-bottom: 9px; border-radius: 10px;
  background: rgba(31,111,235,.07);
  border: 1px solid rgba(31,111,235,.16);
  font-size: 11.5px; color: var(--ink-2);
}
.restore-bar .restore-text { flex: 1; min-width: 0; }
.restore-bar b { color: var(--brand); font-weight: 650; }
.restore-bar .icon-btn { flex: none; }

/* ---------- 网盘 ---------- */
.breadcrumb {
  display: flex; align-items: center; gap: 3px; flex-wrap: wrap;
  font-size: 12px; margin-bottom: 11px; color: var(--muted);
}
.breadcrumb button { color: var(--ink-2); padding: 2px 4px; border-radius: 5px; font-weight: 550; }
.breadcrumb button:hover { background: rgba(15,26,48,.06); color: var(--brand); }
.breadcrumb .sep { color: var(--faint); font-size: 10px; }

.file-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
  transition: background .14s;
  border: 1px solid transparent;
}
.file-row:hover { background: #fff; border-color: var(--line); }
.file-row .row-main b { font-weight: 550; font-size: 12.5px; }
.file-ops { display: flex; gap: 2px; opacity: 0; transition: opacity .14s; }
.file-row:hover .file-ops { opacity: 1; }
.file-ops .icon-btn { width: 26px; height: 26px; }

.quota {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 11px;
  background: rgba(0,168,148,.07); color: var(--ink-2);
  font-size: 11.5px; margin-bottom: 12px;
}
.quota .bar { flex: 1; height: 5px; border-radius: 5px; background: rgba(0,168,148,.18); overflow: hidden; }
.quota .bar i { display: block; height: 100%; background: var(--teal); border-radius: 5px; }

/* ---------- 测量卡 ---------- */
.measure-card {
  position: fixed; left: calc(14px + var(--rail-w) + 12px); top: 78px; z-index: 44;
  width: 262px; padding: 14px 15px;
  background: var(--glass-strong);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  animation: slidein .22s var(--ease);
}
.mc-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); }
.mc-value { font-size: 26px; font-weight: 720; letter-spacing: -.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.mc-meta { font-size: 11px; color: var(--muted); line-height: 1.5; }
.mc-actions { display: flex; gap: 6px; margin-top: 11px; }
.mc-actions .btn { flex: 1; }

/* ---------- 测距剖面 ---------- */
/* 剖面要够宽才看得出山脊山谷，出现时把卡片撑开 */
.measure-card.has-profile { width: 344px; }
.mp-wrap { margin-top: 10px; }
.mp-wrap svg { display: block; width: 100%; height: auto; }
.mp-axis { font-size: 9.5px; fill: var(--faint); font-variant-numeric: tabular-nums; }
.mp-meta {
  margin-top: 4px; display: flex; justify-content: space-between; gap: 8px;
  font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.mp-hint { margin-top: 3px; font-size: 10px; color: var(--faint); }
.mp-loading { padding: 12px 0 10px; font-size: 11px; color: var(--muted); }
.mp-error { padding: 10px 0; font-size: 11px; color: var(--red); line-height: 1.5; }

/* ---------- 右上指北针 ---------- */
/* 只指示北向：不可拖拽、不显示度数、不弹面板；相机转向东时指针逆时针转 */
.mini-compass {
  position: fixed; right: 16px; top: 78px; z-index: 41;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--glass-strong);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  pointer-events: none; user-select: none;
}
.mini-compass svg { display: block; width: 100%; height: 100%; }
#miniCompassNeedle { transform-origin: 20px 20px; transition: transform .1s linear; }

/* ---------- 状态栏 ---------- */
.statusbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: calc(40px + var(--safe-b)); padding: 0 16px var(--safe-b);
  background: linear-gradient(0deg, rgba(255,255,255,.92), rgba(255,255,255,.62));
  border-top: 1px solid rgba(255,255,255,.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 11px; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.sb-left, .sb-right { display: flex; align-items: center; gap: 16px; min-width: 0; }
.sb-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sb-item .ic { color: var(--muted); }
.sb-item b { font-weight: 650; }
#sbEngine { color: var(--faint); }

/* ---------- Toast ---------- */
.toasts {
  position: fixed; left: 50%; bottom: calc(58px + var(--safe-b)); transform: translateX(-50%);
  z-index: 9100; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 9px;
  min-height: 40px; padding: 9px 16px;
  border-radius: 12px;
  background: rgba(15, 22, 38, .93);
  color: #eaf1fb; font-size: 12.5px; font-weight: 500;
  box-shadow: 0 16px 40px -14px rgba(0,0,0,.6);
  backdrop-filter: blur(10px);
  animation: toastin .22s var(--ease);
  max-width: min(90vw, 520px);
}
.toast.is-out { animation: toastout .2s var(--ease) forwards; }
.toast .ic { width: 16px; height: 16px; }
.toast.ok .ic { color: #56e0b0; }
.toast.err .ic { color: #ff8b93; }
.toast.warn .ic { color: #ffc46b; }
@keyframes toastin { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastout { to { opacity: 0; transform: translateY(6px) scale(.98); } }

/* ---------- 弹窗 ---------- */
.modal-root { position: fixed; inset: 0; z-index: 9200; display: none; }
.modal-root.is-open { display: block; }
.modal-mask {
  position: absolute; inset: 0;
  background: rgba(10, 18, 32, .42);
  backdrop-filter: blur(3px);
  animation: fade .18s var(--ease);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 32px));
  max-height: min(84vh, 720px); overflow: auto;
  background: var(--glass-strong);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px) saturate(1.7);
  -webkit-backdrop-filter: blur(24px) saturate(1.7);
  animation: modalin .24s var(--ease);
  padding: 18px 20px 20px;
}
@keyframes modalin { from { opacity: 0; transform: translate(-50%, -48%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.modal h3 { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.modal .sub { font-size: 11.5px; color: var(--muted); margin-bottom: 16px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.modal .form-grid { display: flex; flex-direction: column; gap: 12px; }

/* 菜单 */
.menu {
  position: fixed; z-index: 9300;
  min-width: 186px; padding: 5px;
  background: var(--glass-strong);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  animation: pop .16s var(--ease);
}
.menu button {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 10px; border-radius: 8px;
  font-size: 12.5px; color: var(--ink-2); text-align: left;
}
.menu button:hover { background: var(--brand-soft); color: var(--brand); }
.menu button.danger:hover { background: var(--red-soft); color: var(--red); }
.menu .ic { width: 15px; height: 15px; }
.menu hr { border: none; border-top: 1px solid var(--line); margin: 4px 2px; }

/* 加载态 */
.spinner {
  width: 16px; height: 16px; flex: none;
  border: 2px solid rgba(15,26,48,.15);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-row { display: flex; align-items: center; gap: 9px; padding: 14px 2px; color: var(--muted); font-size: 12px; }

.skeleton {
  height: 44px; border-radius: 11px;
  background: linear-gradient(90deg, rgba(15,26,48,.05), rgba(15,26,48,.09), rgba(15,26,48,.05));
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
}
@keyframes shimmer { from { background-position: 140% 0; } to { background-position: -40% 0; } }

/* ---------- 账号与登录 ---------- */
.user-chip {
  display: flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px 0 6px;
  border-radius: 999px;
  background: var(--glass-strong);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 12px; color: var(--ink-2); font-weight: 600;
  transition: background .16s, color .16s;
}
.user-chip:hover { background: #fff; color: var(--brand); }
/* 登录后显示脱敏邮箱，域名可能很长：限宽省略，别把顶栏挤变形 */
#userLabel { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dot {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(15,26,48,.12);
  color: #fff; font-size: 10px; font-weight: 700;
  transition: background .2s var(--ease);
}
.user-chip.is-in .user-dot { background: linear-gradient(140deg, #2f7bff, #0a8f7a); }

.auth-gate {
  position: fixed; inset: 0; z-index: 9500;
  display: grid; place-items: center;
  padding: 16px;
  background: radial-gradient(95% 70% at 50% 18%, rgba(20,31,52,.72) 0%, rgba(8,13,22,.86) 70%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fade .25s var(--ease);
}
.auth-card {
  width: min(404px, calc(100vw - 24px));
  padding: 24px 24px 20px;
  background: var(--glass-strong);
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  /* 不用 modalin：那套关键帧带 translate(-50%,-50%)（给绝对定位的 .modal 用的），
     套在 grid 居中的卡片上会让它在动画期间整体向左上偏半个身位 */
  animation: authin .26s var(--ease);
  max-height: calc(100vh - 32px);
  overflow: auto;
}
@keyframes authin {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-mark {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(136deg, #2f7bff 0%, #0f6ef0 48%, #00b39b 100%);
  box-shadow: 0 4px 12px -4px rgba(22, 87, 232, .7);
}
.auth-brand b { display: block; font-size: 15px; letter-spacing: .04em; }
.auth-brand small { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.auth-card h1 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.auth-sub { font-size: 12px; color: var(--muted); margin: 6px 0 18px; line-height: 1.6; }
.auth-seg {
  display: flex; gap: 4px; padding: 3px; margin-bottom: 16px;
  background: rgba(15,26,48,.055); border-radius: 10px;
}
.auth-seg button {
  flex: 1; height: 30px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.auth-seg button:hover { color: var(--ink-2); }
.auth-seg button.is-on {
  background: #fff; color: var(--brand);
  box-shadow: 0 1px 3px rgba(10,24,50,.14);
}
.auth-pass-row { display: flex; gap: 6px; align-items: center; }
.auth-pass-row .input { flex: 1; min-width: 0; }
.auth-eye {
  flex: none; height: 38px; padding: 0 8px; border-radius: 8px;
  font-size: 11.5px; font-weight: 600; color: var(--muted);
}
.auth-eye:hover { background: rgba(15,26,48,.05); color: var(--ink); }
.auth-code-row { display: flex; gap: 8px; align-items: stretch; }
.auth-code-row .input { flex: 1; min-width: 0; }
.auth-code-row .btn { flex: none; height: 38px; min-width: 96px; }
.auth-err { font-size: 11.5px; color: var(--red); margin-top: 5px; line-height: 1.4; }
.auth-err:empty { display: none; }
.auth-link {
  display: block; width: 100%; margin-top: 8px;
  text-align: right; font-size: 11.5px; color: var(--brand);
}
.auth-link:hover { text-decoration: underline; }
.auth-submit { height: 42px; margin-top: 14px; font-size: 14px; }
.auth-switch {
  display: block; width: 100%; margin-top: 8px; padding: 6px;
  font-size: 12px; color: var(--muted); border-radius: 8px;
}
.auth-switch:hover { background: rgba(22,87,232,.06); color: var(--brand); }
.auth-skip {
  display: block; width: 100%; margin-top: 10px; padding: 8px;
  font-size: 12px; color: var(--muted); border-radius: 9px;
}
.auth-skip:hover { background: rgba(15,26,48,.05); color: var(--ink-2); }
.auth-foot { margin-top: 12px; text-align: center; font-size: 11px; color: var(--faint); }

/* 任务面板里的登录引导 */
.panel-login {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 30px 18px; text-align: center;
}
.panel-login .ic { width: 30px; height: 30px; color: var(--brand); }
.panel-login b { font-size: 13.5px; }
.panel-login small { font-size: 11.5px; color: var(--muted); line-height: 1.65; }
.panel-login .btn { margin-top: 4px; }

/* ---------- 响应式 ---------- */
@media (max-width: 880px) {
  :root { --panel-w: calc(100vw - 28px); }
  .brand-text small { display: none; }
  .search { max-width: none; }
  .search kbd { display: none; }
  .rail {
    left: 50%; top: auto; bottom: calc(46px + var(--safe-b));
    transform: translateX(-50%);
    flex-direction: row; width: auto; padding: 6px 8px; border-radius: 18px;
  }
  .rail-btn { width: 48px; height: 46px; }
  .rail-btn.is-active::before { left: 50%; top: auto; bottom: -6px; transform: translateX(-50%); width: 18px; height: 3px; }
  .rail-sep { width: 1px; height: 26px; margin: 0 4px; }
  .panel { left: 14px; right: 14px; width: auto; top: 74px; bottom: calc(112px + var(--safe-b)); }
  .measure-card { left: 14px; right: 14px; width: auto; top: 74px; }
  /* has-profile 特异性更高，这里必须显式压回自适应宽度 */
  .measure-card.has-profile { width: auto; }
  .mp-wrap svg { max-height: 96px; }
  .mini-compass { width: 34px; height: 34px; top: 70px; right: 12px; }
  .statusbar { height: calc(36px + var(--safe-b)); }
  .sb-right .sb-item:not(#sbScale) { display: none; }
  .top-actions .net-badge span { display: none; }
  /* 窄屏靠左侧图标轨与悬浮面板，菜单栏收起来避免把搜索框挤没 */
  .menubar { display: none; }
}
@media (max-width: 560px) {
  .brand-text { display: none; }
  .brand { padding: 8px; }
  .sb-left .sb-item:not(#sbCursor) { display: none; }
  #userLabel { max-width: 84px; }
}

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

/* ---------- 云端数据集 ---------- */
.cloud-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cloud-switch {
  margin-left: auto; display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--muted); cursor: pointer; user-select: none;
}
.cloud-switch input { accent-color: var(--brand); width: 14px; height: 14px; }
.cloud-note {
  padding: 10px 12px; border-radius: 10px;
  background: rgba(15, 26, 48, .045);
  font-size: 11.5px; line-height: 1.65; color: var(--muted);
}
.cloud-note strong { color: var(--ink-2); font-weight: 650; }
.cloud-progress {
  height: 4px; border-radius: 999px; overflow: hidden;
  background: rgba(15, 26, 48, .08); margin-top: 6px;
}
.cloud-progress i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--teal));
  transition: width .2s ease;
}

/* ---------- 工参导入 ---------- */
.gc-entry {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; cursor: pointer;
  background: linear-gradient(180deg, rgba(22,87,232,.055), rgba(22,87,232,.02));
  border: 1px solid rgba(22,87,232,.22); border-radius: var(--r-md);
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.gc-entry:hover { border-color: rgba(22,87,232,.46); transform: translateY(-1px); }
.gc-entry-ic {
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(22,87,232,.12); color: var(--brand);
}
.gc-entry-ic .ic { width: 16px; height: 16px; }
.gc-entry-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gc-entry-text b { font-size: 12.5px; font-weight: 650; color: var(--ink); }
.gc-entry-text small { font-size: 11px; color: var(--muted); }

.gc-modal { display: flex; flex-direction: column; padding: 0; overflow: hidden; max-height: min(88vh, 780px); }
.gc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px 10px; border-bottom: 1px solid var(--line); }
.gc-head .sub { margin-bottom: 0; }
.gc-body { flex: 1; min-height: 0; overflow: auto; padding: 14px 20px 6px; }
.gc-section { margin-bottom: 14px; }
.gc-label { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: .02em; margin-bottom: 8px; }

.gc-sheets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.gc-sheet {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 11px; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 10px;
  font: inherit; transition: border-color .16s var(--ease), background .16s var(--ease);
}
.gc-sheet:hover { border-color: rgba(22,87,232,.42); }
.gc-sheet.is-on { border-color: rgba(22,87,232,.55); background: rgba(22,87,232,.06); }
.gc-sheet b { font-size: 12.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-sheet-hint { flex: none; font-size: 10.5px; color: var(--faint); }

.gc-detail { border-top: 1px dashed var(--line-strong); padding-top: 12px; }
.gc-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.gc-summary .hint { font-size: 11px; color: var(--faint); margin-left: auto; }

.gc-tablewrap { overflow: auto; max-height: 208px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; }
.gc-tablewrap table { border-collapse: separate; border-spacing: 0; font-size: 11.5px; white-space: nowrap; }
.gc-tablewrap th {
  position: sticky; top: 0; z-index: 1;
  background: #f4f6fa; color: var(--ink-2); font-weight: 600; text-align: left;
  padding: 6px 9px; border-bottom: 1px solid var(--line-strong);
}
.gc-tablewrap th i { display: block; font-style: normal; font-weight: 400; font-size: 10px; color: var(--faint); margin-top: 1px; }
.gc-tablewrap td { padding: 5px 9px; color: var(--ink-2); border-bottom: 1px solid var(--line); max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.gc-tablewrap tr:last-child td { border-bottom: 0; }

.gc-filter { margin-top: 14px; }
.gc-filter-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.gc-filter-head .gc-label { margin-bottom: 0; }
.gc-filter-head .btn { display: inline-flex; align-items: center; gap: 4px; }
.gc-conds { display: flex; flex-direction: column; gap: 6px; }
.gc-cond {
  display: grid; grid-template-columns: 20px minmax(0, 1.5fr) 96px minmax(0, 1fr) minmax(0, 1fr) 28px;
  align-items: center; gap: 6px;
  padding: 6px; background: rgba(15,26,48,.03); border-radius: 9px;
}
.gc-cond-idx { font-size: 10.5px; color: var(--faint); text-align: center; }
.gc-cond .select, .gc-cond .input { height: 30px; font-size: 11.5px; padding: 0 8px; }
.gc-cond-hint { grid-column: 1 / -1; font-size: 10.5px; color: var(--faint); padding-left: 26px; }
.gc-empty { font-size: 11.5px; color: var(--faint); padding: 8px 2px; }

.gc-hits { display: flex; align-items: center; gap: 8px; margin-top: 10px; min-height: 22px; }
.gc-hit-text, .gc-err-inline { font-size: 11.5px; color: var(--red); }
.gc-hit-bar { flex: 1; height: 5px; border-radius: 3px; background: rgba(15,26,48,.08); overflow: hidden; }
.gc-hit-bar i { display: block; height: 100%; background: var(--teal); border-radius: 3px; transition: width .2s var(--ease); }

.gc-err { font-size: 12px; color: var(--red); line-height: 1.6; padding: 6px 2px; }
.gc-status { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); flex: 1; min-width: 0; }
.gc-actions { border-top: 1px solid var(--line); padding: 12px 20px 16px; margin-top: 0; justify-content: space-between; align-items: center; }
.gc-actions-right { display: flex; gap: 8px; }

@media (max-width: 620px) {
  .gc-sheets { grid-template-columns: minmax(0, 1fr); }
  .gc-cond { grid-template-columns: 20px minmax(0, 1fr) 84px 28px; }
  .gc-cond .input { grid-column: span 2; }
}
.gc-warn { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11.5px; color: var(--amber); }

/* =========================================================
   系统级打磨（全局一致性）
   ========================================================= */

/* 键盘焦点可见：鼠标点击不出现，Tab 导航才出现 */
:focus-visible { outline: 2px solid rgba(22, 87, 232, .6); outline-offset: 2px; border-radius: 4px; }
/* 文本输入用自己的 focus 环（border + box-shadow），不再叠加 outline */
.input:focus-visible, .select:focus-visible, .textarea:focus-visible, .search input:focus-visible { outline: none; }

/* 表单原子控件统一换肤（此前只有 cloud-switch 一处设置了 accent） */
input[type='checkbox'], input[type='radio'] { accent-color: var(--brand); width: 15px; height: 15px; flex: none; }
input[type='checkbox'], input[type='radio'] { cursor: pointer; }
input[type='checkbox']:disabled, input[type='radio']:disabled { cursor: not-allowed; opacity: .5; }

/* 取色器：去掉原生黑边和内衬，圆角对齐输入控件 */
input[type='color'] {
  height: 32px; padding: 3px; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 8px; background: #fff;
}
input[type='color']:disabled { cursor: not-allowed; opacity: .5; }
input[type='color']::-webkit-color-swatch-wrapper { padding: 0; }
input[type='color']::-webkit-color-swatch { border: none; border-radius: 5px; }
input[type='color']::-moz-color-swatch { border: none; border-radius: 5px; }

/* 滑杆：轨道 4px + 品牌色进度（--fill 由 ui.js 委托写入）+ 白底品牌描边圆钮 */
input[type='range'] {
  -webkit-appearance: none; appearance: none;
  height: 24px; margin: 0; background: none;
}
input[type='range']:disabled { cursor: not-allowed; }
input[type='range']::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--brand) var(--fill, 50%), rgba(15, 26, 48, .16) var(--fill, 50%));
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px; margin-top: -5.5px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand);
  box-shadow: 0 1px 4px rgba(10, 24, 50, .3);
  transition: transform .12s var(--ease);
}
input[type='range']::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type='range']:disabled::-webkit-slider-runnable-track { background: rgba(15, 26, 48, .12); }
input[type='range']:disabled::-webkit-slider-thumb { border-color: var(--faint); box-shadow: none; }
input[type='range']::-moz-range-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--brand) var(--fill, 50%), rgba(15, 26, 48, .16) var(--fill, 50%));
}
input[type='range']::-moz-range-thumb {
  width: 11px; height: 11px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand);
  box-shadow: 0 1px 4px rgba(10, 24, 50, .3);
}
input[type='range']:disabled::-moz-range-track { background: rgba(15, 26, 48, .12); }
input[type='range']:disabled::-moz-range-thumb { border-color: var(--faint); box-shadow: none; }

/* 下拉：收掉原生箭头，画一支与图标语言一致的细 chevron */
.select {
  -webkit-appearance: none; appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a90' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}
.select:disabled { cursor: not-allowed; opacity: .55; }

/* 全局滚动条：与 .panel-body 一致的细圆角样式 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background-color: rgba(15, 26, 48, .16);
  border-radius: 9px; border: 3px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(15, 26, 48, .3); }

/* 危险操作按钮：实底红，替代此前「ghost + 内联红字」的临时做法 */
.btn.danger { background: var(--red); box-shadow: 0 6px 16px -8px rgba(220, 59, 69, .8); }
.btn.danger:hover { background: #c22e37; }
.btn.danger:disabled { box-shadow: none; }
