@font-face {
  font-family: "CF UI";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/cf-ui.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --text: #192d35;
  --muted: #78868c;
  --line: #e5ebed;
  --primary: #12877c;
  --primary-hover: #0c7167;
  --ok: #138575;
  --danger: #d05b5b;
  --accent: #12877c;
  --sidebar-width: 208px;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", "CF UI", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "CF UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #68c5b9; outline-offset: 3px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: #45a89b; box-shadow: 0 0 0 3px #12877c13; }
::selection { background: #c9eee7; }
[hidden], .hidden { display: none !important; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

.app-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); z-index: 20; display: flex; flex-direction: column; padding: 27px 16px 18px; background: #162c29; color: #bdcbc7; }
.brand { display: flex; gap: 11px; align-items: center; padding: 0 9px 33px; color: #f0f8f5; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; background: #35b19a; border-radius: 11px; color: #102f29; }
.brand-mark .icon { width: 25px; height: 25px; stroke-width: 1.9; }
.brand strong { display: block; font-size: 17px; font-weight: 650; letter-spacing: -.4px; }
.brand small { display: block; margin-top: 1px; color: #829e97; font: 9px/1.4 var(--mono); letter-spacing: 1.8px; }
.nav-label { padding: 0 12px; margin-bottom: 11px; color: #6d8b83; font-size: 10px; font-weight: 600; letter-spacing: 2px; }
.tabbar { display: grid; gap: 7px; }
.tab-btn, .nav-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid transparent; border-radius: 8px; background: transparent; text-align: left; color: #aebfb9; font-size: 13px; font-weight: 550; }
.tab-btn:hover, .nav-link:hover { background: #ffffff08; color: #f1f8f5; }
.tab-btn.active { background: #244c42; border-color: #316352; color: #95e6c9; }
.tab-btn.active::after { content: ""; width: 5px; height: 5px; margin-left: auto; background: #85d6b7; border-radius: 50%; }
.nav-link { margin-top: 26px; color: #829d93; }
.nav-link.admin-entry { margin-top: 6px; }
.admin-entry-link { display: none; }
.sidebar-bottom { margin-top: auto; }
.sidebar-guide { padding: 16px; border: 1px solid #ffffff0b; border-radius: 11px; background: #ffffff03; }
.sidebar-guide strong { color: #a4bbb0; font-size: 11px; font-weight: 500; }
.guide-step { display: flex; align-items: center; gap: 10px; margin-top: 15px; color: #86a196; font-size: 11px; }
.guide-step span { display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid #39584c; border-radius: 6px; color: #a5c5b2; font: 10px var(--mono); }
.sidebar-foot { display: flex; align-items: center; gap: 8px; margin: 22px 10px 0; color: #709384; font: 10px var(--mono); letter-spacing: .5px; }
.sidebar-foot i { width: 6px; height: 6px; border-radius: 50%; background: #61b095; }

.wrap { min-width: 0; margin-left: var(--sidebar-width); }
.topbar { height: 64px; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 30px; background: #fffffff5; border-bottom: 1px solid var(--line); }
.breadcrumbs { display: flex; align-items: center; gap: 13px; color: #859097; font-size: 12px; }
.breadcrumbs .icon { width: 15px; height: 15px; color: #b1babd; }
.breadcrumbs strong { color: #41555c; font-weight: 500; }
.topbar-meta { display: flex; gap: 18px; align-items: center; color: #8b969c; font-size: 11px; }
.local-badge { display: flex; align-items: center; gap: 7px; color: #6a7c7c; }
.local-badge .icon { width: 14px; height: 14px; }
.content { width: 100%; max-width: 1540px; padding: 27px 30px 18px; margin: 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 25px; line-height: 1.35; font-weight: 650; letter-spacing: -.7px; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.page-tag { display: inline-flex; gap: 7px; align-items: center; padding: 6px 10px; border: 1px solid #dbe8e4; border-radius: 6px; color: #67887e; font: 11px var(--mono); background: #f0f6f3; white-space: nowrap; }
.page-tag .icon { width: 14px; height: 14px; }
.overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.overview-card { position: relative; min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.overview-card .metric-icon { position: absolute; right: 17px; top: 16px; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; background: #f1f5f6; color: #91a2a7; }
.overview-card .metric-icon .icon { width: 16px; height: 16px; }
.overview-card.metric-good .metric-icon { background: #eaf6f0; color: #51a58c; }
.overview-card.metric-latency .metric-icon { background: #eff3fa; color: #8199c0; }
.metric-label { color: #7b8b92; font-size: 11px; }
.metric-value { display: flex; gap: 6px; align-items: baseline; margin-top: 5px; line-height: 1.3; }
.metric-value strong { font: 600 27px/1.3 var(--mono); letter-spacing: -1.5px; }
.metric-value small { color: #a4aeb3; font-size: 11px; }
.metric-good .metric-value strong { color: var(--primary); }
.metric-note { margin-top: 6px; color: #98a3a9; font-size: 10px; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 282px; gap: 18px; align-items: start; }
.workspace > * { min-width: 0; }
.page { display: none; }
.page.active { display: block; }
.panel, .library-sidebar, .library-main { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.panel { padding: 20px; }
.section-head, .output-head, .record-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-head { margin-bottom: 17px; }
.section-head h2, .section-head h3 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.2px; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.section-title { display: flex; align-items: center; gap: 9px; }
.step-number { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; background: #edf7f3; color: #619889; font: 11px var(--mono); }
.subtle-label { color: #a0adb3; font: 10px var(--mono); letter-spacing: 1px; }
.extraction-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.extraction-grid > .panel { height: 100%; }
.input-panel { display: flex; flex-direction: column; }
label { display: block; color: #546870; font-size: 11px; font-weight: 550; }
input, textarea, select { width: 100%; min-width: 0; margin-top: 6px; padding: 9px 11px; color: #344c56; background: #fff; border: 1px solid #dfe6e9; border-radius: 6px; line-height: 1.5; font-size: 12px; }
select { min-height: 37px; cursor: pointer; }
input::placeholder, textarea::placeholder { color: #a4afb4; }
input:disabled, select:disabled, textarea:disabled { background: #f6f8f9; color: #84949b; cursor: not-allowed; }
textarea { resize: vertical; min-height: 110px; line-height: 1.8; font-family: var(--mono); }
.source-picker { margin-bottom: 14px; }
.file-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 195px; padding: 20px 13px; border: 1px dashed #bfd2ce; border-radius: 8px; background: #f8fbfa; text-align: center; }
.file-drop.drag-over { border-color: var(--primary); background: #edf8f4; box-shadow: 0 0 0 3px #12877c13; }
.upload-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 10px; border: 1px solid #e1ebe7; border-radius: 11px; background: #fff; color: #6c9c8e; }
.upload-icon .icon { width: 21px; height: 21px; }
.file-drop strong { color: #58736b; font-size: 12px; font-weight: 550; }
.file-drop > small { margin: 4px 0 11px; color: #91a69d; font-size: 10px; font-weight: 400; }
input[type="file"] { max-width: 100%; padding: 5px; background: transparent; border-color: #e3ebe8; font-size: 10px; font-weight: 400; }
input::file-selector-button { margin-right: 8px; padding: 5px 9px; color: #527a6a; background: #edf5f1; border: 0; border-radius: 4px; font: inherit; cursor: pointer; }
.file-drop .hint { width: 100%; margin-bottom: 0; font-size: 10px; color: #94a69e; overflow-wrap: anywhere; }
#customBox textarea { min-height: 170px; }
.tool-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 9px; margin-top: 11px; }
.tool-row:has(> label[hidden]) { display: none; }
.actionbar, .toolbar, .record-actions, .modal-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.actionbar { margin-top: auto; padding-top: 17px; }
.btn, .copy-btn, .view-chip { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 35px; padding: 8px 12px; border: 1px solid transparent; border-radius: 6px; background: var(--primary); color: #fff; font-size: 11px; line-height: 1.5; font-weight: 550; white-space: nowrap; }
.btn .icon { width: 14px; height: 14px; }
.btn:hover { background: var(--primary-hover); }
.btn.secondary { background: #304e4b; }
.btn.secondary:hover { background: #25423e; }
.btn.ghost, .copy-btn, .view-chip { color: #687d82; border-color: #dfe7e9; background: #fff; }
.btn.ghost:hover, .copy-btn:hover, .view-chip:hover { background: #f3f8f6; border-color: #b8d1c7; color: #39755f; }
.btn.danger { background: #c95c5c; }
.btn.danger:hover { background: #b34747; }
.btn.ghost.danger { color: #b67474; border-color: #ecdada; background: #fff; }
.btn:disabled, .copy-btn:disabled, .view-chip:disabled { opacity: .43; cursor: not-allowed; }
.btn.small { min-height: 29px; padding: 5px 9px; font-size: 10px; }
.copy-btn { min-height: 28px; padding: 4px 9px; font-size: 10px; }
.hint { margin: 9px 0 0; color: #8d9ba1; font-size: 10px; line-height: 1.75; }
.input-note { margin-top: 10px; }
.error, .ok { margin: 12px 0 0; padding: 9px 11px; border-radius: 6px; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.error { color: #a95656; background: #fbefef; border: 1px solid #f4dddd; }
.ok { color: #4c8c74; background: #f0f8f3; border: 1px solid #dceee3; }
.error:empty, .ok:empty, .hint:empty { display: none; }
.count-pill { display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px; color: #7f9894; background: #eff5f3; border-radius: 5px; font: 10px var(--mono); }
.output-head { margin-bottom: 11px; font-size: 11px; font-weight: 550; }
.candidate-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 262px; gap: 11px; padding: 22px; background: #f7f9fa; border: 1px solid #edf1f3; border-radius: 7px; text-align: center; }
.candidate-empty .icon { width: 30px; height: 30px; color: #bcccd0; stroke-width: 1.2; }
.candidate-empty strong { font-size: 11px; color: #8c9ea6; font-weight: 500; }
.candidate-empty p { max-width: 190px; margin: 0; color: #a6b2b8; font-size: 10px; }
#outIps { min-height: 262px; margin: 0; padding: 13px; background: #f7f9fa; border-color: #e9eef0; color: #4f6773; font-size: 12px; line-height: 1.95; tab-size: 2; }
.output-foot { display: flex; align-items: center; gap: 6px; margin-top: 13px; color: #96a6ab; font-size: 10px; }
.output-foot .icon { width: 13px; height: 13px; color: #7fa499; }

.node-generation { margin-top: 15px; padding: 0; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.node-generation > summary { display: flex; gap: 9px; align-items: center; padding: 15px 19px; color: #71838b; font-size: 11px; }
.node-generation > summary .icon { width: 15px; height: 15px; color: #94a6ac; }
.node-generation > summary small { padding: 1px 5px; border: 1px solid #e7edef; border-radius: 3px; color: #a2aeb4; font-size: 9px; }
.node-generation > summary::after, .probe-settings > summary::after { content: ""; width: 6px; height: 6px; margin-left: auto; border-right: 1.5px solid #92a6ac; border-bottom: 1.5px solid #92a6ac; transform: rotate(45deg); transition: transform .15s; }
details[open] > summary::after { transform: rotate(225deg); }
.node-content { padding: 0 20px 20px; border-top: 1px solid var(--line); }
.tool-grid, .outputs, .compare-box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.tool-grid { margin: 15px 0; }
.outputs { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; }
.output-card { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #f9fbfb; }
.output-card textarea { margin: 0; min-height: 180px; font-size: 11px; }

.connection-panel { padding: 20px; }
.connection-panel .section-head { margin-bottom: 8px; }
.connection-panel .section-title .icon { width: 16px; height: 16px; color: #7b9690; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 5px; background: #f1f4f5; color: #90a0a5; font-size: 9px; white-space: nowrap; }
.status-pill::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.status-pill.good { color: #4e977d; background: #eaf6ee; }
.status-pill.bad { color: #b47373; background: #fbefef; }
.status-pill.running { color: #328c80; background: #e5f4ef; }
#proxyStatus { margin: 8px 0 12px; color: #96a5aa; font: 10px/1.7 var(--mono); overflow-wrap: anywhere; }
.connection-controls { margin-top: 19px; padding-top: 17px; border-top: 1px solid var(--line); }
.control-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 12px; }
.label-note { float: right; color: #a5b2b7; font: 9px var(--mono); }
.probe-settings { margin: 16px 0 0; border-top: 1px solid var(--line); }
.probe-settings > summary { display: flex; align-items: center; gap: 7px; padding: 13px 0; color: #889aa1; font-size: 10px; }
.probe-settings > summary .icon { width: 13px; height: 13px; }
.probe-grid { display: grid; gap: 11px; }
.websocket-settings { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); min-width: 0; }
.websocket-settings > .check { margin-bottom: 14px; font-size: 11px; }
.websocket-settings > .btn { margin-top: 12px; max-width: 100%; white-space: normal; }
.websocket-settings > .hint { margin: 10px 0 0; line-height: 1.8; }
.ws-check { font-size: 10px; white-space: nowrap; color: #9aaab1; }
.ws-check.good { color: #128f86; }
.ws-check.bad { color: #bb7070; }
.check { display: inline-flex; align-items: center; gap: 7px; color: #7e8f98; font-size: 10px; font-weight: 400; }
.check input, .record-select { flex: 0 0 auto; width: 13px; height: 13px; margin: 0; accent-color: var(--primary); }
.probe-settings .check { margin-top: 12px; }
.connection-note { margin-top: 1px; padding: 10px 11px; border: 1px solid #eaf0f2; border-radius: 6px; background: #f6f9fa; color: #98a8ae; font-size: 10px; line-height: 1.8; }
.connection-note strong { font-weight: 500; color: #73968c; }
body[data-page="library"] .workspace { grid-template-columns: 1fr; }
body[data-page="library"] .connection-panel { grid-row: 1; display: grid; grid-template-columns: 270px minmax(0, 1fr); column-gap: 24px; }
body[data-page="library"] .connection-controls { margin: 0; padding: 0 0 0 23px; border-top: 0; border-left: 1px solid var(--line); display: grid; grid-template-columns: 1.4fr 1fr; align-items: end; gap: 14px; }
body[data-page="library"] .control-pair { margin: 0; }
body[data-page="library"] .probe-settings, body[data-page="library"] .connection-note, body[data-page="library"] .websocket-settings { grid-column: 1 / -1; }
body[data-page="library"] .probe-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.result-panel { margin-top: 20px; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.results-head .section-head { margin: 0; }
.results-head h2 .icon { width: 17px; height: 17px; color: #829b95; margin-right: 6px; }
.probe-toolbar select { width: auto; max-width: 290px; min-height: 33px; margin-top: 0; padding: 7px 24px 7px 10px; font-size: 10px; }
.task-toolbar { justify-content: flex-end; }
.progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 7px; border: 1px solid #eaf0f0; border-bottom: 0; border-radius: 7px 7px 0 0; background: #f8fbfa; }
.progress-head .hint { margin: 0; color: #82968f; font-size: 10px; }
#probeProgressPercent { color: #88a99c; font: 10px var(--mono); }
.progress-track { padding: 0 12px 11px; border: 1px solid #eaf0f0; border-top: 0; border-radius: 0 0 7px 7px; background: #f8fbfa; }
#probeProgress { display: block; width: 100%; height: 5px; border: 0; border-radius: 10px; background: #e5efea; accent-color: var(--primary); overflow: hidden; }
#probeProgress::-webkit-progress-bar { border-radius: 10px; background: #e5efea; }
#probeProgress::-webkit-progress-value { border-radius: 10px; background: #50ac91; transition: width .3s; }
#probeProgress::-moz-progress-bar { border-radius: 10px; background: #50ac91; }
.result-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 17px 0 13px; border-bottom: 1px solid var(--line); }
.result-filters { flex-wrap: wrap; }
.result-filter-check { min-height: 33px; padding: 0 2px; }
.result-actions { justify-content: flex-end; }
.result-actions .btn { min-height: 32px; padding: 6px 9px; font-size: 10px; }
.import-actions { display: flex; align-items: center; gap: 6px; }
.import-actions select { max-width: 146px; }
#probeMessage { font-size: 10px; }
.probe-results { overflow: auto; max-height: 510px; }
.probe-results > .hint { padding-bottom: 8px; color: #a1adb2; font-size: 9px; }
.probe-table { width: 100%; border-collapse: collapse; font-size: 11px; white-space: nowrap; }
.probe-table thead { position: sticky; top: 0; z-index: 1; background: #f7f9fa; }
.probe-table th { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; color: #8c9ca5; font-size: 10px; font-weight: 500; }
.probe-table td { padding: 13px; border-bottom: 1px solid #edf1f3; color: #83949d; }
.probe-table tbody tr:hover { background: #f8fbfa; }
.probe-table tbody tr:last-child td { border-bottom: 0; }
.probe-table .endpoint-cell { font: 11px var(--mono); color: #46626d; }
.probe-table small { display: block; max-width: 300px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; color: #ad9393; font-size: 9px; }
.probe-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 5px; font-size: 9px; line-height: 1.6; white-space: nowrap; }
.probe-badge::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.probe-badge.good { color: #388d73; background: #e8f6ee; }
.probe-badge.bad { color: #b97575; background: #fbeeee; }
.probe-badge.neutral { color: #96a4ac; background: #f0f3f5; }
.mode-badge { color: #90a2b2; font: 9px var(--mono); }
.latency-value { font: 11px var(--mono); color: #668498; }
.latency-value.fast { color: #4a9a80; }
.latency-value.slow { color: #b49967; }
.latency-value small { display: inline; margin-left: 3px; color: #9eafb7; font-size: 9px; }
.retry-note { display: inline-block; margin-left: 5px; color: #a7b2b7; font-size: 9px; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 35px 18px; color: #9aa9b0; text-align: center; font-size: 11px; line-height: 1.8; }
.empty .icon { width: 31px; height: 31px; margin-bottom: 2px; color: #b5c9c5; stroke-width: 1.2; }
.empty strong { color: #8da3a5; font-size: 12px; font-weight: 500; }
.empty p { margin: 0; color: #acb8bd; font-size: 10px; }
.result-empty { min-height: 178px; }

.library-shell { display: grid; grid-template-columns: 223px minmax(0, 1fr); gap: 18px; }
.library-sidebar, .library-main { padding: 20px; }
.view-switch { display: flex; gap: 5px; padding: 4px; background: #f4f7f6; border: 1px solid #ecf0ee; border-radius: 7px; }
.view-chip { flex: 1; padding: 6px 5px; min-height: 30px; background: transparent; border-color: transparent; font-size: 10px; }
.view-chip.active { background: #fff; color: #4c8874; border-color: #e3ebe6; box-shadow: 0 2px 3px #123b2210; }
.group-create { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; margin: 16px 0; }
.group-create input { margin-top: 0; font-size: 10px; }
.group-create .btn { padding: 6px 9px; }
.group-list { max-height: 430px; overflow: auto; }
.group-list .empty { padding: 25px 8px; }
.group-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 12px 10px; border: 1px solid transparent; border-radius: 7px; text-align: left; color: #5e787a; background: transparent; }
.group-card + .group-card { margin-top: 5px; }
.group-card:hover { background: #f6f9f7; }
.group-card.active { border-color: #d5e8dc; background: #f0f8f2; }
.group-card > div:first-child { min-width: 0; }
.group-card strong { display: block; overflow-wrap: anywhere; font-size: 11px; font-weight: 550; }
.group-card span { display: block; margin-top: 4px; color: #a4b2b4; font-size: 9px; }
.pill, .record-group { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; padding: 3px 6px; border-radius: 4px; background: #eaf2ee; color: #6a9784; font-size: 9px; }
.side-card { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.side-card + .side-card { margin-top: 14px; }
.side-card strong { display: block; color: #8da39b; font-size: 10px; font-weight: 500; }
.side-card p { margin: 5px 0 0; color: #a7b4b0; font-size: 10px; line-height: 1.9; }
.stats { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 12px; margin: 20px 0; }
.stat-card { padding: 12px 14px; border: 1px solid #eaf0f1; border-radius: 7px; background: #f9fbfb; }
.stat-card strong { display: block; color: #9aaaae; font-size: 10px; font-weight: 400; }
.stat-card span { display: block; margin-top: 5px; color: #66838a; font: 500 21px/1.5 var(--mono); overflow-wrap: anywhere; }
#groupNameStat { padding-top: 7px; font-family: inherit; font-size: 11px; font-weight: 500; line-height: 1.7; }
#importTextarea { min-height: 92px; margin-bottom: 10px; font-size: 10px; }
.library-main > .probe-toolbar { margin: 19px 0; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.library-main > .probe-toolbar select { max-width: 220px; }
.records-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.search-bar { display: flex; gap: 6px; flex: 1; max-width: 380px; }
.search-bar input { width: 0; flex: 1; margin: 0; }
.records-head { display: flex; gap: 10px; font-size: 10px; color: #a3b0b6; }
.records-head > span:first-child { color: #7b929a; }
.records-body { display: grid; gap: 10px; max-height: 680px; overflow: auto; }
.record-row { padding: 15px; border: 1px solid #e7eef0; border-radius: 8px; }
.record-head { align-items: flex-start; flex-wrap: wrap; }
.record-main { min-width: 0; }
.record-main strong { display: flex; align-items: center; color: #4d6d77; font: 500 13px var(--mono); overflow-wrap: anywhere; }
.record-select { margin-right: 8px; }
.record-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; color: #a2b0b6; font-size: 9px; }
.record-note { margin-top: 10px; padding-top: 9px; border-top: 1px solid #eef2f3; color: #a1b1b5; font-size: 10px; overflow-wrap: anywhere; }
.record-actions { gap: 5px; }
.fav-btn.active { color: #b39962; background: #faf7ec; border-color: #eee5c8; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; margin: 22px 2px 0; color: #adb8bd; font: 9px var(--mono); letter-spacing: .8px; }

.overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 22px; background: #152d2c73; }
.note-modal, .confirm-modal, .prompt-modal { width: min(440px, 100%); max-height: 90dvh; overflow: auto; padding: 26px; border: 1px solid #dbe8e2; border-radius: 14px; background: #fff; box-shadow: 0 22px 80px #10262335; }
.confirm-modal { width: min(760px, 100%); }
.compare-card { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: #f8faf9; }
.compare-card strong { color: #7c9790; font-size: 11px; font-weight: 500; }
.compare-card textarea { margin-top: 9px; font-size: 10px; }

@media (min-width: 1800px) { .content { padding-top: 32px; } .panel { padding: 23px; } .workspace { grid-template-columns: minmax(0, 1fr) 310px; } .candidate-empty, #outIps { min-height: 290px; } }
@media (max-width: 1250px) { :root { --sidebar-width: 184px; } .topbar { padding-inline: 24px; } .content { padding-inline: 24px; } .workspace { grid-template-columns: minmax(0, 1fr) 255px; gap: 15px; } .extraction-grid { grid-template-columns: 1fr; gap: 15px; } .candidates-panel #outIps, .candidate-empty { min-height: 175px; } .file-drop { min-height: 170px; } .connection-panel { position: sticky; top: 82px; } }
@media (max-width: 1020px) { .workspace { grid-template-columns: 1fr; } .extraction-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .connection-panel, body[data-page="library"] .connection-panel { position: static; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 22px; } .connection-controls, body[data-page="library"] .connection-controls { margin: 0; padding: 0 0 0 20px; border-top: 0; border-left: 1px solid var(--line); } .probe-settings, .connection-note, .websocket-settings { grid-column: 1 / -1; } .probe-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .library-shell { grid-template-columns: 190px minmax(0, 1fr); gap: 14px; } .library-sidebar, .library-main { padding: 16px; } .outputs { grid-template-columns: 1fr; } .results-head { flex-wrap: wrap; } .task-toolbar { justify-content: flex-start; } .result-actions { justify-content: flex-start; } }
@media (max-width: 780px) {
  :root { --sidebar-width: 0px; }
  .app-sidebar { position: sticky; inset: auto; top: 0; width: 100%; flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 16px; gap: 12px; border-bottom: 1px solid #264339; }
  .brand { padding: 0; gap: 8px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .brand-mark .icon { width: 21px; height: 21px; }
  .brand strong { font-size: 14px; }
  .brand small { font-size: 7px; letter-spacing: 1px; }
  .nav-label, .sidebar-bottom, .nav-link { display: none; }
  .tabbar { display: flex; gap: 4px; }
  .tab-btn { width: auto; min-height: 33px; padding: 7px 10px; gap: 6px; font-size: 10px; }
  .tab-btn .icon { width: 14px; height: 14px; }
  .tab-btn.active::after { display: none; }
  .topbar { position: static; height: 44px; padding: 0 18px; }
  .topbar-meta #currentDate { display: none; }
  .topbar-meta .local-badge:not(.admin-entry-link) { display: none; }
  .topbar-meta .admin-entry-link { display: flex; }
  .breadcrumbs { font-size: 10px; gap: 7px; }
  .topbar-meta { font-size: 9px; }
  .content { padding: 20px 16px 16px; }
  .page-head { margin-bottom: 16px; gap: 8px; }
  .page-head h1 { font-size: 22px; }
  .page-head p { max-width: 360px; font-size: 11px; line-height: 1.8; }
  .page-tag { padding: 5px 7px; font-size: 9px; }
  .overview { gap: 10px; margin-bottom: 16px; }
  .overview-card { padding: 13px; }
  .overview-card .metric-icon { display: none; }
  .metric-label { font-size: 10px; }
  .metric-value strong { font-size: 24px; }
  .metric-note { font-size: 9px; }
  .workspace { gap: 14px; }
  .extraction-grid { gap: 13px; }
  .panel { padding: 17px; }
  .result-panel { margin-top: 16px; }
  .section-head h2, .section-head h3 { font-size: 14px; }
  .library-shell { grid-template-columns: 1fr; }
  .library-sidebar .side-card { display: none; }
  .group-list { max-height: 200px; }
  .group-create { margin-bottom: 8px; }
  .probe-results { max-height: 430px; }
  .page-footer { font-size: 8px; letter-spacing: 0; }
}
@media (max-width: 560px) {
  .app-sidebar { padding: 11px 13px; }
  .brand small { display: none; }
  .brand strong { font-size: 13px; }
  .tab-btn { padding: 7px 9px; }
  .tab-btn .icon { display: none; }
  .content { padding: 18px 13px 14px; }
  .page-head { align-items: flex-start; }
  .page-head h1 { font-size: 21px; }
  .page-tag { display: none; }
  .overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .overview-card { padding: 12px 14px; }
  .overview-card .metric-icon { display: grid; right: 13px; top: 12px; width: 24px; height: 24px; }
  .overview-card .metric-icon .icon { width: 13px; height: 13px; }
  .metric-value { margin-top: 4px; }
  .metric-note { margin-top: 4px; }
  .extraction-grid { grid-template-columns: 1fr; }
  .file-drop { min-height: 175px; }
  .candidates-panel #outIps, .candidate-empty { min-height: 190px; }
  .actionbar .btn { min-height: 39px; flex: 1; font-size: 11px; padding-inline: 9px; }
  .connection-panel, body[data-page="library"] .connection-panel { display: block; }
  .connection-controls, body[data-page="library"] .connection-controls { display: block; margin-top: 17px; padding: 15px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .control-pair, body[data-page="library"] .control-pair { margin-top: 12px; }
  .probe-grid, body[data-page="library"] .probe-grid { grid-template-columns: 1fr; }
  .tool-grid, .compare-box { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .stat-card { padding: 10px; }
  .stat-card strong { font-size: 9px; }
  .stat-card span { font-size: 19px; }
  #groupNameStat { font-size: 10px; }
  .probe-toolbar select { max-width: 100%; }
  .task-toolbar { width: 100%; }
  #probeRecentJobs { width: 100%; max-width: 100%; }
  .result-filters { width: 100%; gap: 7px; }
  .result-filters select { flex: 1; min-width: 0; padding-right: 20px; }
  .result-filter-check { flex: 0 0 100%; }
  .result-actions { width: 100%; }
  .import-actions { flex: 1 1 100%; }
  .import-actions select { flex: 1; max-width: 100%; }
  .progress-head .hint { font-size: 9px; }
  .record-main strong { font-size: 12px; }
  .record-actions { width: 100%; }
  .record-actions .copy-btn { flex: 1; }
  .records-head { width: 100%; justify-content: space-between; }
  .overlay { padding: 13px; }
  .note-modal, .confirm-modal, .prompt-modal { padding: 20px; }
  .modal-actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
.pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px 0; color: var(--muted); font-size: 12px; }
.pagination .toolbar { flex-wrap: wrap; }
.history-pagination { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.result-search { min-width: 0; }
.result-search input { width: 100%; }
.probe-settings label { margin-top: 10px; }
@media (max-width: 600px) { .pagination { align-items: flex-start; } .pagination .toolbar { width: 100%; } .pagination button { flex: 1; } }
