/* 落款 · 软著工作台样式 v4（品牌：落款 Luokuan）
   原则：信息密度优先、颜色只表达状态、主色仅用于主要操作与当前位置。 */
:root {
  --bg: #f4efe6;
  --surface: #fffdf9;
  --subtle: #faf6ef;
  --hover: #f2ece1;
  --border: #e6ddcd;
  --border-strong: #d5c9b5;
  --divider: #efe8dc;
  --text: #1f2328;
  --muted: #5e5950;
  --faint: #958d80;
  --primary: #2b2f36;
  --primary-hover: #14171b;
  --primary-soft: #efe8dc;
  --primary-ink: #1f2328;
  --success: #1e8e3e;
  --success-soft: #e6f4ea;
  --success-ink: #137333;
  --warn: #b26a00;
  --warn-soft: #fef3e0;
  --warn-ink: #8a5300;
  --danger: #d93025;
  --danger-soft: #fce8e6;
  --danger-ink: #b3261e;
  --pane-bg: #1c1b19;
  --pane-text: #ddd6ca;
  --accent: #c8102e;
  --accent-soft: #fbeaea;
  --serif: "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --radius: 8px;
  --radius-sm: 6px;
  --control-h: 32px;
  --topbar-h: 52px;
  --shadow-pop: 0 12px 32px rgba(60, 45, 25, .16), 0 2px 6px rgba(60, 45, 25, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", "Noto Sans CJK SC", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, "Liberation Mono", "Noto Sans Mono CJK SC", monospace;
  color-scheme: light;
}

* , *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: 0; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.sr-only, .clipboard-proxy {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.clipboard-proxy { position: fixed !important; left: -9999px; top: 0; opacity: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.yes { color: var(--text); }
.icon { width: 16px; height: 16px; flex: none; }

/* ------------------------------------------------------------------ controls */
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text); min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { display: block; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; font-size: 13.5px; margin-top: 16px; cursor: pointer; }
label.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); flex: none; }
label.small-check { margin: 0; font-size: 12.5px; color: var(--muted); gap: 6px; white-space: nowrap; }
label.small-check input { width: 14px; height: 14px; }

input, select, textarea {
  font: inherit; font-size: 14px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  width: 100%; min-width: 0; height: var(--control-h); padding: 0 10px; font-weight: 400;
  transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; padding: 8px 10px; line-height: 1.6; resize: vertical; min-height: 64px; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235c6370' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
input[type="file"] { height: auto; padding: 6px; font-size: 13px; }
input[type="file"]::file-selector-button {
  font: inherit; font-size: 13px; margin-right: 10px; height: 26px; padding: 0 10px; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 4px; background: var(--subtle); color: var(--text);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(43, 47, 54, .15); }
input:disabled, select:disabled, textarea:disabled { background: var(--subtle); color: var(--faint); }

button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--control-h); padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 500;
  white-space: nowrap; cursor: pointer; text-decoration: none; user-select: none;
  transition: background-color .12s, border-color .12s, color .12s;
}
button:hover:not(:disabled), .button:hover { background: var(--hover); text-decoration: none; }
button:active:not(:disabled) { background: var(--hover); }
button:disabled { opacity: .5; cursor: not-allowed; }
a.button:not([href]) { opacity: .5; pointer-events: none; }
button.primary, .button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
button.primary:hover:not(:disabled), .button.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
button.danger { color: var(--danger-ink); border-color: #f0bcb7; }
button.danger:hover:not(:disabled) { background: var(--danger-soft); }
button.small, .button.small, .small-button { height: 28px; padding: 0 10px; font-size: 13px; }
button.small .icon, .button.small .icon { width: 14px; height: 14px; }
button.block { width: 100%; height: 36px; }
button.ghost, .button.ghost, a.ghost {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-weight: 500;
}
button.ghost:hover:not(:disabled), a.ghost:hover { background: var(--hover); border-color: var(--border-strong); text-decoration: none; }
.icon-button, a.icon-button {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: var(--control-h); height: var(--control-h); padding: 0; border: 1px solid transparent;
  background: transparent; color: var(--muted); border-radius: var(--radius-sm);
}
.icon-button:hover:not(:disabled), a.icon-button:hover { background: var(--hover); color: var(--text); }
.input-group .icon-button { border-color: var(--border-strong); background: var(--surface); }
.link-button {
  display: inline; height: auto; padding: 0; border: 0; background: none; color: var(--primary);
  font: inherit; font-size: inherit; font-weight: 500; cursor: pointer;
}
.link-button:hover:not(:disabled) { background: none; text-decoration: underline; }
.danger-link { color: var(--danger-ink); font-size: 12.5px; }
:is(button, .button, a, input, select, textarea, summary, .pane, tr.clickable, [tabindex]):focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
kbd {
  display: inline-block; min-width: 20px; padding: 0 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px;
  border-radius: 4px; background: var(--subtle); font: 11px/16px var(--mono); color: var(--muted); text-align: center;
}
progress { appearance: none; -webkit-appearance: none; width: 100%; height: 6px; border: 0; border-radius: 3px; background: var(--divider); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--divider); }
progress::-webkit-progress-value { background: var(--primary); transition: width .2s; }
progress::-moz-progress-bar { background: var(--primary); }

/* ---------------------------------------------------------------------- tags */
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px;
  font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; background: var(--hover); color: var(--muted);
}
.tag:empty { display: none; }
.tag.ok { background: var(--success-soft); color: var(--success-ink); }
.tag.warn { background: var(--warn-soft); color: var(--warn-ink); }
.tag.info { background: var(--primary-soft); color: var(--primary-ink); }
.tag.err { background: var(--danger-soft); color: var(--danger-ink); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c9c0b0; flex: none; }
.dot.running, .dot.queued { background: var(--primary); animation: pulse 1.6s ease-in-out infinite; }
.dot.completed { background: var(--success); }
.dot.failed { background: var(--danger); }
.dot.stopping, .dot.paused, .dot.stopped, .dot.interrupted { background: var(--warn); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(43, 47, 54, .35); } 50% { box-shadow: 0 0 0 4px rgba(43, 47, 54, 0); } }

.status-pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px;
  font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--hover); color: var(--muted);
}
.status-pill.completed { background: var(--success-soft); color: var(--success-ink); }
.status-pill.failed { background: var(--danger-soft); color: var(--danger-ink); }
.status-pill.running, .status-pill.queued { background: var(--primary-soft); color: var(--primary-ink); }
.status-pill.stopping, .status-pill.paused, .status-pill.interrupted, .status-pill.stopped { background: var(--warn-soft); color: var(--warn-ink); }

/* -------------------------------------------------------------------- topbar */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner {
  max-width: 1440px; margin: 0 auto; height: var(--topbar-h); padding: 0 24px;
  display: flex; align-items: center; gap: 24px; min-width: 0;
}
.brand { display: flex; align-items: center; gap: 8px; flex: none; font-weight: 600; font-size: 15px; }
.brand-mark { width: 24px; height: 24px; border-radius: 6px; color: var(--primary); flex: none; }
#nav { display: flex; align-items: stretch; align-self: stretch; gap: 4px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
#nav::-webkit-scrollbar { display: none; }
.nav-item {
  height: auto; padding: 0 10px; border: 0; border-radius: 0; background: none; color: var(--muted);
  font-size: 14px; font-weight: 500; box-shadow: inset 0 -2px 0 transparent; flex: none;
}
.nav-item:hover:not(:disabled) { background: none; color: var(--text); }
.nav-item.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); font-weight: 600; }
.nav-item:focus-visible { outline-offset: -4px; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex: none; min-width: 0; }
.topbar-user { font-size: 13px; color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-job {
  height: 28px; padding: 0 10px; gap: 6px; border: 0; border-radius: 14px; background: var(--primary-soft);
  color: var(--primary-ink); font-size: 12.5px; max-width: 260px;
}
.topbar-job:hover:not(:disabled) { background: color-mix(in srgb, var(--primary-soft), var(--primary) 10%); }
#topbar-job-text { overflow: hidden; text-overflow: ellipsis; }

.banner-update {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 6px max(24px, calc((100% - 1440px) / 2 + 24px));
  background: #e8f1fb; border-bottom: 1px solid #c9dcf2; color: #1d4370; font-size: 13px;
}
.banner-update[hidden] { display: none; }
.banner-warn {
  display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
  padding: 7px max(24px, calc((100% - 1440px) / 2 + 24px));
  background: #fff8e6; border-bottom: 1px solid #f3dfae; color: #6b4a00; font-size: 13px;
}

/* ---------------------------------------------------------------------- page */
.main { max-width: 1440px; margin: 0 auto; padding: 20px 24px 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; min-width: 0; }
.page-head > div:first-child { min-width: 0; max-width: 860px; }
.page-head h1 { font-size: 20px; line-height: 28px; }
.page-head p { margin-top: 2px; font-size: 13px; color: var(--muted); }
.page-actions { display: flex; gap: 8px; flex: none; }
.foot-note { margin: -8px 0 16px; font-size: 12.5px; color: var(--faint); overflow-wrap: anywhere; }
.foot-note:empty { display: none; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 16px; min-width: 0;
}
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; min-height: 28px; min-width: 0; }
.card-head h2 { font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.card-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.card > .field-hint { margin-top: 12px; }

.form-stack { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.field-hint { font-size: 12.5px; font-weight: 400; color: var(--faint); line-height: 1.5; }
.field-hint:empty { display: none; }
.kbd-hint { font-size: 12px; color: var(--faint); display: inline-flex; align-items: center; gap: 3px; }
.form-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.form-actions.bordered { border-top: 1px solid var(--divider); padding-top: 16px; margin-top: 20px; }
.section-title { font-size: 14px; margin: 20px 0 12px; padding-top: 16px; border-top: 1px solid var(--divider); }
.note-line { margin-top: 10px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.note-line:empty { display: none; }
.note-line.ok { color: var(--success-ink); }
.note-line.error { color: var(--danger-ink); }
.error-text { font-size: 13px; color: var(--danger-ink); }
p.error-text:empty { display: none; }
.input-group { display: flex; gap: 8px; }
.input-group > select, .input-group > input { flex: 1 1 auto; }
.input-unit { display: flex; min-width: 0; }
.input-unit input { border-top-right-radius: 0; border-bottom-right-radius: 0; flex: 1 1 auto; }
.input-unit span {
  display: inline-flex; align-items: center; padding: 0 10px; height: var(--control-h); flex: none;
  border: 1px solid var(--border-strong); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--subtle); color: var(--muted); font-size: 12.5px; font-weight: 400;
}

/* folding card */
details.fold { padding: 0; }
details.fold > summary {
  display: flex; align-items: center; gap: 8px; padding: 12px 20px; cursor: pointer; list-style: none;
  font-size: 14px; font-weight: 500; border-radius: var(--radius); user-select: none;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary:hover { background: var(--subtle); }
details.fold[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.chev { width: 14px; height: 14px; color: var(--faint); transition: transform .15s; }
details[open] > summary .chev { transform: rotate(90deg); }
.fold-body { padding: 0 20px 16px; display: flex; flex-direction: column; gap: 10px; }
.fold-body .form-actions { margin-top: 2px; }

/* -------------------------------------------------------------- workbench */
.workbench { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.workbench-form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.workbench-form > .card { margin: 0; }
.workbench-task { min-width: 0; }
.task-panel { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.task-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.task-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.task-title h2 { font-size: 15px; flex: none; }
.task-job { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.task-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.status-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px;
  background: var(--hover); font-size: 12.5px; font-weight: 500; max-width: 320px; min-width: 0;
}
#status-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.task-meta span { overflow-wrap: anywhere; }
.task-meta span:empty { display: none; }

.stepper { list-style: none; display: flex; align-items: center; margin: 14px 0 2px; padding: 10px 12px; background: var(--subtle); border-radius: var(--radius-sm); min-width: 0; }
.step { display: flex; align-items: center; gap: 6px; flex: 1 1 0; min-width: 0; font-size: 12.5px; color: var(--faint); }
.step:last-child { flex: none; }
.step:not(:last-child)::after { content: ""; flex: 1 1 auto; height: 1px; min-width: 8px; background: var(--border-strong); margin: 0 6px; }
.step-mark {
  display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: 50%;
  border: 1px solid var(--border-strong); background: var(--surface); font-size: 11px; font-weight: 600; color: var(--faint);
}
.step-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step.done { color: var(--muted); }
.step.done .step-mark { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.step.done:not(:last-child)::after { background: color-mix(in srgb, var(--primary) 35%, transparent); }
.step.current { color: var(--text); font-weight: 600; }
.step.current .step-mark { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.error { color: var(--danger-ink); font-weight: 600; }
.step.error .step-mark { background: var(--danger); border-color: var(--danger); color: #fff; }
.step.halted { color: var(--warn-ink); font-weight: 600; }
.step.halted .step-mark { background: var(--warn); border-color: var(--warn); color: #fff; }

.pane-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 10px; border-bottom: 1px solid var(--divider); min-width: 0; }
.tabs { display: flex; gap: 4px; min-width: 0; }
.tab {
  height: 34px; padding: 0 8px; border: 0; border-radius: 0; background: none; color: var(--muted);
  font-size: 13.5px; font-weight: 500; box-shadow: inset 0 -2px 0 transparent;
}
.tab:hover:not(:disabled) { background: none; color: var(--text); }
.tab.active { color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); }
.pane-tools { display: flex; align-items: center; gap: 2px; flex: none; }
.pane-tools .icon-button { width: 28px; height: 28px; }
.pane-tools .small-check { margin-right: 6px; }

.pane {
  margin: 0; height: 440px; overflow: auto; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--pane-bg); color: var(--pane-text); border: 1px solid var(--pane-bg);
  font: 12.5px/1.65 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4;
  scrollbar-color: #3a3f47 transparent;
}
.pane.tall { height: 460px; }
.pane:empty {
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px;
  background: var(--subtle); border: 1px dashed var(--border-strong); color: var(--faint); font-family: var(--font); font-size: 13px;
}
.pane:empty::before { content: attr(data-empty); max-width: 360px; white-space: normal; line-height: 1.6; }
.pane[hidden] { display: none !important; }

.project-facts { display: flex; flex-direction: column; gap: 8px; }
.project-facts:empty { display: none; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; }
.fact { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 4px; font-size: 12.5px; }
.fact.ok { background: var(--success-soft); color: var(--success-ink); }
.fact.ok::before { content: "✓"; font-weight: 700; }
.fact.missing { background: var(--hover); color: var(--muted); }
.fact.missing::before { content: "–"; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.card.flush .table-wrap { border: 0; border-radius: 0; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 680px; }
th, td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--divider); vertical-align: middle; white-space: nowrap; }
th { font-size: 12.5px; font-weight: 500; color: var(--muted); background: var(--subtle); border-bottom-color: var(--border); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--subtle); }
td.actions { text-align: right; }
th:last-child { text-align: inherit; }
td.actions > * + * { margin-left: 6px; }
td.muted { color: var(--muted); }
#history-table td:nth-child(2) { white-space: normal; min-width: 160px; max-width: 320px; overflow-wrap: anywhere; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--subtle); }
tbody tr.selected, tbody tr.selected:hover { background: var(--primary-soft); }
tbody tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.projects-table { min-width: 980px; }
.projects-table th:last-child, table.plain th:last-child { text-align: right; }
.projects-table th, .projects-table td { padding-left: 10px; padding-right: 10px; }
.projects-table th:first-child, .projects-table td:first-child { padding-left: 16px; }
.projects-table th:last-child, .projects-table td:last-child { padding-right: 16px; }
.projects-table .name-cell { white-space: normal; width: 300px; min-width: 200px; max-width: 300px; }
.project-open {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  max-width: 100%; white-space: normal; line-height: 1.45; text-align: left; overflow-wrap: anywhere;
  color: var(--text); font-weight: 600;
}
.project-open:hover:not(:disabled) { color: var(--primary); }
.empty-state { padding: 40px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-title { font-size: 15px; font-weight: 600; }
.empty-state button { margin-top: 10px; }
.search-row { display: flex; gap: 8px; margin-bottom: 12px; }
.list-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.list-toolbar input[type="search"] { flex: 1 1 240px; min-width: 180px; max-width: 360px; }
.list-toolbar .inline-field { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; }
.list-toolbar .inline-field span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.list-toolbar .muted { margin-left: auto; font-size: 13px; }
.projects-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.projects-table th.sortable:hover { color: var(--text); }
.projects-table th.sortable.sorted { color: var(--text); }
.projects-table th .sort-mark { margin-left: 4px; font-size: 10px; }
.search-row input { flex: 1 1 auto; }

/* --------------------------------------------------------- key / value lists */
.kv { margin: 0; display: flex; flex-direction: column; }
.kv-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--divider); align-items: baseline; }
.kv-row:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; font-size: 13.5px; overflow-wrap: anywhere; min-width: 0; }
.kv dd.mono { font-size: 12.5px; }
.kv dd .tag { vertical-align: 1px; }
.kv-inline { flex-direction: row; flex-wrap: wrap; gap: 6px 28px; padding: 10px 14px; margin-bottom: 16px; background: var(--subtle); border-radius: var(--radius-sm); }
.kv-inline .kv-row { display: flex; gap: 6px; padding: 0; border: 0; min-width: 0; }
.kv-inline dd { font-weight: 500; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.detail-grid h3 { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
/* 项目文件树：文件夹默认折叠，缩进 + 引导线，文件按类型着色 */
.file-list {
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  max-height: 440px; overflow: auto; padding: 4px 0;
}
.file-row {
  --indent: calc(10px + var(--depth, 0) * 20px);
  display: flex; align-items: center; gap: 8px; min-width: 0; height: 32px;
  padding: 0 10px 0 var(--indent); font-size: 13px; color: var(--text);
}
.file-row:hover { background: var(--subtle); }
.file-row.muted { color: var(--muted); padding-left: 14px; }
.file-row .name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row.dir { cursor: pointer; user-select: none; }
.file-row.dir .name { font-weight: 600; }
.file-row.dir.empty { cursor: default; }
.file-row.dir.empty .name { color: var(--muted); font-weight: 500; }
.file-row:focus-visible { outline-offset: -2px; }
.tree-caret { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; color: var(--faint); }
.tree-caret .icon { width: 14px; height: 14px; transition: transform .15s ease; }
.file-row.dir.open .tree-caret .icon { transform: rotate(90deg); }
.file-row.dir:hover .tree-caret { color: var(--text); }
.file-icon { width: 17px; height: 17px; color: var(--faint); }
.file-row.dir .file-icon { color: #c08a2c; }
.file-row[data-kind="code"] .file-icon { color: #3b6fb6; }
.file-row[data-kind="web"] .file-icon { color: #d0602a; }
.file-row[data-kind="doc"] .file-icon { color: #5a6b7d; }
.file-row[data-kind="data"] .file-icon { color: #8a6bb0; }
.file-row[data-kind="image"] .file-icon { color: #2f8f5b; }
.file-row[data-kind="archive"] .file-icon { color: #9a7b4f; }
.file-meta { flex: none; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.file-row:not(.dir) .file-meta { min-width: 64px; text-align: right; }
.file-row.dir .file-meta { margin-right: 34px; }
.file-download {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: var(--radius-sm); color: var(--faint);
  opacity: .55; transition: opacity .12s, background-color .12s, color .12s;
}
.file-row:hover .file-download, .file-download:focus-visible { opacity: 1; color: var(--text); }
.file-download:hover { background: var(--hover); }
.tree-children {
  background-image: linear-gradient(var(--divider), var(--divider));
  background-repeat: no-repeat; background-size: 1px 100%;
  background-position: calc(10px + var(--depth, 0) * 20px + 7.5px) 0;
}
.copyable { cursor: pointer; }
.copyable:hover { color: var(--accent, #c8102e); text-decoration: underline dotted; }
.clipboard-helper { position: fixed; top: -100px; left: -100px; width: 1px; height: 1px; opacity: 0; }
/* 提交信息弹窗：加宽 + 信息/内容两列 + 内容可上下滚动 */
.dialog.dialog-wide { width: min(860px, calc(100vw - 32px)); height: min(96vh, 960px); max-height: calc(100vh - 16px); overflow: hidden; }
.dialog.dialog-wide .dialog-body { height: 100%; }
.dialog-head-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.submit-info { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; padding-right: 4px; }
.submit-row { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; align-items: start; }
.submit-label { color: var(--muted); font-size: 13px; padding-top: 9px; }
.submit-value { position: relative; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.submit-value:hover { border-color: var(--accent, #c8102e); }
.submit-text { display: block; box-sizing: border-box; width: 100%; min-height: 40px; max-height: 160px; overflow-y: auto; padding: 8px 10px; padding-right: 60px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; border: 0; background: transparent; color: inherit; font-family: inherit; resize: vertical; }
.submit-text:focus { outline: 2px solid var(--accent, #c8102e); outline-offset: -2px; border-radius: 4px; }
.submit-text::placeholder { color: var(--muted); font-style: italic; }
.submit-text[readonly] { background: var(--subtle); cursor: default; }
.submit-text.empty { color: var(--muted); font-style: italic; }
.value-copy { position: absolute; top: 4px; right: 6px; z-index: 1; font-size: 12px; line-height: 1; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--muted); cursor: pointer; }
.value-copy:hover { color: var(--accent, #c8102e); border-color: var(--accent, #c8102e); }
#project-usage .kv-row { grid-template-columns: 1fr auto; }
#project-usage dd { text-align: right; }

/* -------------------------------------------------------------- settings */
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.settings-layout > .card { margin: 0; }
.settings-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.settings-side .card { margin: 0; }
.settings-side .card-head { margin-bottom: 6px; }
.settings-side .field-hint { margin-top: 10px; padding: 8px 10px; background: var(--warn-soft); color: var(--warn-ink); border-radius: var(--radius-sm); }
#system-info .kv-row { grid-template-columns: 86px minmax(0, 1fr); }

/* ---------------------------------------------------------------- dialog */
.dialog {
  border: 0; padding: 0; border-radius: 10px; width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop);
}
.dialog::backdrop { background: rgba(15, 17, 21, .38); }
.dialog[open] { animation: pop-in .14s ease-out; }
.dialog-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -6px -2px 0; }
.dialog-head h2 { font-size: 16px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.confirm-message { margin: 0; line-height: 1.7; white-space: pre-line; color: var(--text); }
#confirm-ok.danger { background: var(--danger, #c0392b); border-color: var(--danger, #c0392b); color: #fff; }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }

/* ----------------------------------------------------------------- toast */
.notice {
  position: fixed; right: 20px; bottom: 20px; z-index: 100; max-width: min(400px, calc(100vw - 40px));
  padding: 10px 14px 10px 12px; border-radius: var(--radius); background: #23272e; color: #f1f3f5;
  font-size: 13.5px; line-height: 1.5; box-shadow: var(--shadow-pop); border-left: 3px solid var(--primary);
  animation: toast-in .18s ease-out; overflow-wrap: anywhere;
}
.notice.ok { border-left-color: #34a853; }
.notice.error { border-left-color: #f28b82; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.brand-word { height: 16px; width: auto; display: block; }
.brand-sub { font-size: 12px; font-weight: 500; color: var(--faint); padding-left: 8px; margin-left: 2px; border-left: 1px solid var(--border); line-height: 14px; }
/* ----------------------------------------------------------------- login（落款：书画题跋风格，浮于山水背景之上的卡片） */
.login-wrap { position: relative; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px 64px; background: #ece4d4; overflow: hidden; }
.login-bg { position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); object-fit: cover; object-position: center bottom; filter: blur(6px) saturate(.9); opacity: .7; pointer-events: none; }
.particles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.login-frame {
  position: relative; z-index: 1; width: min(1392px, 100%); min-height: min(680px, calc(100vh - 112px));
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr);
  background: var(--surface); border: 1px solid rgba(213, 201, 181, .9); border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 70px rgba(60, 45, 25, .16), 0 6px 18px rgba(60, 45, 25, .07);
  animation: frame-in .7s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes frame-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.login-art { position: relative; overflow: hidden; background: #f3ecdf; border-right: 1px solid var(--border); min-height: 560px; }
.art-scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.art-brand { position: absolute; top: 28px; left: 40px; display: flex; align-items: center; gap: 10px; z-index: 1; }
.art-logo { width: 32px; height: 32px; border-radius: 8px; }
.art-word { height: 20px; width: auto; }
.art-brand span { font-size: 12px; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--border-strong); letter-spacing: .12em; }
.art-copy { position: absolute; left: 40px; top: 52%; transform: translateY(-50%); width: min(440px, calc(100% - 200px)); z-index: 1; }
.art-brush { display: block; width: min(340px, 90%); height: auto; margin: 0 0 18px -8px; animation: brush-in 1.4s .2s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes brush-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.art-copy h2 { font-family: var(--serif); font-size: 28px; font-weight: 700; letter-spacing: .04em; line-height: 1.35; color: var(--text); }
.art-copy p { margin-top: 10px; font-size: 14px; line-height: 1.9; color: var(--muted); }
.art-steps { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.art-steps li { display: flex; align-items: center; gap: 14px; }
.art-steps b {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 1.5px solid var(--accent); border-radius: 4px;
  color: var(--accent); font-family: var(--serif); font-size: 16px; font-weight: 700; background: rgba(255, 253, 249, .6);
}
.art-steps span { display: flex; flex-direction: column; font-size: 14px; font-weight: 600; color: var(--text); }
.art-steps small { font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 1px; }
.art-poem { position: absolute; right: 7%; top: 12%; height: 64%; max-height: 440px; width: auto; z-index: 1; animation: fade-in 1.6s .4s ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.login-side { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 40px; background: var(--surface); }
.login-inner { width: min(360px, 100%); display: flex; flex-direction: column; gap: 18px; }
.login-brand { display: none; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 4px; }
.login-logo { width: 56px; height: 56px; border-radius: 13px; box-shadow: 0 8px 20px rgba(60, 45, 25, .12); }
.login-word { height: 26px; width: auto; margin-top: 4px; }
.login-slogan { margin: 0; font-size: 13px; color: var(--muted); letter-spacing: .2em; }
.login-card { display: flex; flex-direction: column; gap: 16px; }
.login-head { margin-bottom: 8px; }
.login-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .24em; color: var(--accent); margin-bottom: 10px; }
.login-eyebrow i { width: 10px; height: 10px; background: var(--accent); border-radius: 1.5px; }
.login-head h1 { font-family: var(--serif); font-size: 28px; font-weight: 700; letter-spacing: .06em; }
.login-head p { margin-top: 6px; font-size: 13px; color: var(--muted); }
.login-card label { font-size: 13px; color: var(--muted); }
.login-card input { height: 42px; padding: 0 12px; background: var(--subtle); border-color: var(--border); font-size: 14px; color: var(--text); }
.login-card input:hover { border-color: var(--border-strong); }
.login-card input:focus { background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(43, 47, 54, .1); }
.login-card button.primary { height: 42px; font-size: 15px; letter-spacing: .3em; margin-top: 4px; }
.login-card button.primary:hover:not(:disabled) { background: var(--primary-hover); }
.login-switch { text-align: center; font-size: 13px; color: var(--muted); }
.login-switch .link-button { color: var(--accent); font-weight: 600; }
.login-foot { position: absolute; bottom: 22px; left: 0; right: 0; z-index: 1; text-align: center; font-size: 12px; color: var(--muted); letter-spacing: .2em; }
@media (max-width: 1180px) {
  .art-poem { display: none; }
  .art-copy { width: calc(100% - 80px); }
}
@media (max-width: 900px) {
  .login-wrap { padding: 32px 16px 56px; }
  .login-bg { filter: none; opacity: 1; }
  .login-frame { grid-template-columns: minmax(0, 1fr); width: min(420px, 100%); min-height: 0; background: rgba(255, 253, 249, .94); }
  .login-art { display: none; }
  .login-side { background: transparent; padding: 32px 24px; }
  .login-brand { display: flex; }
}

/* ----------------------------------------------------------------- login · 动态插画（第四轮） */
.login-art { --mx: 0; --my: 0; }
.art-layers { position: absolute; inset: 0; overflow: hidden; }
.lyr { position: absolute; pointer-events: none; }
.lyr-paper { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lyr-sun { left: 73%; top: 33%; width: 25%; aspect-ratio: 1; transform: translate(-50%, -50%); translate: calc(var(--mx) * -3px) calc(var(--my) * -2px); transition: translate .9s cubic-bezier(.2, .7, .2, 1); }
.lyr-sun img { display: block; width: 100%; height: 100%; animation: lk-breathe 7s ease-in-out infinite alternate; }
@keyframes lk-breathe { from { transform: scale(.95); opacity: .8; } to { transform: scale(1.06); opacity: 1; } }
.lyr-mt, .lyr-mist { left: -5%; bottom: 0; width: 110%; height: 100%; object-fit: cover; object-position: center bottom; transition: translate .9s cubic-bezier(.2, .7, .2, 1); }
.lyr-mt0 { translate: calc(var(--mx) * 4px) calc(var(--my) * 2px); animation: lk-drift-a 46s ease-in-out -12s infinite alternate; }
.lyr-mt1 { translate: calc(var(--mx) * 8px) calc(var(--my) * 3px); animation: lk-drift-b 34s ease-in-out -20s infinite alternate; }
.lyr-mt2 { translate: calc(var(--mx) * 14px) calc(var(--my) * 5px); animation: lk-drift-b 27s ease-in-out -5s infinite alternate-reverse; }
.lyr-mt3 { translate: calc(var(--mx) * 22px) calc(var(--my) * 7px); animation: lk-drift-c 21s ease-in-out -9s infinite alternate; }
.lyr-mist { left: 0; width: 200%; opacity: .9; translate: calc(var(--mx) * 18px) 0; animation: lk-mist 80s linear infinite alternate; }
@keyframes lk-drift-a { from { transform: translateX(-1%); } to { transform: translateX(1%); } }
@keyframes lk-drift-b { from { transform: translateX(-1.8%); } to { transform: translateX(1.8%); } }
@keyframes lk-drift-c { from { transform: translateX(-2.6%); } to { transform: translateX(2.6%); } }
@keyframes lk-mist { from { transform: translateX(0); } to { transform: translateX(-46%); } }
.lyr-birds { inset: 0; animation: lk-fly 28s linear 1.8s infinite both; }
.lyr-birds img { position: absolute; left: 0; top: 5%; width: 58px; height: auto; }
@keyframes lk-fly { 0% { transform: translate(100%, 36px); } 62% { transform: translate(-12%, -26px); } 100% { transform: translate(-12%, -26px); } }

/* 入场：笔触扫出 → 文案浮现 → 题字逐字写出 → 盖章 */
.art-copy h2, .art-copy > p, .art-steps li { animation: lk-rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.art-copy h2 { animation-delay: .55s; }
.art-copy > p { animation-delay: .7s; }
.art-steps li:nth-child(1) { animation-delay: .85s; }
.art-steps li:nth-child(2) { animation-delay: .95s; }
.art-steps li:nth-child(3) { animation-delay: 1.05s; }
@keyframes lk-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
svg.art-poem { height: 64%; max-height: 440px; width: auto; aspect-ratio: 160 / 548; overflow: visible; animation: none; }
.pc { clip-path: inset(0 0 100% 0); animation: lk-write .5s cubic-bezier(.45, 0, .25, 1) both; }
@keyframes lk-write { from { clip-path: inset(0 0 100% 0); opacity: .35; } to { clip-path: inset(0 0 -2% 0); opacity: 1; } }
.pc1 { animation-delay: 1.0s; } .pc2 { animation-delay: 1.16s; } .pc3 { animation-delay: 1.32s; } .pc4 { animation-delay: 1.48s; }
.pc5 { animation-delay: 1.78s; } .pc6 { animation-delay: 1.94s; } .pc7 { animation-delay: 2.1s; } .pc8 { animation-delay: 2.26s; }
.pc9 { animation-delay: 2.42s; } .pc10 { animation-delay: 2.58s; } .pc11 { animation-delay: 2.74s; }
.seal { transform-box: fill-box; transform-origin: 50% 50%; animation: lk-stamp .5s cubic-bezier(.3, 1.35, .5, 1) 3.1s both; }
@keyframes lk-stamp { 0% { opacity: 0; transform: scale(1.9) rotate(-7deg); } 55% { opacity: 1; transform: scale(.94) rotate(0); } 100% { opacity: 1; transform: none; } }
.seal-ink { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; animation: lk-ink 1.5s ease-out 3.3s both; }
@keyframes lk-ink { 0% { opacity: 0; transform: scale(.9); } 18% { opacity: .3; } 100% { opacity: 0; transform: scale(1.7); } }
.login-frame { animation: frame-in .7s cubic-bezier(.2, .7, .2, 1) both, lk-thud .34s ease-out 3.38s; }
@keyframes lk-thud { 0%, 100% { transform: none; } 30% { transform: translateY(2px) scale(.998); } 60% { transform: translateY(-1px); } }

/* 三步依次高亮（入场结束后循环） */
.art-steps b, .art-steps span { animation: lk-step-b 9s ease-in-out infinite; }
.art-steps span { animation-name: lk-step-s; }
.art-steps li:nth-child(1) b, .art-steps li:nth-child(1) span { animation-delay: 4.2s; }
.art-steps li:nth-child(2) b, .art-steps li:nth-child(2) span { animation-delay: 7.2s; }
.art-steps li:nth-child(3) b, .art-steps li:nth-child(3) span { animation-delay: 10.2s; }
@keyframes lk-step-b {
  0%, 36%, 100% { background: rgba(255, 253, 249, .6); color: var(--accent); box-shadow: none; }
  5%, 30% { background: var(--accent); color: #fff; box-shadow: 0 6px 14px rgba(200, 16, 46, .22); }
}
@keyframes lk-step-s { 0%, 36%, 100% { transform: none; } 5%, 30% { transform: translateX(4px); } }

/* ----------------------------------------------------------------- login · 右侧登录区增强 */
.login-side { background: linear-gradient(180deg, #fffdf9 0%, #fcf8f1 100%); overflow: hidden; padding: 56px 40px; }
.side-seal { position: absolute; right: -14px; bottom: -34px; width: 128px; height: auto; opacity: .045; transform: rotate(-9deg); pointer-events: none; }
.login-side::before { content: ""; position: absolute; top: 0; left: 40px; right: 40px; height: 3px; background: linear-gradient(90deg, transparent, rgba(200, 16, 46, .55) 20%, rgba(200, 16, 46, .55) 80%, transparent); opacity: .5; }
.login-inner { position: relative; z-index: 1; gap: 14px; }
.login-tabs { position: relative; display: flex; gap: 20px; border-bottom: 1px solid var(--divider); margin-bottom: 10px; }
.login-tabs button {
  height: auto; padding: 0 0 10px; width: 56px; border: 0; border-radius: 0; background: none; font-family: var(--serif);
  font-size: 15px; font-weight: 600; letter-spacing: .2em; color: var(--faint); transition: color .2s;
}
.login-tabs button:hover:not(:disabled) { background: none; color: var(--text); }
.login-tabs button.active { color: var(--text); }
.tab-ink { position: absolute; left: 12px; bottom: -1px; width: 32px; height: 2px; background: var(--accent); border-radius: 2px; transition: transform .32s cubic-bezier(.3, .8, .3, 1); }
.login-tabs.is-register .tab-ink { transform: translateX(76px); }
.login-card:not([hidden]) { animation: lk-card-in .38s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes lk-card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.login-card.shake { animation: lk-shake .42s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes lk-shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
.field { position: relative; display: flex; align-items: center; }
.field-ic { position: absolute; left: 12px; top: 50%; margin-top: -9px; width: 18px; height: 18px; color: var(--faint); pointer-events: none; transition: color .15s; z-index: 1; }
.field:focus-within .field-ic { color: var(--text); }
.login-card .field input { padding-left: 40px; }
.login-card .field.has-toggle input { padding-right: 44px; }
.login-card input:focus-visible { outline: none; }
.login-card input::placeholder { color: #b3aa9b; }
.pw-toggle { position: absolute; right: 5px; top: 50%; margin-top: -16px; width: 34px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--faint); z-index: 1; }
.pw-toggle:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.pw-toggle svg { width: 18px; height: 18px; }
.pw-toggle .eye-slash { opacity: 0; transition: opacity .15s; }
.pw-toggle.on .eye-slash { opacity: 1; }
.caps-hint { font-size: 12px; font-weight: 500; color: #9a6500; }
.pw-meter { display: flex; align-items: center; gap: 4px; }
.pw-meter i { flex: 1; height: 3px; border-radius: 2px; background: var(--divider); transition: background-color .25s; }
.pw-meter em { flex: none; min-width: 64px; text-align: right; font-style: normal; font-size: 12px; font-weight: 400; color: var(--faint); }
.pw-meter[data-level="1"] i:nth-child(1) { background: #c8102e; }
.pw-meter[data-level="1"] em { color: #a4161a; }
.pw-meter[data-level="2"] i:nth-child(-n+2) { background: #d08a1e; }
.pw-meter[data-level="2"] em { color: #9a6500; }
.pw-meter[data-level="3"] i { background: #3c8d5a; }
.pw-meter[data-level="3"] em { color: #2f7148; }
/* 浏览器自动填充：去掉默认浅蓝底 */
.login-card input:-webkit-autofill, .login-card input:-webkit-autofill:hover {
  -webkit-box-shadow: 0 0 0 1000px var(--subtle) inset; -webkit-text-fill-color: var(--text); caret-color: var(--text); transition: background-color 600000s 0s;
}
.login-card input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 1000px var(--surface) inset, 0 0 0 3px rgba(43, 47, 54, .1); }
.login-card .error-text { padding: 8px 12px; border: 1px solid #efc6c6; border-radius: 6px; background: #fbeeec; color: #a4161a; }
.login-card button.primary { position: relative; transition: background-color .15s, transform .15s, box-shadow .15s; }
.login-card button.primary:hover:not(:disabled) { box-shadow: 0 8px 18px rgba(31, 35, 40, .18); transform: translateY(-1px); }
.login-card button.primary.is-busy { opacity: .85; letter-spacing: .12em; }
.login-card button.primary.is-busy::before { content: ""; width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: lk-spin .7s linear infinite; }
@keyframes lk-spin { to { transform: rotate(360deg); } }
.login-status { position: absolute; left: 0; right: 0; bottom: 20px; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; font-size: 12px; color: var(--faint); letter-spacing: .06em; }
.login-status i { width: 7px; height: 7px; border-radius: 50%; background: #c9c0b0; }
.login-status[data-state="ok"] i { background: #3c8d5a; animation: lk-pulse 2.4s ease-out infinite; }
.login-status[data-state="down"] i { background: var(--accent); }
@keyframes lk-pulse { 0% { box-shadow: 0 0 0 0 rgba(60, 141, 90, .35); } 70%, 100% { box-shadow: 0 0 0 6px rgba(60, 141, 90, 0); } }
/* 登录成功：印章盖下后淡出进入工作台 */
.stamp-overlay { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; pointer-events: none; background: rgba(244, 239, 230, .9); }
.stamp-overlay img { width: 76px; height: auto; }
.stamp-overlay.play { animation: lk-ov 1.25s ease both; }
.stamp-overlay.play img { animation: lk-stamp-big 1.25s cubic-bezier(.3, 1.3, .5, 1) both; }
@keyframes lk-ov { 0% { opacity: 1; } 55% { opacity: 1; } 100% { opacity: 0; } }
@keyframes lk-stamp-big { 0% { opacity: 0; transform: scale(2.3) rotate(-8deg); } 28% { opacity: 1; transform: scale(.94) rotate(0); } 38% { transform: none; } 100% { opacity: 1; transform: scale(1.04); } }
#app:not([hidden]) { animation: lk-app-in .45s ease both; }
@keyframes lk-app-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 900px) {
  .login-side { padding: 28px 22px 52px; background: transparent; }
  .login-side::before { left: 22px; right: 22px; }
  .side-seal { width: 96px; right: -10px; bottom: -26px; }
  .login-status { bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .login-wrap, .login-wrap *, #app, .stamp-overlay, .stamp-overlay * { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------ responsive */
@media (min-width: 1100px) {
  .workbench { grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); }
  .workbench-task { position: sticky; top: calc(var(--topbar-h) + 16px); height: calc(100vh - var(--topbar-h) - 150px); min-height: 500px; }
  .workbench-task .task-panel { height: 100%; }
  .workbench-task .pane { flex: 1 1 auto; height: auto; min-height: 200px; }
}
@media (max-width: 1100px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .topbar-inner { height: auto; flex-wrap: wrap; row-gap: 0; padding: 0 16px; }
  .brand { height: 48px; }
  .topbar-right { margin-left: auto; height: 48px; }
  #nav { order: 3; flex: 1 0 100%; height: 40px; margin: 0 -16px; padding: 0 12px; border-top: 1px solid var(--divider); }
  .workbench-task { position: static; }
}
@media (max-width: 720px) {
  .main { padding: 16px 12px 40px; }
  .topbar-user, .kbd-hint, #engine-badge { display: none; }
  .page-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .page-actions > * { flex: 1 1 0; }
  .card { padding: 14px; }
  details.fold > summary { padding: 12px 14px; }
  .fold-body { padding: 0 14px 14px; }
  .form-grid, .form-grid.cols-3 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .card-head { flex-wrap: wrap; }
  .card-tools { justify-content: flex-start; }
  .pane { height: 360px; }
  .step:not(.current) .step-label { display: none; }
  .task-head { flex-wrap: wrap; }
  .pane-tools .small-check { display: none; }
  .search-row { flex-direction: column; }
  .notice { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .topbar-job { max-width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------- tickets */
.ticket-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.ticket-layout > .card { margin-bottom: 0; }
.ticket-sidebar { padding: 0; overflow: hidden; position: sticky; top: calc(var(--topbar-h) + 16px); }
.ticket-sidebar-head { padding: 14px 14px 10px; border-bottom: 1px solid var(--divider); display: flex; flex-direction: column; gap: 10px; }
.ticket-sidebar-head h2 { font-size: 15px; }
.ticket-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.ticket-filter {
  height: 26px; padding: 0 8px; gap: 5px; font-size: 12.5px; border-radius: 13px;
  border-color: var(--border); background: transparent; color: var(--muted);
}
.ticket-filter.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.ticket-filter.active:hover:not(:disabled) { background: var(--primary-hover); }
.ticket-filter-count { font-size: 11.5px; opacity: .75; font-variant-numeric: tabular-nums; }
.ticket-list { max-height: calc(100vh - var(--topbar-h) - 210px); min-height: 120px; overflow-y: auto; }
.ticket-empty { padding: 28px 16px; text-align: center; }
.ticket-item {
  display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: 100%; height: auto;
  padding: 11px 14px; border: 0; border-bottom: 1px solid var(--divider); border-radius: 0;
  background: transparent; text-align: left; font-weight: 400; white-space: normal;
  box-shadow: inset 3px 0 0 transparent;
}
.ticket-item:hover:not(:disabled) { background: var(--subtle); }
.ticket-item.active, .ticket-item.active:hover:not(:disabled) { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.ticket-item-top { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.ticket-item-id { flex: none; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.ticket-item-title { flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-item.unread .ticket-item-title { font-weight: 700; }
.unread-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); align-self: center; }
.ticket-item-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.ticket-item-meta .status-pill { height: 20px; font-size: 11.5px; padding: 0 7px; }
.ticket-item-clip { display: inline-flex; align-items: center; gap: 2px; }
.ticket-item-clip .icon { width: 13px; height: 13px; }
.ticket-item-time { margin-left: auto; color: var(--faint); }

.ticket-main { min-height: 420px; }
.ticket-form { display: flex; flex-direction: column; gap: 14px; }
.ticket-form .card-head { margin-bottom: 0; }
.ticket-form textarea { min-height: 150px; }
.attach-zone { position: relative; border-radius: var(--radius-sm); transition: box-shadow .12s, background-color .12s; }
.attach-zone.dragging { box-shadow: 0 0 0 2px var(--primary); background: var(--subtle); }
.attach-zone.dragging::after {
  content: "松开即可添加附件"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; color: var(--text); background: rgba(250, 246, 239, .88); border-radius: inherit; pointer-events: none;
}
.attach-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
label.attach-pick { flex-direction: row; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; }
.attach-list { display: flex; flex-wrap: wrap; gap: 8px; }
.attach-list:empty { display: none; }
.attach-block > .attach-list { margin-bottom: 10px; }
.attach-chip {
  display: flex; align-items: center; gap: 8px; width: 220px; padding: 6px 6px 6px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
}
.attach-chip.failed { border-color: #f0bcb7; background: var(--danger-soft); }
.attach-chip img { flex: none; width: 40px; height: 40px; object-fit: cover; border-radius: 4px; background: var(--subtle); }
.attach-chip > .file-icon { flex: none; width: 22px; height: 22px; color: var(--faint); margin: 0 9px; }
.attach-chip-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.attach-chip-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-chip-status { font-size: 11.5px; color: var(--faint); }
.attach-chip.failed .attach-chip-status { color: var(--danger-ink); }
.attach-remove { width: 24px; height: 24px; }
.attach-remove .icon { width: 14px; height: 14px; }

.ticket-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ticket-detail-titles { min-width: 0; }
.ticket-detail-titles h2 { font-size: 16px; line-height: 24px; overflow-wrap: anywhere; }
.ticket-meta { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.ticket-context {
  margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--subtle);
  border: 1px solid var(--divider); display: grid; gap: 4px; font-size: 12.5px;
}
.ticket-context-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; }
.ticket-context-row > span:last-child { overflow-wrap: anywhere; }
.ticket-context-error { color: var(--danger-ink); white-space: pre-wrap; }
.ticket-thread { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.ticket-msg { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); }
.ticket-msg.from-admin { background: #f6f8fb; border-color: #dfe5ee; }
.ticket-msg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.ticket-avatar {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--text); font-size: 12px; font-weight: 600;
}
.from-admin .ticket-avatar { background: var(--primary); color: #fff; }
.role-tag { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--primary); color: #fff; }
.ticket-msg-head .muted { margin-left: auto; }
.ticket-msg-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; font-size: 13.5px; }
.attachment-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-top: 10px; }
.attachment-thumb {
  width: 140px; height: 100px; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--subtle); cursor: zoom-in;
}
.attachment-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attachment-thumb:hover:not(:disabled) { border-color: var(--border-strong); }
a.attachment-file {
  display: flex; align-items: center; gap: 8px; width: 240px; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); text-decoration: none; background: var(--surface);
}
a.attachment-file:hover { background: var(--subtle); text-decoration: none; }
.attachment-file .file-icon { width: 20px; height: 20px; color: var(--faint); }
.attachment-file-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.attachment-file-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-event { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.ticket-event::before, .ticket-event::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--divider); }
.ticket-event .status-pill { height: 20px; font-size: 11.5px; padding: 0 7px; }
.ticket-composer { border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 10px; background: var(--surface); }
.ticket-composer textarea { width: 100%; border: 0; padding: 4px 4px 8px; min-height: 72px; box-shadow: none; background: transparent; }
.ticket-composer textarea:focus { box-shadow: none; }
.ticket-composer:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(43, 47, 54, .12); }
.ticket-composer > .attach-list { margin: 0 4px 8px; }
.composer-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--divider); padding-top: 8px; }
label.composer-status { flex-direction: row; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 400; }
label.composer-status select { height: 28px; font-size: 13px; width: auto; }
.composer-spacer { flex: 1 1 auto; }
.ticket-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ticket-actions-hint { font-size: 13px; font-weight: 500; }

.image-dialog { width: min(1200px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: hidden; }
.image-dialog-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--divider); }
.image-dialog-bar > span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-dialog img { display: block; max-width: 100%; max-height: calc(100vh - 100px); margin: 0 auto; object-fit: contain; background: var(--subtle); }

.live-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--faint); }
.live-hint[hidden] { display: none; }
.live-hint::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success);
  animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse { 50% { opacity: .35; } }
.nav-item { position: relative; }
.nav-badge {
  position: absolute; top: 9px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center;
}

@media (max-width: 1100px) {
  .ticket-layout { grid-template-columns: 280px minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .ticket-layout { grid-template-columns: minmax(0, 1fr); }
  .ticket-sidebar { position: static; }
  .ticket-list { max-height: 320px; }
}
@media (max-width: 720px) {
  .attach-chip, a.attachment-file { width: 100%; }
  .attachment-thumb { width: calc(50% - 4px); }
}

/* ------------------------------------------------- settings: API channel */
.channel-switch { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.channel-switch legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 500; }
.channel-switch[hidden] { display: none; }
.segmented { display: inline-flex; align-self: flex-start; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.segmented label { flex-direction: row; align-items: center; gap: 0; margin: 0; cursor: pointer; font-weight: 500; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.segmented span { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; font-size: 13px; color: var(--muted); background: var(--surface); }
.segmented label + label span { border-left: 1px solid var(--border-strong); }
.segmented input:checked + span { background: var(--primary); color: #fff; }
.segmented input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: -2px; }
#s-api-url:disabled { color: var(--faint); }

/* ------------------------------------------------ 一键流程：步骤选择、进度条 */
.step-picker { border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 14px 0 0; padding: 8px 14px 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.step-picker legend { padding: 0 6px; font-size: 12.5px; color: var(--muted); }
.step-option { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; margin: 0; font-weight: 400; cursor: pointer; }
.step-option input { flex: none; width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--primary); }
.step-option b { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); }
.step-option small { display: block; margin-top: 1px; font-size: 12.5px; line-height: 1.5; color: var(--faint); }
.step-option.disabled { opacity: .5; cursor: not-allowed; }
.single-steps { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 10px; }
.single-steps > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); user-select: none; }
.single-steps .form-actions { margin-top: 10px; }
.progress { margin: 14px 0 2px; }
.progress-bar { height: 8px; border-radius: 999px; background: var(--subtle); border: 1px solid var(--border); overflow: hidden; }
.progress-fill { height: 100%; width: 0; border-radius: 999px; background: var(--primary); transition: width .45s ease; }
.progress.running .progress-fill { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.18) 0 8px, transparent 8px 16px); background-size: 22px 22px; animation: progress-slide 1s linear infinite; }
.progress.halted .progress-fill { background: var(--warn); }
.progress.error .progress-fill { background: var(--danger); }
.progress.done .progress-fill { background: var(--success); }
.progress-text { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.step .step-pct { margin-left: 4px; font-size: 11.5px; font-weight: 400; color: var(--muted); }
@keyframes progress-slide { to { background-position: 22px 0; } }
@media (prefers-reduced-motion: reduce) { .progress.running .progress-fill { animation: none; } }

/* ------------------------------------------------ 降 AIGC 页 */
.seg { display: inline-flex; margin: 0 0 14px; padding: 3px; gap: 2px; background: var(--subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.seg-item { border: 0; background: transparent; padding: 5px 16px; border-radius: 4px; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg-item:hover { color: var(--text); }
.seg-item.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(60, 45, 25, .12); }
#polish-text { width: 100%; resize: vertical; min-height: 220px; line-height: 1.7; }
#polish-progress { width: 100%; height: 8px; }
.polish-result-text { width: 100%; min-height: 220px; resize: vertical; line-height: 1.7; }
.polish-result-meta { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.polish-result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ------------------------------------------------ 启动加载页（避免刷新时闪出登录页） */
.boot-splash { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.boot-splash img { width: 56px; height: 56px; opacity: .85; animation: boot-pulse 1.2s ease-in-out infinite; }
@keyframes boot-pulse { 0%, 100% { opacity: .35; transform: scale(.96); } 50% { opacity: .9; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .boot-splash img { animation: none; opacity: .7; } }

/* ------------------------------------------------ 降 AIGC：结果区（降 AIGC 页与历史详情共用） */
.polish-result-actions .push { margin-left: auto; }
.history-polish { margin: 4px 0 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--subtle); }
.history-polish .polish-result-text { background: var(--surface); }

/* ------------------------------------------------ 管理员页 */
.admin-tabs { flex-wrap: wrap; margin-bottom: 16px; }
.admin-pane { display: flex; flex-direction: column; gap: 16px; }
.admin-pane > .card { margin: 0; }
.form-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.form-row > label { color: var(--muted); font-size: 13px; font-weight: 400; flex-direction: row; white-space: nowrap; }
.form-row input[type="number"] { width: 180px; }
.alert-list { display: flex; flex-direction: column; gap: 8px; }
.alert-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius-sm); background: var(--surface); }
.alert-card.danger { border-left-color: var(--danger); background: var(--danger-soft); }
.alert-card.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.alert-card.info { border-left-color: var(--faint); }
.alert-body { flex: 1 1 auto; min-width: 0; }
.alert-title { font-weight: 600; font-size: 13.5px; }
.alert-detail { margin-top: 2px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.alert-ok { color: var(--success-ink); font-size: 13px; margin: 0; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.filter-row select, .filter-row input[type="search"] { width: auto; min-width: 130px; }
.filter-row input[type="search"] { flex: 1 1 200px; max-width: 320px; }
.date-field { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 13px; font-weight: 400; }
.date-field input { width: 140px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.mono-cell { font-family: var(--mono); font-size: 12px; }
.clip-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-hint { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--faint); }
.detail-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px 28px; }
.detail-sections h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.detail-sections .wide { grid-column: 1 / -1; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-table th, .mini-table td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--divider); vertical-align: top; }
.mini-table th { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.fail-item { padding: 8px 0; border-bottom: 1px solid var(--divider); font-size: 13px; }
.fail-item:last-child { border-bottom: 0; }
.fail-item .fail-error { margin-top: 2px; color: var(--danger-ink); font-size: 12.5px; word-break: break-all; }
.feature-card { margin: 0; }
.scope-group { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 4px; }
.scope-group label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-weight: 400; }
.user-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 4px; padding: 10px 12px; background: var(--subtle); border-radius: var(--radius-sm); }
.user-checks label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-weight: 400; }
.user-checks[hidden] { display: none; }
.notice-items { display: flex; flex-direction: column; gap: 14px; max-height: 50vh; overflow-y: auto; }
.notice-item h3 { margin: 0 0 4px; font-size: 14.5px; }
.notice-item p { margin: 0; white-space: pre-line; line-height: 1.7; color: var(--muted); font-size: 13.5px; }
.nav-new { margin-left: 5px; padding: 0 5px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 700; line-height: 16px; vertical-align: 1px; }
.nav-item .nav-badge.admin-badge { background: var(--warn); }
.kv-row .quota-note { color: var(--faint); font-size: 12px; }
