@font-face { font-family: "Geist"; src: url("/static/fonts/Geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/static/fonts/GeistMono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #000;
  --bg-1: #0a0a0a;
  --bg-2: #111;
  --bg-3: #1a1a1a;
  --border: #1f1f1f;
  --border-2: #2e2e2e;
  --border-3: #454545;
  --text: #ededed;
  --text-2: #a1a1a1;
  --text-3: #707070;
  --blue: #3291ff;
  --green: #45dd95;
  --red: #ff5b4f;
  --amber: #f5a623;
  --purple: #a78bfa;
  --radius: 8px;
  --radius-sm: 6px;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px rgba(50, 145, 255, .6);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(50, 145, 255, .35); }
code, .mono { font-family: var(--mono); font-size: 13px; }
:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------- layout ---------- */
.header { position: sticky; top: 0; z-index: 20; background: rgba(0, 0, 0, .8); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.header-top { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 24px; max-width: 1240px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.01em; }
.logo-mark { width: 24px; height: 24px; flex: none; }
.crumb-sep { color: var(--border-3); font-size: 20px; font-weight: 200; margin: 0 2px; }
.crumb { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.avatar { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: #000; flex: none; }
.spacer { flex: 1; }
.tabs { display: flex; gap: 4px; padding: 0 16px; max-width: 1240px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; padding: 8px 10px 12px; color: var(--text-2); font-size: 14px; white-space: nowrap; border-radius: var(--radius-sm); transition: color .15s; }
.tab:hover { color: var(--text); }
.tab:hover::before { content: ""; position: absolute; inset: 2px 0 6px; background: var(--bg-3); border-radius: var(--radius-sm); z-index: -1; }
.tab.active { color: var(--text); }
.tab.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--text); border-radius: 2px; }
.main { max-width: 1240px; margin: 0 auto; padding: 32px 24px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-title { font-size: 28px; font-weight: 600; letter-spacing: -.035em; margin: 0; line-height: 1.2; }
.page-sub { color: var(--text-2); margin: 6px 0 0; }
.section-title { font-size: 15px; font-weight: 600; margin: 32px 0 12px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }

/* ---------- primitives ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--bg); color: var(--text); font-weight: 500; font-size: 14px; cursor: pointer; transition: background .15s, border-color .15s, color .15s, opacity .15s; white-space: nowrap; }
.btn:hover { background: var(--bg-3); border-color: var(--border-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--text); color: #000; border-color: var(--text); }
.btn-primary:hover { background: #ccc; border-color: #ccc; }
.btn-danger { color: var(--red); border-color: rgba(255, 91, 79, .35); }
.btn-danger:hover { background: rgba(255, 91, 79, .1); border-color: var(--red); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-ghost { border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text); background: var(--bg-3); border-color: transparent; }
.btn-block { width: 100%; }
.icon { width: 16px; height: 16px; flex: none; }

.input, .select, .textarea { width: 100%; height: 38px; padding: 0 12px; background: var(--bg-1); border: 1px solid var(--border-2); border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--text-2); box-shadow: 0 0 0 3px rgba(255, 255, 255, .08); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23a1a1a1' stroke-width='1.5'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; }
.label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.field { margin-bottom: 20px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-2); user-select: none; font-size: 13px; }
.check input { accent-color: var(--text); width: 15px; height: 15px; margin: 0; }

.card { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); gap: 12px; }
.card-title { font-weight: 600; font-size: 14px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--border); background: var(--bg-2); border-radius: 0 0 var(--radius) var(--radius); display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-2); font-size: 13px; }

.segmented { display: inline-flex; padding: 3px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); gap: 2px; }
.segmented button { height: 28px; padding: 0 12px; border: 0; background: transparent; color: var(--text-2); border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 500; transition: background .15s, color .15s; }
.segmented button:hover { color: var(--text); }
.segmented button.on { background: var(--bg-3); color: var(--text); box-shadow: 0 0 0 1px var(--border-2); }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid var(--border-2); color: var(--text-2); background: var(--bg-2); white-space: nowrap; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 12px; background: var(--bg-3); color: var(--text-2); font-family: var(--mono); }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-3); }
.s-running .dot, .dot.s-running { background: var(--blue); box-shadow: 0 0 0 3px rgba(50, 145, 255, .2); animation: pulse 1.6s ease-in-out infinite; }
.s-starting .dot, .dot.s-starting { background: var(--blue); }
.s-queued .dot, .dot.s-queued { background: var(--amber); }
.s-succeeded .dot, .dot.s-succeeded { background: var(--green); }
.s-failed .dot, .dot.s-failed { background: var(--red); }
.s-oom .dot, .dot.s-oom { background: var(--purple); }
.s-killed .dot, .dot.s-killed { background: var(--text-3); }
.state { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-transform: capitalize; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(50, 145, 255, .05); } }

.bar { height: 6px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--text); transition: width .4s ease; }
.bar.warn > span { background: var(--amber); }
.bar.crit > span { background: var(--red); }

.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.err { color: var(--red); font-size: 13px; }
.empty { padding: 56px 24px; text-align: center; color: var(--text-2); }
.empty-title { color: var(--text); font-weight: 600; font-size: 15px; margin-bottom: 4px; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 18px 20px; }
.stat-label { color: var(--text-2); font-size: 13px; display: flex; align-items: center; justify-content: space-between; }
.stat-value { font-size: 28px; font-weight: 600; letter-spacing: -.04em; margin: 6px 0 12px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 15px; color: var(--text-3); font-weight: 500; letter-spacing: -.01em; margin-left: 4px; }

/* ---------- job list ---------- */
.list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-1); }
.list-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 120px 150px 110px; gap: 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--border); transition: background .12s; }
.list-row:first-child { border-top: 0; }
a.list-row:hover { background: var(--bg-2); }
.list-head { padding: 10px 20px; font-size: 12px; color: var(--text-3); background: var(--bg); border-bottom: 1px solid var(--border); }
.job-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.job-title { display: flex; align-items: center; gap: 8px; font-weight: 500; min-width: 0; }
.job-id { color: var(--text-3); font-family: var(--mono); font-size: 13px; font-weight: 400; }
.job-cmd { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }
.cell-sub { font-size: 12px; color: var(--text-3); }
.res { font-size: 13px; font-variant-numeric: tabular-nums; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .input, .toolbar .select { width: auto; height: 36px; }
.search-box { position: relative; flex: 1; min-width: 200px; }
.search-box .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search-box .input { padding-left: 34px; width: 100%; }

/* ---------- job detail ---------- */
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.detail-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 13px; margin-bottom: 14px; }
.back:hover { color: var(--text); }
.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kv > div { padding: 16px 20px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); min-width: 0; }
.kv > div:nth-child(4n) { border-right: 0; }
.kv-k { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.kv-v { font-size: 14px; overflow-wrap: anywhere; }
.cmd-block { padding: 14px 20px; font-family: var(--mono); font-size: 13px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; border-bottom: 1px solid var(--border); }
.cmd-block .prompt { color: var(--text-3); user-select: none; margin-right: 8px; }

.terminal { background: #050505; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.terminal-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg-1); }
.terminal-bar .input { height: 30px; width: 220px; font-size: 13px; }
.log { height: 60vh; min-height: 320px; overflow: auto; padding: 12px 0; font: 12.5px/1.65 var(--mono); }
.log-line { display: flex; padding: 0 16px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.log-line:hover { background: rgba(255, 255, 255, .03); }
.log-line.hl { background: rgba(245, 166, 35, .12); }
.log-no { flex: none; width: 56px; padding-right: 16px; text-align: right; color: #3d3d3d; user-select: none; }
.log-no:hover { color: var(--text-2); cursor: pointer; }
.log-line.sys .log-text { color: var(--text-3); }
.log-line.sys.ok .log-text { color: var(--green); }
.log-line.sys.bad .log-text { color: var(--red); }
mark { background: rgba(245, 166, 35, .35); color: inherit; border-radius: 2px; padding: 0 1px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--blue); }

/* ---------- search ---------- */
.result-group { margin-bottom: 16px; }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
.result-line { display: flex; gap: 0; font: 12.5px/1.7 var(--mono); padding: 1px 16px 1px 0; }
.result-line:hover { background: var(--bg-2); }
.result-line .log-no { color: var(--text-3); }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 255, 255, .08), transparent 60%); }
.login { width: 100%; max-width: 360px; }
.login .logo-mark { width: 40px; height: 40px; margin: 0 auto 24px; display: block; }
.login h1 { text-align: center; font-size: 24px; font-weight: 600; letter-spacing: -.03em; margin: 0 0 6px; }
.login p { text-align: center; color: var(--text-2); margin: 0 0 28px; }

/* ---------- menu & toast ---------- */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--bg-1); border: 1px solid var(--border-2); border-radius: var(--radius); padding: 6px; box-shadow: 0 16px 40px rgba(0, 0, 0, .6); z-index: 30; }
.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: var(--radius-sm); border: 0; background: none; color: var(--text-2); font-size: 14px; text-align: left; cursor: pointer; }
.menu-item:hover { background: var(--bg-3); color: var(--text); }
.menu-sep { height: 1px; background: var(--border); margin: 6px 0; }
.menu-label { padding: 8px 10px 6px; font-size: 13px; }
.user-btn { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 6px 0 4px; border-radius: 999px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--text-2); }
.user-btn:hover { border-color: var(--border-2); color: var(--text); }
.toasts { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { min-width: 260px; max-width: 380px; padding: 12px 16px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--border-2); box-shadow: 0 12px 32px rgba(0, 0, 0, .5); font-size: 13px; animation: slide .2s ease; }
.toast.error { border-color: rgba(255, 91, 79, .5); }
@keyframes slide { from { transform: translateY(8px); opacity: 0; } }

.skeleton { background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 4px; height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.form-card { max-width: 720px; }
.kbd { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border: 1px solid var(--border-2); border-radius: 4px; color: var(--text-2); background: var(--bg-2); }
.code-block { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font: 13px/1.7 var(--mono); color: var(--text-2); overflow-x: auto; white-space: pre; }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv > div:nth-child(4n) { border-right: 1px solid var(--border); }
  .kv > div:nth-child(2n) { border-right: 0; }
  .list-row.job-row { grid-template-columns: 110px minmax(0, 1fr) 90px; }
  .list-row.job-row > :nth-child(4), .list-row.job-row > :nth-child(5) { display: none; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .header-top, .main { padding-left: 16px; padding-right: 16px; }
  .stats, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .list-row.job-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .list-row.job-row > :nth-child(3) { display: none; }
  .list-head { display: none; }
  .page-title { font-size: 24px; }
  .terminal-bar .input { width: 140px; }
}
.mt { margin-top: 6px; }
@media (max-width: 900px) { .ov-grid { grid-template-columns: minmax(0, 1fr) !important; } }
@media (max-width: 600px) {
  .crumb, .crumb-sep { display: none; }
  .header-top .btn-label { display: none; }
  .header-top .btn-sm { width: 30px; padding: 0; }
  .tabs { padding: 0 8px; }
}

/* ---------- workspaces ---------- */
a.ws-card { transition: border-color .15s, background .15s; }
a.ws-card:hover { border-color: var(--border-3); background: var(--bg-2); }
.list-row.snap-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) 110px 60px 170px; }
.list-row.hist-row { grid-template-columns: 110px minmax(0, 1fr) minmax(0, 220px) 90px; }
.list-row.out-row { grid-template-columns: 90px minmax(0, 1fr) 90px 40px; padding: 10px 20px; }
.log-line.diff-file { color: var(--text); font-weight: 600; margin-top: 10px; }
.log-line.diff-hunk { color: var(--purple); }
.log-line.diff-add { background: rgba(69, 221, 149, .08); color: #7ee2b8; }
.log-line.diff-del { background: rgba(255, 91, 79, .08); color: #ff8a80; }
.chg { font-size: 12px; font-weight: 500; text-transform: capitalize; }
.chg-created { color: var(--green); }
.chg-modified { color: var(--amber); }
.chg-deleted { color: var(--red); }
@media (max-width: 900px) {
  .list-row.snap-row { grid-template-columns: minmax(0, 1fr) 150px; }
  .list-row.snap-row > :nth-child(2), .list-row.snap-row > :nth-child(3), .list-row.snap-row > :nth-child(4) { display: none; }
  .list-row.hist-row { grid-template-columns: 90px minmax(0, 1fr) 70px; }
  .list-row.hist-row > :nth-child(3) { display: none; }
}

/* ---------- file manager ---------- */
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; flex-wrap: wrap; min-width: 0; }
.crumbs a { color: var(--text-2); padding: 2px 4px; border-radius: 4px; }
.crumbs a:hover { color: var(--text); background: var(--bg-3); }
.crumbs a:last-child { color: var(--text); }
.list-row.file-row { grid-template-columns: minmax(0, 1fr) 90px 100px 110px; padding: 8px 12px 8px 20px; }
a.list-row.file-row:hover, .list-row.file-row:hover { background: var(--bg-2); }
.file-name { gap: 10px !important; flex-wrap: nowrap !important; min-width: 0; }
.file-name:hover .ellipsis { text-decoration: underline; }
.file-actions { opacity: .55; transition: opacity .15s; }
.file-row:hover .file-actions { opacity: 1; }
.ic-folder { color: var(--blue); }
.list-row.up-row { grid-template-columns: minmax(0, 1fr) 200px 140px; padding: 10px 20px; }
.list.drop-target { position: relative; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(50, 145, 255, .15); }
.drop-hint { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .75); color: var(--text); font-weight: 500; z-index: 2; pointer-events: none; }
.editor { display: block; width: 100%; height: 65vh; min-height: 320px; padding: 14px 16px; border: 0; resize: vertical; background: #050505; color: var(--text); font: 13px/1.6 var(--mono); tab-size: 4; outline: none; white-space: pre; overflow: auto; }
@media (max-width: 700px) {
  .list-row.file-row { grid-template-columns: minmax(0, 1fr) 90px; }
  .list-row.file-row > :nth-child(2), .list-row.file-row > :nth-child(3) { display: none; }
  .list-row.up-row { grid-template-columns: minmax(0, 1fr) 90px; }
  .list-row.up-row > :nth-child(3) { display: none; }
}

/* ---------- charts ---------- */
:root {
  /* Categorical slots, dark steps of the reference palette, validated on #0a0a0a. */
  --series-1: #3987e5; /* research jobs / process memory */
  --series-2: #d95926; /* other processes / file cache */
  --series-3: #199e70; /* ZFS cache */
}
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 10px; min-width: 0; }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.chart-title { font-weight: 600; font-size: 13px; }
.chart-now { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text); }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.chart-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend b, .tip-row b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.chart-legend i, .tip-row i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.chart-plot { position: relative; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--text-3); font: 11px var(--sans); font-variant-numeric: tabular-nums; }
.chart .area { opacity: .28; }
.chart .gap { fill: none; stroke: var(--bg-1); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ref { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 4 4; }
.chart .ref-label { fill: var(--text-2); font: 11px var(--sans); paint-order: stroke; stroke: var(--bg-1); stroke-width: 3px; }
.chart .crosshair { stroke: var(--border-3); stroke-width: 1; }
.chart .dot { stroke: var(--bg-1); stroke-width: 2; }
.chart-empty { display: grid; place-items: center; color: var(--text-3); font-size: 13px; border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.chart-tip { position: absolute; min-width: 170px; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 12px; pointer-events: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); z-index: 3; }
.tip-time { color: var(--text-3); margin-bottom: 4px; }
.tip-row { display: flex; align-items: center; gap: 8px; color: var(--text-2); padding: 1px 0; }
.tip-row span { flex: 1; }
.tip-total { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.chart-table-toggle { margin-top: 6px; background: none; border: 0; padding: 0; color: var(--text-3); font-size: 12px; cursor: pointer; }
.chart-table-toggle:hover { color: var(--text); }
.chart-table { max-height: 220px; overflow: auto; margin-top: 8px; border-top: 1px solid var(--border); }
.chart-table table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.chart-table th, .chart-table td { text-align: right; padding: 4px 8px; border-bottom: 1px solid var(--border); }
.chart-table th:first-child, .chart-table td:first-child { text-align: left; color: var(--text-2); }
.chart-table th { color: var(--text-3); font-weight: 500; position: sticky; top: 0; background: var(--bg-1); }
@media (max-width: 900px) { .charts { grid-template-columns: 1fr; } }

/* ---------- registry ---------- */
.list-row.reg-row { grid-template-columns: minmax(0, 1.4fr) 70px minmax(0, 1.4fr) 90px 100px; }
.list-row.ver-row { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 1.2fr) 120px 140px; }
.list-row.clickable { cursor: pointer; }
.list-row.clickable:hover { background: var(--bg-2); }
.kv.kv-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kv.kv-3 > div:nth-child(4n) { border-right: 1px solid var(--border); }
.kv.kv-3 > div:nth-child(3n) { border-right: 0; }
.tag.label-chip { background: transparent; border: 1px solid var(--border-2); }
.tag.tag-strong { background: rgba(50, 145, 255, .15); color: #9ec5f4; }
a.tag:hover { color: var(--text); }
.chip-x { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 0 0 2px; opacity: .6; font-size: 13px; line-height: 1; }
.chip-x:hover { opacity: 1; }
.ulink { text-decoration: underline; text-decoration-color: var(--border-3); text-underline-offset: 2px; }
.ulink:hover { text-decoration-color: currentColor; }
@media (max-width: 900px) {
  .list-row.reg-row { grid-template-columns: minmax(0, 1fr) 50px minmax(0, 1fr); }
  .list-row.reg-row > :nth-child(4), .list-row.reg-row > :nth-child(5) { display: none; }
  .list-row.ver-row { grid-template-columns: minmax(0, 1fr) 120px; }
  .list-row.ver-row > :nth-child(2), .list-row.ver-row > :nth-child(3), .list-row.ver-row > :nth-child(5) { display: none; }
  .kv.kv-3 { grid-template-columns: 1fr; }
  .kv.kv-3 > div { border-right: 0 !important; }
}

/* ---------- papers ---------- */
.list-row.paper-row { grid-template-columns: minmax(0, 1fr) 140px 70px 100px 100px; }
.list-row.pver-row { grid-template-columns: 50px minmax(0, 1fr) 110px 100px 220px; }
.author-row { display: grid; grid-template-columns: 1.2fr 1.2fr 1.2fr 1fr auto; gap: 8px; margin-bottom: 8px; }
.pdf-frame { width: 100%; height: 80vh; min-height: 480px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
@media (max-width: 900px) {
  .list-row.paper-row { grid-template-columns: minmax(0, 1fr) 120px; }
  .list-row.paper-row > :nth-child(3), .list-row.paper-row > :nth-child(4), .list-row.paper-row > :nth-child(5) { display: none; }
  .list-row.pver-row { grid-template-columns: 40px minmax(0, 1fr) 150px; }
  .list-row.pver-row > :nth-child(3), .list-row.pver-row > :nth-child(4) { display: none; }
  .author-row { grid-template-columns: 1fr 1fr; }
}

.warn-text { color: var(--amber); }
.badge svg { width: 12px; height: 12px; }
.toast.warn { border-color: rgba(245, 166, 35, .6); }
.list-row.svc-row { grid-template-columns: 130px minmax(0, 1fr) 140px 90px 80px; }
@media (max-width: 900px) {
  .list-row.svc-row { grid-template-columns: 110px minmax(0, 1fr) 90px; }
  .list-row.svc-row > :nth-child(4), .list-row.svc-row > :nth-child(5) { display: none; }
}
@media (max-width: 600px) {
  .list-row.svc-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .list-row.svc-row > :nth-child(3) { display: none; }
}
