:root {
  --ink: #162a2c;
  --muted: #687c7c;
  --line: #dce7e4;
  --paper: #f4f7f5;
  --card: #ffffff;
  --teal: #087f73;
  --teal-dark: #075e57;
  --mint: #dff3ed;
  --amber: #b66b16;
  --red: #b63d43;
  --shadow: 0 12px 35px rgba(23, 54, 51, .07);
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: linear-gradient(180deg, #102e2d 0%, #102e2d 60%, #0d2726 92%, #0b2120 100%); color: white; padding: 30px 22px 18px; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #3a6e68 #0d2726; }
.brand { flex-shrink: 0; display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #0b534e; background: #a8e4d1; font-weight: 800; letter-spacing: -.04em; }
.brand strong, .brand span { display: block; }
.brand span { margin-top: 3px; color: #a8c5c1; font-size: 12px; }
nav { flex-shrink: 0; margin-top: 62px; display: grid; gap: 8px; }
nav a { text-decoration: none; color: #aac4c1; padding: 12px 14px; border-radius: 10px; transition: .2s; }
nav a:hover, nav a.active { color: white; background: rgba(161, 226, 211, .12); }
.module-sidebar-nav { flex-shrink: 0; flex-shrink: 0; margin-top: 38px; }
.workspace-nav { flex-shrink: 0; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(184, 225, 216, .14); }
.workspace-nav .side-nav-label { color: #5a8f89; }
.workspace-nav .side-nav-button { color: #5a928b; }
.workspace-nav .side-nav-button:hover, .workspace-nav .side-nav-button.active { color: #c5ece6; background: rgba(161, 226, 211, .1); }
.side-nav-label { margin: 8px 10px 3px; color: #789b97; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.side-nav-button { width: 100%; border: 0; border-radius: 10px; padding: 11px 13px; color: #aac4c1; background: transparent; text-align: left; cursor: pointer; transition: .2s; }
.side-nav-button:hover, .side-nav-button.active { color: white; background: rgba(161, 226, 211, .12); }
.sidebar-module-list { display: grid; gap: 6px; }
.sidebar-module-button { display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 9px; }
.sidebar-module-button i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #0d4e49; background: #a8e4d1; font-style: normal; font-size: 11px; font-weight: 850; flex-shrink: 0; }
.sidebar-module-button span { display: grid; gap: 2px; }
.sidebar-module-button small { color: #739995; font-size: 10px; }
.side-doc-link { flex-shrink: 0; margin-top: 18px; padding: 10px 13px; border: 1px solid rgba(140, 190, 182, .2); border-radius: 10px; color: #6da89f; text-decoration: none; font-size: 12px; font-weight: 750; }
.side-doc-link:hover { color: #b8e8df; border-color: rgba(184, 225, 216, .3); background: rgba(161, 226, 211, .06); }
.side-note { flex-shrink: 0; margin-top: auto; padding: 16px; border: 1px solid rgba(140, 190, 182, .2); border-radius: 12px; font-size: 13px; color: #8ebeb5; }
.side-note p { color: #689992; line-height: 1.6; margin: 9px 0 0; }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #5de2a8; box-shadow: 0 0 0 4px rgba(93, 226, 168, .12); }
main { width: min(1500px, 100%); padding: 38px 4vw 28px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-actions .btn { text-decoration: none; white-space: nowrap; }
.eyebrow { margin: 0 0 7px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .13em; }
h1 { margin: 0; font-family: Georgia, "Microsoft YaHei", serif; font-size: clamp(30px, 4vw, 48px); font-weight: 600; letter-spacing: -.04em; }
h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.subtitle { margin: 10px 0 0; color: var(--muted); }
.status-pill { white-space: nowrap; border: 1px solid #b8dfd6; background: var(--mint); color: var(--teal-dark); border-radius: 999px; padding: 9px 14px; font-size: 13px; }
.status-pill.muted { color: var(--muted); border-color: var(--line); background: white; }
.status-pill.error { color: var(--red); border-color: #efc5c8; background: #fff3f3; }
.module-gateway { margin-top: 28px; min-height: 62vh; padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(145deg, #fff 0%, #f1f8f5 100%); box-shadow: var(--shadow); }
.gateway-head { max-width: 720px; }
.gateway-head h2 { font-size: clamp(25px, 3vw, 36px); }
.gateway-head > p:last-child { margin: 12px 0 0; color: var(--muted); line-height: 1.7; }
.module-gateway-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 30px; }
.module-entry { min-height: 250px; display: flex; flex-direction: column; border: 1px solid #cee2dc; border-radius: 18px; padding: 24px; color: var(--ink); background: white; text-align: left; box-shadow: 0 10px 28px rgba(23, 54, 51, .06); transition: .2s; }
.module-entry:hover { transform: translateY(-4px); border-color: #89c9ba; box-shadow: 0 18px 36px rgba(23, 54, 51, .11); }
.module-entry-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; color: #075e57; background: var(--mint); font-size: 15px; font-weight: 900; }
.module-entry h3 { margin: 22px 0 6px; font-size: 23px; }
.module-entry p { margin: 0; min-height: 42px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.module-entry-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 22px; }
.module-entry-action { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; color: var(--teal); font-size: 12px; font-weight: 800; }
.view-hidden { display: none !important; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 14px; margin: 32px 0 22px; }
.stat { min-height: 132px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 19px; box-shadow: var(--shadow); }
.stat span, .stat small { display: block; color: var(--muted); font-size: 12px; }
.stat strong { display: block; margin: 12px 0 5px; font-size: 28px; line-height: 1; }
.stat.accent { color: white; border-color: #0d6e65; background: linear-gradient(135deg, #0b756a, #0c504c); }
.stat.accent span, .stat.accent small { color: #c6e3de; }
.stat.accent strong { font-size: 22px; }
.panel { margin-top: 18px; padding: 25px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); scroll-margin-top: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 22px; }
.helper { color: var(--muted); font-size: 12px; text-align: right; }
label { display: grid; gap: 7px; color: #385251; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #cbdad6; background: #fbfcfb; color: var(--ink); border-radius: 9px; padding: 11px 12px; outline: none; transition: .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 127, 115, .1); background: white; }
textarea { resize: vertical; line-height: 1.55; }
.source-form { display: grid; grid-template-columns: 180px 220px minmax(260px, 1fr) 130px; align-items: end; gap: 12px; }
.path-picker-row { display: flex; gap: 6px; align-items: center; }
.path-picker-row input[type="text"] { flex: 1; }
.hidden-input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.project-form { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; align-items: end; gap: 12px; }
.project-description { grid-column: 1 / -2; }
.model-form { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); align-items: end; gap: 12px; padding-top: 15px; }
.model-file { grid-column: span 2; }
.model-description { grid-column: 1 / -2; }
.btn { border: 0; border-radius: 9px; padding: 11px 16px; font-weight: 750; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--teal); color: white; }
.btn.primary:hover { background: var(--teal-dark); }
.btn.secondary { background: #153d3b; color: white; }
.btn.ghost { border: 1px solid var(--line); color: var(--ink); background: white; }
.btn.danger { color: var(--red); border: 1px solid #ecc7c9; background: #fff6f6; }
.btn.small { padding: 7px 10px; font-size: 12px; }
.btn.wide { min-width: 130px; }
.form-message { min-height: 18px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.form-message.error { color: var(--red); }
.form-message.success { color: var(--teal); }
.source-list { display: grid; gap: 10px; margin-top: 14px; }
.project-grid, .model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.project-card, .model-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fcfdfc; }
.project-card header, .model-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.project-card h3, .model-card h3 { margin: 0; font-size: 15px; }
.project-card header p, .model-card header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.project-summary { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 15px; }
.project-summary span { padding: 10px; border-radius: 9px; background: #f1f5f3; }
.project-summary small, .project-summary strong { display: block; }
.project-summary small { color: var(--muted); font-size: 10px; }
.project-summary strong { margin-top: 5px; font-size: 12px; }
.project-card > .open-project { width: 100%; margin-top: 13px; }
.model-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.card-description { min-height: 36px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.card-actions { display: flex; gap: 8px; margin-top: 14px; }
.source-card { display: grid; grid-template-columns: minmax(180px, 1.1fr) 1fr auto; align-items: center; gap: 18px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 12px; }
.source-card h3 { font-size: 15px; margin: 0 0 5px; }
.source-card p { margin: 0; color: var(--muted); font-size: 12px; word-break: break-all; }
.source-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; background: #eff4f2; color: #45615e; font-size: 11px; }
.chip.good { color: var(--teal-dark); background: var(--mint); }
.chip.warn { color: var(--amber); background: #fff1dc; }
.chip.bad { color: var(--red); background: #fff0f1; }
.source-extra { grid-column: 1 / -1; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 12px; }
.source-extra summary { cursor: pointer; color: var(--teal-dark); font-weight: 700; }
.source-extra p { margin-top: 8px; line-height: 1.6; }
.scan-builder { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(360px, 1.8fr) auto; align-items: end; gap: 15px; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode { text-align: left; padding: 11px 13px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: #fafcfb; }
.mode strong, .mode span { display: block; }
.mode strong { font-size: 13px; }
.mode span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.mode.active { border-color: var(--teal); background: var(--mint); box-shadow: inset 0 0 0 1px var(--teal); }
.active-job { margin-top: 18px; padding: 18px; border: 1px solid #b9ded5; border-radius: 12px; background: #f1faf7; }
.active-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.active-row h3 { margin: 0; font-size: 15px; }
.active-row p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.progress-track { height: 8px; margin-top: 14px; overflow: hidden; border-radius: 99px; background: #d9e9e5; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0a8175, #4fc29f); transition: width .4s; }
.history-layout { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(420px, 1.5fr); min-height: 380px; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.job-list { max-height: 650px; overflow-y: auto; border-right: 1px solid var(--line); background: #fbfcfb; }
.job-item { display: block; width: 100%; padding: 15px 16px; border: 0; border-bottom: 1px solid var(--line); text-align: left; color: var(--ink); background: transparent; }
.job-item:hover, .job-item.active { background: #edf6f3; }
.job-item-head { display: flex; justify-content: space-between; gap: 10px; }
.job-item strong { font-size: 13px; }
.job-item p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.badge { flex: 0 0 auto; padding: 4px 7px; border-radius: 99px; font-size: 10px; font-weight: 800; }
.badge.completed, .badge.passed, .badge.validated, .badge.finalized, .badge.ready, .badge.frozen { color: var(--teal-dark); background: var(--mint); }
.badge.running, .badge.pending, .badge.validating, .badge.active, .badge.draft, .badge.pending_upload, .badge.uploading, .badge.precheck, .badge.registering, .badge.inferring, .badge.extracting, .badge.collecting, .badge.matching, .badge.rescreening, .badge.building, .badge.finalizing { color: #24668b; background: #e3f1f8; }
.badge.failed, .badge.cancelled, .badge.invalid { color: var(--red); background: #fff0f1; }
.badge.awaiting_model { color: var(--amber); background: #fff1dc; }
.badge.skipped { color: #687271; background: #eef0ef; }
.job-detail { padding: 22px; min-width: 0; }
.empty-state, .empty-detail { color: var(--muted); text-align: center; padding: 40px 20px; }
.empty-detail { display: grid; place-items: center; }
.empty-detail span { color: var(--ink); font-weight: 700; }
.detail-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.detail-head h3 { margin: 0 0 7px; }
.detail-head p { margin: 0; color: var(--muted); font-size: 12px; }
.summary-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 15px 0; }
.summary-cell { padding: 11px; border-radius: 9px; background: #f3f6f5; }
.summary-cell span, .summary-cell strong { display: block; }
.summary-cell span { color: var(--muted); font-size: 10px; }
.summary-cell strong { margin-top: 5px; font-size: 17px; }
.rule-list { display: grid; gap: 8px; }
.rule { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.rule summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 13px; font-weight: 750; }
.rule-body { padding-top: 10px; color: var(--muted); font-size: 12px; }
.finding { margin: 7px 0; padding-left: 10px; border-left: 2px solid #d8e2df; line-height: 1.5; }
.ai-box { margin-top: 15px; padding: 18px 20px; border-radius: 12px; background: #f4f0e7; border: 1px solid #e5dcc7; max-height: 600px; overflow-y: auto; }
.ai-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ai-head strong { font-size: 13px; color: #5d4e37; }
.ai-report { margin: 12px 0 0; line-height: 1.7; color: #4d4639; font-size: 12px; }
.ai-report .md-h1 { font-size: 14px; font-weight: 700; color: #5d4e37; margin: 8px 0 6px; padding-bottom: 5px; border-bottom: 1px solid #d9ccb5; }
.ai-report .md-h2 { font-size: 13px; font-weight: 700; color: #6b5d45; margin: 12px 0 5px; }
.ai-report .md-h3 { font-size: 12px; font-weight: 700; color: #7d6e55; margin: 8px 0 4px; }
.ai-report p { margin: 0 0 6px; }
.ai-report ul { margin: 4px 0 10px; padding-left: 18px; }
.ai-report li { margin-bottom: 3px; }
.ai-report .risk-high { color: #c0392b; font-weight: 600; }
.ai-report .risk-mid { color: #d35400; }
.ai-report strong { color: #c0392b; }
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.module-card { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fcfdfc; }
.module-card header { display: flex; justify-content: space-between; gap: 10px; }
.module-card h3 { margin: 0; font-size: 15px; }
.module-card p { color: var(--muted); margin: 9px 0 0; font-size: 12px; line-height: 1.6; }
.module-card > .btn { width: 100%; margin-top: 12px; }
.taxonomy-browser { margin-top: 14px; padding: 16px; border: 1px solid #b9dbd3; border-radius: 12px; background: #f7fcfa; }
.taxonomy-version-list { display: flex; gap: 8px; margin-top: 13px; overflow-x: auto; padding-bottom: 4px; }
.taxonomy-version { display: flex; flex: 0 0 230px; align-items: center; justify-content: space-between; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; text-align: left; }
.taxonomy-version.active { border-color: var(--teal); background: var(--mint); }
.taxonomy-version strong, .taxonomy-version small { display: block; }
.taxonomy-version small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.taxonomy-version-detail { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; background: white; overflow: hidden; }
.taxonomy-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; }
.taxonomy-actions strong, .taxonomy-actions span { display: block; }
.taxonomy-actions span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.project-workspace { border-color: #b7d9d2; background: linear-gradient(180deg, #f9fdfb 0, #fff 180px); }
.workspace-head, .section-title, .batch-head, .round-card > header, .review-list article > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.workspace-subtitle { margin-top: 7px; text-align: left; }
.workspace-overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.workspace-overview article, .mini-stats article { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.workspace-overview span, .workspace-overview small, .mini-stats span { display: block; color: var(--muted); font-size: 10px; }
.workspace-overview strong, .mini-stats strong { display: block; margin: 7px 0 4px; font-size: 18px; }
.workspace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.workspace-section { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.workspace-wide { grid-column: 1 / -1; }
.section-title { align-items: center; }
.section-title > div { display: flex; align-items: center; gap: 9px; }
.section-title > div > span { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; color: var(--teal-dark); background: var(--mint); font-size: 10px; font-weight: 800; }
.section-title h3 { margin: 0; font-size: 15px; }
.section-hint { margin: 7px 0 14px; color: var(--muted); font-size: 11px; }
.round-list, .analysis-list, .artifact-list, .review-list, .task-list { display: grid; gap: 10px; margin-top: 14px; }
.round-card { padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfb; }
.round-card h4, .class-card h4, .sample-info h4 { margin: 0; }
.round-card header p, .class-card header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.batch-list { display: grid; gap: 9px; margin-top: 13px; }
.batch-card { padding: 13px; border: 1px solid #d9e5e2; border-radius: 10px; background: white; }
.batch-head { align-items: center; }
.batch-head strong, .batch-head span { display: block; }
.batch-head span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.batch-stage { margin: 8px 0; color: var(--muted); font-size: 11px; }
.text-error { color: var(--red); }
.batch-upload { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 8px; padding: 10px; border-radius: 9px; background: #f3f7f5; }
.file-picker { position: relative; display: block; overflow: hidden; padding: 9px 10px; border: 1px dashed #a9c5bf; border-radius: 8px; color: var(--teal-dark); background: white; text-align: center; cursor: pointer; }
.file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-progress { grid-column: 1 / -1; min-height: 15px; color: var(--muted); font-size: 10px; }
.empty-state.compact { padding: 15px; }
.analysis-list { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.analysis-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fbfcfb; text-align: left; }
.analysis-item.active { border-color: var(--teal); background: var(--mint); }
.analysis-item strong, .analysis-item small { display: block; }
.analysis-item small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.result-workspace { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line); }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.class-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.class-card { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.class-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.class-card img, .sample-visual img { display: block; width: 100%; margin-top: 10px; border-radius: 8px; background: #f1f4f3; object-fit: contain; }
.class-card img { aspect-ratio: 4 / 3; }
.class-card > p { color: var(--muted); font-size: 10px; }
.plot-placeholder { display: grid; min-height: 130px; margin-top: 10px; place-items: center; border-radius: 8px; color: var(--muted); background: #f1f4f3; font-size: 11px; }
.filter-bar { display: grid; grid-template-columns: 1fr 1fr auto auto; align-items: end; gap: 8px; margin-top: 14px; }
.sample-table { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); background: #f5f8f7; font-size: 10px; }
td strong, td small { display: block; }
td small { margin-top: 4px; color: var(--muted); max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
td .chip { margin-left: 5px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; color: var(--muted); font-size: 11px; }
.pagination div { display: flex; gap: 6px; }
.sample-detail { position: relative; display: grid; grid-template-columns: minmax(220px, .8fr) minmax(300px, 1.2fr); gap: 18px; margin-top: 14px; padding: 18px; border: 1px solid #b8dcd4; border-radius: 12px; background: #f7fcfa; }
.sample-detail-close { position: absolute; top: 8px; right: 10px; border: 0; color: var(--muted); background: transparent; font-size: 22px; }
.sample-visual img { max-height: 360px; margin: 0; }
.sample-info > p { color: var(--muted); font-size: 12px; }
.sample-info dl { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.sample-info dl div { padding: 9px; border-radius: 8px; background: white; }
.sample-info dt { color: var(--muted); font-size: 9px; }
.sample-info dd { margin: 4px 0 0; font-size: 12px; font-weight: 750; }
.prob-list { display: grid; gap: 6px; }
.prob-list span { position: relative; display: grid; grid-template-columns: 110px 1fr 55px; align-items: center; gap: 8px; font-size: 10px; }
.prob-list i { display: block; height: 6px; max-width: 100%; border-radius: 99px; background: var(--teal); }
.prob-list em { color: var(--muted); font-style: normal; text-align: right; }
.quality-flags { padding-top: 9px; border-top: 1px solid var(--line); }
.review-detail { grid-template-columns: 1fr; }
.sample-info.full { min-width: 0; }
.eval-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 16px; }
.eval-panel .eval-card { background: var(--paper); border: 1px solid var(--line); border-radius: 9px; padding: 12px; }
.eval-panel .eval-card h5 { font-size: 11px; margin: 0 0 4px; color: var(--muted); }
.eval-panel .eval-card strong { font-size: 16px; }
.eval-panel .eval-card small { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.per-class-eval { margin-top: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.per-class-eval span { display: flex; justify-content: space-between; padding: 4px 8px; background: var(--paper); border-radius: 5px; font-size: 10px; }
.per-class-eval b { color: var(--ink); }
.review-hint { padding: 10px 14px; border-radius: 9px; margin-bottom: 14px; font-size: 11px; line-height: 1.5; }
.review-hint.warn { background: #fef9e7; border: 1px solid #f4d03f; color: #7d6608; }
.review-hint.good { background: #eafaf1; border: 1px solid #82e0aa; color: #1e8449; }

/* ---- Project report / analysis summary ---- */
.report-workspace-section { padding: 22px; }
.report-inline { margin: 16px 0 14px; }
.report-summary-card {
  overflow: hidden;
  border: 1px solid #d9e6e2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(17, 57, 52, .07);
}
.report-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid #e7efec;
  background: linear-gradient(135deg, #fbfdfc 0%, #f3faf7 100%);
}
.report-summary-title-wrap { min-width: 0; display: flex; align-items: center; gap: 13px; }
.report-summary-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #cce5dd;
  border-radius: 12px;
  color: #087f73;
  background: #e8f6f1;
}
.report-summary-mark svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.report-summary-kicker { margin-bottom: 3px; color: #78938e; font-size: 9px; font-weight: 850; letter-spacing: .15em; }
.report-summary-title-wrap h4 { margin: 0; overflow: hidden; color: #173532; font-size: 17px; font-weight: 800; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.report-summary-title-wrap p { margin: 4px 0 0; color: #738a86; font-size: 11px; line-height: 1.45; }
.report-meta-dot { margin: 0 7px; color: #b4c7c2; }
.report-status-pill { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 7px 11px; border: 1px solid #bfe1d4; border-radius: 999px; color: #176d59; background: #edf9f4; font-size: 10px; font-weight: 800; }
.report-status-pill i { width: 7px; height: 7px; border-radius: 50%; background: #35a67a; box-shadow: 0 0 0 3px rgba(53, 166, 122, .12); }
.report-summary-body { padding: 20px 22px 18px; }
.report-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.report-kpi-card { position: relative; min-width: 0; padding: 15px 16px; border: 1px solid #e3ece9; border-radius: 13px; background: #fbfcfc; }
.report-kpi-card::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 2px; border-radius: 99px; background: #c9d9d5; opacity: 0; }
.report-kpi-card.risk::after, .report-kpi-card.accuracy::after { opacity: 1; }
.report-kpi-card.risk::after { background: #d96868; }
.report-kpi-card.accuracy::after { background: #45a47f; }
.report-kpi-card > span { display: block; color: #708681; font-size: 10px; font-weight: 700; }
.report-kpi-card > strong { display: block; margin-top: 7px; color: #193b37; font-size: 27px; font-weight: 820; letter-spacing: -.035em; line-height: 1; }
.report-kpi-card.risk > strong { color: #b94c50; }
.report-kpi-card.accuracy > strong { color: #13715d; }
.report-kpi-card > small { display: block; margin-top: 7px; overflow: hidden; color: #97a8a4; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.report-content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(230px, .7fr); gap: 14px; margin-top: 14px; }
.report-block { min-width: 0; padding: 16px; border: 1px solid #e3ece9; border-radius: 14px; background: #fff; }
.report-class-block { background: linear-gradient(180deg, #fff 0%, #fbfdfc 100%); }
.report-risk-block { display: flex; flex-direction: column; background: #fafcfb; }
.report-block-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.report-block-head h5 { margin: 2px 0 0; color: #203d39; font-size: 13px; }
.report-block-head > small { margin-top: 14px; color: #9aaba7; font-size: 9px; }
.report-block-eyebrow { color: #8da19c; font-size: 8px; font-weight: 850; letter-spacing: .14em; }
.report-class-list { display: grid; gap: 9px; }
.report-class-row { display: grid; grid-template-columns: minmax(125px, 165px) minmax(120px, 1fr) 52px; align-items: center; gap: 11px; }
.report-class-name { min-width: 0; display: flex; align-items: center; gap: 7px; }
.report-class-name strong { min-width: 0; overflow: hidden; color: #324d49; font-size: 11px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.report-class-tag { flex: 0 0 auto; padding: 3px 6px; border-radius: 999px; color: #6f8580; background: #eef3f1; font-size: 8px; font-weight: 760; }
.report-class-tag.good { color: #25735f; background: #e9f6f1; }
.report-class-tag.warning { color: #9b6719; background: #fbf1df; }
.report-class-tag.danger { color: #a94549; background: #fbe9e9; }
.report-class-meter { height: 7px; overflow: hidden; border-radius: 999px; background: #edf2f0; }
.report-class-meter i { display: block; height: 100%; border-radius: inherit; background: #9eb7b0; transition: width .45s ease; }
.report-class-meter i.good { background: #5aaa8a; }
.report-class-meter i.warning { background: #d8a44f; }
.report-class-meter i.danger { background: #d86d70; }
.report-class-value { text-align: right; color: #617873; font-size: 11px; }
.report-class-value.good { color: #2b8069; }
.report-class-value.warning { color: #a67323; }
.report-class-value.danger { color: #b84d52; }
.report-empty { padding: 20px 0; color: #93a6a1; text-align: center; font-size: 11px; }
.report-risk-ring {
  --ring-color: #54a98b;
  --risk: 0;
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
  align-self: center;
  margin: 3px 0 12px;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--risk) * 1%), #e8efed 0);
  position: relative;
}
.report-risk-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.report-risk-ring > div { position: relative; z-index: 1; text-align: center; }
.report-risk-ring strong { display: block; color: #264844; font-size: 22px; font-weight: 820; letter-spacing: -.03em; }
.report-risk-ring span { display: block; margin-top: 2px; color: #8fa19d; font-size: 8px; font-weight: 700; }
.report-risk-ring.warning { --ring-color: #d5a04b; }
.report-risk-ring.danger { --ring-color: #d4676b; }
.report-risk-copy { margin: 0; padding: 9px 10px; border-radius: 9px; color: #48625d; background: #edf6f2; font-size: 10px; line-height: 1.5; text-align: center; }
.report-risk-copy.warning { color: #8f651f; background: #fbf3e6; }
.report-risk-copy.danger { color: #a5464a; background: #fbeaea; }
.report-focus-list { display: grid; gap: 0; margin: 12px 0 0; }
.report-focus-list div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid #e8efed; }
.report-focus-list dt { color: #899b97; font-size: 9px; }
.report-focus-list dd { margin: 0; color: #334d49; font-size: 10px; font-weight: 750; text-align: right; }
.report-review-strip { display: grid; grid-template-columns: minmax(150px, 1.2fr) repeat(3, 1fr); align-items: center; gap: 0; margin-top: 14px; overflow: hidden; border: 1px solid #e3ece9; border-radius: 13px; background: #fbfcfc; }
.report-review-title, .report-review-metric { padding: 13px 15px; }
.report-review-title span, .report-review-title small { display: block; }
.report-review-title span { color: #334f4a; font-size: 11px; font-weight: 780; }
.report-review-title small { margin-top: 3px; color: #94a6a2; font-size: 9px; }
.report-review-metric { border-left: 1px solid #e6eeeb; text-align: center; }
.report-review-metric strong, .report-review-metric span { display: block; }
.report-review-metric strong { color: #287a65; font-size: 18px; }
.report-review-metric span { margin-top: 2px; color: #91a29e; font-size: 8px; }
.report-review-metric.danger strong { color: #ba5054; }
.report-summary-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #e5eeeb; }
.report-disclaimer { min-width: 0; display: flex; align-items: center; gap: 8px; color: #91a19d; }
.report-disclaimer > span { width: 18px; height: 18px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #d5e1dd; border-radius: 50%; font-family: Georgia, serif; font-size: 10px; }
.report-disclaimer p { margin: 0; font-size: 9px; line-height: 1.45; }
.report-disclaimer strong { color: #718681; }
.report-download-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.report-action-btn, .report-artifact-download { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.report-action-btn { padding: 7px 10px; border: 1px solid #ccdcd7; border-radius: 8px; color: #315e56; background: #fff; font-size: 9px; font-weight: 760; transition: .15s; }
.report-action-btn:hover { border-color: #9ec8bc; background: #f3f8f6; }
.report-action-btn.primary { border-color: #0d7066; color: #fff; background: #0d7066; }
.report-action-btn.primary:hover { background: #095f57; }
.report-action-btn svg, .report-artifact-icon svg, .report-artifact-download svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.report-generation-state { display: inline-flex; align-items: center; gap: 6px; color: #91a29e; font-size: 9px; }
.report-spinner { width: 12px; height: 12px; border: 2px solid #d9e6e2; border-top-color: #178375; border-radius: 50%; animation: report-spin .8s linear infinite; }
@keyframes report-spin { to { transform: rotate(360deg); } }
.artifact-subhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 13px 0 7px; }
.artifact-subhead strong { color: #36514d; font-size: 11px; }
.artifact-subhead small { color: #96a7a3; font-size: 9px; }
.report-artifact-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.report-artifact-list .report-artifact-card { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 9px; min-width: 0; padding: 10px 11px; border: 1px solid #e1ebe8; border-radius: 11px; background: #fbfcfc; }
.report-artifact-list .report-artifact-card.ready { background: #fff; }
.report-artifact-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #39766a; background: #eaf5f1; }
.report-artifact-main { min-width: 0; }
.report-artifact-main strong, .report-artifact-main span { display: block; }
.report-artifact-main strong { overflow: hidden; color: #294641; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.report-artifact-main span { margin-top: 3px; color: #93a49f; font-size: 8px; }
.report-artifact-download { width: 30px; height: 30px; border: 1px solid #cdded9; border-radius: 8px; color: #2f6d62; background: #fff; transition: .15s; }
.report-artifact-download:hover { border-color: #9fc9bd; background: #eff7f4; }
.report-artifact-download span { display: none; }

@media (max-width: 1100px) {
  .report-content-grid { grid-template-columns: 1fr; }
  .report-risk-block { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; }
  .report-risk-block .report-block-head { grid-column: 1 / -1; }
  .report-risk-ring { grid-row: 2 / 4; }
  .report-risk-copy { align-self: end; }
  .report-focus-list { margin-top: 0; }
}
@media (max-width: 850px) {
  .report-kpi-grid { grid-template-columns: 1fr 1fr; }
  .report-review-strip { grid-template-columns: 1fr 1fr; }
  .report-review-metric:nth-of-type(2) { border-left: 0; }
  .report-artifact-list { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .report-summary-head, .report-summary-foot { align-items: flex-start; flex-direction: column; }
  .report-summary-head, .report-summary-body { padding-left: 16px; padding-right: 16px; }
  .report-kpi-grid { grid-template-columns: 1fr; }
  .report-content-grid { display: block; }
  .report-risk-block { display: flex; margin-top: 12px; }
  .report-class-row { grid-template-columns: minmax(105px, 1fr) 52px; }
  .report-class-meter { grid-column: 1 / -1; grid-row: 2; }
  .report-class-value { grid-column: 2; grid-row: 1; }
  .report-class-tag { display: none; }
  .report-review-strip { grid-template-columns: 1fr; }
  .report-review-metric { border-top: 1px solid #e6eeeb; border-left: 0; }
  .report-download-actions { justify-content: flex-start; }
  .report-artifact-list .report-artifact-card { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .report-artifact-list .badge { display: none; }
}
/* ---- end Project report ---- */
.artifact-list:not(.report-artifact-list) article, .task-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; }
.artifact-list:not(.report-artifact-list) strong, .artifact-list:not(.report-artifact-list) span, .task-list strong, .task-list span { display: block; }
.artifact-list:not(.report-artifact-list) span, .task-list span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.review-list article { padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
.review-list header strong, .review-list header span { display: block; }
.review-list header span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.review-list article > p { color: var(--muted); font-size: 11px; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.finalization-box { margin-top: 12px; }
.final-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.final-kpis span { padding: 9px; border-radius: 8px; background: #f1f5f3; }
.final-kpis small, .final-kpis strong { display: block; }
.final-kpis small { color: var(--muted); font-size: 9px; }
.final-kpis strong { margin-top: 4px; }
.finalization-box ul { padding-left: 19px; color: var(--red); font-size: 11px; line-height: 1.6; }
.final-dataset { display: grid; gap: 6px; margin-top: 10px; padding: 11px; border: 1px solid #b7dbd2; border-radius: 9px; background: var(--mint); font-size: 11px; }
.final-dataset .btn { justify-self: start; }
.task-progress { min-width: 90px; }
.task-progress > span { margin: 0 0 4px; text-align: right; }
.task-progress .progress-track { margin: 0; }
.task-progress .progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.management-box { margin-top: 12px; border: 1px solid var(--line); border-radius: 11px; padding: 14px 16px; }
.management-box > summary { cursor: pointer; color: var(--teal-dark); font-weight: 750; }
.compact-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 12px; padding-top: 15px; }
.taxonomy-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 12px; padding-top: 15px; }
.check-label { display: flex; align-items: center; gap: 8px; min-height: 42px; }
.check-label input { width: auto; }
.textarea-label { grid-column: 1 / -1; }
footer { padding: 28px 0 5px; color: #82928f; text-align: center; font-size: 11px; }
.hidden { display: none !important; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: 360px; padding: 12px 16px; border-radius: 10px; color: white; background: #173e3b; box-shadow: 0 14px 36px rgba(0,0,0,.18); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #96383d; }
@media (max-width: 1050px) {
  .source-form, .scan-builder, .project-form, .model-form { grid-template-columns: 1fr 1fr; }
  .path-field, .mode-switch, .project-description, .model-description { grid-column: 1 / -1; }
  .model-file { grid-column: auto; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .module-grid, .project-grid, .model-grid { grid-template-columns: 1fr 1fr; }
  .workspace-overview, .mini-stats { grid-template-columns: 1fr 1fr; }
  .class-grid { grid-template-columns: 1fr 1fr; }
  .module-gateway-list { grid-template-columns: 1fr; }
  .module-entry { min-height: 190px; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 16px; }
  .sidebar nav { flex-shrink: 0; margin-top: 16px; grid-template-columns: repeat(3, 1fr); }
  .sidebar nav a, .side-nav-button { padding: 9px 4px; text-align: center; font-size: 12px; }
  .side-nav-label { grid-column: 1 / -1; text-align: center; }
  .sidebar-module-list { display: contents; }
  .sidebar-module-button { display: block; }
  .sidebar-module-button i, .sidebar-module-button small { display: none; }
  .side-note { flex-shrink: 0; display: none; }
  main { padding: 25px 14px; }
  .topbar, .panel-head, .workspace-head { align-items: flex-start; flex-direction: column; }
  .topbar-actions { width: 100%; justify-content: space-between; }
  .helper { text-align: left; }
  .source-form, .scan-builder, .history-layout, .compact-form, .taxonomy-form, .project-form, .model-form { grid-template-columns: 1fr; }
  .path-field, .mode-switch, .textarea-label, .project-description, .model-description, .model-file { grid-column: auto; }
  .history-layout { display: block; }
  .job-list { max-height: 320px; border-right: 0; border-bottom: 1px solid var(--line); }
  .module-grid, .project-grid, .model-grid { grid-template-columns: 1fr; }
  .source-card { grid-template-columns: 1fr; }
  .source-extra { grid-column: auto; }
  .workspace-grid { grid-template-columns: 1fr; }
  .workspace-wide { grid-column: auto; }
  .class-grid, .filter-bar, .sample-detail, .batch-upload { grid-template-columns: 1fr; }
  .upload-progress { grid-column: auto; }
  .module-gateway { min-height: auto; padding: 22px; }
}

.workflow-strip, .comparison-guide { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 22px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 14px; background: #f5faf8; color: var(--muted); }
.workflow-strip span, .comparison-guide span { padding: 7px 10px; border-radius: 10px; background: #fff; color: var(--ink); font-weight: 700; }
.workflow-strip b, .comparison-guide i { color: var(--teal); font-style: normal; }
.batch-complete-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.class-card.insufficient { border-style: dashed; background: #fafbfb; }
.comparison-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; }
.comparison-form label { display: grid; gap: 7px; }
.comparison-summary { margin-top: 18px; }
.comparison-projects { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; }
.comparison-projects span { color: var(--muted); }
.comparison-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.comparison-kpis article { display: grid; gap: 5px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.comparison-kpis article span, .comparison-kpis article small { color: var(--muted); }
.comparison-kpis article strong { font-size: 24px; }
.comparison-kpis article.priority { border-color: #e4b3ad; background: #fff7f5; }
.comparison-conclusion { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: #eef8f5; color: #285e57; }
.comparison-result-section { margin-top: 24px; }
.comparison-table-wrap { overflow: auto; max-height: 620px; border: 1px solid var(--line); border-radius: 14px; }
.comparison-table-wrap table { width: 100%; border-collapse: collapse; background: #fff; }
.comparison-table-wrap th, .comparison-table-wrap td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 12px; }
.comparison-table-wrap th { position: sticky; top: 0; z-index: 1; background: #edf6f3; }
.comparison-table-wrap td:first-child { max-width: 420px; overflow-wrap: anywhere; }
.comparison-table-wrap a { color: var(--teal); font-weight: 700; }

@media (max-width: 900px) {
  .comparison-form, .comparison-kpis { grid-template-columns: 1fr; }
}
@media (max-width: 470px) {
  .stats-grid, .summary-row { grid-template-columns: 1fr 1fr; }
  .mode-switch { grid-template-columns: 1fr; }
}
