/* trading-admin 2026-10-22: copied from the tgkvm admin site (local copy only). Dark ground with a green accent, so it
   is never mistaken for tgkvm's (violet). */
:root {
    color-scheme: dark;
    --bg: #121715; --panel: #1a211e; --panel2: #222b27; --side: #161c19; --line: #2b3631; --line2: #38463f;
    --text: #e8f0ec; --text2: #a7b8af; --text3: #74867c; --hover: #24302a; --sel: #263a30; --tip: #2f4038;
    --accent: #2fa86a; --accent-bg: rgba(60, 200, 120, .15); --link: #7fe0a8;
    --ok: #5fc48a; --warn: #e6b450; --bad: #f07070; --info: #6aa8f0;
    --warn-bg: rgba(230, 180, 80, .1); --warn-line: rgba(230, 180, 80, .4); --warn-text: #f0cf88;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); min-height: 100vh; }
a { color: var(--link); }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { background: var(--panel); }
.boot { color: var(--text3); padding: 40px; }
.mono { font-variant-numeric: tabular-nums; } code, pre, .mono.small { font-family: var(--mono); }
.muted { color: var(--text2); } .small { font-size: 12.5px; } .bad-text { color: var(--bad); font-weight: 600; }
h4 { margin: 16px 0 8px; font-size: 13px; color: var(--text2); }

/* ---------------------------------------------------------------- the shell */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; display: flex; align-items: center; gap: 12px;
    padding: 9px 18px; background: #0e1210; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .02em; }
.brand svg { color: var(--link); }
.brand em { font-style: normal; font-weight: 600; color: var(--link); background: var(--accent-bg); padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.top .sp { flex: 1; }
.top .who { color: var(--text2); font-size: 13px; }
.top .menu-btn { display: none; }
.layout { display: grid; grid-template-columns: 210px 1fr; min-height: calc(100vh - 51px); }
.side { border-right: 1px solid var(--line); padding: 12px 8px; background: var(--side); }
.side a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text2); text-decoration: none; margin-bottom: 1px; }
.side a:hover { background: var(--hover); color: var(--text); }
.side a.on { background: var(--accent-bg); color: var(--link); font-weight: 600; }
.side .grp { margin: 16px 10px 4px; font-size: 11px; color: var(--text3); letter-spacing: .08em; }
main { padding: 18px 22px 40px; min-width: 0; }
/* 2026-10-21 (user: "后台管理的最右侧，不要有整个页面的滚动条"): on a desktop the page is the window; only the content
   scrolls (when it is longer), the lists and the repository fill it to its bottom (core.js fitMain) */
@media (min-width: 761px) {
    body:has(> .layout) { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
    body:has(> .layout) > .top { position: static; flex-shrink: 0; }
    body:has(> .layout) > .layout { flex: 1; min-height: 0; }
    .layout > .side { overflow-y: auto; } .layout > main { overflow: auto; padding-bottom: 18px; }
}
main > h1 { font-size: 20px; margin: 0 0 4px; }
.lead { color: var(--text2); margin: 0 0 14px; font-size: 13px; }

/* ---------------------------------------------------------------- cards, overview */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.card h3 { margin: 0 0 8px; font-size: 13px; color: var(--text2); font-weight: 600; }
.card b { display: block; font-size: 20px; margin-bottom: 6px; }
.card b.small { font-size: 15px; }
.card em { display: block; font-style: normal; color: var(--text2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.card em:empty { display: none; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.panel h2 { font-size: 14px; margin: 0 0 10px; }
.todo { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.todo li { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--c, var(--warn)); border-radius: 8px; padding: 10px 14px; }
.todo li.ok { --c: var(--ok); color: var(--text2); } .todo li.bad { --c: var(--bad); }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 6px; }
.bar { flex: 1 1 0; max-width: 70px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; text-decoration: none; color: var(--text2); }
.bar i { width: 100%; max-width: 34px; border-radius: 4px 4px 0 0; background: var(--accent); }
.bar i.low { background: var(--warn); }
.bar:hover i { filter: brightness(1.2); }
.bar .v { font-size: 12px; color: var(--text); } .bar .l { font-size: 11px; }

/* ---------------------------------------------------------------- pieces (console.css) */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); cursor: pointer; font-weight: 600; font-size: 13px; text-decoration: none; white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--hover); border-color: var(--accent); } .btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: transparent; color: #fff; } .btn-primary:hover:not(:disabled) { background: var(--accent); filter: brightness(1.12); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #1a0d0d; } .btn-danger:hover:not(:disabled) { filter: brightness(.92); background: var(--bad); }
.btn-sm { height: 26px; padding: 0 10px; font-size: 12px; }
.f { margin-bottom: 12px; } .f label { display: block; font-size: 12px; color: var(--text2); margin-bottom: 4px; } .f .req { color: var(--bad); }
.f input, .f select, .f textarea, .modal input, .modal select { width: 100%; padding: 6px 10px; border: 1px solid var(--line2); border-radius: 10px; }
.f textarea { font-family: var(--mono); font-size: 12.5px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus, .modal input:focus, .modal select:focus, .md-card input:focus, .md-card select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.f input[readonly] { background: var(--bg); color: var(--text2); } .f .err { color: var(--bad); font-size: 12px; margin-top: 3px; } .f .hint, .hint { color: var(--text2); font-size: 12px; margin-top: 3px; }
input.bad { border-color: var(--bad) !important; }
label.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); margin: 4px 0; } label.chk input { width: auto; }
.checks { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.chip { display: inline-block; font-size: 11.5px; border: 1px solid var(--line2); border-radius: 999px; padding: 0 8px; color: var(--text2); white-space: nowrap; vertical-align: 1px; }
.dot { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12.5px; }
.dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text3); }
.dot-green::before { background: var(--ok); } .dot-amber::before { background: var(--warn); } .dot-red::before { background: var(--bad); } .dot-blue::before { background: var(--info); }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 999px; overflow: hidden; padding: 2px; gap: 2px; background: var(--panel); }
.seg button { border: 0; background: none; color: var(--text2); padding: 5px 15px; cursor: pointer; border-radius: 999px; } .seg button:hover:not(.on) { background: var(--hover); }
.seg button.on { background: var(--accent); color: #fff; font-weight: 600; }
.tabrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; } .tabrow .sp { flex: 1; }
.kv { display: grid; grid-template-columns: minmax(90px, max-content) 1fr; gap: 6px 14px; font-size: 13px; } .kv > span:nth-child(odd) { color: var(--text2); }
.kv + .f, .kv + p, .kv + h4 { margin-top: 14px; }
.mini { border: 0; background: none; color: var(--text2); cursor: pointer; padding: 2px 4px; border-radius: 4px; } .mini:hover { background: var(--hover); color: var(--text); }
.warn-box { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-text); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin: 0 0 12px; }
.ok-box { background: rgba(95, 196, 138, .1); border: 1px solid rgba(95, 196, 138, .35); color: #9fe0ba; border-radius: 10px; padding: 6px 12px; font-size: 13px; margin: 0 0 12px; }
.note { background: var(--accent-bg); border: 1px solid rgba(60, 200, 120, .35); color: var(--text2); border-radius: 8px; padding: 10px 14px; font-size: 13px; }
.note.gap { margin-top: 14px; }
.pre { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.sq { display: inline-flex; gap: 2px; vertical-align: middle; }
.sq i { width: 7px; height: 13px; border-radius: 2px; background: var(--bad); }
.sq i.ok { background: var(--ok); }
.tbl-wrap { overflow-x: auto; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 8px; }
.mini-table th { text-align: left; color: var(--text2); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line2); white-space: nowrap; background: var(--panel2); }
.mini-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mini-table tr.bad td, .mini-table tr.warn td:first-child { color: var(--warn-text); }
.mini-table input { width: 100%; min-width: 80px; padding: 3px 6px; border: 1px solid var(--line2); border-radius: 6px; font-size: 12.5px; }
.mini-table input[type=checkbox] { width: auto; min-width: 0; }
.pick-list { max-height: 260px; overflow: auto; border: 1px solid var(--line2); border-radius: 10px; padding: 4px 10px; margin-top: 6px; background: var(--bg); }
.pick-list label.chk { margin: 3px 0; }
.pk-q { width: 100%; }
.fail-item { border-left: 3px solid var(--bad); background: var(--bg); border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; display: grid; gap: 3px; }
.mdview { font-size: 13px; } .mdview h3 { font-size: 16px; margin: 4px 0 10px; } .mdview h4 { font-size: 14px; color: var(--text); margin: 14px 0 6px; }
.mdview h5, .mdview h6 { font-size: 13px; margin: 12px 0 6px; } .mdview p { margin: 6px 0; } .mdview ul { margin: 6px 0; padding-left: 20px; }
.mdview li.sub { margin-left: 18px; color: var(--text2); font-size: 12px; } .mdview code { background: var(--bg); padding: 0 4px; border-radius: 4px; font-size: 12px; }
.mdview .md-table { width: auto; border-collapse: collapse; margin: 6px 0; } .mdview .md-table th, .mdview .md-table td { border: 1px solid var(--line2); padding: 4px 8px; text-align: left; }

/* ---------------------------------------------------------------- list + detail (md.js; console.css) */
.mdbox { min-height: 380px; }
.md { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; height: 100%; }
.md-bar { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.md-sp { flex: 1; } .md-sep { width: 1px; height: 22px; background: var(--line2); margin: 0 6px; }
.md-ic { width: 34px; height: 32px; border: 0; background: none; border-radius: 9px; color: var(--text2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; position: relative; }
.md-ic svg { width: 18px; height: 18px; } .md-ic:hover:not(:disabled) { background: var(--hover); color: var(--text); } .md-ic.on { background: var(--accent-bg); color: var(--link); }
.md-ic:disabled { opacity: .3; cursor: not-allowed; } .md-ic.red { color: var(--bad); }
.md-ic[data-tip]:hover::after { content: attr(data-tip); position: absolute; top: 36px; left: 50%; transform: translateX(-50%); background: var(--tip); color: #fff; font-size: 12px; padding: 3px 9px; border-radius: 8px; white-space: nowrap; z-index: 300; pointer-events: none; }
.md-dirty { display: none; color: var(--warn); font-size: 12px; margin-right: 4px; } .md.dirty .md-dirty { display: inline; }
.md-colwrap { position: relative; display: inline-flex; }
.md-colmenu { position: absolute; top: 36px; left: 0; z-index: 310; background: var(--panel2); border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 12px 30px -8px rgba(0,0,0,.6); padding: 6px 0; min-width: 180px; }
.md-colmenu .h { font-size: 12px; color: var(--text2); padding: 4px 12px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; justify-content: space-between; gap: 8px; } .md-colmenu .h a { cursor: pointer; }
.md-colmenu label { display: flex; align-items: center; gap: 8px; padding: 5px 12px; cursor: pointer; white-space: nowrap; } .md-colmenu label:hover { background: var(--hover); }
.md-body { display: grid; flex: 1; min-height: 0; } .md-body > * { min-height: 0; }
.md-filter { border-right: 1px solid var(--line); padding: 10px; background: var(--bg); overflow: auto; } .md-filter .fb { margin-bottom: 10px; }
.md-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.md-card .t { display: flex; gap: 4px; align-items: center; } .md-card select, .md-card input { width: 100%; height: 28px; padding: 0 6px; border: 1px solid var(--line2); border-radius: 8px; font-size: 13px; }
.md-card .t select { width: auto; flex: 1; min-width: 0; }
.md-add { border: 1.5px dashed var(--line2); border-radius: 12px; text-align: center; padding: 6px; cursor: pointer; color: var(--text2); font-size: 18px; }
.md-list { overflow: auto; display: flex; flex-direction: column; min-width: 0; }
.md-list table { width: 100%; border-collapse: collapse; font-size: 13px; }
.md-list th { position: sticky; top: 0; z-index: 1; background: var(--panel2); text-align: left; font-size: 12px; font-weight: 600; color: var(--text2); padding: 9px 12px; border-bottom: 1px solid var(--line2); white-space: nowrap; cursor: pointer; user-select: none; }
.md-list th .arrow { margin-left: 4px; color: var(--text3); font-size: 10px; } .md-list th.asc .arrow, .md-list th.desc .arrow { color: var(--link); }
.md-list td { padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.md-list tbody tr { cursor: pointer; } .md-list tbody tr:hover td { background: var(--hover); }
.md-list tbody tr.sel td { background: var(--sel); } .md-list tbody tr.sel td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.md-empty { color: var(--text2); text-align: center; padding: 40px 16px; }
.md-pg { position: sticky; bottom: 0; background: var(--panel); margin-top: auto; display: flex; justify-content: flex-end; align-items: center; gap: 6px; padding: 7px 10px; font-size: 12px; color: var(--text2); border-top: 1px solid var(--line); }
.md-pg select, .md-pg button { border: 1px solid var(--line2); background: var(--panel2); border-radius: 5px; padding: 1px 7px; color: var(--text); }
.md-split { cursor: col-resize; background: var(--line); } .md-split:hover { background: var(--accent); }
.md-detail { overflow: hidden; display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--line); }
.md-dh, .md-tabs { flex-shrink: 0; }
.md-dh { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.md-dh h4 { margin: 0; font-size: 15px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.md-back { display: none; }
.md-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 10px; overflow-x: auto; }
.md-tabs button { border: 0; background: none; padding: 9px 12px; color: var(--text2); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.md-tabs button.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.md-pane { padding: 14px; flex: 1; min-height: 0; overflow: auto; } /* 2026-10-22: the head and tabs stay, only this scrolls */

/* ---------------------------------------------------------------- dialogs, toasts */
.modal-bg { position: fixed; inset: 0; z-index: 400; background: rgba(5, 2, 8, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.7); }
.modal.wide { max-width: 900px; } .modal h3 { margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 16px; }
.modal h4 { margin: 14px 0 6px; }
.modal-body { padding: 14px 18px; } .modal-body p { margin: 0 0 10px; } .modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
#toasts { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 500; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--tip); color: #fff; padding: 10px 18px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.4); max-width: 520px; transition: opacity .3s; }
.toast.error { background: #9c3434; } .toast.out { opacity: 0; }

/* ---------------------------------------------------------------- sign-in */
.login { max-width: 400px; margin: 12vh auto; padding: 0 16px; text-align: center; }
.login .box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 30px 26px; }
.login svg.lock { color: var(--link); }
.login h1 { margin: 10px 0 6px; font-size: 20px; }
.login p { color: var(--text2); }
.login .btn { width: 100%; justify-content: center; margin-top: 14px; height: 42px; }
.login .err { color: var(--bad); min-height: 1.5em; margin: 10px 0 0; }
.login .hint { font-size: 12px; color: var(--text3); margin-top: 18px; text-align: left; }
.login code { background: var(--panel2); padding: 1px 5px; border-radius: 4px; }

@media (max-width: 760px) {
    .layout { grid-template-columns: 1fr; }
    .side { display: none; border-right: 0; border-bottom: 1px solid var(--line); }
    .side.open { display: block; }
    .top .menu-btn { display: inline-flex; padding: 0 10px; }
    .top .who { display: none; }
    main { padding: 14px 16px 30px; }
    .md-body { grid-template-columns: 1fr !important; } .md-split { display: none; }
    .md-filter { position: fixed; left: 0; right: 0; bottom: 0; max-height: 70vh; z-index: 210; box-shadow: 0 -6px 20px rgba(0,0,0,.5); border-radius: 18px 18px 0 0; }
    .md-detail { position: fixed; inset: 51px 0 0 0; z-index: 205; background: var(--panel); display: none; border: 0; }
    .md.show-d .md-detail { display: flex; } .md-back { display: inline-flex; }
}
progress { width: 90px; height: 8px; vertical-align: middle; accent-color: var(--accent); } .mini-table tr.sub td { border-bottom: 1px solid var(--line2); padding-top: 0; }

/* a test result opened: the checks and every screenshot (tests.js, 2026-10-19) */
.res-table tr.clickable { cursor: pointer; }
.res-table tr.res-open > td { background: var(--panel2); padding: 10px 12px; }
.warn-mark { color: var(--warn); font-size: 12px; white-space: nowrap; }  /* a pass on a near OCR match (train.py ⚠) */
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
.shot-grid figure { margin: 0; }
.shot-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #222; border-radius: 6px; display: block; cursor: zoom-in; }
.shot-grid figcaption { font-size: 12px; color: var(--text2); margin-top: 3px; }
.mini-table input[type=checkbox] { width: auto; min-width: 0; }

/* a first-level menu with a second level (main.js; development management, 2026-10-21) */
.side .menu-parent { cursor: pointer; } .side .menu-parent .caret { margin-left: auto; transition: transform .15s; }
.side .menu-parent.open .caret { transform: rotate(90deg); }
.side .sub { display: none; margin: 0 0 6px; } .side .sub.open { display: block; }
.side .sub a { padding-left: 38px; font-size: 13px; } .side a .chip { margin-left: auto; border-color: var(--warn); color: var(--warn); }
/* dev.js */
.you { color: var(--warn); font-weight: 700; }
.pbar { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text2); white-space: nowrap; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .two .pre { max-height: 300px; overflow: auto; margin: 0; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0 0; }
.replies { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.reply { border: 1px solid var(--line2); background: var(--panel2); color: var(--text); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; cursor: pointer; }
.reply:hover { border-color: var(--accent); } .reply.on { background: var(--accent-bg); border-color: var(--accent); color: var(--link); }
.reply.again { border-style: dashed; } .reply.no, .reply.later { color: var(--text2); }
.tl { list-style: none; padding: 0; margin: 6px 0 0; font-size: 13px; }
.tl li { display: grid; grid-template-columns: 110px 130px 1fr 60px; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; margin-right: 12px; white-space: nowrap; }
.flowbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.flowbar h2 { margin: 0; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree { padding: 8px 6px; overflow: auto; }
.tree .node { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.tree .node:hover { background: var(--hover); } .tree .node.sel { background: var(--sel); color: var(--link); }
.tree .node .tw { width: 14px; text-align: center; color: var(--text3); flex-shrink: 0; }
.tree .node .k { color: var(--text3); font-size: 11.5px; } .tree .node .dot { margin-left: auto; }
.tree .kids { margin-left: 16px; border-left: 1px dashed var(--line2); padding-left: 4px; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } .tl li { grid-template-columns: 1fr 1fr; } }
/* devops.js: the repository's explorer */
.ex { padding: 6px 0; font-size: 13px; user-select: none; }
.ex-row { display: flex; align-items: center; gap: 6px; height: 26px; padding-right: 8px; cursor: pointer; white-space: nowrap; color: var(--text2); }
.ex-row:hover { background: var(--hover); } .ex-row.sel { background: var(--sel); color: var(--link); }
.ex-row.dir { color: var(--text); font-weight: 600; } .ex-row .tw { width: 12px; color: var(--text3); }
.ex-row .cnt, .ex-row .lk { margin-left: auto; font-size: 11px; color: var(--text3); font-weight: 400; }
.ind0 { padding-left: 6px; } .ind1 { padding-left: 20px; } .ind2 { padding-left: 34px; } .ind3 { padding-left: 48px; } .ind4 { padding-left: 62px; }
.ind5 { padding-left: 76px; } .ind6 { padding-left: 90px; } .ind7 { padding-left: 104px; } .ind8 { padding-left: 118px; } .ind9 { padding-left: 132px; }
.fi { display: inline-block; width: 22px; font-size: 10px; font-weight: 700; text-align: center; color: var(--text3); }
.fi.md { color: var(--info); } .fi.html { color: var(--warn); }
.ex-q { width: 240px; height: 30px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); border-radius: 8px; padding: 0 10px; }
.ex-path { font-size: 11.5px; color: var(--text3); padding: 6px 14px 0; }
.preview { width: 100%; height: 62vh; border: 1px solid var(--line2); border-radius: 8px; background: #fff; }
/* the repository page (2026-10-21): tree | editor (tabs) | chat; each scrolls by itself, the lines drag */
.rp-body { display: grid; flex: 1; min-height: 0; } .rp-body > * { min-height: 0; min-width: 0; }
.rp-tree { overflow: auto; }
.rp-ed { display: flex; flex-direction: column; border-left: 1px solid var(--line); overflow: hidden; }
.rp-ed .md-tabs, .rp-ed .ex-path { flex-shrink: 0; } .rp-ed .ex-path { padding-bottom: 6px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.rp-pane { flex: 1; min-height: 0; overflow: auto; padding: 12px 14px; }
.rp-pane.full { display: flex; flex-direction: column; } .rp-pane.full .preview { flex: 1; height: auto; min-height: 300px; }
.rp-tabs { display: flex; flex-shrink: 0; overflow-x: auto; background: var(--bg); border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.rp-tab { display: flex; align-items: center; gap: 4px; padding: 0 4px 0 10px; height: 34px; font-size: 12.5px; color: var(--text2); cursor: pointer; border-right: 1px solid var(--line); white-space: nowrap; flex-shrink: 0; }
.rp-tab:hover { background: var(--hover); } .rp-tab.on { background: var(--panel); color: var(--text); box-shadow: inset 0 2px 0 var(--accent); }
.rp-tab .nm { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.rp-x { border: 0; background: none; color: var(--text3); width: 20px; height: 20px; border-radius: 5px; cursor: pointer; font-size: 15px; line-height: 1; padding: 0; visibility: hidden; }
.rp-tab.on .rp-x, .rp-tab:hover .rp-x, .ch-row:hover .rp-x { visibility: visible; } .rp-x:hover { background: var(--hover); color: var(--text); }
body.dragging { cursor: col-resize; user-select: none; } body.dragging iframe { pointer-events: none; }
.rp-chat { display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--bg); overflow: hidden; }
.c-head { display: flex; align-items: center; gap: 2px; padding: 4px 6px 4px 12px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.c-head b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.c-hist { max-height: 45%; overflow: auto; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.ch-row { padding: 7px 12px; cursor: pointer; border-bottom: 1px solid var(--line); } .ch-row:hover { background: var(--hover); } .ch-row.sel { background: var(--sel); }
.ch-row .t { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ch-row .cx { display: flex; align-items: center; }
.ch-row .rp-x { margin-left: auto; }
.c-msgs { flex: 1; min-height: 0; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.c-empty { color: var(--text2); font-size: 13px; padding: 20px 8px; } .c-empty p { margin: 6px 0; }
.cm { display: flex; flex-direction: column; gap: 3px; max-width: 100%; } .cm.me { align-items: flex-end; }
.cm .cb { font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; min-width: 0; max-width: 100%; }
.cm.me .cb { background: var(--accent-bg); border: 1px solid var(--line2); border-radius: 12px 12px 4px 12px; padding: 7px 11px; max-width: 92%; }
.cm.pm .cb { padding: 0 2px; } .cm.pm .cb pre, .cm.pm .cb .pre { overflow-x: auto; }
.cm .cb.wait { color: var(--text2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .cm .cb.bad { color: var(--bad); }
.cw { font-size: 11.5px; color: var(--text3); font-weight: 600; } .cx { font-size: 11.5px; color: var(--text3); }
.cm .acts { margin: 2px 0 0; }
.spin { width: 12px; height: 12px; border: 2px solid var(--line2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.c-in { border-top: 1px solid var(--line); padding: 8px 10px; flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; }
.c-in textarea { width: 100%; resize: vertical; min-height: 60px; max-height: 240px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13px; box-sizing: border-box; }
.c-in .acts { margin: 0; } .c-in .hint { margin: 0; font-size: 11.5px; }
@media (max-width: 760px) { .rp-body { grid-template-columns: 1fr !important; } .rp-body .md-split { display: none; } .rp-tree { max-height: 220px; } .rp-chat { min-height: 420px; } }
.mt { margin-top: 10px; }
/* dev.js: a proposal's flowchart (lanes per employee, steps top to bottom; 2026-10-21) */
.fl { display: grid; gap: 6px 8px; align-items: start; margin: 6px 0; overflow-x: auto; }
.fl-h { font-size: 12px; color: var(--text2); font-weight: 600; text-align: center; padding: 4px; border-bottom: 1px solid var(--line2); }
.fl-n { font-size: 12px; text-align: right; padding-top: 8px; color: var(--text2); border-right: 2px solid var(--line2); padding-right: 6px; min-height: 100%; }
.fl-c1 { grid-column: 2; } .fl-c2 { grid-column: 3; } .fl-c3 { grid-column: 4; } .fl-c4 { grid-column: 5; } .fl-c5 { grid-column: 6; }
.fl-box { border: 1px solid var(--line2); border-radius: 8px; padding: 6px 8px; background: var(--panel2); font-size: 12.5px; min-width: 0; overflow-wrap: anywhere; }
.fl-box.sub { margin-left: 12px; border-style: dashed; } .fl-box.fl-passed { border-color: var(--ok); } .fl-box.fl-failed { border-color: var(--bad); }
.fl-box.fl-running, .fl-box.fl-queued { border-color: var(--info); } .fl-box.fl-end { border-style: dotted; color: var(--text2); }
.fl-c5.fl-box { border-color: var(--warn); }
.fl-t { font-weight: 600; margin-bottom: 2px; } .fl-t .dot { font-weight: 400; }
.fl-ops { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.fl-confirm { border-top: 1px dashed var(--line2); margin-top: 8px; padding-top: 4px; }
/* devops.js: the latest daily report on the 进度 page (plan.md section 12.4) */
.daily { border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; margin: 8px 0 4px; background: var(--panel); }
.daily summary { cursor: pointer; font-size: 13px; } .daily .mdview { margin-top: 6px; }
/* dev.js: a proposal (2026-10-21): cards, the text full width, long lines wrapped */
.prop-card { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 10px; background: var(--panel); }
.prop-head { display: flex; align-items: center; gap: 10px; padding: 9px 12px; flex-wrap: wrap; }
.prop-head .t { flex: 1; min-width: 160px; font-weight: 600; } .prop-card.open .prop-head { border-bottom: 1px solid var(--line); }
.prop-in { padding: 4px 14px 12px; min-width: 0; }
.prop-body { min-width: 0; overflow-wrap: anywhere; } .prop-body pre, .prop-body .pre { white-space: pre-wrap; word-break: break-word; overflow-x: auto; max-width: 100%; }
.prop-body code { white-space: pre-wrap; overflow-wrap: anywhere; } .prop-body table { display: block; overflow-x: auto; max-width: 100%; }
.prop-draft { margin: 10px 0; border: 1px dashed var(--line2); border-radius: 8px; padding: 6px 10px; } .prop-draft summary { cursor: pointer; color: var(--text2); font-size: 13px; }
.md-detail .mdview pre, .md-detail .pre { white-space: pre-wrap; word-break: break-word; } .md-detail .mdview code { overflow-wrap: anywhere; }
/* dev.js: new approvals (2026-10-21) */
.ap-notice { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 450; width: min(360px, calc(100vw - 36px));
    background: var(--panel2); border: 1px solid var(--warn); border-radius: 12px; box-shadow: 0 12px 30px -8px rgba(0,0,0,.6); padding: 8px 10px; }
.ap-notice .h { display: flex; align-items: center; font-weight: 600; color: var(--warn); margin-bottom: 4px; } .ap-notice .h .rp-x { margin-left: auto; visibility: visible; }
.ap-notice a { display: block; padding: 6px 8px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-notice a:hover { background: var(--hover); }
.md-list th .arrow sub { font-size: 9px; margin-left: 1px; }
/* devops.js: 开发设置 (2026-10-22) */
.set-card { max-width: 860px; margin-bottom: 12px; } .set-card h4 { margin-top: 2px; }
.set-row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); justify-content: space-between; }
.set-row > span:first-of-type { flex: 1; } label.set-row { justify-content: flex-start; cursor: pointer; } label.set-row input { margin-top: 4px; }
.set-row .hint { display: block; margin: 2px 0 0; } .set-num { width: 70px; } .set-hours { width: 120px; }
.set-crew { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 8px 0; border-bottom: 1px solid var(--line); } .set-crew > b { min-width: 220px; }
.set-row b, .set-crew > b { font-size: 13.5px; font-weight: 600; line-height: 1.4; } .set-row { font-size: 13px; }
/* dev.js: what the person wrote, above a proposal in 审批 (2026-10-22) */
.mine { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; background: var(--panel2); }
.mine summary { cursor: pointer; font-weight: 600; font-size: 13px; } .mine .pre { margin-top: 6px; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.mine-sup { border-top: 1px dashed var(--line2); margin-top: 8px; padding-top: 6px; } .mine-sup .pre { margin-top: 2px; }
/* md.js: column widths dragged at a header's right edge (2026-10-22); a dragged table is laid out fixed */
.md-list th { position: sticky; } .md-rz { position: absolute; top: 0; right: 0; width: 6px; height: 100%; cursor: col-resize; z-index: 2; }
.md-rz:hover, body.dragging .md-rz:active { background: var(--accent); opacity: .5; }
.md-list table.fixed { table-layout: fixed; } .md-list table.fixed th, .md-list table.fixed td { max-width: none; overflow: hidden; text-overflow: ellipsis; }
/* dev.js: the topics' tabs over the list (2026-10-22) */
.ttabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 10px; overflow-x: auto; }
.ttabs button { border: 0; background: none; padding: 7px 14px; color: var(--text2); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 13px; }
.ttabs button.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.ttabs .n { margin-left: 6px; font-size: 11px; color: var(--text3); background: var(--panel2); border-radius: 9px; padding: 1px 7px; font-weight: 400; }
/* md.js: the detail over the whole page under the top bar (2026-10-22); phones: it is already */
.md.full-d .md-detail { position: fixed; inset: 51px 0 0 0; z-index: 205; background: var(--panel); border: 0; }
@media (max-width: 760px) { .md-max { display: none; } }
.note + .mine { margin-top: 10px; }
.md-nav { display: inline-flex; align-items: center; gap: 2px; } .md-nav .small { min-width: 52px; text-align: center; }
