@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("vendor/fonts/literata-400.ttf") format("truetype");
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("vendor/fonts/literata-600.ttf") format("truetype");
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url("vendor/fonts/literata-700.ttf") format("truetype");
}
@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("vendor/fonts/nunito-sans-300.ttf") format("truetype");
}
@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("vendor/fonts/nunito-sans-400.ttf") format("truetype");
}
@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("vendor/fonts/nunito-sans-600.ttf") format("truetype");
}
@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("vendor/fonts/nunito-sans-700.ttf") format("truetype");
}
@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
  src: url("vendor/fonts/nunito-sans-800.ttf") format("truetype");
}
@font-face {
  font-family: "Material Symbols Outlined";
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url("vendor/fonts/material-symbols-outlined.woff2") format("woff2");
}

:root {
  --bg: #faf6f0;
  --surface: #faf6f0;
  --surface-low: #f5f1ea;
  --surface-mid: #e4e0d8;
  --surface-high: #d4ccbf;
  --text: #2e3230;
  --muted: #4a4e4a;
  --line: rgba(196, 200, 188, .55);
  --outline: #74796e;
  --primary: #4a7c59;
  --primary-soft: #c8e8d0;
  --ok: #2a6038;
  --ok-soft: #a7f0ba;
  --danger: #b83230;
  --danger-soft: #ffdad8;
  --warn-soft: #f8e0a8;
  --ink: #2e3230;
  --card: #f5f1ea;
  --tertiary: #705c30;
  --shadow: 0 4px 20px rgba(46, 50, 48, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.submission-task-modal-open { overflow: hidden; }
body {
  font-family: "Nunito Sans", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
.hidden { display: none !important; }
.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.login { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 500px) 1fr; }
.login-panel { padding: 48px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.login-panel h1 { font-size: 28px; line-height: 1.2; font-weight: 600; }
.login-panel p { margin-top: 16px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.login-visual { background: var(--surface-low); padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.login-visual h2 { font-size: 38px; line-height: 1.1; font-weight: 600; max-width: 780px; }
.strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); margin-top: 28px; }
.strip-cell { background: var(--surface); min-height: 142px; padding: 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; }
.strip-cell:last-child { border-right: 0; }
.strip-cell b { font-size: 18px; }
.strip-cell span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.brand-row { display: flex; gap: 12px; align-items: center; margin-bottom: 36px; }
.brand-mark { width: 44px; height: 44px; background: var(--text); color: #fff; display: grid; place-items: center; font-weight: 700; }
.brand-row b { display: block; font-size: 18px; }
.brand-row span { color: var(--muted); font-size: 12px; }

.field { margin-top: 16px; }
.field label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 600; }
.input, .select, textarea {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-bottom: 1px solid var(--outline);
  background: var(--surface-low);
  color: var(--text);
  padding: 9px 11px;
  font-size: 14px;
  outline: none;
}
textarea { min-height: 112px; resize: vertical; line-height: 1.65; }
.input:focus, .select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -2px; }
.btn {
  min-height: 40px;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--primary);
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.btn:hover { background: var(--primary-soft); }
.btn.primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.btn.primary:hover { background: #0043ce; }
.btn.secondary { color: var(--primary); border-color: var(--primary); background: var(--surface); }
.btn.ghost { color: var(--muted); background: transparent; }
.btn.green { color: #fff; background: var(--ok); border-color: var(--ok); }
.btn.full { width: 100%; margin-top: 18px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.topnav { min-height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; border-bottom: 1px solid rgba(196, 200, 188, .35); padding: 0 32px; position: sticky; top: 0; z-index: 20; background: rgba(250, 246, 240, .96); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.top-left { display: flex; align-items: center; gap: 28px; min-width: 0; justify-self: start; }
.wordmark { font-family: "Literata", "Microsoft YaHei", serif; font-size: 24px; font-weight: 700; color: var(--primary); white-space: nowrap; cursor: pointer; justify-self: center; }
.top-tabs { display: flex; align-items: center; gap: 22px; min-height: 48px; }
.top-tabs button { min-height: 48px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 14px; padding: 0; }
.top-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.admin-client .topnav { background: #f5f1ea; border-bottom-color: rgba(74, 124, 89, .24); }
.admin-client-tabs { gap: 18px; margin-left: 10px; }
.admin-client-tabs button { padding: 0 2px; font-weight: 800; }
.admin-client .page { max-width: 1680px; }
.admin-login-visual { background: #efe9df; }
.top-actions { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 14px; font-weight: 600; justify-self: end; }
.avatar { width: 40px; height: 40px; border-radius: 999px; background: var(--primary); display: grid; place-items: center; color: #fff; font-weight: 800; box-shadow: var(--shadow); border: 2px solid rgba(200, 232, 208, .55); }
.page { max-width: 1680px; margin: 0 auto; padding: 24px 32px; }

.hero { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; border-bottom: 1px solid var(--line); padding: 16px 0 24px; margin-bottom: 24px; }
.hero h1 { font-size: 32px; font-weight: 600; line-height: 1.2; }
.hero p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.7; max-width: 820px; }
.hero p:empty, .hero-actions:empty { display: none; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.home-hero { padding: 46px 0 28px; max-width: 980px; }
.home-hero h1 { font-family: "Literata", "Microsoft YaHei", serif; font-size: 42px; line-height: 1.1; font-weight: 600; }
.home-hero p { margin-top: 16px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.app-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; border: 0; }
.home-app-grid { min-height: calc(100vh - 120px); align-content: center; padding: 32px 0; }
.app-card { min-height: 320px; border: 1px solid rgba(196, 200, 188, .28); border-radius: 24px; background: var(--card); text-align: left; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; transition: transform .3s ease, box-shadow .3s ease, background .3s ease; box-shadow: var(--shadow); }
.app-card:last-child { border-right: 1px solid rgba(196, 200, 188, .28); }
.app-card:hover { background: #f8f3eb; transform: translateY(-4px); box-shadow: 0 8px 30px rgba(46, 50, 48, .08); }
.app-card.is-loading { position: relative; overflow: hidden; border-color: rgba(72, 133, 94, .38); background: #f9f5ee; transform: translateY(-3px); box-shadow: 0 14px 36px rgba(46, 50, 48, .1); cursor: wait; }
.app-card.is-loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, .52) 42%, transparent 72%); transform: translateX(-120%); animation: appCardSweep 1.05s ease-in-out infinite; pointer-events: none; }
.app-card:disabled { color: inherit; }
.card-icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 800; font-size: 20px; box-shadow: var(--shadow); transition: transform .3s ease; }
.app-card:hover .card-icon { transform: scale(1.08); }
.app-card.is-loading .card-icon { animation: appIconPulse 1.05s ease-in-out infinite; }
.app-card:nth-child(2) .card-icon { background: #c8e8d0; color: #002110; }
.app-card:nth-child(3) .card-icon { background: #f8e0a8; color: #554020; }
.app-card:nth-child(4) .card-icon { background: #6b6358; color: #fff; }
.app-card h2 { font-family: "Literata", "Microsoft YaHei", serif; margin-top: 26px; font-size: 24px; font-weight: 700; line-height: 1.25; }
.app-card p { margin-top: 14px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.app-card .meta { margin-top: 40px; padding-top: 16px; border-top: 1px solid rgba(196, 200, 188, .35); display: flex; justify-content: space-between; align-items: center; color: #6b6358; font-size: 13px; font-weight: 700; }
.app-card .meta strong { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-size: 14px; }
.app-card .material-symbols-outlined { font-size: 18px; line-height: 1; }
.app-loading-shell { min-height: calc(100vh - 120px); display: grid; place-items: center; padding: 40px 0; animation: appLoadingIn .24s ease-out both; }
.app-loading-card { width: min(760px, 100%); border: 1px solid rgba(196, 200, 188, .34); border-radius: 24px; background: rgba(255, 253, 248, .94); box-shadow: var(--shadow); padding: 28px; display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 20px; position: relative; overflow: hidden; }
.app-loading-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, rgba(72, 133, 94, .16), rgba(72, 133, 94, .78), rgba(248, 224, 168, .92), rgba(72, 133, 94, .16)); background-size: 220% 100%; animation: appLoadingBar 1.15s ease-in-out infinite; }
.app-loading-icon { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; background: var(--primary); color: #fff; font-size: 28px; font-weight: 900; box-shadow: var(--shadow); animation: appIconPulse 1.05s ease-in-out infinite; }
.app-loading-copy span { display: inline-flex; min-height: 28px; align-items: center; padding: 5px 10px; border-radius: 999px; background: rgba(72, 133, 94, .1); color: var(--primary); font-size: 12px; font-weight: 800; }
.app-loading-copy h1 { margin-top: 12px; font-family: "Literata", "Microsoft YaHei", serif; font-size: 30px; line-height: 1.2; font-weight: 800; }
.app-loading-copy p { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.app-loading-steps { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.app-loading-steps i { height: 7px; border-radius: 999px; background: rgba(196, 200, 188, .32); overflow: hidden; position: relative; }
.app-loading-steps i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--primary); transform: translateX(-105%); animation: appStepFill 1.25s ease-in-out infinite; }
.app-loading-steps i:nth-child(2)::after { animation-delay: .14s; }
.app-loading-steps i:nth-child(3)::after { animation-delay: .28s; }
.app-loading-steps i:nth-child(4)::after { animation-delay: .42s; }
@keyframes appCardSweep { to { transform: translateX(120%); } }
@keyframes appIconPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes appLoadingIn { from { opacity: 0; transform: translateY(10px) scale(.992); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes appLoadingBar { to { background-position: -220% 0; } }
@keyframes appStepFill { 0% { transform: translateX(-105%); } 45%, 65% { transform: translateX(0); } 100% { transform: translateX(105%); } }

.page-view-enter { animation: pageViewEnter .34s cubic-bezier(.22, .8, .24, 1) both; will-change: opacity, transform; }
@keyframes pageViewEnter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); margin-bottom: 24px; }
.metric { min-height: 112px; background: var(--surface); border-right: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; justify-content: space-between; }
.metric:last-child { border-right: 0; }
.metric span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .02em; }
.metric b { font-size: 28px; font-weight: 600; }
.metric.primary b { color: var(--primary); }
.metric.ok b { color: var(--ok); }
.metric.danger b { color: var(--danger); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--surface-low); padding: 16px; margin-bottom: 16px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 0; background: var(--surface-mid); color: var(--muted); min-height: 32px; padding: 7px 12px; font-size: 12px; font-weight: 600; }
.chip.active, .chip:hover { background: var(--primary); color: #fff; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); }
.panel-head { min-height: 52px; padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-head h3 { font-size: 17px; font-weight: 600; }
.panel-body { padding: 16px; }
.status { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 3px 8px; font-size: 12px; font-weight: 600; background: var(--surface-mid); color: var(--muted); }
.status.blue { background: var(--primary-soft); color: #001d6c; }
.status.green { background: var(--ok-soft); color: #022d0d; }
.status.red { background: var(--danger-soft); color: #750e13; }
.status.yellow { background: var(--warn-soft); color: #684e00; }
.status.orange { background: #ffe8d4; color: #7a3a00; }
.status.muted { background: var(--surface-mid); color: var(--muted); }
.code { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 4px; }
.table-wrap { width: 100%; max-width: 100%; overflow: auto; border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 920px; }
th, td { border-bottom: 1px solid var(--line); padding: 12px; text-align: left; vertical-align: top; font-size: 14px; }
th { background: var(--surface-low); color: var(--muted); font-size: 12px; font-weight: 600; }
tbody tr:nth-child(even) { background: var(--surface-low); }
tbody tr:hover { background: #e8f0ff; }
.project-name { color: var(--primary); font-weight: 600; line-height: 1.45; }
.progress { height: 8px; background: var(--surface-mid); overflow: hidden; min-width: 90px; }
.progress i { display: block; height: 100%; background: var(--primary); }

.archive-page { padding-top: 10px; }
.archive-home-btn { min-height: 34px; border-radius: 11px; padding: 6px 12px; box-shadow: none; }
.archive-home-btn .material-symbols-outlined { font-size: 18px; }
.archive-back-group { display: inline-flex; align-items: center; gap: 6px; }
.archive-home-icon { padding: 6px 8px; }
.archive-home-icon .material-symbols-outlined { margin: 0; }
.archive-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 16px; margin-bottom: 12px; padding: 14px 16px; border: 1px solid rgba(196, 200, 188, .48); border-radius: 14px; background: rgba(245, 241, 234, .72); box-shadow: 0 8px 22px rgba(46, 50, 48, .045); }
.archive-filter-row { display: grid; grid-template-columns: minmax(360px, 470px) minmax(320px, 1fr); align-items: start; gap: 18px; min-width: 0; }
.archive-filter { display: grid; gap: 7px; min-width: 220px; }
.archive-search { width: 100%; min-width: 0; max-width: none; }
.archive-search label { display: grid; gap: 7px; align-content: start; }
.archive-filter span { color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1; }
.archive-filter .input, .archive-filter .select { min-height: 42px; background: var(--surface); }
.archive-search-input-row { display: flex; align-items: stretch; gap: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.archive-search .input { flex: 1 1 auto; width: auto; min-width: 0; max-width: none; padding-left: 15px; border: 0; background: transparent; }
.archive-search .input:focus { outline: none; }
.archive-search-input-row:focus-within { border-color: rgba(74, 124, 89, .72); box-shadow: 0 0 0 3px rgba(200, 232, 208, .42); }
.archive-search-input-row .btn { flex: 0 0 auto; min-height: 42px; min-width: 108px; border: 0; border-left: 1px solid var(--line); border-radius: 0; white-space: nowrap; }
.archive-search-input-row .btn.secondary { background: rgba(200, 232, 208, .18); }
.archive-search-input-row .btn.secondary:hover { background: rgba(200, 232, 208, .44); }
.archive-search-input-row .archive-search-btn { min-width: 48px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; }
.archive-search-input-row .archive-search-btn .material-symbols-outlined { font-size: 20px; }
.archive-saved-tags-panel { min-width: 0; display: grid; gap: 7px; align-self: start; }
.archive-tag-panel-head { display: inline-flex; align-items: center; gap: 8px; }
.archive-tag-panel-head > span { color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1; }
.archive-add-group-btn { display: inline-flex; align-items: center; gap: 2px; border: 1px dashed rgba(74,124,89,.5); background: rgba(255,255,255,.9); color: var(--primary); padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.4; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .16s ease, background .16s ease, border-color .16s ease; }
.archive-add-group-btn .material-symbols-outlined { font-size: 15px; }
.archive-tag-panel-head:hover .archive-add-group-btn, .archive-add-group-btn:focus-visible { opacity: 1; pointer-events: auto; }
.archive-add-group-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.archive-tag-row { display: flex; flex-wrap: wrap; align-content: center; gap: 7px; min-height: 42px; margin-top: 0; }
.archive-tag-row.empty { align-items: center; padding: 0 12px; border: 1px dashed rgba(116, 121, 110, .28); border-radius: 12px; background: rgba(250, 246, 240, .62); color: var(--muted); font-size: 12px; }
.archive-search-tag { min-height: 28px; border: 1px solid rgba(74, 124, 89, .28); border-radius: 999px; background: rgba(255, 255, 255, .64); color: var(--primary); padding: 4px 4px 4px 10px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; box-shadow: 0 4px 12px rgba(46, 50, 48, .035); }
.archive-search-tag.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.archive-tag-label { border: 0; background: transparent; color: inherit; padding: 0; font: inherit; }
.archive-tag-remove { width: 22px; height: 22px; border: 0; border-radius: 999px; background: transparent; color: inherit; display: grid; place-items: center; padding: 0; }
.archive-tag-remove:hover { background: rgba(74, 124, 89, .14); }
.archive-search-tag.active .archive-tag-remove:hover { background: rgba(255, 255, 255, .18); }
.archive-tag-remove .material-symbols-outlined { font-size: 15px; }
.archive-search-tag:hover { border-color: var(--primary); background: var(--primary-soft); }
.archive-tag-groups { display: grid; gap: 4px; min-width: 0; }
.archive-tag-group-name-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 16px; align-items: start; min-width: 0; }
.archive-tag-group { min-width: 0; }
.archive-tag-group-head { display: flex; align-items: center; gap: 7px; min-height: 30px; }
.archive-tag-group-toggle, .archive-tag-group-edit { border: 0; background: transparent; color: var(--primary); font-size: 12px; font-weight: 800; padding: 3px 5px; }
.archive-tag-group-toggle { display: inline-flex; align-items: center; gap: 4px; min-width: 0; white-space: nowrap; }
.archive-tag-group-toggle:hover, .archive-tag-group-edit:hover { color: var(--primary-deep, var(--primary)); background: var(--primary-soft); border-radius: 7px; }
.archive-tag-group-chevron { width: 12px; color: var(--muted); }
.archive-tag-group-toggle em { min-width: 17px; padding: 2px 5px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 10px; font-style: normal; text-align: center; }
.archive-tag-group-edit { margin-left: auto; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; }
.archive-tag-group-head:hover .archive-tag-group-edit, .archive-tag-group-head:focus-within .archive-tag-group-edit { opacity: 1; pointer-events: auto; }
.archive-tag-group-content { grid-column: 1 / -1; display: grid; gap: 7px; min-width: 0; padding: 2px 0 4px 17px; border-top: 1px solid rgba(196, 200, 188, .34); }
.archive-tag-group-content .archive-tag-row { min-height: 0; }
.archive-group-tag-chip { position: relative; padding-right: 5px; }
.archive-tag-edit { border: 1px solid rgba(74, 124, 89, .32); background: rgba(255, 255, 255, .92); color: var(--primary); padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; line-height: 1.4; opacity: 0; transform: translateX(-3px); pointer-events: none; transition: opacity .16s ease, transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.archive-group-tag-chip:hover .archive-tag-edit, .archive-group-tag-chip:focus-within .archive-tag-edit { opacity: 1; transform: none; pointer-events: auto; }
.archive-tag-edit:hover { border-color: var(--primary); background: var(--primary); color: #fff; box-shadow: 0 3px 8px rgba(46, 50, 48, .14); }
.archive-search-tag.active .archive-tag-edit { border-color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .18); color: #fff; }
.archive-search-tag.active .archive-tag-edit:hover { background: #fff; color: var(--primary); border-color: #fff; }
.archive-tag-group-editor { display: grid; gap: 7px; padding: 8px; border: 1px dashed rgba(74, 124, 89, .28); border-radius: 10px; background: rgba(250, 247, 241, .68); }
.archive-tag-group-edit-list { display: flex; flex-wrap: wrap; gap: 5px; }
.archive-tag-edit-chip { display: inline-flex; align-items: center; gap: 3px; min-height: 25px; padding: 3px 4px 3px 8px; border: 1px solid rgba(116, 121, 110, .24); border-radius: 999px; background: rgba(255, 255, 255, .68); color: var(--muted); font-size: 11px; }
.archive-tag-edit-chip button { width: 18px; height: 18px; border: 0; border-radius: 999px; background: transparent; color: inherit; padding: 0; line-height: 1; }
.archive-tag-edit-chip button:hover { background: rgba(74, 124, 89, .14); color: var(--primary); }
.archive-tag-group-add { display: flex; gap: 6px; }
.archive-tag-group-add .input { min-width: 0; min-height: 30px; flex: 1 1 auto; padding: 5px 9px; border-radius: 8px; font-size: 12px; }
.archive-tag-group-add .btn { min-height: 30px; padding: 4px 10px; border-radius: 8px; font-size: 12px; }
.archive-report-col { justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 0; }
.archive-report-row { display: flex; align-items: end; gap: 8px; margin-left: 0; padding-top: 1px; }
.archive-report-row .btn { min-height: 42px; border-radius: 12px; font-weight: 900; }
.archive-advanced-row { grid-column: 1 / -1; display: grid; gap: 10px; min-width: 0; }
.archive-advanced-actions { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.archive-table-view-groups { flex: 0 1 auto; min-width: 0; margin-left: auto; display: flex; align-items: flex-end; gap: 8px; }
.archive-table-view-group { position: relative; min-width: 0; display: grid; gap: 4px; }
.archive-table-view-group.is-source { flex: 0 1 220px; width: 220px; max-width: 220px; }
.archive-table-view-group.is-hierarchy { flex: 0 1 176px; width: 176px; }
.archive-table-view-label { min-height: 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 0 4px; color: var(--muted); font-size: 11px; font-weight: 850; line-height: 1.2; }
.archive-table-view-label small { font-size: 9.5px; font-weight: 650; }
.archive-table-view-select-shell {
  position: relative;
  height: 38px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--primary);
  border-radius: 12px;
  background: var(--surface);
  color: var(--primary);
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.archive-table-view-select-shell:hover { background: var(--primary-soft); }
.archive-table-view-select-shell:focus-within { outline: 3px solid rgba(47, 93, 63, .64); outline-offset: 2px; }
.archive-table-view-select {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 34px 0 36px;
  border: 0;
  border-radius: inherit;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12.5px;
  font-weight: 850;
  cursor: pointer;
}
.archive-table-view-select:disabled { opacity: .58; cursor: not-allowed; }
.archive-table-view-select-leading, .archive-table-view-select-arrow { position: absolute; z-index: 1; pointer-events: none; font-size: 18px; }
.archive-table-view-select-leading { left: 11px; }
.archive-table-view-select-arrow { right: 9px; }
.archive-table-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.archive-advanced-toggle { justify-self: start; min-height: 38px; border-radius: 12px; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.archive-advanced-toggle .material-symbols-outlined { font-size: 18px; }
.archive-advanced-toggle.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.archive-selection-tag-button { min-height: 38px; border-radius: 12px; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.archive-selection-tag-button .material-symbols-outlined { font-size: 17px; }
.archive-selection-button-count { display: inline-flex; align-items: center; min-height: 19px; padding: 2px 6px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 900; line-height: 1; }

@media (max-width: 1200px) {
  .archive-toolbar { grid-template-columns: 1fr; }
  .archive-filter-row { grid-template-columns: 1fr; gap: 12px; }
  .archive-report-col { justify-self: stretch; width: 100%; align-items: stretch; }
  .archive-report-row { justify-self: stretch; width: 100%; flex-wrap: wrap; }
}

@media (max-width: 820px) {
  .archive-toolbar { gap: 12px; }
  .archive-tag-group-name-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; }
  .archive-tag-group-add { flex-wrap: wrap; }
  .archive-tag-group-add .input { flex: 1 1 100%; }
  .archive-report-row { flex-direction: column; align-items: stretch; }
  .archive-report-row > * { width: 100%; }
  .archive-report-row .archive-weekly-selector .select { width: 100%; }
}

@media (max-width: 760px) {
  .archive-table-view-groups { flex: 1 0 100%; width: 100%; margin-left: 0; display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); gap: 8px; }
  .archive-table-view-group.is-source, .archive-table-view-group.is-hierarchy { width: auto; max-width: none; }
  .archive-table-view-select-shell { height: 44px; }
  .archive-table-view-label small { display: none; }
}

@media (max-width: 420px) {
  .archive-table-view-select-leading { display: none; }
  .archive-table-view-select { padding-left: 10px; padding-right: 30px; font-size: 12px; }
}

@media (max-width: 340px) {
  .archive-table-view-groups { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .archive-tag-group-name-grid { grid-template-columns: 1fr; }
}
.archive-advanced-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 900; line-height: 1; }
.archive-advanced-panel { display: grid; gap: 14px; padding: 14px 16px; border: 1px solid rgba(196, 200, 188, .6); border-radius: 14px; background: rgba(250, 247, 241, .9); box-shadow: 0 8px 22px rgba(46, 50, 48, .04); }
.archive-adv-grid { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 10px 18px; }
.archive-adv-row { display: grid; grid-template-columns: minmax(116px, auto) minmax(108px, 130px) minmax(80px, 1fr) minmax(80px, 1fr); align-items: center; gap: 8px; min-width: 0; }
.archive-adv-row .archive-adv-value2.hidden { display: none; }
.archive-adv-label { color: var(--muted); font-size: 13px; font-weight: 800; display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.archive-adv-label em { font-style: normal; font-size: 11px; font-weight: 700; color: rgba(116, 121, 110, .8); }
.archive-adv-row .select, .archive-adv-row .input { min-height: 36px; }
.archive-adv-remarks { display: grid; gap: 8px; border-top: 1px dashed rgba(116, 121, 110, .26); padding-top: 12px; }
.archive-adv-remark-row { display: flex; flex-wrap: wrap; gap: 8px; }
.archive-adv-remark { max-width: 100%; min-height: 30px; border: 1px solid rgba(74, 124, 89, .3); border-radius: 999px; background: rgba(255, 255, 255, .7); color: var(--primary); padding: 4px 12px; font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archive-adv-remark:hover { border-color: var(--primary); background: var(--primary-soft); }
.archive-adv-remark.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.archive-adv-remark-empty { color: var(--muted); font-size: 12px; }
.archive-adv-selects { display: grid; grid-template-columns: repeat(3, minmax(200px, 1fr)); gap: 10px 18px; border-top: 1px dashed rgba(116, 121, 110, .26); padding-top: 12px; }
.archive-adv-select { position: relative; display: grid; gap: 6px; }
.archive-adv-select-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 6px 12px; border: 1px solid rgba(196, 200, 188, .8); border-radius: 10px; background: rgba(255, 255, 255, .8); color: var(--ink); font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; }
.archive-adv-select-btn:hover { border-color: var(--primary); }
.archive-adv-select-btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.archive-adv-select-btn i { font-size: 18px; color: var(--muted); }
.archive-adv-select-pop { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; max-height: 260px; overflow: auto; display: grid; gap: 2px; padding: 6px; border: 1px solid rgba(196, 200, 188, .8); border-radius: 10px; background: #fff; box-shadow: 0 12px 28px rgba(46, 50, 48, .14); }
.archive-adv-select-pop[hidden] { display: none; }
.archive-adv-option { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 13px; text-align: left; cursor: pointer; }
.archive-adv-option:hover { background: var(--primary-soft); }
.archive-adv-option.active { color: var(--primary); font-weight: 800; }
.archive-adv-option i { font-size: 18px; color: var(--primary); flex: none; }
.archive-adv-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) { .archive-adv-selects { grid-template-columns: 1fr; } }
.archive-adv-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px dashed rgba(116, 121, 110, .26); padding-top: 12px; }
.archive-adv-action-btns { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-shrink: 0; }
.archive-adv-action-btns .btn { min-height: 36px; padding: 8px 16px; border-radius: 8px; }
.archive-adv-summary { color: var(--muted); font-size: 12px; font-weight: 700; }
.archive-adv-summary.is-pending { color: var(--tertiary); }
.archive-weekly-selector { display: grid; gap: 7px; }
.archive-weekly-selector span { color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1; }
.archive-report-row .archive-weekly-selector .select { width: 220px; }
.archive-report-type-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(46, 50, 48, .32);
  backdrop-filter: blur(5px);
}
.archive-report-type-dialog {
  width: min(520px, 100%);
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(120, 168, 134, .34);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(46, 50, 48, .22);
}
.archive-report-type-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.archive-report-type-head span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.archive-report-type-head h3 { margin-top: 6px; color: var(--text); font-size: 21px; line-height: 1.3; font-weight: 900; }
.archive-report-type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.archive-report-type-item {
  min-width: 0;
  min-height: 90px;
  border: 1px solid rgba(196, 200, 188, .52);
  border-radius: 16px;
  background: var(--surface);
  padding: 14px 16px;
  text-align: left;
  display: grid;
  align-content: start;
  gap: 7px;
  color: var(--text);
  cursor: pointer;
}
.archive-report-type-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.archive-report-type-item b { font-size: 15px; font-weight: 900; }
.archive-report-type-item span { color: var(--muted); font-size: 12px; line-height: 1.6; }
.archive-report-fields-dialog { width: min(640px, 100%); }
.archive-report-fields-toolbar { display: flex; align-items: center; gap: 10px; }
.archive-report-fields-toolbar em { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 800; font-style: normal; }
.archive-report-fields-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 54px;
  gap: 8px 12px;
  max-height: min(46vh, 420px);
  overflow-y: auto;
  padding: 4px 2px;
}
.archive-report-field-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid rgba(196, 200, 188, .4);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text);
}
.archive-report-field-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.archive-report-field-item input { flex: none; accent-color: var(--primary); }
.archive-report-field-item span {
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.archive-report-fields-actions { display: flex; justify-content: flex-end; gap: 10px; }
.archive-hierarchy-view {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
  padding: 12px 16px;
  border: 1px solid rgba(196, 200, 188, .42);
  border-radius: 14px;
  background: rgba(245, 241, 234, .68);
}
.archive-hierarchy-view > div { min-width: 0; }
.archive-hierarchy-view span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.2; }
.archive-hierarchy-view h3 { margin-top: 4px; color: var(--primary); font-size: 16px; font-weight: 900; line-height: 1.35; }
.archive-hierarchy-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; color: var(--muted); font-size: 12px; font-weight: 700; }
.archive-hierarchy-view .btn.secondary { flex: 0 0 auto; min-height: 38px; }
.archive-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.archive-grid-table-only { grid-template-columns: minmax(0, 1fr); }
.archive-grid > *, #archive-table, #excel-panel { min-width: 0; max-width: 100%; }
/* 项目总表：整页不滚动，仅表格区域内部滚动 */
body:has(.archive-page) { height: 100vh; overflow: hidden; }
body:has(.archive-page) #page-root.page { height: calc(100vh - 72px); box-sizing: border-box; overflow: hidden; }
.archive-page { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.archive-page > .archive-toolbar, .archive-page > #archive-hierarchy-view, .archive-page > #archive-selection-summary { flex: 0 0 auto; }
.archive-page > .archive-grid-table-only { flex: 1 1 auto; min-height: 0; }
.archive-grid-table-only > div, .archive-grid-table-only #archive-table { height: 100%; min-height: 0; }
.archive-page .archive-weekly-table { height: 100%; max-height: 100%; }
.archive-weekly-table { position: relative; max-height: calc(100vh - 205px); scrollbar-width: none; -ms-overflow-style: none; }
.archive-weekly-table::-webkit-scrollbar { width: 0; height: 0; display: none; }
.archive-weekly-table { --archive-col-0: 72px; --archive-col-1: 260px; }
.archive-weekly-table table { width: 100%; min-width: 1120px; table-layout: fixed; }
.archive-weekly-table th { position: sticky; top: 0; z-index: 3; height: 48px; }
.archive-weekly-table tbody tr { height: 86px; }
.archive-weekly-table tbody tr[data-project] { cursor: default; }
.archive-weekly-table th, .archive-weekly-table td { width: 130px; min-width: 130px; max-width: 130px; height: 86px; padding: 10px 12px; line-height: 1.45; overflow: hidden; vertical-align: middle; }
.archive-weekly-table thead th { height: 48px; vertical-align: middle; white-space: nowrap; }
.archive-weekly-table thead th { position: sticky; padding-right: 18px; }
.column-resizer { position: absolute; top: 0; right: -4px; bottom: 0; z-index: 8; width: 8px; cursor: col-resize; touch-action: none; }
.column-resizer::after { content: ""; position: absolute; top: 10px; right: 3px; bottom: 10px; width: 2px; border-radius: 999px; background: transparent; }
.archive-weekly-table thead th:hover .column-resizer::after, .resizing-column .column-resizer::after { background: rgba(74, 124, 89, .45); }
.resizing-column { cursor: col-resize; user-select: none; }
.archive-weekly-table th.archive-check-col, .archive-weekly-table td.archive-check-col { position: sticky; right: 0; z-index: 2; width: 46px; min-width: 46px; max-width: 46px; padding: 0; text-align: center; background: var(--surface); box-shadow: -1px 0 0 var(--line); }
.archive-weekly-table thead th.archive-check-col { z-index: 4; }
.archive-weekly-table .archive-check-col input { width: 17px; height: 17px; cursor: pointer; accent-color: var(--primary); }
.archive-weekly-table .archive-row:hover .archive-check-col { background: #e8f0ff; }
.archive-weekly-table .archive-row.expanded .archive-check-col { background: var(--surface-mid); }
.archive-th-label { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; }
.archive-weekly-table th.archive-match-col, .archive-weekly-table td.archive-match-col { position: sticky; right: 46px; z-index: 2; width: 230px; min-width: 230px; max-width: 230px; font-size: 12.5px; background: var(--surface); box-shadow: -1px 0 0 var(--line); }
.archive-weekly-table thead th.archive-match-col { z-index: 4; background: var(--surface-mid); }
.archive-weekly-table .archive-row:hover td.archive-match-col { background: #e8f0ff; }
.archive-weekly-table .archive-row.expanded td.archive-match-col { background: var(--surface-mid); }
.archive-match-item { display: flex; align-items: baseline; gap: 6px; margin: 2px 0; }
.archive-match-field { flex: none; color: var(--muted); font-size: 11px; font-weight: 700; border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; background: var(--surface-mid); }
.archive-match-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; word-break: break-all; }
.archive-match-text mark { background: #ffe58f; color: inherit; border-radius: 3px; padding: 0 1px; font-weight: 700; }
.archive-th-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-th-label em { flex: 0 0 auto; min-width: 22px; padding: 2px 7px; border-radius: 999px; background: rgba(46, 107, 75, 0.14); color: var(--primary); font-size: 11px; font-style: normal; font-weight: 900; line-height: 1.35; text-align: center; }
.archive-th-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-weekly-table .sticky-sequence { position: sticky; left: 0; z-index: 2; width: var(--archive-col-0); min-width: var(--archive-col-0); max-width: var(--archive-col-0); text-align: center; font-weight: 900; color: var(--primary); background: var(--surface); box-shadow: 1px 0 0 var(--line); }
.archive-weekly-table .sticky-name { position: sticky; left: var(--archive-col-0); z-index: 2; width: var(--archive-col-1); min-width: var(--archive-col-1); max-width: var(--archive-col-1); background: var(--surface); box-shadow: 1px 0 0 var(--line); }
.archive-weekly-table tbody tr:nth-child(even) .sticky-sequence, .archive-weekly-table tbody tr:nth-child(even) .sticky-name { background: var(--surface-low); }
.archive-weekly-table tbody tr:hover .sticky-sequence, .archive-weekly-table tbody tr:hover .sticky-name { background: #e8f0ff; }
.archive-weekly-table th:first-child { position: sticky; left: 0; z-index: 6; width: var(--archive-col-0); min-width: var(--archive-col-0); max-width: var(--archive-col-0); background: var(--surface-low); box-shadow: 1px 0 0 var(--line); }
.archive-weekly-table th:nth-child(2) { position: sticky; left: var(--archive-col-0); z-index: 5; width: var(--archive-col-1); min-width: var(--archive-col-1); max-width: var(--archive-col-1); background: var(--surface-low); box-shadow: 1px 0 0 var(--line); }
.archive-project-cell { display: grid; align-content: center; gap: 4px; min-height: 70px; overflow: hidden; }
.archive-project-cell .project-name {
  display: -webkit-box;
  max-height: 42px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.archive-project-cell .code,
.archive-project-cell .project-hierarchy-tag {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.archive-project-cell .project-hierarchy-tag {
  justify-self: start;
  max-width: 74px;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid rgba(46, 107, 75, 0.2);
  border-radius: 999px;
  background: rgba(46, 107, 75, 0.08);
  color: #2f6f45;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}
.archive-project-cell .project-hierarchy-tag.mother,
.archive-project-cell .project-hierarchy-tag.child,
.archive-project-cell .project-hierarchy-tag.grandchild {
  border-color: rgba(74, 124, 89, .28);
  background: rgba(74, 124, 89, .12);
  color: #2f6f45;
}
.archive-project-cell .project-hierarchy-tag:hover,
.archive-project-cell .project-hierarchy-tag.active {
  border-color: rgba(46, 107, 75, 0.48);
  background: rgba(46, 107, 75, 0.16);
}
.project-relation-row { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.archive-project-source-badge {
  min-height: 22px;
  max-width: 138px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border: 1px solid rgba(196, 200, 188, .72);
  border-radius: 999px;
  background: rgba(245, 241, 234, .72);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 850;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.archive-project-source-badge .material-symbols-outlined { flex: 0 0 auto; font-size: 13px; }
.archive-project-source-badge.is-summary { border-color: rgba(115, 124, 117, .25); background: rgba(221, 225, 220, .38); color: #647067; }
.project-relation-edit-btn {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid rgba(196, 200, 188, .8);
  border-radius: 999px;
  background: rgba(255, 252, 246, .78);
  color: var(--muted);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.project-relation-edit-btn:hover { border-color: rgba(74, 124, 89, .45); color: var(--primary); background: rgba(200, 232, 208, .18); }
.project-relation-edit-btn .material-symbols-outlined { font-size: 15px; }
.project-custom-tag {
  min-height: 24px;
  max-width: 160px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid rgba(201, 142, 38, .42);
  border-radius: 999px;
  background: rgba(245, 196, 92, .18);
  color: #97651a;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.project-custom-tag .material-symbols-outlined { font-size: 14px; flex: 0 0 auto; }
.project-custom-tag:hover { border-color: rgba(201, 142, 38, .7); background: rgba(245, 196, 92, .32); }
.project-custom-tag.active { border-color: #c98e26; background: #e7a92e; color: #fff; }
.archive-cell-clip {
  display: -webkit-box;
  max-height: 40px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
}
.archive-cell-clip.lines-3 {
  max-height: 61px;
  -webkit-line-clamp: 3;
}
.archive-combined-cell { display: grid; align-content: center; gap: 3px; min-height: 44px; overflow: hidden; }
.archive-combined-cell span { display: flex; align-items: baseline; gap: 6px; min-width: 0; line-height: 1.35; }
.archive-combined-cell b { flex: 0 0 auto; color: var(--muted); font-size: 11px; font-weight: 800; }
.archive-combined-cell em { min-width: 0; overflow: hidden; color: var(--ink); font-style: normal; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.policy-text .archive-combined-cell { gap: 5px; }
.policy-text .archive-combined-cell span { gap: 8px; }
.policy-text .archive-combined-cell b { min-width: 104px; }
.image-progress-cell { display: grid; align-content: center; gap: 7px; min-width: 94px; }
.image-progress-cell b { color: var(--primary); font-size: 16px; font-weight: 900; line-height: 1; }
.image-progress-bar { width: 96px; min-width: 96px; border-radius: 999px; background: rgba(74, 124, 89, .16); }
.image-progress-bar i { border-radius: inherit; background: var(--primary); }
.archive-stage-pill { display: inline-flex; align-items: center; white-space: nowrap; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 850; color: var(--primary); background: rgba(74, 124, 89, .12); border: 1px solid rgba(74, 124, 89, .26); }
.archive-stage-pill.stage-0 { color: #2f6f4f; background: rgba(74, 124, 89, .12); border-color: rgba(74, 124, 89, .26); }
.archive-stage-pill.stage-1 { color: #2563a8; background: rgba(37, 99, 168, .12); border-color: rgba(37, 99, 168, .26); }
.archive-stage-pill.stage-2 { color: #a8761e; background: rgba(180, 130, 40, .14); border-color: rgba(180, 130, 40, .3); }
.archive-stage-pill.stage-3 { color: #7a4ea8; background: rgba(122, 78, 168, .12); border-color: rgba(122, 78, 168, .28); }
.archive-stage-pill.stage-mother { color: var(--muted); background: rgba(120, 130, 140, .1); border-color: rgba(120, 130, 140, .22); }
/* 三个投资指标各占一个真正的表格列，可分别拖拽调宽。*/
.archive-weekly-table thead th.archive-invest-col { white-space: normal; line-height: 1.25; }
.archive-invest-col .archive-plan-cell { min-width: 0; gap: 7px; }
.archive-invest-col .archive-plan-cell span { gap: 8px; line-height: 1.2; }
.archive-invest-col .archive-plan-cell em { flex: 0 0 auto; overflow: visible; color: var(--primary); font-size: 17px; font-weight: 950; letter-spacing: 0; text-overflow: clip; }
.investment-progress { display: grid; gap: 7px; align-content: center; justify-items: stretch; min-width: 0; }
.investment-progress-track { height: 10px; border-radius: 999px; background: rgba(196, 200, 188, .54); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(36, 46, 38, .08); }
.investment-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #82b978); transition: width .36s ease; }
.investment-progress span { color: var(--text); font-size: 13px; font-weight: 950; line-height: 1; text-align: right; }
.overdue-node-badge { display: inline-flex; align-items: center; gap: 3px; min-height: 24px; padding: 3px 9px; border: 1px solid rgba(184, 50, 48, .32); border-radius: 999px; background: var(--danger-soft); color: var(--danger); font-size: 12px; font-weight: 850; line-height: 1.35; white-space: nowrap; }
.overdue-node-badge .material-symbols-outlined { font-size: 15px; }
.empty-table { min-height: 180px; display: grid; place-items: center; color: var(--muted); font-size: 14px; }

.project-detail-page { --detail-side-width: 360px; --detail-page-gap: 20px; max-width: 1440px; margin: 0 auto; padding: 22px calc(var(--detail-side-width) + var(--detail-page-gap)) 48px 0; }
.project-detail-top { display: flex; justify-content: flex-start; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.project-top-file-btn { min-height: 38px; border-radius: 999px; padding: 8px 16px; box-shadow: 0 8px 20px rgba(72, 133, 94, .18); }
.project-top-file-btn .material-symbols-outlined { font-size: 18px; }
.project-detail-hero { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: stretch; padding: 22px 24px 18px; border: 1px solid var(--line); background: var(--surface-low); }
.detail-hero-main { min-width: 0; display: grid; align-content: start; gap: 10px; }
.detail-title-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.detail-title-line { min-width: 0; display: flex; align-items: center; gap: 8px; }
.detail-title-line h1 { min-width: 0; }
.detail-title-action { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid rgba(196, 200, 188, .8); border-radius: 8px; background: rgba(255, 255, 255, .8); color: var(--muted); cursor: pointer; }
.detail-title-action i { font-size: 18px; }
.detail-title-action:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.detail-title-action.danger:hover { border-color: #b3403a; color: #b3403a; background: rgba(179, 64, 58, .08); }
.detail-status-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-source-pill { max-width: 420px; min-height: 28px; display: inline-flex; align-items: center; border: 1px solid rgba(196, 200, 188, .65); background: var(--surface); color: var(--muted); padding: 5px 10px; font-size: 12px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-meta-right { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.detail-code-row { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-code-item { min-width: 0; display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(196, 200, 188, .65); background: var(--surface); padding: 3px 9px; font-size: 11px; }
.detail-code-item em { color: var(--muted); font-style: normal; font-size: 10px; font-weight: 700; }
.detail-code-item b { color: var(--text); font-size: 11px; font-weight: 800; overflow-wrap: anywhere; }
.detail-hero-attrs { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-hero-attr { min-width: 0; display: inline-flex; align-items: baseline; gap: 6px; border: 1px solid rgba(196, 200, 188, .65); background: var(--surface); padding: 4px 10px; font-size: 12px; }
.detail-hero-attr em { color: var(--muted); font-style: normal; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.detail-hero-attr b { color: var(--text); font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.project-detail-hero h1 { min-width: 0; font-family: "Literata", "Microsoft YaHei", serif; font-size: 32px; line-height: 1.22; font-weight: 900; color: var(--primary); overflow-wrap: anywhere; }
.project-detail-hero p { max-width: 900px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.detail-kpi span, .detail-fact span { color: var(--muted); font-size: 12px; font-weight: 700; }
.detail-layout { display: block; }
.detail-main, .detail-side { min-width: 0; display: grid; gap: 16px; }
.detail-side { position: fixed; top: 148px; right: max(32px, calc((100vw - 1440px) / 2)); width: var(--detail-side-width); max-height: calc(100vh - 172px); overflow: auto; scrollbar-width: thin; z-index: 20; gap: 10px; }
.detail-side-actions { display: flex; justify-content: flex-end; padding-bottom: 2px; }
/* 右侧栏紧凑化：投资完成情况 + AI 提醒 + 进展概览 尽量一屏放下 */
.detail-side .panel-head { min-height: 40px; padding: 9px 14px; }
.detail-side .panel-head h3 { font-size: 15px; }
.detail-side .detail-invest-card { gap: 5px; padding: 9px 14px; }
.detail-side .detail-invest-card b { font-size: 21px; }
.detail-side .detail-invest-card p { font-size: 11px; line-height: 1.4; }
.detail-side .investment-progress { gap: 5px; }
.detail-side .detail-reminder-list { padding: 9px; gap: 6px; }
.detail-side .detail-reminder-item { padding: 8px 10px; }
.detail-side .detail-overview-side-item { padding: 6px 14px; }
.detail-side .detail-overview-side-item b { line-height: 1.4; }
/* 详情页左侧 4 分区导航布局（基本信息 / 进展与计划 / 入库资料 / AI 提醒） */
.project-detail-page.detail-navpage { --detail-side-width: 0px; max-width: 1320px; padding: 22px 0 56px; }
.detail-navlayout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 22px; align-items: start; }
.detail-nav { position: sticky; top: 96px; align-self: start; }
.detail-nav-list { display: grid; gap: 4px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 26px rgba(46, 50, 48, .055); }
.detail-nav-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 14.5px; font-weight: 800; text-align: left; cursor: pointer; transition: background .18s ease, color .18s ease; }
.detail-nav-item .material-symbols-outlined { font-size: 21px; flex: 0 0 auto; }
.detail-nav-item span { flex: 1 1 auto; min-width: 0; }
.detail-nav-item:hover { background: rgba(74, 124, 89, .08); color: var(--primary); }
.detail-nav-item.active { background: var(--primary-soft); color: var(--primary); }
.detail-nav-files { width: 100%; display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--primary); font-size: 14.5px; font-weight: 800; text-align: left; cursor: pointer; box-shadow: 0 10px 26px rgba(46, 50, 48, .055); transition: background .18s ease, box-shadow .18s ease; }
.detail-nav-files .material-symbols-outlined { font-size: 21px; flex: 0 0 auto; }
.detail-nav-files span { flex: 1 1 auto; min-width: 0; }
.detail-nav-files:hover { background: var(--primary-soft); box-shadow: 0 12px 28px rgba(74, 124, 89, .14); }
.detail-nav-badge { flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: rgba(74, 124, 89, .2); color: var(--primary); font-size: 11px; font-weight: 900; font-style: normal; line-height: 1; }
.detail-nav-badge.high { background: var(--danger); color: #fff; }
.detail-nav-body { min-width: 0; display: grid; gap: 18px; align-content: start; }
/* 基本信息分区：计划与实际投资并列，形象进度独立成一行。 */
.detail-nav-body [data-detail-target="finance"] { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 20px; border-radius: 16px; }
.detail-nav-body [data-detail-target="finance"] .panel-head { min-height: 0; margin: 0; padding: 0 0 2px; border: 0; }
.detail-image-progress { min-width: 0; min-height: 82px; box-sizing: border-box; display: grid; grid-template-columns: 96px 84px minmax(160px, 1fr) 170px 300px; gap: 18px; align-items: center; padding: 16px 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.detail-image-progress > em { font-style: normal; color: var(--text); font-size: 13px; font-weight: 900; white-space: nowrap; }
.detail-image-progress p b { color: var(--text); font-weight: 900; }
.detail-image-progress p > span { display: block; }
.detail-image-progress p > span + span { margin-top: 4px; }
.detail-image-progress > span { color: var(--text); font-size: 14px; font-weight: 900; white-space: nowrap; }
.detail-image-progress > b { color: var(--primary); font-size: 30px; line-height: 1; font-weight: 950; text-align: right; }
.detail-image-progress .investment-progress-track { height: 12px; }
.detail-image-progress.detail-contract-amount-row { grid-template-columns: 96px minmax(0, 1fr) 300px; }
.detail-image-progress.detail-contract-amount-row > b { font-size: 30px; text-align: left; white-space: nowrap; }
.detail-image-progress.detail-contract-amount-row .detail-stage-editable > b { color: var(--primary); font-size: 30px; line-height: 1; font-weight: 950; }
.detail-image-progress.detail-contract-amount-row .detail-stage-inline-unit { font-size: 14px; font-weight: 900; }
.detail-image-progress p { color: var(--muted); font-size: 12px; line-height: 1.5; text-align: right; }
.hierarchy-amount-breakdown { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(88px, 1fr)); gap: 7px; vertical-align: middle; }
.hierarchy-amount-segment { min-width: 0; display: grid; gap: 3px; align-content: center; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-low); text-align: left; }
.hierarchy-amount-segment small { color: var(--muted); font-size: 10.5px; line-height: 1.25; font-weight: 850; }
.hierarchy-amount-segment > b, .hierarchy-amount-segment .detail-stage-editable > b { color: var(--text); font-size: 13px; line-height: 1.35; font-weight: 900; white-space: nowrap; }
.hierarchy-amount-segment.is-self { border-color: rgba(74, 124, 89, .28); background: rgba(74, 124, 89, .055); }
.hierarchy-amount-segment.is-total { border-color: rgba(74, 124, 89, .4); background: var(--primary-soft); }
.hierarchy-amount-segment.is-total > b { color: var(--primary); }
.detail-image-progress.detail-contract-amount-row .hierarchy-amount-breakdown { grid-column: 2 / -1; }
.detail-image-progress.detail-contract-amount-row .hierarchy-amount-segment > b,
.detail-image-progress.detail-contract-amount-row .hierarchy-amount-segment .detail-stage-editable > b { font-size: 17px; }
.detail-image-progress p .hierarchy-amount-breakdown { margin-top: 5px; }
.statistics-authority-item .hierarchy-amount-breakdown { grid-template-columns: 1fr; }
/* 分区内的 AI 提醒卡片更舒展、圆角更柔和 */
.detail-nav-body .detail-reminder-list { padding: 16px 16px 6px; gap: 12px; }
.detail-nav-body .detail-reminder-item { padding: 14px 16px; border-radius: 14px; border-left-width: 4px; }
.detail-section { overflow: hidden; scroll-margin-top: 96px; }
.project-relation-panel { scroll-margin-top: 84px; }
.project-relation-form { width: min(100%, 1120px); display: grid; grid-template-columns: minmax(150px, 190px) minmax(220px, 1fr) auto; align-items: end; gap: 12px; padding: 0; border: 0; background: transparent; }
.detail-hero-relation-form { margin-top: 0; padding-top: 0; }
.detail-relation-summary { display: grid; grid-template-columns: 1fr; align-items: stretch; gap: 10px; margin-top: 2px; }
.detail-relation-links { min-width: 0; display: grid; align-content: center; gap: 6px; padding: 8px 10px; border: 1px solid rgba(196, 200, 188, .52); background: rgba(255, 252, 246, .72); }
.detail-relation-links .detail-item { min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 0; border-bottom: 0; background: transparent; }
.detail-relation-links .detail-item b { color: var(--muted); font-size: 12px; line-height: 1.35; white-space: nowrap; }
.detail-relation-links .detail-item span { min-width: 0; color: var(--text); font-size: 13px; line-height: 1.4; }
.project-relation-form .field { margin: 0; min-width: 0; }
.project-relation-form .field span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 900; }
.project-relation-form .select { min-height: 38px; border-radius: 11px; background: #fff; font-weight: 850; }
.relation-current-card { min-width: 0; display: grid; align-content: center; gap: 2px; min-height: 56px; padding: 8px 11px; border: 1px solid rgba(74, 124, 89, .2); background: rgba(200, 232, 208, .14); }
.relation-current-card span { color: var(--muted); font-size: 12px; font-weight: 900; }
.relation-current-card b { color: var(--primary); font-size: 18px; line-height: 1.1; font-weight: 900; }
.relation-current-card em { color: var(--muted); font-size: 12px; line-height: 1.35; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relation-link-item span { min-width: 0; }
.project-relation-link-list { display: flex; flex-wrap: wrap; gap: 7px; }
.project-relation-link { max-width: 100%; min-height: 28px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid rgba(74, 124, 89, .22); border-radius: 8px; padding: 4px 8px; background: rgba(255, 252, 246, .86); color: var(--primary); font-size: 12px; line-height: 1.35; font-weight: 900; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.project-relation-link:hover { border-color: rgba(74, 124, 89, .44); background: rgba(200, 232, 208, .18); }
.project-relation-link .material-symbols-outlined { font-size: 15px; flex: 0 0 auto; }
.project-relation-name { color: var(--text); font-weight: 850; overflow-wrap: anywhere; }
.project-relation-actions { display: flex; justify-content: flex-end; gap: 8px; padding-bottom: 1px; min-height: 38px; }
.project-relation-actions .btn { min-height: 34px; border-radius: 999px; padding: 6px 12px; font-size: 13px; line-height: 1; white-space: nowrap; }
.project-relation-actions .btn .material-symbols-outlined { font-size: 17px; }
.project-relation-form:has(#relation-root-field:not(.hidden)) { grid-template-columns: minmax(150px, 190px) minmax(220px, 1fr) minmax(220px, 1fr) auto; }
.project-relation-form:has(#relation-parent-field:not(.hidden)) { grid-template-columns: minmax(150px, 190px) minmax(210px, 1fr) minmax(210px, 1fr) auto; }
.detail-brief-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border-top: 1px solid var(--line); background: var(--line); }
.detail-narrative { min-width: 0; min-height: 132px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-content: start; padding: 16px; background: var(--surface); }
.detail-narrative i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(200, 232, 208, .5); color: var(--primary); font-size: 20px; }
.detail-narrative span { color: var(--muted); font-size: 12px; font-weight: 900; }
.detail-narrative p { margin-top: 7px; color: var(--text); font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-stage-panel { background: var(--surface); }
.detail-stage-head { align-items: center; }
.detail-stage-head > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-stage-head em { color: var(--muted); font-size: 12px; line-height: 1.45; font-style: normal; font-weight: 800; }
.detail-stage-tabs { border-top: 1px solid var(--line); background: rgba(245, 241, 234, .62); }
.detail-stage-timeline { position: relative; display: grid; grid-template-columns: repeat(var(--stage-count, 4), minmax(0, 1fr)); gap: 0; padding: 16px 22px 14px; }
.detail-stage-timeline::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 38px; height: 2px; background: linear-gradient(90deg, rgba(74, 124, 89, .42), rgba(74, 124, 89, .28), rgba(196, 200, 188, .72)); pointer-events: none; }
.detail-stage-step { position: relative; z-index: 1; min-width: 0; min-height: 62px; display: grid; justify-items: center; align-content: start; gap: 7px; border: 0; background: transparent; color: var(--muted); font: inherit; cursor: pointer; text-align: center; }
.detail-stage-node { width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid rgba(196, 200, 188, .78); border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 7px rgba(245, 241, 234, .88); transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease; }
.detail-stage-node i { color: var(--muted); font-size: 13px; line-height: 1; font-style: normal; font-weight: 900; }
.detail-stage-copy { min-width: 0; display: grid; }
.detail-stage-copy b { color: var(--text); font-size: 14px; line-height: 1.25; font-weight: 900; }
.detail-stage-step:hover .detail-stage-node { border-color: rgba(74, 124, 89, .52); transform: translateY(-1px); }
.detail-stage-step:hover .detail-stage-copy b { color: var(--primary); }
.detail-stage-step.passed .detail-stage-node { border-color: rgba(74, 124, 89, .42); background: rgba(200, 232, 208, .5); }
.detail-stage-step.passed .detail-stage-node i { color: var(--primary); }
.detail-stage-step.done .detail-stage-node { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 7px rgba(200, 232, 208, .6), 0 6px 14px rgba(74, 124, 89, .2); }
.detail-stage-step.done .detail-stage-node i { color: #fff; font-size: 19px; }
.detail-stage-step.done .detail-stage-copy b { color: var(--primary); }
.detail-stage-done-tag { display: inline-block; margin-top: 2px; font-size: 11px; font-weight: 800; font-style: normal; color: var(--primary); }
.detail-stage-step.upcoming { opacity: .82; }
.detail-stage-step.current .detail-stage-node { border-color: rgba(74, 124, 89, .72); background: var(--primary); box-shadow: 0 0 0 7px rgba(200, 232, 208, .66), 0 8px 18px rgba(74, 124, 89, .18); }
.detail-stage-step.current .detail-stage-node i { color: #fff; }
.detail-stage-step.current .detail-stage-copy b { color: var(--primary); }
.detail-stage-step.current .detail-stage-copy em { color: var(--primary); }
.detail-stage-step.active .detail-stage-copy b { color: var(--primary); }
.detail-stage-step.active:not(.current) .detail-stage-node { border-color: rgba(74, 124, 89, .72); background: rgba(255, 255, 255, .96); }
/* 条线选择：4 条主线圆点进度条（复用阶段步进条样式），点圆点切换查看 */
.detail-line-step .detail-stage-done-tag { font-size: 11px; font-weight: 800; color: var(--muted); }
.detail-line-step .detail-stage-done-tag.has-overdue { color: #c0392b; }
.detail-line-step.current .detail-stage-done-tag { color: var(--primary); }
.detail-line-step.current .detail-stage-done-tag.has-overdue { color: #c0392b; }
/* 文物勘探 / 资金保障两条线：在 4 主线下方常显（不进入顶部进度条，但内容保留） */
.detail-line-extra { border-top: 1px solid var(--line); }
.detail-line-extra-head { padding: 12px 22px 0; font-size: 12px; font-weight: 850; color: var(--muted); }
/* 条线时间轴：每条线一张卡片，字段+计划节点串在同一条竖向圆点轴上 */
.detail-line-stack { display: grid; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.detail-line-card { min-height: 0; }
.detail-line-card .detail-stage-line-head span { font-weight: 850; }
.detail-line-card .detail-stage-items { padding-bottom: 18px; }
/* 主面板顶部：当前条线「关键信息」字段（随圆点切线切换），多列平铺、无圆点竖轴 */
.detail-line-main-fields-head { display: flex; align-items: center; gap: 6px; padding: 12px 22px 0; color: var(--primary); font-size: 13px; font-weight: 900; }
.detail-line-main-fields-head i { font-size: 18px; }
.detail-line-main-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 28px; padding: 8px 22px 16px; }
.detail-line-main-fields .detail-stage-item { grid-template-columns: 92px minmax(0, 1fr); padding: 6px 0; }
.detail-line-main-fields .detail-stage-item::before { display: none; }
.detail-line-main-fields .detail-stage-cap { margin: 8px 0 0; }
@media (max-width: 760px) { .detail-line-main-fields { grid-template-columns: 1fr; } }
/* 右下角固定面板：项目进展概览（当前阶段/进展/下一步/问题），单列、长文本换行 */
.detail-line-side-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.detail-line-side-head h3 { display: inline-flex; align-items: center; gap: 6px; }
.detail-line-side-head h3 i { font-size: 18px; color: var(--primary); }
.detail-overview-side-panel { border-radius: 16px; }
.detail-overview-side-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 16px; border-top: 1px solid var(--line); background: var(--surface-low); }
.detail-overview-column { min-width: 0; display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.detail-overview-side-item { min-width: 0; min-height: 88px; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; background: var(--surface); padding: 14px 16px; }
.detail-overview-side-item > i { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: rgba(200, 232, 208, .46); color: var(--primary); font-size: 19px; }
.detail-overview-side-item > div { min-width: 0; display: grid; align-content: start; gap: 9px; }
.detail-overview-side-item span { color: var(--muted); font-size: 12px; font-weight: 900; }
.detail-overview-side-item b { min-width: 0; color: var(--text); font-size: 13px; line-height: 1.58; font-weight: 850; white-space: pre-wrap; overflow-wrap: anywhere; }
/* 左侧导航「资料完整度」卡片：圆环总进度 + 分阶段百分比 */
.detail-nav-completeness { display: grid; gap: 0; margin-top: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 10px 26px rgba(46, 50, 48, .055); }
.detail-nav-completeness-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-nav-completeness-copy { min-width: 0; display: grid; gap: 4px; }
.detail-nav-completeness-copy b { color: var(--text); font-size: 15px; line-height: 1.2; font-weight: 950; }
.detail-completeness-provisional-tag { display: inline-flex; margin-left: 6px; padding: 2px 6px; border-radius: 999px; background: rgba(255, 226, 178, .72); color: #8a5514; font-size: 9px; line-height: 1.25; font-style: normal; font-weight: 950; vertical-align: middle; }
.detail-nav-completeness-copy span { color: var(--muted); font-size: 12px; font-weight: 750; }
.detail-nav-completeness-ring { position: relative; flex: 0 0 auto; width: 58px; height: 58px; }
.detail-nav-completeness-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.detail-nav-completeness-track { fill: none; stroke: #e4ebe4; stroke-width: 3.4; }
.detail-nav-completeness-value { fill: none; stroke: var(--primary); stroke-width: 3.4; stroke-linecap: round; }
.detail-nav-completeness-ring em { position: absolute; inset: 0; display: grid; place-items: center; color: var(--primary); font-size: 13px; font-style: normal; font-weight: 950; }
.detail-nav-completeness-rows { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.detail-nav-completeness-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.detail-nav-completeness-row span { min-width: 0; color: var(--text); font-size: 12.5px; font-weight: 750; overflow-wrap: anywhere; }
.detail-nav-completeness-row b { flex: 0 0 auto; color: var(--primary); font-size: 14px; font-weight: 950; }
.material-profile-status { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid rgba(74, 124, 89, .24); border-radius: 11px; background: rgba(200, 232, 208, .16); color: var(--primary); text-align: left; }
.material-profile-status span { min-width: 0; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; line-height: 1.35; font-weight: 900; }
.material-profile-status span i { flex: 0 0 auto; font-size: 16px; }
.material-profile-status em { flex: 0 0 auto; color: inherit; font-size: 10.5px; font-style: normal; font-weight: 900; }
.material-profile-status.is-pending { border-color: rgba(204, 133, 42, .3); background: rgba(255, 247, 230, .8); color: #9a5b12; }
.material-profile-status.is-compact { width: 100%; padding: 7px 8px; }
.detail-material-profile-inline { display: grid; gap: 9px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.detail-material-profile-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.detail-material-profile-head b { color: var(--text); font-size: 12px; font-weight: 950; }
.detail-material-profile-head span { padding: 2px 7px; border-radius: 999px; color: #8a5514; background: rgba(255, 226, 178, .55); font-size: 9px; line-height: 1.5; font-weight: 950; }
.detail-material-profile-head span.is-confirmed { color: var(--primary); background: rgba(200, 232, 208, .45); }
.detail-material-profile-head span.is-error { color: #a33d32; background: rgba(201, 74, 62, .1); }
.detail-material-profile-questions { display: grid; gap: 7px; }
.detail-material-profile-question { display: grid; gap: 7px; padding: 8px; border: 1px solid rgba(196, 200, 188, .72); border-radius: 10px; background: #fff; }
.detail-material-profile-question > div:first-child { min-width: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 6px; align-items: start; }
.detail-material-profile-question > div:first-child > em { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; background: rgba(200, 232, 208, .34); color: var(--primary); font-size: 9px; line-height: 1; font-style: normal; font-weight: 950; }
.detail-material-profile-question > div:first-child > span { min-width: 0; display: grid; gap: 2px; color: var(--text); font-size: 12.5px; line-height: 1.4; font-weight: 900; }
.detail-material-profile-options { width: min(100%, 168px); justify-self: end; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid rgba(74, 124, 89, .28); border-radius: 8px; overflow: hidden; }
.detail-material-profile-options button { min-width: 0; min-height: 32px; border: 0; border-right: 1px solid rgba(74, 124, 89, .22); background: #fff; color: var(--text); font: inherit; font-size: 11px; font-weight: 900; cursor: pointer; }
.detail-material-profile-options button:last-child { border-right: 0; }
.detail-material-profile-options button.is-active.is-suggested { color: #8a5514; background: rgba(255, 226, 178, .38); }
.detail-material-profile-options button.is-active.is-confirmed { color: #fff; background: var(--primary); }
.detail-material-profile-options button:focus-visible { position: relative; z-index: 1; outline: 2px solid rgba(74, 124, 89, .58); outline-offset: -2px; }
.detail-material-profile-options button:disabled { cursor: default; opacity: .72; }
.detail-material-profile-inline > p { color: var(--muted); font-size: 9.5px; line-height: 1.45; font-weight: 750; }
.detail-material-profile-inline.is-error > p { color: #a33d32; }
.detail-material-profile-retry { width: 100%; min-height: 38px; border: 1px solid var(--primary); border-radius: 9px; background: #fff; color: var(--primary); font: inherit; font-size: 11px; font-weight: 950; cursor: pointer; }
.detail-material-profile-inline.is-loading, .detail-material-profile-inline.is-error { min-height: 88px; align-content: start; }
.detail-material-profile-inline.is-busy { opacity: .82; }
/* 卡片内分组小标题（报批材料 / 资金线 / 计划节点…）：占满整行、不带圆点 */
.detail-stage-cap { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; margin: 10px 0 2px; padding-top: 6px; color: var(--primary); font-size: 12px; font-weight: 900; }
.detail-stage-cap:first-child { margin-top: 0; padding-top: 0; }
.detail-stage-cap::before { display: none; }
.detail-stage-cap i { font-size: 15px; }
.detail-stage-cap.detail-stage-cap-node { color: var(--muted); }
/* 计划节点行：复用字段同款圆点轴，圆点按 逾期/即将到期/未到期 分级着色 */
.plan-line-item .plan-line-body { min-width: 0; display: grid; gap: 3px; }
.plan-line-item .plan-line-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.plan-line-item .plan-line-top b { font-size: 13px; font-weight: 850; }
.plan-line-item .plan-line-meta { color: var(--muted); font-size: 12px; line-height: 1.5; font-weight: 800; font-style: normal; }
.plan-line-item .plan-line-remark { color: var(--muted); font-size: 11.5px; line-height: 1.5; font-weight: 700; font-style: normal; }
/* 计划节点圆点：改为空心环（与左侧字段同款），环边按 逾期/即将到期/未到期 着色 */
.plan-line-item.level-red::before { border-color: #c0392b; background: var(--surface); }
.plan-line-item.level-orange::before { border-color: #d98a1f; background: var(--surface); }
.plan-line-item.level-yellow::before { border-color: #c79a1a; background: var(--surface); }
.plan-line-item.level-green::before { border-color: var(--primary); background: var(--surface); }
.plan-line-item.level-gray::before { border-color: rgba(150, 158, 142, .9); background: var(--surface); }
/* 当前节点：时间轴里第一个未完成节点，标「进行中」并整行高亮 */
.plan-line-item.is-current { background: rgba(74, 124, 89, .07); border-radius: 10px; box-shadow: inset 3px 0 0 var(--primary); }
.plan-line-item.is-current::before { box-shadow: 0 0 0 4px rgba(74, 124, 89, .16); }
.plan-line-current-tag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 900; line-height: 1.7; }
/* 当前重点线：顶部条线圆点加脉冲环 + 角标 */
.detail-line-step.is-focus .detail-stage-node { border-color: var(--primary); box-shadow: 0 0 0 7px rgba(245, 241, 234, .88), 0 0 0 9px rgba(74, 124, 89, .35); animation: lineFocusPulse 1.8s ease-in-out infinite; }
@keyframes lineFocusPulse { 0%, 100% { box-shadow: 0 0 0 7px rgba(245, 241, 234, .88), 0 0 0 9px rgba(74, 124, 89, .35); } 50% { box-shadow: 0 0 0 7px rgba(245, 241, 234, .88), 0 0 0 12px rgba(74, 124, 89, .12); } }
.detail-line-focus-tag { display: inline-block; margin-top: 2px; padding: 0 7px; border-radius: 999px; background: rgba(74, 124, 89, .12); color: var(--primary); font-size: 10.5px; font-weight: 900; font-style: normal; }
.detail-line-empty { grid-column: 1 / -1; margin-top: 4px; padding: 8px 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.detail-stage-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.detail-stage-status-item { min-width: 0; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: baseline; background: var(--surface); padding: 11px 16px; }
.detail-stage-status-item span { color: var(--muted); font-size: 12px; font-weight: 900; }
.detail-stage-status-item b { min-width: 0; color: var(--text); font-size: 13px; line-height: 1.55; font-weight: 850; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-stage-body { border-top: 1px solid var(--line); }
.detail-stage-head-actions { display: flex; align-items: center; gap: 10px; }
.detail-stage-edit-hint { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; color: var(--muted); }
.detail-stage-edit-hint i { font-size: 15px; color: var(--primary); }
/* 点击就地编辑：默认是普通文字，hover 出现一支小铅笔提示可点；点击后由 JS 原地换成输入框 */
.detail-stage-editable { display: inline-flex; align-items: center; gap: 3px; min-width: 0; max-width: 100%; border-radius: 7px; padding: 1px 5px; margin: -1px -5px; cursor: text; transition: background .12s ease; }
.detail-stage-editable > b { min-width: 0; overflow-wrap: anywhere; }
.detail-stage-editable .detail-stage-edit-pencil { font-size: 14px; color: var(--primary); opacity: 0; flex: 0 0 auto; transition: opacity .12s ease; }
.detail-stage-editable:hover { background: rgba(74, 124, 89, .1); }
.detail-stage-editable:hover .detail-stage-edit-pencil,
.detail-stage-editable:focus-visible .detail-stage-edit-pencil { opacity: .8; }
.detail-stage-editable:focus-visible { outline: 2px solid rgba(74, 124, 89, .5); outline-offset: 1px; }
.detail-stage-manual-tag { display: inline-flex; align-items: center; padding: 1px 5px; border-radius: 999px; background: rgba(196, 200, 188, .42); color: var(--muted); font-size: 11px; line-height: 1.35; font-weight: 850; white-space: nowrap; }
.detail-stage-editable.is-editing { display: flex; width: 100%; background: transparent; padding: 0; margin: 0; gap: 4px 6px; flex-wrap: wrap; cursor: default; }
.detail-stage-editable.is-editing .detail-stage-inline-actions { flex: 1 0 100%; justify-content: flex-end; }
.detail-stage-inline-value { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.detail-stage-inline-input { min-height: 30px; padding: 4px 8px; font-size: 13px; border: 1px solid var(--outline); border-radius: 8px; background: var(--surface); min-width: 0; }
.detail-stage-inline-input:focus { border-color: var(--primary); }
.detail-stage-inline-input.is-number { width: 92px; flex: 0 0 auto; }
.detail-stage-inline-input:not(.is-number):not(textarea) { flex: 1 1 140px; width: auto; }
textarea.detail-stage-inline-input { flex: 1 1 100%; width: 100%; min-height: 52px; resize: vertical; line-height: 1.5; }
.detail-stage-inline-unit, .detail-stage-inline-sep { color: var(--muted); font-size: 12px; font-weight: 850; white-space: nowrap; }
/* 就地编辑的「保存/取消」按钮：点保存才写库，不再失焦自动保存 */
.detail-stage-inline-actions { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.detail-stage-inline-btn { font-size: 12px; font-weight: 850; padding: 4px 12px; border-radius: 8px; border: 1px solid var(--outline); background: var(--surface); color: var(--text); cursor: pointer; transition: background .12s ease, border-color .12s ease, opacity .12s ease; }
.detail-stage-inline-btn.is-save { background: var(--primary); border-color: var(--primary); color: #fff; }
.detail-stage-inline-btn.is-save:hover { filter: brightness(1.05); }
.detail-stage-inline-btn.is-cancel:hover { background: rgba(0, 0, 0, .04); }
.detail-stage-inline-btn:disabled { opacity: .55; cursor: default; }
.detail-stage-current-line { display: flex; align-items: center; gap: 7px; padding: 9px 22px; font-size: 12px; font-weight: 850; color: var(--primary); background: rgba(74, 124, 89, .08); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-stage-current-line i { font-size: 17px; }
.detail-stage-current-line b { font-weight: 900; }
.detail-stage-snapshot { display: flex; align-items: center; gap: 8px; padding: 9px 16px; font-size: 12px; font-weight: 850; border-bottom: 1px solid var(--line); }
.detail-stage-snapshot i { font-size: 17px; }
.detail-stage-snapshot.current { color: var(--primary); background: rgba(74, 124, 89, .08); }
.detail-stage-snapshot.passed { color: #8a6d3b; background: rgba(180, 140, 60, .1); }
.detail-stage-snapshot.upcoming { color: var(--muted); background: rgba(120, 130, 140, .08); }
.detail-stage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.detail-stage-grid.is-snapshot { opacity: .72; filter: grayscale(.35); }
.detail-stage-line { position: relative; min-width: 0; min-height: 190px; display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--surface); }
@media (min-width: 1181px) { .detail-stage-grid:has(.detail-stage-line:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.detail-stage-grid:has(.detail-stage-line:only-child) { grid-template-columns: 1fr; }
.detail-stage-line::before { content: ""; position: absolute; left: 33px; top: 51px; bottom: 18px; width: 2px; background: linear-gradient(180deg, var(--primary) 0%, rgba(120, 170, 130, .28) 100%); border-radius: 2px; }
.detail-stage-line-head { position: relative; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 15px 16px 10px; }
.detail-stage-line-head i { position: relative; z-index: 1; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-size: 19px; box-shadow: 0 0 0 4px rgba(200, 232, 208, .55); }
.detail-stage-line-head b { display: block; color: var(--text); font-size: 15px; line-height: 1.25; font-weight: 900; }
.detail-stage-line-head span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; font-weight: 800; }
.detail-stage-items { display: grid; align-content: start; padding: 4px 16px 16px 50px; }
.detail-stage-item { position: relative; min-width: 0; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 8px 0; }
.detail-stage-item::before { content: ""; position: absolute; left: -21px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--primary); box-sizing: border-box; }
.detail-stage-item span { color: var(--muted); font-size: 12px; line-height: 1.5; font-weight: 900; }
.detail-stage-item b { min-width: 0; color: var(--text); font-size: 13px; line-height: 1.65; font-weight: 850; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-field-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 16px; }
.detail-field-group { min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.detail-field-group h4 { min-height: 42px; display: flex; align-items: center; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--primary); font-size: 14px; font-weight: 900; }
.detail-field-list { display: grid; grid-template-columns: 1fr; }
.detail-fact { min-height: 54px; padding: 10px 14px; background: var(--surface); display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: start; gap: 12px; border-bottom: 1px solid rgba(196, 200, 188, .42); }
.detail-fact:last-child { border-bottom: 0; }
.detail-fact b { min-width: 0; font-size: 14px; line-height: 1.55; font-weight: 850; overflow-wrap: anywhere; white-space: pre-wrap; }
.detail-table-fields .detail-fact.wide, .detail-table-fields .detail-fact.full { grid-column: auto; }
.detail-content-note { margin: 0 16px 16px; border-top: 1px solid rgba(196, 200, 188, .45); color: var(--muted); }
.detail-content-note summary { min-height: 38px; display: flex; align-items: center; color: var(--muted); font-size: 12px; line-height: 1.35; font-weight: 900; cursor: pointer; }
.detail-content-note p { padding: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.side-facts { grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.side-facts .detail-fact { min-height: 52px; grid-template-columns: 112px minmax(0, 1fr); }
.detail-invest-card { display: grid; gap: 10px; padding: 16px; border-top: 1px solid var(--line); background: var(--surface); }
.detail-invest-card div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.detail-invest-card span { color: var(--muted); font-size: 12px; font-weight: 900; }
.detail-invest-card b { color: var(--primary); font-size: 28px; line-height: 1; font-weight: 900; }
.detail-invest-card p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.detail-record-list { display: grid; gap: 1px; border-top: 1px solid var(--line); background: var(--line); }
.detail-record-group { min-width: 0; display: grid; gap: 8px; padding: 14px; background: var(--surface); }
.detail-record-group > b { color: var(--primary); font-size: 13px; line-height: 1.35; font-weight: 900; }
.detail-record-group > p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.detail-record { min-width: 0; display: grid; gap: 3px; padding: 9px 10px; border: 1px solid rgba(196, 200, 188, .48); background: var(--surface-low); }
.detail-record span { min-width: 0; color: var(--text); font-size: 13px; line-height: 1.45; font-weight: 850; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-record em { color: var(--muted); font-size: 12px; line-height: 1.45; font-style: normal; }
.file-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 16px 18px 18px; }
.panel-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.detail-file-browser-btn { min-height: 30px; border-radius: 999px; padding: 5px 10px; font-size: 12px; }
.detail-file-browser-btn .material-symbols-outlined { font-size: 17px; }
.file-category { min-height: 0; padding: 14px 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); display: grid; gap: 10px; align-content: start; transition: box-shadow .15s ease, border-color .15s ease; }
.file-category:hover { box-shadow: 0 6px 18px rgba(31, 45, 34, .07); }
.file-category.missing { background: rgba(255, 218, 216, .14); border-color: rgba(214, 96, 92, .26); }
.file-category-head { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.file-category-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.file-category.missing .file-category-icon { background: rgba(214, 96, 92, .12); color: #b3403c; }
.file-category-icon i { font-size: 20px; }
.file-category-meta { min-width: 0; display: grid; gap: 1px; }
.file-category-meta b { font-size: 14px; font-weight: 850; }
.file-category-meta span { color: var(--muted); font-size: 11.5px; }
.file-category-flag { flex: 0 0 auto; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 850; font-style: normal; white-space: nowrap; }
.file-category-flag.ready { background: var(--primary-soft); color: var(--primary); }
.file-category-flag.missing { background: rgba(214, 96, 92, .14); color: #b3403c; }
.file-category-files { display: grid; }
.file-category-empty { display: flex; align-items: center; gap: 6px; padding: 9px 2px 2px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 12px; }
.file-category-empty i { font-size: 16px; }
.file-category-more { padding: 7px 0 0; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.file-link { min-width: 0; width: 100%; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 0; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.file-link-icon { font-size: 16px; color: var(--primary); }
.file-link:hover .file-link-label { text-decoration: underline; color: var(--primary); }
.file-link-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-link em { flex: 0 0 auto; color: var(--muted); font-style: normal; font-size: 11px; }
.file-browser-overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 28px; background: rgba(46, 50, 48, .28); backdrop-filter: blur(4px); animation: fileBrowserFade .18s ease-out both; }
.file-browser-panel { width: min(1120px, calc(100vw - 56px)); height: min(780px, calc(100vh - 56px)); overflow: hidden; border: 1px solid rgba(196, 200, 188, .7); border-radius: 18px; background: var(--surface); box-shadow: 0 24px 60px rgba(46, 50, 48, .18); display: grid; grid-template-rows: auto minmax(0, 1fr); animation: fileBrowserIn .24s ease-out both; }
.file-browser-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line); background: var(--surface-low); }
.file-browser-head span { display: block; color: var(--muted); font-size: 12px; font-weight: 900; }
.file-browser-head h3 { margin-top: 6px; color: var(--primary); font-family: "Literata", "Microsoft YaHei", serif; font-size: 22px; line-height: 1.35; font-weight: 900; }
.file-browser-head p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.file-explorer-shell { min-height: 0; overflow: hidden; }
.file-explorer { min-height: 0; height: 100%; overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.file-explorer > .file-explorer-toolbar, .file-explorer > .file-view-switch, .file-explorer > .file-explorer-actionbar { flex: 0 0 auto; }
.file-explorer > .file-explorer-body { flex: 1 1 auto; min-height: 0; }
.file-explorer-toolbar { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fff, rgba(247, 248, 245, .92)); }
.file-explorer-search { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.file-explorer-search .material-symbols-outlined { flex: 0 0 auto; color: var(--muted); font-size: 18px; }
.file-explorer-search input { width: clamp(150px, 18vw, 220px); border: 0; background: transparent; color: var(--text); font-size: 12px; font-weight: 800; outline: none; }
.file-explorer-search:focus-within { border-color: rgba(74, 124, 89, .52); box-shadow: 0 0 0 3px rgba(200, 232, 208, .35); }
.file-search-result { position: relative; min-width: 0; display: grid; gap: 4px; }
.file-search-location { min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-search-location .material-symbols-outlined { flex: 0 0 auto; font-size: 14px; }
.file-explorer-nav { display: inline-flex; align-items: center; gap: 6px; }
.file-explorer-viewmode { display: inline-flex; align-items: center; gap: 6px; }
.file-explorer-viewmode .file-explorer-nav-btn.active { background: rgba(200, 232, 208, .36); border-color: rgba(74, 124, 89, .5); color: var(--primary); }
.file-explorer-nav-btn { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; }
.file-explorer-nav-btn:disabled { opacity: .38; cursor: default; }
.file-explorer-nav-btn:not(:disabled):hover { background: rgba(200, 232, 208, .22); color: var(--primary); }
.file-explorer-nav-btn .material-symbols-outlined { font-size: 19px; }
.file-explorer-path { min-width: 0; min-height: 34px; display: flex; align-items: center; gap: 2px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.file-explorer-path button, .file-explorer-path span { max-width: 260px; border: 0; background: transparent; color: var(--text); font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-explorer-path button { cursor: pointer; color: var(--primary); }
.file-explorer-path button:hover { text-decoration: underline; }
.file-explorer-path .material-symbols-outlined { flex: 0 0 auto; color: var(--muted); font-size: 16px; }
.file-explorer-summary { min-width: 170px; display: grid; justify-items: end; gap: 2px; }
.file-explorer-summary b { max-width: 240px; color: var(--text); font-size: 13px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-explorer-summary span { color: var(--muted); font-size: 12px; font-weight: 700; }
.file-explorer-actionbar { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid rgba(196, 200, 188, .46); background: rgba(250, 248, 243, .74); }
.file-transfer-panel { min-width: 0; display: grid; gap: 4px; }
.file-transfer-actions, .file-bulk-actions { min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.file-upload-target, .file-bulk-actions span { color: var(--muted); font-size: 12px; line-height: 1.25; font-weight: 800; }
.file-upload-target { min-width: 0; max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-drag-hint { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 11px; line-height: 1.25; font-weight: 700; white-space: nowrap; opacity: .85; }
.file-drag-hint .material-symbols-outlined { font-size: 14px; }
.file-action-btn { min-height: 32px; border-radius: 9px; padding: 6px 10px; font-size: 12px; font-weight: 900; white-space: nowrap; }
.history-library-search { min-width: 0; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid rgba(196, 200, 188, .6); border-radius: 9px; background: rgba(255, 255, 255, .92); }
.history-library-search .material-symbols-outlined { flex: 0 0 auto; color: var(--muted); font-size: 17px; }
.history-library-search input { width: 132px; min-height: 24px; border: 0; outline: none; background: transparent; color: var(--text); font-size: 12px; font-weight: 800; }
.file-action-btn .material-symbols-outlined { font-size: 17px; }
.file-action-btn.danger { border-color: rgba(210, 80, 70, .28); color: #9f382f; background: rgba(255, 243, 241, .72); }
.file-action-btn.danger:hover:not(:disabled) { background: #fff0ed; border-color: rgba(210, 80, 70, .5); }
.file-move-select { width: clamp(180px, 24vw, 260px); min-height: 32px; border-radius: 9px; padding-top: 4px; padding-bottom: 4px; font-size: 12px; font-weight: 800; }
.file-explorer-body { min-height: 0; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); }
.file-explorer.has-preview .file-explorer-body { grid-template-columns: minmax(0, 1fr); }
.file-explorer-grid { min-height: 0; overflow: auto; padding: 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); align-content: start; gap: 18px 14px; }
.file-explorer-item-wrap { position: relative; min-width: 0; }
.file-explorer-grid.file-explorer-listview { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; }
.file-explorer-list-header { display: grid; grid-template-columns: 34px minmax(0, 1fr) 104px 70px 116px; align-items: center; gap: 12px; padding: 0 168px 7px 12px; color: var(--muted); font-size: 12px; line-height: 1.2; font-weight: 900; }
.file-explorer-listview .file-explorer-item-wrap { width: 100%; }
.file-explorer-listview .file-explorer-item { min-height: 44px; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; padding: 6px 12px; text-align: left; }
.file-explorer-listview .file-explorer-item.file { min-height: 48px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 104px 70px 116px; grid-template-rows: auto; align-items: start; justify-items: stretch; }
.file-explorer-listview .file-explorer-item:hover { transform: none; }
.file-explorer-listview .file-explorer-icon { width: 34px; height: 34px; flex: 0 0 auto; }
.file-explorer-listview .file-explorer-item.file .file-explorer-icon { justify-self: center; }
.file-explorer-listview .file-explorer-icon .material-symbols-outlined { font-size: 24px; }
.file-explorer-listview .file-explorer-item.file .file-explorer-icon .material-symbols-outlined { font-size: 24px; }
.file-explorer-listview .file-explorer-icon.file-icon em { left: auto; right: -4px; bottom: -2px; transform: none; min-width: 0; padding: 1px 3px; font-size: 8px; }
.file-explorer-listview .file-explorer-file-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; align-content: start; align-self: stretch; gap: 4px 6px; }
.file-explorer-listview .file-explorer-name { flex: 1 1 auto; width: auto; min-width: 0; display: block; -webkit-line-clamp: unset; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.file-explorer-listview .file-explorer-meta { width: auto; max-width: none; margin-left: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.file-explorer-listview .file-explorer-meta-label { display: none; }
.file-explorer-listview .file-explorer-meta.is-empty { display: block; }
.file-explorer-listview .file-processing-status { justify-self: start; }
.file-explorer-listview .file-invoice-amount-badge { flex: 0 0 auto; }
.file-invoice-details { display: none; }
.file-explorer-listview .file-explorer-name { grid-column: 1; }
.file-explorer-listview .file-explorer-invoice-summary { grid-column: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; }
.file-explorer-listview .file-invoice-details { grid-column: 1; min-width: 0; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.file-invoice-detail-caption { color: var(--muted); font-size: 10px; line-height: 1.3; font-weight: 800; }
.file-invoice-detail-line { color: #315f43; font-size: 11px; font-weight: 800; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; align-items: center; gap: 2px 5px; }
.file-invoice-detail-line > b,
.file-invoice-detail-line > .file-invoice-status,
.file-invoice-detail-line > .file-invoice-action,
.file-invoice-detail-line > .file-invoice-total-amount-field { grid-column: 1 / -1; justify-self: start; }
.file-invoice-detail-line b { color: #1f4630; font-weight: 900; margin-right: 4px; }
.file-invoice-detail-line.total { padding-top: 2px; border-top: 1px dashed rgba(92, 130, 83, .3); }
.file-invoice-field.editable { cursor: pointer; min-width: 0; box-sizing: border-box; display: inline-flex; align-items: center; gap: 1px; border-radius: 6px; padding: 0 2px; margin: 0 -1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-invoice-field.editable:hover { background: rgba(92, 130, 83, .16); }
.file-invoice-field.editable .material-symbols-outlined { flex: 0 0 11px; visibility: hidden; font-size: 11px; color: var(--primary); opacity: 0; transition: opacity .12s ease; }
.file-explorer-item:hover .file-invoice-field.editable .material-symbols-outlined,
.file-invoice-field.editable:hover .material-symbols-outlined,
.file-invoice-field.editable:focus-visible .material-symbols-outlined { visibility: visible; opacity: .7; }
.file-invoice-field.editable.editing { cursor: text; overflow: visible; background: rgba(92, 130, 83, .1); }
.file-invoice-inline-input { width: 100%; min-width: 0; height: 16px; box-sizing: border-box; padding: 0 4px; border: 1px solid rgba(92, 130, 83, .48); border-radius: 4px; background: #fff; color: var(--text); font: inherit; font-size: 11px; line-height: 14px; font-weight: 800; outline: none; }
.file-invoice-inline-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(74, 124, 89, .14); }
.file-invoice-inline-input:disabled { opacity: .65; }
.file-invoice-detail-line .file-invoice-status { grid-column: 1 / -1; justify-self: start; }
.file-invoice-inline-input[type="number"] { -moz-appearance: textfield; }
.file-invoice-inline-input[type="number"]::-webkit-inner-spin-button,
.file-invoice-inline-input[type="number"]::-webkit-outer-spin-button { margin: 0; appearance: none; -webkit-appearance: none; }
.file-explorer-listview .file-source-badge { flex: 0 0 auto; }
.file-explorer-listview .file-explorer-count-badge { position: static; order: 2; margin-left: 4px; flex: 0 0 auto; }
.file-explorer-listview .file-explorer-tags { flex: 0 0 auto; margin-left: 8px; }
.file-explorer-listview .file-explorer-folder-alerts { width: auto; flex: 0 0 auto; justify-content: flex-start; margin: 0 0 0 8px; }
.file-explorer-listview .file-explorer-item-wrap .file-explorer-item.file { padding: 8px 156px 8px 12px; }
.file-explorer-listview .file-explorer-select { top: 10px; right: 118px; transform: none; }
.file-explorer-listview .file-explorer-delete { top: 10px; bottom: auto; transform: none; }
.file-explorer-listview .file-search-result { width: 100%; }
.file-explorer-item { position: relative; width: 100%; min-width: 0; min-height: 176px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text); text-align: center; text-decoration: none; display: grid; grid-template-rows: 66px auto auto auto auto auto; justify-items: center; align-items: start; gap: 6px; padding: 18px 9px 34px; cursor: pointer; transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.file-explorer-item.file { touch-action: none; }
.file-explorer-item:hover { border-color: rgba(74, 124, 89, .28); background: rgba(200, 232, 208, .18); box-shadow: 0 8px 18px rgba(46, 50, 48, .06); transform: translateY(-1px); }
.file-explorer-item-wrap.selected .file-explorer-item { border-color: rgba(74, 124, 89, .62); background: rgba(200, 232, 208, .28); box-shadow: 0 10px 24px rgba(74, 124, 89, .12); }
.file-explorer-item-wrap.highlighted .file-explorer-item { border-color: rgba(74, 124, 89, .58); background: rgba(200, 232, 208, .36); box-shadow: 0 10px 24px rgba(74, 124, 89, .14); }
.file-explorer-item-wrap.highlighted::after { content: "新归档"; position: absolute; z-index: 3; left: 7px; top: 7px; padding: 3px 7px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 10px; line-height: 1.2; font-weight: 900; box-shadow: 0 6px 12px rgba(46, 50, 48, .12); pointer-events: none; }
.file-explorer-item-wrap.file-drag-source { opacity: .42; }
.file-explorer-item.folder.file-drag-target { border-color: var(--primary); background: rgba(200, 232, 208, .5); box-shadow: 0 0 0 3px rgba(74, 124, 89, .14), 0 10px 24px rgba(74, 124, 89, .16); transform: translateY(-2px); }
.file-dragging, .file-dragging * { cursor: grabbing !important; user-select: none !important; }
.file-drag-ghost { position: fixed; z-index: 130; left: 0; top: 0; width: min(300px, calc(100vw - 32px)); min-height: 42px; padding: 8px 12px; border: 1px solid rgba(74, 124, 89, .34); border-radius: 10px; background: rgba(255, 255, 255, .96); color: var(--text); display: flex; align-items: center; gap: 8px; pointer-events: none; box-shadow: 0 14px 34px rgba(46, 50, 48, .22); }
.file-drag-ghost .material-symbols-outlined { flex: 0 0 auto; color: var(--primary); font-size: 20px; }
.file-drag-ghost span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 900; }
.file-drag-parent-zone { position: fixed; z-index: 129; min-height: 38px; border: 1px dashed rgba(74, 124, 89, .42); border-radius: 10px; background: rgba(247, 248, 245, .94); color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 7px; opacity: .78; pointer-events: none; box-shadow: 0 8px 18px rgba(46, 50, 48, .08); transition: color .14s ease, border-color .14s ease, background-color .14s ease, opacity .14s ease; }
.file-drag-parent-zone.active { border-color: var(--primary); background: rgba(200, 232, 208, .92); color: var(--primary); opacity: 1; }
.file-drag-parent-zone .material-symbols-outlined { font-size: 19px; }
.file-drag-parent-zone span { font-size: 12px; font-weight: 900; }
.file-explorer-count-badge { position: absolute; z-index: 3; top: 8px; right: 10px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; line-height: 20px; font-weight: 900; box-shadow: 0 6px 12px rgba(46, 50, 48, .14); pointer-events: none; }
.file-explorer-folder-actions { position: absolute; z-index: 4; left: 8px; top: 8px; display: inline-flex; gap: 4px; opacity: 0; transition: opacity .16s ease; }
.file-explorer-item:hover .file-explorer-folder-actions, .file-explorer-folder-actions:focus-within { opacity: 1; }
.file-explorer-folder-action { width: 26px; height: 26px; border: 1px solid rgba(74, 124, 89, .24); border-radius: 8px; background: rgba(255, 255, 255, .94); color: var(--primary); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 14px rgba(46, 50, 48, .08); transition: background-color .16s ease, transform .16s ease; }
.file-explorer-folder-action:hover { background: rgba(200, 232, 208, .4); transform: translateY(-1px); }
.file-explorer-folder-action.danger { border-color: rgba(210, 80, 70, .22); color: #b84d42; }
.file-explorer-folder-action.danger:hover { background: #fff3f1; }
.file-explorer-folder-action .material-symbols-outlined { font-size: 16px; }
.file-explorer-item:disabled { cursor: default; opacity: .62; }
.file-explorer-item:disabled:hover { border-color: transparent; background: transparent; box-shadow: none; transform: none; }
.file-explorer-delete { position: absolute; z-index: 3; right: 8px; bottom: 8px; width: 28px; height: 28px; border: 1px solid rgba(210, 80, 70, .18); border-radius: 8px; background: rgba(255, 255, 255, .94); color: #b84d42; display: grid; place-items: center; opacity: 0; cursor: pointer; box-shadow: 0 8px 18px rgba(46, 50, 48, .08); transition: opacity .16s ease, background-color .16s ease, transform .16s ease; }
.file-explorer-item-wrap:hover .file-explorer-delete, .file-explorer-delete:focus-visible { opacity: 1; }
.file-explorer-delete:hover { background: #fff3f1; transform: translateY(-1px); }
.file-explorer-delete .material-symbols-outlined { font-size: 18px; }
.file-explorer-select { position: absolute; z-index: 4; top: 8px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; }
.file-explorer-select input { position: absolute; opacity: 0; pointer-events: none; }
.file-explorer-select span { width: 20px; height: 20px; border: 1px solid rgba(74, 124, 89, .34); border-radius: 6px; background: rgba(255, 255, 255, .92); box-shadow: 0 6px 14px rgba(46, 50, 48, .08); }
.file-explorer-select input:checked + span { border-color: var(--primary); background: var(--primary); }
.file-explorer-select input:checked + span::after { content: ""; display: block; width: 9px; height: 5px; margin: 5px auto 0; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); }
.file-explorer-item-wrap.selected .file-explorer-select span { border-color: var(--primary); }
.file-explorer-item-wrap.highlighted .file-explorer-select span { border-color: rgba(74, 124, 89, .58); }
.file-explorer-icon { width: 66px; height: 66px; display: grid; place-items: center; position: relative; }
.file-explorer-icon .material-symbols-outlined { font-size: 58px; line-height: 1; }
.file-explorer-item.folder .file-explorer-icon .material-symbols-outlined { color: #d8a23a; font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 48; text-shadow: 0 7px 14px rgba(184, 125, 24, .16); }
.file-explorer-item.folder .file-explorer-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-explorer-item.file .file-explorer-icon .material-symbols-outlined { color: #5f7f8f; font-size: 54px; }
.file-explorer-icon.file-icon em { position: absolute; left: 50%; bottom: 11px; transform: translateX(-50%); min-width: 34px; padding: 2px 5px; border-radius: 4px; background: var(--primary); color: #fff; font-size: 9px; line-height: 1; font-style: normal; font-weight: 900; letter-spacing: 0; }
.file-explorer-item.file .file-explorer-icon.ftype-pdf .material-symbols-outlined { color: #d0453c; }
.file-explorer-icon.ftype-pdf em { background: #d0453c; }
.file-explorer-item.file .file-explorer-icon.ftype-word .material-symbols-outlined { color: #2b579a; }
.file-explorer-icon.ftype-word em { background: #2b579a; }
.file-explorer-item.file .file-explorer-icon.ftype-excel .material-symbols-outlined { color: #217346; }
.file-explorer-icon.ftype-excel em { background: #217346; }
.file-explorer-item.file .file-explorer-icon.ftype-ppt .material-symbols-outlined { color: #d24726; }
.file-explorer-icon.ftype-ppt em { background: #d24726; }
.file-explorer-item.file .file-explorer-icon.ftype-image .material-symbols-outlined { color: #8156c9; }
.file-explorer-icon.ftype-image em { background: #8156c9; }
.file-explorer-item.file .file-explorer-icon.ftype-zip .material-symbols-outlined { color: #b58021; }
.file-explorer-icon.ftype-zip em { background: #b58021; }
.file-explorer-item.file .file-explorer-icon.ftype-video .material-symbols-outlined { color: #c2447e; }
.file-explorer-icon.ftype-video em { background: #c2447e; }
.file-explorer-item.file .file-explorer-icon.ftype-cad .material-symbols-outlined { color: #3f7d8c; }
.file-explorer-icon.ftype-cad em { background: #3f7d8c; }
.file-explorer-item.file .file-explorer-icon.ftype-other .material-symbols-outlined { color: #6b7a83; }
.file-explorer-icon.ftype-other em { background: #6b7a83; }
.file-explorer-icon.file-thumb .file-explorer-thumb { width: 58px; height: 58px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(46, 50, 48, .12); background: var(--surface-low); box-shadow: 0 3px 8px rgba(46, 50, 48, .12); }
.file-explorer-icon.file-thumb > .material-symbols-outlined { display: none; }
.file-explorer-icon.file-thumb > em { display: none; }
.file-explorer-icon.file-thumb.thumb-failed .file-explorer-thumb { display: none; }
.file-explorer-icon.file-thumb.thumb-failed > .material-symbols-outlined { display: inline-block; }
.file-explorer-icon.file-thumb.thumb-failed > em { display: block; }
.file-explorer-listview .file-explorer-icon.file-thumb .file-explorer-thumb { width: 32px; height: 32px; border-radius: 6px; }
.file-explorer-name { width: 100%; color: var(--text); font-size: 13px; line-height: 1.35; font-weight: 850; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.file-explorer-file-main { display: contents; }
.file-explorer-invoice-summary { display: contents; }
.file-processing-status { display: inline-flex; align-items: center; justify-content: center; width: max-content; max-width: 100%; min-height: 24px; padding: 3px 8px; border-radius: 999px; border: 1px solid transparent; font-size: 11px; line-height: 1.2; font-weight: 900; white-space: nowrap; }
.file-processing-status.uploading { color: #8a641f; border-color: rgba(184, 125, 24, .24); background: rgba(244, 214, 151, .22); }
.file-processing-status.processing { color: #35628a; border-color: rgba(64, 116, 165, .24); background: rgba(184, 215, 241, .24); }
.file-processing-status.completed { color: #315f43; border-color: rgba(92, 130, 83, .24); background: rgba(200, 232, 208, .28); }
.file-category-assign { display: inline-flex; align-items: center; gap: 4px; justify-self: start; margin-top: 6px; padding: 4px 9px; border: 1px dashed rgba(92, 130, 83, .45); border-radius: 999px; background: transparent; color: #315f43; font-size: 11px; font-weight: 900; cursor: pointer; }
.file-category-assign:hover { background: rgba(92, 130, 83, .12); border-style: solid; }
.file-category-assign .material-symbols-outlined { font-size: 14px; }
.assign-material-overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(31, 42, 34, .38); }
.assign-material-modal { display: flex; flex-direction: column; gap: 10px; width: min(600px, 92vw); max-height: 76vh; padding: 18px; border-radius: 16px; background: #fff; box-shadow: 0 24px 60px rgba(31, 42, 34, .25); }
.assign-material-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15px; }
.assign-material-hint { margin: 0; color: var(--muted); font-size: 12px; }
.assign-material-list { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.assign-material-group { display: flex; flex-direction: column; gap: 6px; }
.assign-material-group-head { position: sticky; top: 0; z-index: 1; width: 100%; border: none; cursor: pointer; text-align: left; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; background: rgba(200, 232, 208, .35); color: #315f43; font-size: 12px; font-weight: 900; }
.assign-material-group-head .material-symbols-outlined { font-size: 15px; }
.assign-material-group-head em { margin-left: auto; font-style: normal; color: var(--muted); font-weight: 700; font-size: 11px; }
.assign-material-group-head:hover { background: rgba(200, 232, 208, .55); }
.assign-material-group-arrow { font-size: 16px; }
.assign-material-file { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(247, 248, 245, .7); cursor: pointer; text-align: left; }
.assign-material-file:hover { border-color: rgba(92, 130, 83, .5); background: rgba(200, 232, 208, .25); }
.assign-material-file .material-symbols-outlined { font-size: 18px; color: #315f43; flex: 0 0 auto; }
.assign-material-file-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; font-size: 13px; }
.assign-material-file em { flex: 0 0 auto; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; color: var(--muted); font-size: 11px; }
.file-category-head[data-material-files-modal] { cursor: pointer; border-radius: 10px; }
.file-category-head[data-material-files-modal]:hover { background: rgba(200, 232, 208, .22); }
.material-type-file { padding: 0; gap: 0; cursor: default; }
.material-type-file:hover { background: rgba(247, 248, 245, .7); }
.material-type-file-open { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: none; background: transparent; cursor: pointer; text-align: left; border-radius: 10px 0 0 10px; }
.material-type-file-open:hover { background: rgba(200, 232, 208, .25); }
.material-type-file-open .material-symbols-outlined { font-size: 18px; color: #315f43; flex: 0 0 auto; }
.material-type-file-remove { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px; margin-right: 8px; padding: 4px 9px; border: 1px dashed rgba(178, 76, 60, .45); border-radius: 999px; background: transparent; color: #a4432f; font-size: 11px; font-weight: 900; cursor: pointer; }
.material-type-file-remove:hover { background: rgba(178, 76, 60, .1); border-style: solid; }
.material-type-file-remove .material-symbols-outlined { font-size: 14px; color: #a4432f; }
.material-type-add { align-self: flex-start; }
.file-invoice-amount-badge { max-width: 100%; padding: 4px 8px; border-radius: 999px; background: rgba(92, 130, 83, .12); color: #315f43; border: 1px solid rgba(92, 130, 83, .22); font-size: 11px; line-height: 1.1; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-invoice-amount-badge.editable { cursor: pointer; display: inline-flex; align-items: center; gap: 3px; }
.file-invoice-amount-badge.editable .material-symbols-outlined { flex: 0 0 12px; visibility: hidden; font-size: 12px; opacity: 0; transition: opacity .12s ease; }
.file-invoice-amount-badge.editable:hover .material-symbols-outlined,
.file-invoice-amount-badge.editable:focus-visible .material-symbols-outlined { visibility: visible; opacity: .75; }
.file-invoice-amount-badge.editable:hover { background: rgba(92, 130, 83, .22); border-color: rgba(92, 130, 83, .45); }
.file-invoice-status, .file-invoice-action { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 11px; line-height: 1.1; font-weight: 900; white-space: nowrap; }
.file-invoice-status.suspect { color: #9b2c2c; background: rgba(220, 53, 69, .12); border: 1px solid rgba(220, 53, 69, .25); }
.file-invoice-status.review { color: #8a4b08; background: rgba(245, 158, 11, .14); border: 1px solid rgba(245, 158, 11, .28); }
.file-invoice-status.non-invoice { color: #667085; background: rgba(102, 112, 133, .12); border: 1px solid rgba(102, 112, 133, .24); }
.file-invoice-action { gap: 3px; cursor: pointer; color: #fff; border: 1px solid var(--primary, #2f8f4e); background: var(--primary, #2f8f4e); box-shadow: 0 2px 5px rgba(47, 143, 78, .2); transition: filter .15s ease, box-shadow .15s ease, transform .08s ease; }
.file-invoice-action.suspect { background: var(--primary, #2f8f4e); border-color: var(--primary, #2f8f4e); }
.file-invoice-action.review { background: #356f9f; border-color: #356f9f; box-shadow: 0 2px 5px rgba(53, 111, 159, .2); }
.file-invoice-action.review-flag { background: #a24d1a; border-color: #a24d1a; box-shadow: 0 2px 5px rgba(162, 77, 26, .22); }
.file-invoice-action .material-symbols-outlined { font-size: 13px; line-height: 1; }
.file-invoice-action:hover { filter: brightness(.94); box-shadow: 0 3px 7px rgba(47, 143, 78, .28); }
.file-invoice-action.review:hover { box-shadow: 0 3px 7px rgba(53, 111, 159, .28); }
.file-invoice-action.review-flag:hover { box-shadow: 0 3px 7px rgba(162, 77, 26, .3); }
.file-invoice-action:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(47, 143, 78, .2); }
.file-invoice-action:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(47, 143, 78, .35); }
.file-source-badge { flex: 0 0 auto; padding: 2px 6px; border-radius: 999px; font-size: 10px; line-height: 1.1; font-weight: 800; white-space: nowrap; }
.file-source-badge.ai { color: #35628a; border: 1px solid rgba(64, 116, 165, .24); background: rgba(184, 215, 241, .24); }
.file-source-badge.manual { color: #6b6257; border: 1px solid rgba(120, 108, 92, .24); background: rgba(214, 205, 192, .28); }
.file-folder-suggestion { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 176, 32, .16); color: #9a6a00; font-size: 12px; font-weight: 700; line-height: 1.5; }
.file-folder-suggestion .material-symbols-outlined { font-size: 16px; }
.file-folder-suggestion-confirm { cursor: pointer; padding: 1px 8px; border-radius: 999px; background: var(--primary, #2f8f4e); color: #fff; font-weight: 800; }
.file-folder-suggestion-confirm:hover { opacity: .9; }
.file-explorer-meta { width: 100%; color: var(--muted); font-size: 11px; line-height: 1.25; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-explorer-meta.is-empty { display: none; }
.file-explorer-folder-completeness { margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: rgba(200, 232, 208, .5); color: var(--primary); font-size: 11px; font-weight: 900; line-height: 1.4; }
.file-explorer-folder-completeness.is-provisional { background: rgba(255, 226, 178, .62); color: #8a5514; }
.file-explorer-folder-alerts { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 2px; }
.file-explorer-folder-alert { display: inline-flex; align-items: center; gap: 2px; padding: 2px 7px; border: 1px solid transparent; border-radius: 999px; font-size: 10px; line-height: 1.4; font-weight: 900; white-space: nowrap; cursor: pointer; transition: filter .15s ease, transform .1s ease; }
.file-explorer-folder-alert .material-symbols-outlined { font-size: 12px; line-height: 1; }
.file-explorer-folder-alert.review { color: #8a4b08; background: rgba(245, 158, 11, .16); border-color: rgba(245, 158, 11, .3); }
.file-explorer-folder-alert.suspect { color: #9b2c2c; background: rgba(220, 53, 69, .14); border-color: rgba(220, 53, 69, .28); }
.file-explorer-folder-alert:hover { filter: brightness(.95); transform: translateY(-1px); }
.file-explorer-folder-alert:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.file-explorer-empty { grid-column: 1 / -1; min-height: 220px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; background: rgba(247, 248, 245, .72); text-align: center; }
.file-view-switch { display: inline-flex; align-self: flex-start; gap: 4px; margin: 0 22px 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(247, 248, 245, .7); }
.file-view-switch-btn { display: inline-flex; align-items: center; gap: 5px; border: none; border-radius: 999px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; padding: 6px 14px; cursor: pointer; transition: background-color .14s ease, color .14s ease; }
.file-view-switch-btn .material-symbols-outlined { font-size: 17px; }
.file-view-switch-btn:hover { color: var(--text); }
.file-view-switch-btn.active { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(74, 124, 89, .28); }
.file-explorer-item.line-tile .line-icon { background: rgba(92, 130, 83, .14); color: #2f6b46; }
.file-explorer-tags { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 4px; }
.folder-line-tag { padding: 2px 8px; border-radius: 999px; background: rgba(92, 130, 83, .12); color: #315f43; border: 1px solid rgba(92, 130, 83, .22); font-size: 10px; line-height: 1.35; font-weight: 800; white-space: nowrap; }
.file-explorer-empty .material-symbols-outlined { color: var(--muted); font-size: 46px; }
.file-explorer-empty b { color: var(--text); font-size: 15px; }
.file-explorer-empty span { font-size: 12px; }
.file-preview-full { position: fixed; inset: 0; z-index: 120; min-width: 0; min-height: 0; overflow: hidden; background: var(--surface-low); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: fileBrowserFade .14s ease-out both; }
.file-preview-drawer { min-width: 0; min-height: 0; overflow: hidden; border-left: 1px solid var(--line); background: var(--surface-low); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.file-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); box-shadow: 0 8px 24px rgba(46, 50, 48, .06); }
.file-preview-head div { min-width: 0; display: grid; gap: 4px; }
.file-preview-head span { color: var(--muted); font-size: 12px; font-weight: 900; }
.file-preview-head b { color: var(--text); font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.file-preview-head em { color: var(--muted); font-size: 12px; line-height: 1.4; font-style: normal; }
.file-preview-viewer { min-height: 0; overflow: auto; padding: 0; background: #fff; }
.file-preview-frame { display: block; width: 100%; height: 100%; min-height: 0; border: 0; border-radius: 0; background: #fff; }
.file-preview-image { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 116px); margin: 0 auto; object-fit: contain; border-radius: 0; background: #fff; }
.file-preview-text { margin: 0 auto; min-height: 100%; max-width: 920px; padding: 22px 26px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); font-family: "Microsoft YaHei", system-ui, sans-serif; font-size: 14px; line-height: 1.82; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 8px 22px rgba(46, 50, 48, .06); }
.file-preview-sheet-wrap { display: flex; flex-direction: column; gap: 10px; min-height: 100%; }
.file-preview-sheet-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.file-preview-sheet-tab { border: 1px solid var(--line); border-radius: 999px; background: var(--surface, #fff); color: var(--muted); font-size: 12px; font-weight: 800; padding: 5px 14px; cursor: pointer; }
.file-preview-sheet-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.file-preview-sheet { flex: 1; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 10px; box-shadow: 0 8px 22px rgba(46, 50, 48, .06); }
.file-preview-sheet table { border-collapse: collapse; font-size: 13px; color: var(--text); }
.file-preview-sheet td { border: 1px solid #e2e0d8; padding: 6px 10px; min-width: 64px; max-width: 460px; vertical-align: top; overflow-wrap: anywhere; }
.file-preview-sheet tr:first-child td { background: rgba(200, 232, 208, .3); font-weight: 800; }
.file-preview-doc { margin: 0 auto; min-height: 100%; max-width: 920px; padding: 26px 32px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); font-family: "Microsoft YaHei", system-ui, sans-serif; font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; box-shadow: 0 8px 22px rgba(46, 50, 48, .06); }
.file-preview-doc table { border-collapse: collapse; margin: 10px 0; }
.file-preview-doc td, .file-preview-doc th { border: 1px solid #e2e0d8; padding: 6px 10px; }
.file-preview-doc img { max-width: 100%; height: auto; }
.file-preview-doc h1, .file-preview-doc h2, .file-preview-doc h3 { line-height: 1.4; }
.file-preview-placeholder, .file-preview-loading { min-height: 320px; display: grid; place-items: center; align-content: center; gap: 10px; border: 1px dashed var(--line); border-radius: 12px; background: rgba(247, 248, 245, .72); color: var(--muted); text-align: center; padding: 22px; }
.file-preview-placeholder .material-symbols-outlined, .file-preview-loading .material-symbols-outlined { color: var(--primary); font-size: 42px; }
.file-preview-placeholder b, .file-preview-loading b { color: var(--text); font-size: 15px; }
.file-preview-placeholder span, .file-preview-loading span { font-size: 12px; line-height: 1.6; }
.file-preview-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12px; }
.file-preview-foot .btn { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.file-preview-warning { color: #8a4c12; }
@keyframes fileBrowserFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fileBrowserIn { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.detail-text-block { display: grid; gap: 10px; }
.detail-text-block b { font-size: 13px; }
.detail-text-block p, .detail-text-block li { color: var(--muted); font-size: 13px; line-height: 1.7; }
.detail-text-block ul { margin: 0; padding-left: 18px; }
.detail-reminder-list { padding: 12px; display: grid; gap: 8px; }
.detail-reminder-item { width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: start; gap: 10px; border: 1px solid rgba(196, 200, 188, .58); border-left-width: 3px; border-radius: 8px; background: var(--surface); color: var(--text); padding: 11px 12px; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.detail-reminder-item:hover { box-shadow: 0 2px 10px rgba(31, 45, 34, .08); }
.detail-reminder-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; }
.detail-reminder-icon i { font-size: 18px; }
.detail-reminder-body { min-width: 0; display: grid; gap: 3px; }
.detail-reminder-body b { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; color: var(--text); font-size: 13.5px; line-height: 1.4; font-weight: 900; overflow-wrap: anywhere; }
.detail-reminder-tag { flex-shrink: 0; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 850; font-style: normal; line-height: 1.5; }
.detail-reminder-detail { color: var(--muted); font-size: 12px; line-height: 1.5; font-weight: 750; overflow-wrap: anywhere; }
.detail-reminder-action { display: grid; grid-template-columns: 15px minmax(0, 1fr); align-items: start; gap: 5px; margin-top: 2px; color: #4a6b50; font-size: 12px; line-height: 1.45; font-weight: 800; overflow-wrap: anywhere; }
.detail-reminder-action i { font-size: 14px; line-height: 1.45; color: var(--primary); }
.detail-reminder-jump { align-self: center; color: var(--muted); font-size: 17px; }
.detail-reminder-item:hover .detail-reminder-jump { color: var(--primary); }
.detail-reminder-item.lv-high { border-left-color: var(--danger); }
.detail-reminder-item.lv-high:hover { border-color: var(--danger); }
.detail-reminder-item.lv-high .detail-reminder-icon { background: var(--danger-soft); }
.detail-reminder-item.lv-high .detail-reminder-icon i { color: #750e13; }
.detail-reminder-item.lv-high .detail-reminder-tag { background: var(--danger-soft); color: #750e13; }
.detail-reminder-item.lv-medium { border-left-color: #c98a00; }
.detail-reminder-item.lv-medium:hover { border-color: rgba(201, 138, 0, .6); }
.detail-reminder-item.lv-medium .detail-reminder-icon { background: var(--warn-soft); }
.detail-reminder-item.lv-medium .detail-reminder-icon i { color: #684e00; }
.detail-reminder-item.lv-medium .detail-reminder-tag { background: var(--warn-soft); color: #684e00; }
.detail-reminder-item.lv-low { border-left-color: rgba(120, 140, 120, .55); }
.detail-reminder-item.lv-low:hover { border-color: rgba(74, 124, 89, .48); }
.detail-reminder-item.lv-low .detail-reminder-icon { background: rgba(120, 140, 120, .14); }
.detail-reminder-item.lv-low .detail-reminder-icon i { color: #5a6b5a; }
.detail-reminder-item.lv-low .detail-reminder-tag { background: rgba(120, 140, 120, .16); color: #4a5a4a; }
.detail-reminder-empty { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 4px; color: var(--muted); font-size: 13px; font-weight: 800; }
.detail-reminder-empty i { color: var(--primary); font-size: 18px; }
.detail-reminder-note { display: flex; align-items: center; gap: 6px; margin: 0; padding: 2px 14px 14px; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.detail-reminder-note i { flex: 0 0 auto; color: var(--primary); font-size: 15px; }
.detail-material-link { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid rgba(74, 124, 89, .35); border-radius: 999px; background: var(--primary-soft); color: var(--primary); font: inherit; font-size: 12.5px; font-weight: 850; line-height: 1.45; cursor: pointer; transition: background .15s ease, box-shadow .15s ease; }
.detail-material-link:hover { background: rgba(74, 124, 89, .2); box-shadow: 0 1px 6px rgba(74, 124, 89, .22); }
.detail-material-link i { font-size: 15px; }
.detail-material-missing { color: var(--muted); font-weight: 800; }
/* 计划节点表（可编辑） */
.plan-edit-panel .plan-edit-sub { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.plan-edit-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin-top: 12px; background: #fff; }
.plan-edit-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.plan-edit-table td.plan-edit-actualcell { background: #fdf6e0; border-left: 1px solid #ecd9a6; border-right: 1px solid #ecd9a6; }
.plan-edit-table thead th.plan-edit-actualcell { color: #8a6410; background: #f6e9c8; border-left: 1px solid #ecd9a6; border-right: 1px solid #ecd9a6; }
.plan-edit-table td:has(> .plan-edit-date) { width: 96px; }
.plan-edit-table thead th { position: sticky; top: 0; background: var(--primary-soft); color: var(--primary); font-weight: 800; text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
.plan-edit-table tbody td { padding: 5px 6px; border-bottom: 1px solid var(--line-soft, #eef0ec); vertical-align: middle; }
.plan-edit-table tbody tr:hover { background: rgba(74, 124, 89, .045); }
.plan-edit-table tbody td.plan-edit-linecell { position: relative; vertical-align: middle; text-align: center; background: rgba(74, 124, 89, .05); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 4px; }
.plan-edit-linelabel { display: inline-block; line-height: 1.3; font-size: 13px; font-weight: 800; color: var(--primary); white-space: nowrap; pointer-events: none; }
.plan-edit-input { width: 100%; box-sizing: border-box; border: 1px solid transparent; border-radius: 7px; padding: 5px 7px; font: inherit; font-size: 12.5px; background: transparent; color: var(--ink, inherit); transition: border-color .15s ease, background .15s ease; }
.plan-edit-input:hover { border-color: var(--line); background: #fafbf9; }
.plan-edit-input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 2px rgba(74, 124, 89, .14); }
.plan-edit-name { font-weight: 650; }
.plan-edit-statuscell { white-space: nowrap; }
.plan-edit-status { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; }
.plan-edit-status i { font-size: 14px; }
.plan-edit-del { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s ease, color .15s ease; }
.plan-edit-del:hover { background: rgba(200, 60, 60, .1); color: #c83c3c; }
.plan-edit-del i { font-size: 18px; }
.plan-edit-empty-row td { padding: 22px 12px; text-align: center; color: var(--muted); }
.plan-card-list { position: relative; display: grid; gap: 14px; margin-top: 18px; padding: 4px 2px 8px 22px; }
.plan-card-list::before { content: ""; position: absolute; left: 7px; top: 20px; bottom: 20px; width: 2px; background: rgba(74, 124, 89, .2); }
.plan-card-list.is-empty::before { display: none; }
.plan-card { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1.15fr) minmax(250px, 1.1fr) auto; gap: 12px 16px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 20px rgba(46, 50, 48, .045); }
.plan-card::before { content: ""; position: absolute; left: -19px; top: 28px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(150, 158, 142, .9); background: #fff; box-shadow: 0 0 0 3px var(--surface); }
.plan-card.level-green::before { border-color: var(--primary); background: var(--primary); }
.plan-card.level-orange::before { border-color: #d98a1f; background: #d98a1f; }
.plan-card.level-yellow::before { border-color: #c79a1a; }
.plan-card.level-red::before { border-color: #c0392b; background: #c0392b; }
.plan-card.level-gray::before { border-color: rgba(150, 158, 142, .9); background: #fff; }
.plan-card.is-current { border-color: #e2b36a; box-shadow: 0 0 0 3px rgba(226, 179, 106, .18), 0 8px 20px rgba(46, 50, 48, .05); }
.plan-card.is-current::before { border-color: #d98a1f; background: #fff; box-shadow: 0 0 0 4px rgba(217, 138, 31, .2), 0 0 0 3px var(--surface); }
.plan-card.level-red { border-color: rgba(192, 57, 43, .28); }
.plan-card-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: #eef2ee; color: var(--muted); }
.plan-card-icon i { font-size: 22px; }
.plan-card.level-green .plan-card-icon { background: rgba(74, 124, 89, .12); color: var(--primary); }
.plan-card.level-orange .plan-card-icon { background: #fff1de; color: #7a3a00; }
.plan-card.level-yellow .plan-card-icon { background: #fff6d8; color: #684e00; }
.plan-card.level-red .plan-card-icon { background: var(--danger-soft); color: #750e13; }
.plan-card-main { min-width: 0; display: grid; gap: 3px; }
.plan-card-now { width: fit-content; padding: 1px 7px; border-radius: 999px; background: #fff1de; color: #7a3a00; font-size: 11px; font-style: normal; font-weight: 850; }
.plan-card-main .plan-edit-name { padding-left: 0; font-size: 16px; font-weight: 900; }
.plan-card-range { color: var(--muted); font-size: 12.5px; font-weight: 750; }
.plan-card-hint { font-size: 12.5px; font-weight: 850; }
.plan-card.level-green .plan-card-hint { color: var(--primary); }
.plan-card.level-orange .plan-card-hint, .plan-card.level-yellow .plan-card-hint { color: #a46f00; }
.plan-card.level-red .plan-card-hint { color: var(--danger); }
.plan-card-dates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.plan-card-dates label { min-width: 0; display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 800; }
.plan-card-dates .plan-edit-date { min-height: 32px; padding: 4px 6px; border-radius: 8px; background: #f7f8f5; }
.plan-card .plan-edit-status { justify-self: end; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 850; white-space: nowrap; }
.plan-card-empty { display: grid; place-items: center; min-height: 160px; padding: 24px 16px; border: 1px dashed var(--line); border-radius: 14px; background: rgba(247, 248, 245, .72); color: var(--muted); font-size: 13px; font-weight: 750; text-align: center; }
.plan-edit-foot { display: flex; align-items: flex-start; gap: 6px; margin: 12px 2px 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.plan-edit-foot i { font-size: 15px; flex: none; margin-top: 1px; }
.detail-section-projname { flex: 1 1 auto; min-width: 0; text-align: center; font-size: 15px; font-weight: 800; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 12px; }
.plan-edit-date { cursor: pointer; padding-left: 4px; padding-right: 3px; }
.plan-edit-date::placeholder { color: var(--muted); }
/* 中文日期选择器弹层 */
.plan-date-pop { position: absolute; z-index: 4000; width: 248px; box-sizing: border-box; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(40, 60, 50, .18); padding: 10px; font-size: 13px; }
.plan-date-pop[hidden] { display: none; }
.plan-date-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.plan-date-head b { font-weight: 800; color: var(--primary); }
.plan-date-nav { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; color: var(--ink, inherit); }
.plan-date-nav:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.plan-date-nav i { font-size: 18px; }
.plan-date-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 2px; }
.plan-date-week span { text-align: center; font-size: 11.5px; color: var(--muted); padding: 3px 0; }
.plan-date-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.plan-date-cell { display: flex; align-items: center; justify-content: center; height: 30px; border: 1px solid transparent; border-radius: 8px; background: transparent; font: inherit; font-size: 12.5px; color: var(--ink, inherit); cursor: pointer; }
.plan-date-cell.empty { cursor: default; }
.plan-date-cell:not(.empty):hover { background: var(--primary-soft); }
.plan-date-cell.today { border-color: rgba(74, 124, 89, .5); font-weight: 800; }
.plan-date-cell.sel { background: var(--primary); color: #fff; font-weight: 800; }
.plan-date-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; }
.plan-date-act { flex: 1; padding: 6px 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.plan-date-act:hover { background: #f5f6f3; }
.plan-date-act.primary { border-color: var(--primary); color: var(--primary); font-weight: 700; }
.plan-date-act.primary:hover { background: var(--primary-soft); }
.detail-target-flash { animation: detailTargetFlash 1.35s ease-out 1; }
@keyframes detailTargetFlash {
  0% { box-shadow: 0 0 0 0 rgba(74, 124, 89, .0), inset 0 0 0 999px rgba(190, 232, 204, .0); }
  18% { box-shadow: 0 0 0 3px rgba(74, 124, 89, .36), inset 0 0 0 999px rgba(190, 232, 204, .3); }
  100% { box-shadow: 0 0 0 0 rgba(74, 124, 89, .0), inset 0 0 0 999px rgba(190, 232, 204, .0); }
}
.mini-list { display: grid; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.mini-list div { padding: 12px; background: var(--surface); display: grid; gap: 4px; }
.mini-list b { font-size: 13px; line-height: 1.45; }
.mini-list span { color: var(--muted); font-size: 12px; line-height: 1.55; }
.drawer { position: sticky; top: 72px; max-height: calc(100vh - 96px); overflow: auto; }
.tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: transparent; min-height: 44px; padding: 0 14px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.tabs button.active { color: var(--primary); border-bottom: 2px solid var(--primary); font-weight: 600; }
.detail-list { display: grid; gap: 10px; }
.detail-item { background: var(--surface-low); padding: 12px; }
.detail-item b { display: block; font-size: 13px; margin-bottom: 5px; }
.detail-item span { color: var(--muted); font-size: 13px; line-height: 1.55; }

.submission-page { max-width: 1180px; margin: 0 auto; padding: 22px 0 48px; }
.submission-page-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.submission-page-head h1 { font-family: "Literata", "Microsoft YaHei", serif; font-size: 40px; line-height: 1.18; font-weight: 800; color: var(--text); }
.submission-page-head p { margin-top: 6px; color: var(--muted); font-size: 15px; }
.submission-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: wrap; }
.submission-top-action { min-height: 42px; border-radius: 14px; padding: 9px 16px; font-weight: 900; }
.submission-top-action .material-symbols-outlined { font-size: 19px; }
.submission-task-action { position: relative; overflow: visible; gap: 7px; padding-right: 22px; }
.submission-task-action .task-action-badge { position: absolute; top: -9px; right: -9px; min-width: 21px; height: 21px; display: grid; place-items: center; padding: 0 6px; border-radius: 999px; background: #b84d3f; color: #fff; border: 2px solid var(--surface); box-shadow: 0 5px 14px rgba(184, 77, 63, .25); font-size: 12px; line-height: 1; font-weight: 950; }
.submission-task-action.is-processing { color: var(--primary); border-color: rgba(74, 124, 89, .55); background: rgba(232, 244, 235, .78); }
.submission-task-action.is-processing .material-symbols-outlined { animation: taskActionSpin 1.4s linear infinite; }
.submission-task-action.is-complete { color: #2f6d4a; border-color: rgba(74, 124, 89, .5); background: rgba(239, 248, 241, .82); }
.submission-task-action.is-complete .task-action-badge { background: #4a7c59; box-shadow: 0 5px 14px rgba(74, 124, 89, .25); }
@keyframes taskActionSpin { to { transform: rotate(360deg); } }
.new-project-btn { min-height: 42px; border-radius: 14px; padding: 9px 16px; background: rgba(255, 252, 246, .9); }
.new-project-btn .material-symbols-outlined { font-size: 19px; }
.week-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 16px; border-radius: 14px; border: 1px solid rgba(196, 166, 106, .35); background: rgba(248, 224, 168, .22); color: #554020; font-weight: 800; white-space: nowrap; }
.week-pill .material-symbols-outlined { font-size: 20px; }
.upload-action-row { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; }
.upload-file-main-button { min-width: 150px; }
.submission-upload-footer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex-wrap: wrap; }
.upload-secondary-actions { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.upload-option-button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(74, 124, 89, .38); border-radius: 12px; padding: 8px 15px; background: rgba(255, 252, 246, .9); color: var(--primary); font: inherit; font-weight: 900; cursor: pointer; box-shadow: none; white-space: nowrap; }
.upload-option-button:hover { background: rgba(200, 232, 208, .22); border-color: rgba(74, 124, 89, .56); }
.upload-option-button .material-symbols-outlined { font-size: 19px; }
.submission-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.submission-layout > * { min-width: 0; }
.project-list { border: 1px solid var(--line); max-height: 680px; overflow: auto; }
.project-item { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); padding: 14px; text-align: left; }
.project-item.active { border-left: 4px solid var(--primary); background: #edf5ff; }
.project-item h4 { font-size: 14px; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.submission-upload-card { background: var(--card); border: 1px solid rgba(196, 200, 188, .28); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); transition: padding .28s ease, border-radius .28s ease, box-shadow .2s ease; transform-origin: top center; }
.submission-upload-card:hover { box-shadow: 0 8px 30px rgba(46, 50, 48, .08); }
.submission-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; transition: margin .28s ease; }
.submission-title-row { display: inline-flex; align-items: center; gap: 12px; }
.submission-title-row h2 { font-size: 22px; line-height: 1.25; font-weight: 800; }
.submission-entry-heading { min-width: 0; display: grid; gap: 6px; }
.submission-entry-heading p { margin-left: 46px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.submission-entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.submission-entry-grid.history-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.submission-entry-card { position: relative; min-width: 0; min-height: 310px; display: flex; flex-direction: column; align-items: center; gap: 18px; border: 1px solid rgba(196, 200, 188, .72); border-radius: 18px; padding: 22px; background: rgba(255, 252, 246, .82); color: var(--text); text-align: center; font: inherit; cursor: pointer; box-shadow: 0 10px 26px rgba(46, 50, 48, .035); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease; }
.submission-entry-card:hover { border-color: rgba(74, 124, 89, .48); box-shadow: 0 14px 30px rgba(46, 50, 48, .09); transform: translateY(-2px); }
.submission-entry-card.drag-active { border-color: var(--primary); background: rgba(200, 232, 208, .2); box-shadow: inset 0 0 0 2px rgba(74, 124, 89, .18), 0 14px 30px rgba(74, 124, 89, .12); }
.submission-entry-card.file-entry.drag-active::after { content: "松开即可上传文件"; }
.submission-entry-card.folder-entry.drag-active::after { content: "可拖拽上传，松开即上传文件夹"; }
.submission-entry-card.drag-active::after { position: absolute; left: 0; right: 0; bottom: 10px; color: var(--primary); font-size: 12px; font-weight: 900; pointer-events: none; }
.submission-entry-index { position: absolute; top: 18px; left: 20px; color: var(--primary); font-size: 15px; font-weight: 950; letter-spacing: .04em; }
.submission-entry-icon { width: 88px; height: 88px; display: grid; place-items: center; margin-top: 10px; border-radius: 999px; background: rgba(200, 232, 208, .42); color: var(--primary); }
.submission-entry-icon .material-symbols-outlined { font-size: 46px; }
.folder-entry .submission-entry-index { color: #a8761e; }
.folder-entry .submission-entry-icon { color: #9b701e; background: rgba(248, 224, 168, .42); }
.direct-entry .submission-entry-icon { color: #2f756d; background: rgba(194, 228, 223, .42); }
.submission-entry-copy { min-width: 0; display: grid; justify-items: center; gap: 8px; }
.submission-entry-copy b { color: var(--text); font-size: 22px; line-height: 1.3; font-weight: 900; }
.submission-entry-copy span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.submission-entry-copy small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.submission-entry-action { width: 100%; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: auto; border: 1px solid var(--primary); border-radius: 12px; background: var(--primary); color: #fff; font-size: 14px; font-weight: 900; }
.submission-entry-action .material-symbols-outlined { font-size: 18px; }
.submission-entry-card:hover .submission-entry-action { background: #2f6b43; border-color: #2f6b43; color: #fff; }
.folder-entry-featured { border-color: rgba(74, 124, 89, .72); box-shadow: 0 12px 28px rgba(74, 124, 89, .12); }
.folder-entry-featured .submission-entry-copy span { color: var(--text); font-weight: 800; }
.submission-entry-ai-hint { display: inline-flex; align-items: center; gap: 6px; }
.submission-entry-ai-hint .material-symbols-outlined { font-size: 16px; color: var(--primary); }
.submission-entry-status { margin-top: 14px; text-align: center; }
.submission-entry-footer { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.submission-entry-aux { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 800; }
.submission-entry-ai-hint { color: var(--muted); font-size: 12px; line-height: 1.5; }
.step-circle { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 800; }
.submission-limit { color: var(--muted); font-size: 12px; font-weight: 700; }
.upload-zone { min-height: 150px; border: 0; background: transparent; display: grid; place-items: center; text-align: center; padding: 18px; color: var(--muted); line-height: 1.6; cursor: pointer; transition: min-height .28s ease, padding .28s ease, margin .28s ease, background-color .2s ease, box-shadow .2s ease, outline-color .2s ease; }
.upload-zone-large { min-height: 245px; margin-bottom: 16px; border-radius: 18px; background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='16' ry='16' stroke='%234A7C59' stroke-width='2' stroke-dasharray='8%2c 8' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e"); }
.upload-zone-large:hover { background-color: rgba(200, 232, 208, .16); }
.upload-zone.drag-active { background-color: rgba(200, 232, 208, .32); box-shadow: inset 0 0 0 2px rgba(74, 124, 89, .32), 0 14px 32px rgba(74, 124, 89, .12); outline: 2px solid rgba(74, 124, 89, .36); outline-offset: -8px; }
.upload-zone.drag-active .upload-icon { transform: scale(1.12); background: rgba(200, 232, 208, .8); }
.upload-zone.drag-active .upload-pseudo-button { background: #2f6b43; }
.upload-center { width: min(760px, 100%); display: grid; justify-items: center; gap: 14px; transition: gap .28s ease; }
.upload-icon { width: 64px; height: 64px; border-radius: 999px; display: grid; place-items: center; background: rgba(200, 232, 208, .45); color: var(--primary); transition: width .28s ease, height .28s ease, transform .2s ease; }
.upload-zone:hover .upload-icon { transform: scale(1.08); }
.upload-icon .material-symbols-outlined { font-size: 36px; transition: font-size .28s ease; }
.upload-center b { display: block; color: var(--text); font-size: 24px; font-weight: 800; }
.upload-center span { display: block; color: var(--muted); font-size: 15px; line-height: 1.65; }
.upload-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-pseudo-button { min-height: 44px; display: inline-flex !important; align-items: center; justify-content: center; border-radius: 14px; padding: 10px 28px; background: var(--primary); color: #fff !important; font-weight: 800; box-shadow: var(--shadow); }
.submission-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 42px; }
.submission-card-footer #upload-result { min-width: 0; }
.submission-history-btn { min-height: 38px; border-radius: 12px; padding-inline: 14px; font-weight: 800; }
.submission-history-btn.active { background: var(--primary); color: #fff; }
.submission-history-btn .material-symbols-outlined { font-size: 18px; }
.submission-history-panel { border: 1px solid rgba(74, 124, 89, .22); border-radius: 20px; background: rgba(255, 252, 246, .92); box-shadow: var(--shadow); overflow: hidden; }
.submission-history-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: rgba(200, 232, 208, .16); }
.submission-history-head > div { min-width: 0; display: flex; align-items: flex-start; gap: 10px; }
.submission-history-head .material-symbols-outlined { color: var(--primary); font-size: 24px; }
.submission-history-head h3 { color: var(--text); font-size: 17px; line-height: 1.3; font-weight: 900; }
.submission-history-head span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.submission-history-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface-low); }
.submission-history-filters .select { min-width: 180px; }
.submission-history-filters .input { flex: 1 1 220px; min-width: 180px; }
.submission-history-more { display: flex; justify-content: center; padding: 12px 18px; background: var(--surface); }
.submission-history-list { display: grid; gap: 0; max-height: 360px; overflow: auto; background: var(--surface); }
.submission-history-empty { padding: 22px; color: var(--muted); font-size: 13px; font-weight: 800; text-align: center; }
.submission-history-item { display: grid; grid-template-columns: minmax(280px, 1.2fr) minmax(260px, 1fr) auto; align-items: center; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: #fff; }
.submission-history-item:last-child { border-bottom: 0; }
.submission-history-main { min-width: 0; }
.submission-history-main h4 { margin-top: 8px; color: var(--text); font-size: 16px; line-height: 1.4; font-weight: 900; overflow-wrap: anywhere; }
.submission-history-main p { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.submission-history-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 11px; font-weight: 800; }
.submission-history-meta span { border-radius: 999px; padding: 3px 8px; background: var(--surface-low); }
.submission-history-fields { min-width: 0; display: grid; gap: 7px; }
.submission-history-fields span { min-width: 0; color: var(--muted); font-size: 12px; line-height: 1.45; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.submission-history-fields b { color: var(--text); font-weight: 900; }
.submission-history-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.submission-history-actions .btn { min-height: 36px; border-radius: 12px; padding-inline: 13px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; background: rgba(46, 50, 48, .32); backdrop-filter: blur(6px); }
.new-project-modal { width: min(620px, 100%); border: 1px solid rgba(196, 200, 188, .68); border-radius: 24px; background: var(--surface); box-shadow: 0 28px 70px rgba(46, 50, 48, .22); overflow: hidden; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px; border-bottom: 1px solid var(--line); background: rgba(245, 241, 234, .72); }
.modal-head div { display: grid; gap: 5px; }
.modal-head span { color: var(--muted); font-size: 12px; font-weight: 900; }
.modal-head h3 { color: var(--text); font-size: 22px; line-height: 1.25; font-weight: 900; }
.new-project-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 22px 24px; }
.new-project-body .field { margin: 0; min-width: 0; }
.new-project-body .field.wide { grid-column: 1 / -1; }
.new-project-body .field span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 900; }
.new-project-body .input, .new-project-body .select { min-height: 42px; border-radius: 12px; background: #fff; font-weight: 800; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 22px; border-top: 1px solid var(--line); background: rgba(255, 252, 246, .72); }
.modal-actions .btn { min-height: 42px; border-radius: 14px; padding-inline: 18px; }
.project-settings-backdrop { z-index: 76; padding: 18px; }
.project-settings-modal { width: min(1540px, calc(100vw - 32px)); max-height: calc(100dvh - 36px); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; border: 1px solid rgba(196, 200, 188, .68); border-radius: 24px; background: var(--surface); box-shadow: 0 28px 80px rgba(46, 50, 48, .24); overflow: hidden; }
.project-settings-head { align-items: center; }
.project-settings-head > div { min-width: 0; }
.project-settings-head p { color: var(--muted); font-size: 13px; line-height: 1.5; font-weight: 700; }
.project-settings-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: rgba(255, 252, 246, .78); }
.project-settings-toolbar > span { color: var(--muted); font-size: 13px; font-weight: 900; }
.project-settings-pending-count { color: #9a5b12; }
.project-settings-toolbar-actions { display: flex; align-items: center; gap: 10px; }
.project-settings-profile-filter { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 900; }
.project-settings-profile-filter .select { min-width: 174px; min-height: 38px; border-radius: 12px; background: #fff; font-size: 12px; font-weight: 850; }
.project-settings-toolbar .btn { min-height: 38px; border-radius: 12px; }
.project-settings-list-wrap { min-height: 0; overflow: auto; padding: 14px 16px 18px; background: #f4f1ea; }
.project-settings-list { display: grid; gap: 12px; }
.project-settings-card { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(300px, 360px) 40px; gap: 12px 14px; align-items: start; padding: 16px 14px 16px 8px; border: 1px solid rgba(196, 200, 188, .55); border-radius: 18px; background: #fff; box-shadow: 0 8px 22px rgba(46, 50, 48, .04); }
.project-settings-card[hidden] { display: none; }
.project-settings-card:hover { border-color: rgba(74, 124, 89, .28); }
.project-settings-card.is-dirty { background: rgba(200, 232, 208, .12); }
.project-settings-card.is-dragging { opacity: .48; }
.project-settings-card-main { display: grid; gap: 10px; min-width: 0; }
.project-settings-card-meta { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 10px; align-items: start; }
.project-settings-card-meta > label { display: grid; gap: 5px; min-width: 0; color: var(--muted); font-size: 11px; font-weight: 900; }
.project-settings-card .input, .project-settings-card .select { width: 100%; min-width: 0; box-sizing: border-box; min-height: 40px; border: 1px solid rgba(196, 200, 188, .72); border-bottom: 1px solid rgba(196, 200, 188, .72); border-radius: 12px; background: #fff; font-size: 13px; font-weight: 800; }
.project-settings-card .input:focus, .project-settings-card .select:focus { border-color: rgba(74, 124, 89, .55); outline: 2px solid rgba(74, 124, 89, .2); outline-offset: 0; }
.project-settings-card .select:disabled { color: var(--muted); background: var(--surface-low); opacity: 1; }
.project-settings-relation-cell { min-width: 0; }
.project-settings-badge-host { min-height: 0; }
.project-settings-confirmed-badge { display: inline-flex; align-items: center; gap: 5px; color: var(--primary); font-size: 12px; font-weight: 900; }
.project-settings-confirmed-badge .material-symbols-outlined { font-size: 18px; }
.project-settings-order { padding-top: 8px; text-align: center; color: var(--muted); font-size: 12px; font-weight: 900; }
.project-settings-drag-handle { min-height: 38px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 4px 6px; border: 1px solid transparent; border-radius: 10px; color: var(--muted); cursor: grab; user-select: none; }
.project-settings-drag-handle:hover { border-color: rgba(74, 124, 89, .32); color: var(--primary); background: rgba(200, 232, 208, .18); }
.project-settings-drag-handle:active { cursor: grabbing; }
.project-settings-drag-handle .material-symbols-outlined { font-size: 19px; }
.project-settings-drag-handle b { min-width: 16px; font-size: 12px; }
.project-settings-order > .material-symbols-outlined { color: var(--primary); font-size: 22px; }
.project-settings-icon { width: 30px; height: 30px; display: inline-grid; place-items: center; border: 1px solid rgba(196, 200, 188, .7); border-radius: 9px; background: rgba(255, 252, 246, .9); color: var(--muted); cursor: pointer; }
.project-settings-icon:hover:not(:disabled) { border-color: rgba(74, 124, 89, .45); color: var(--primary); background: rgba(200, 232, 208, .18); }
.project-settings-icon:disabled { opacity: .34; cursor: not-allowed; }
.project-settings-icon .material-symbols-outlined { font-size: 18px; }
.project-settings-icon.danger { color: var(--danger); }
.project-settings-icon.danger:hover:not(:disabled) { border-color: rgba(184, 50, 48, .36); color: var(--danger); background: var(--danger-soft); }
.project-settings-actions { display: flex; align-items: flex-start; justify-content: center; gap: 7px; padding-top: 6px; }
.project-settings-material-profile { min-width: 0; padding: 10px 12px; border: 1px solid rgba(196, 200, 188, .48); border-radius: 14px; background: #faf8f3; }
.project-settings-profile { display: grid; gap: 8px; min-width: 0; }
.project-settings-profile.is-busy { opacity: .62; pointer-events: none; }
.project-settings-profile-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.project-settings-profile-head > b { color: var(--text); font-size: 12px; font-weight: 900; }
.project-settings-profile-status { min-width: 0; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 900; }
.project-settings-profile-status .material-symbols-outlined { font-size: 16px; }
.project-settings-profile.is-pending .project-settings-profile-status { color: #9a5b12; }
.project-settings-profile.is-confirmed .project-settings-profile-status { color: var(--primary); }
.project-settings-profile-qs { display: grid; gap: 6px; }
.project-settings-profile-q { display: grid; grid-template-columns: 78px 92px minmax(52px, 1fr); align-items: center; gap: 8px; min-width: 0; }
.project-settings-profile-q b { min-width: 0; color: var(--text); font-size: 12px; line-height: 1.3; font-weight: 850; }
.project-settings-profile-q-status { font-size: 11px; font-style: normal; font-weight: 900; text-align: right; }
.project-settings-profile-q-status.is-wait { color: #9a5b12; }
.project-settings-profile-q-status.is-done { color: var(--primary); }
.project-settings-profile-opts { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid rgba(74, 124, 89, .32); border-radius: 8px; overflow: hidden; }
.project-settings-profile-opts button { min-height: 28px; border: 0; border-right: 1px solid rgba(74, 124, 89, .22); background: #fff; color: var(--text); font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; }
.project-settings-profile-opts button:last-child { border-right: 0; }
.project-settings-profile-opts button.is-active { background: var(--primary); color: #fff; }
.project-settings-profile-opts button.is-active.is-suggested { color: #8a5514; background: rgba(255, 226, 178, .38); }
.project-settings-profile-opts button.is-active.is-confirmed { background: var(--primary); color: #fff; }
.project-settings-profile-opts button:disabled { cursor: default; opacity: .72; }
.project-settings-profile-opts button:focus-visible { position: relative; z-index: 1; outline: 2px solid rgba(74, 124, 89, .52); outline-offset: -2px; }
.material-profile-new-hint { display: grid; min-height: 72px; place-items: center; color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; }
.project-settings-save { min-height: 34px; border-radius: 10px; padding: 7px 12px; font-size: 12px; }
.project-settings-add-row { border-style: dashed; background: rgba(200, 232, 208, .12); }
.project-settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 20px; border-top: 1px solid var(--line); background: rgba(255, 252, 246, .82); }
.project-settings-footer p { max-width: 700px; color: var(--muted); font-size: 12px; line-height: 1.5; font-weight: 750; }
.project-settings-footer > div { display: flex; gap: 9px; flex: 0 0 auto; }
.project-settings-footer .btn { min-height: 40px; border-radius: 12px; }
.submission-single { display: grid; gap: 28px; }
.submission-single.has-tasks { gap: 28px; }
.submission-task-entry-card { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border: 1px solid rgba(74, 124, 89, .22); border-radius: 20px; background: rgba(255, 252, 246, .82); box-shadow: var(--shadow); }
.submission-task-entry-card div { min-width: 0; display: grid; gap: 5px; }
.submission-task-entry-card span { color: var(--muted); font-size: 12px; font-weight: 900; }
.submission-task-entry-card strong { color: var(--text); font-size: 18px; line-height: 1.3; font-weight: 900; }
.submission-task-entry-card .btn { min-height: 40px; border-radius: 13px; white-space: nowrap; }
.submission-modal-backdrop { position: fixed; inset: 0; z-index: 78; display: grid; place-items: center; padding: 26px; overflow: hidden; background: rgba(46, 50, 48, .34); backdrop-filter: blur(8px); }
.submission-modal-panel { width: min(1080px, calc(100vw - 48px)); max-height: calc(100dvh - 52px); display: grid; grid-template-rows: auto minmax(0, 1fr); border: 1px solid rgba(196, 200, 188, .68); border-radius: 24px; background: var(--surface); box-shadow: 0 28px 80px rgba(46, 50, 48, .22); overflow: hidden; }
.submission-task-modal { width: min(1420px, calc(100vw - 52px)); height: min(900px, calc(100dvh - 52px)); max-height: calc(100dvh - 52px); }
.submission-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); background: rgba(245, 241, 234, .76); }
.submission-modal-head > div { display: grid; gap: 5px; min-width: 0; }
.submission-modal-head span { color: var(--muted); font-size: 12px; font-weight: 900; }
.submission-modal-head h3 { color: var(--text); font-size: 22px; line-height: 1.25; font-weight: 900; }
.submission-task-modal-head { align-items: center; }
.submission-task-modal-title h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.submission-task-total-badge { min-width: 30px; height: 30px; display: inline-grid; place-items: center; padding: 0 9px; border-radius: 999px; background: rgba(74, 124, 89, .14); color: var(--primary); font-size: 15px; line-height: 1; }
.submission-task-modal-head > .submission-task-modal-actions { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.submission-task-modal-actions .close-all-tasks-btn { min-height: 40px; }
.submission-modal-body { min-height: 0; overflow: auto; padding: 22px 24px 24px; }
.submission-modal-body .submission-upload-card { box-shadow: none; border-color: rgba(196, 200, 188, .36); }
.submission-modal-body .submission-task-section { min-width: 0; }
.submission-task-modal .submission-modal-head { flex: 0 0 auto; }
.submission-task-modal .submission-modal-body { min-height: 0; height: auto; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 18px 22px 22px; scrollbar-width: thin; scrollbar-color: rgba(74, 124, 89, .55) rgba(245, 241, 234, .76); }
.submission-task-modal .submission-modal-body::-webkit-scrollbar { width: 12px; height: 12px; }
.submission-task-modal .submission-modal-body::-webkit-scrollbar-track { background: rgba(245, 241, 234, .76); border-radius: 999px; }
.submission-task-modal .submission-modal-body::-webkit-scrollbar-thumb { background: rgba(74, 124, 89, .55); border: 3px solid rgba(245, 241, 234, .76); border-radius: 999px; }
.submission-task-modal .submission-modal-body::-webkit-scrollbar-thumb:hover { background: rgba(74, 124, 89, .72); }
.submission-task-modal.is-submitting button:disabled,
.submission-task-modal.is-submitting input:disabled,
.submission-task-modal.is-submitting select:disabled,
.submission-task-modal.is-submitting textarea:disabled { cursor: not-allowed; }
.submission-task-modal.is-submitting [data-next-task][data-submit-final="1"] { opacity: .78; cursor: progress; }
.upload-batch-hint { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; background: rgba(248, 224, 168, .28); color: #6b4b18; font-size: 12px; font-weight: 900; }
.upload-batch-hint .material-symbols-outlined { font-size: 17px; }
.submission-other-tasks-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(248, 224, 168, .28); color: #6b4b18; font-size: 13px; font-weight: 800; line-height: 1.45; }
.submission-other-tasks-bar .material-symbols-outlined { flex: 0 0 auto; font-size: 18px; }
.submission-other-tasks-bar span { flex: 1 1 auto; min-width: 0; }
.submission-other-tasks-bar .btn { flex: 0 0 auto; }
.skipped-task { grid-column: span 4; background: rgba(248, 224, 168, .18); border: 1px solid rgba(196, 166, 106, .36); padding: 22px; display: grid; gap: 12px; text-align: left; }
.skipped-task .material-symbols-outlined { color: #8a6a22; }
.skipped-task > div:last-child { color: var(--muted); font-size: 13px; line-height: 1.55; }
.submission-task-section { display: grid; gap: 20px; }
.submission-task-modal .submission-task-section { min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.submission-batch-section { display: grid; gap: 14px; padding: 14px; border: 1px solid rgba(120, 168, 134, .24); border-radius: 18px; background: rgba(255, 252, 246, .72); box-shadow: 0 8px 22px rgba(62, 80, 61, .05); }
.submission-batch-section + .submission-batch-section { margin-top: 6px; }
.submission-batch-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding-bottom: 10px; border-bottom: 1px solid rgba(120, 168, 134, .2); }
.submission-batch-heading > div:first-child { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.submission-batch-heading span { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .08em; white-space: nowrap; }
.submission-batch-heading b { overflow: hidden; color: var(--ink); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.submission-batch-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 0 auto; }
.submission-batch-heading small { color: var(--muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
.submission-batch-heading .btn { min-height: 32px; padding: 5px 10px; border-radius: 10px; font-size: 12px; }
.submission-loose-tasks { border-style: dashed; }
.submission-direct-tasks { border-color: rgba(106, 128, 178, .28); background: rgba(247, 250, 255, .72); }
.task-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--text); }
.task-section-title > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.task-section-title h3 { font-size: 18px; font-weight: 800; }
.task-section-title .material-symbols-outlined { color: var(--primary); }
.close-all-tasks-btn { min-height: 36px; padding: 8px 14px; border-radius: 12px; font-size: 13px; box-shadow: none; }
.submission-task-view-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 8px; border: 1px solid rgba(120, 168, 134, .24); border-radius: 18px; background: rgba(245, 241, 234, .72); }
.submission-task-view-tabs-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.submission-task-view-tabs span { display: inline-flex; align-items: center; gap: 6px; }
.tab-invoice-chip { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: 999px; background: #f3d2b0; color: #7e4512; font-size: 11px; font-style: normal; font-weight: 900; line-height: 1; }
.submission-task-invoice-note { display: flex; align-items: flex-start; gap: 8px; margin: 10px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.55; font-weight: 800; }
.submission-task-invoice-note .material-symbols-outlined { margin-top: 1px; font-size: 16px; color: var(--primary); }
.submission-task-view-tabs button { min-width: 0; min-height: 48px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid transparent; border-radius: 13px; background: transparent; color: var(--muted); font: inherit; font-weight: 900; text-align: left; cursor: pointer; transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease; }
.submission-task-view-tabs button:not(:disabled):hover { background: rgba(255, 252, 246, .84); border-color: rgba(120, 168, 134, .22); color: var(--text); }
.submission-task-view-tabs button.active { background: #fff; border-color: rgba(74, 124, 89, .36); color: var(--primary); box-shadow: 0 8px 24px rgba(62, 80, 61, .08); }
.submission-task-view-tabs button:disabled { opacity: .42; cursor: not-allowed; }
.submission-task-view-tabs .material-symbols-outlined { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 999px; background: rgba(120, 168, 134, .14); color: currentColor; font-size: 18px; }
.submission-task-view-tabs span { min-width: 0; display: inline-flex; align-items: center; gap: 6px; overflow: hidden; }
.submission-task-view-tabs b { min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 999px; background: rgba(46, 50, 48, .08); color: var(--text); font-size: 13px; line-height: 1; }
.submission-task-view-tabs button.active b { background: rgba(74, 124, 89, .14); color: var(--primary); }
.task-workbench { display: grid; grid-template-columns: minmax(320px, 38%) minmax(420px, 1fr); gap: 28px; align-items: start; }
.task-workbench .task-list { grid-template-columns: 1fr; gap: 18px; }
.task-workbench .processing-task, .task-workbench .error-task { grid-column: span 1; }
.submission-type-panels { display: grid; gap: 18px; }
.submission-task-modal .submission-type-panels { flex: 1 1 auto; min-height: 0; overflow: visible; padding: 2px 8px 2px 2px; }
.submission-type-panel { overflow: hidden; border: 1px solid rgba(196, 200, 188, .42); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.submission-task-modal .submission-type-panel { min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, auto); }
.submission-type-panel--processing { border-color: rgba(196, 166, 106, .34); }
.submission-type-panel--material { border-color: rgba(120, 168, 134, .30); }
.submission-type-panel--invoice { border-color: rgba(224, 145, 69, .30); }
.submission-type-panel--site_photo { border-color: rgba(82, 129, 181, .28); }
.submission-type-panel--error { border-color: rgba(184, 50, 48, .24); }
.submission-type-panel--empty { min-height: 330px; }
.submission-type-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 14px; border-bottom: 1px solid rgba(196, 200, 188, .34); background: var(--surface-low); }
.submission-type-panel-title { min-width: 0; display: flex; align-items: flex-start; gap: 12px; }
.submission-type-panel-title .material-symbols-outlined { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; background: var(--primary); color: #fff; font-size: 22px; flex: 0 0 auto; }
.submission-type-panel--processing .submission-type-panel-title .material-symbols-outlined { background: var(--tertiary); }
.submission-type-panel--invoice .submission-type-panel-title .material-symbols-outlined { background: #d07a31; }
.submission-type-panel--site_photo .submission-type-panel-title .material-symbols-outlined { background: #3f77b6; }
.submission-type-panel--error .submission-type-panel-title .material-symbols-outlined { background: var(--danger); }
.submission-type-panel-title div { min-width: 0; display: grid; gap: 4px; }
.submission-type-panel-title span { color: var(--muted); font-size: 12px; font-weight: 900; }
.submission-type-panel-title b { color: var(--text); font-size: 16px; line-height: 1.35; font-weight: 900; }
.submission-type-panel-count { display: grid; justify-items: end; gap: 2px; flex: 0 0 auto; }
.submission-type-panel-count strong { color: var(--text); font-size: 24px; line-height: 1; font-weight: 900; }
.submission-type-panel-count span { color: var(--muted); font-size: 12px; font-weight: 800; }
.submission-type-panel-badges { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 14px; }
.submission-task-modal .submission-type-panel > .submission-type-panel-badges:first-child { padding-top: 14px; border-bottom: 1px solid rgba(196, 200, 188, .28); }
.submission-type-panel-badges span { display: inline-flex; align-items: center; min-height: 28px; border-radius: 999px; padding: 4px 10px; background: rgba(245, 241, 234, .86); color: var(--text); font-size: 12px; font-weight: 800; }
.submission-type-panel--invoice .submission-type-panel-badges span { background: rgba(255, 236, 219, .9); color: #7e4512; }
.submission-type-panel--site_photo .submission-type-panel-badges span { background: rgba(226, 238, 255, .95); color: #264c7d; }
.submission-type-panel--error .submission-type-panel-badges span { background: rgba(255, 232, 230, .95); color: #8e1919; }
.submission-type-panel .submission-type-task-list { padding: 16px 20px 20px; }
.submission-task-modal .submission-type-panel .submission-type-task-list { min-height: 0; overflow: visible; scrollbar-width: none; }
.submission-task-modal .submission-type-panel .submission-type-task-list::-webkit-scrollbar { width: 0; height: 0; }
.submission-task-modal .submission-type-panel .task-list { min-height: 0; }
.submission-type-panel-empty-state { min-height: 230px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 36px 20px; color: var(--muted); text-align: center; }
.submission-type-panel-empty-state .material-symbols-outlined { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 999px; background: rgba(120, 168, 134, .13); color: var(--primary); font-size: 26px; }
.submission-type-panel-empty-state b { color: var(--text); font-size: 18px; font-weight: 900; }
.submission-type-panel-empty-state span { max-width: 360px; font-size: 13px; line-height: 1.55; font-weight: 800; }
.submission-batch-panel { margin-bottom: 16px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(420px, .9fr); align-items: stretch; gap: 14px; padding: 14px; border-radius: 18px; border: 1px solid rgba(120, 168, 134, .28); background: rgba(255, 252, 246, .94); box-shadow: 0 12px 30px rgba(62, 80, 61, .08); }
.submission-batch-panel.green { border-color: rgba(74, 124, 89, .32); }
.submission-batch-panel.yellow { border-color: rgba(196, 166, 106, .34); }
.submission-batch-panel.red { border-color: rgba(175, 75, 75, .38); background: rgba(255, 246, 242, .96); }
.batch-main { min-width: 0; display: grid; gap: 10px; }
.batch-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.batch-title > .material-symbols-outlined { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: rgba(74, 124, 89, .14); color: var(--primary); font-size: 23px; }
.batch-title span { display: block; color: var(--muted); font-size: 11px; line-height: 1.2; font-weight: 900; }
.batch-title h3 { margin-top: 2px; color: var(--text); font-size: 17px; line-height: 1.25; font-weight: 900; overflow-wrap: anywhere; }
.batch-progress { height: 7px; border-radius: 999px; overflow: hidden; background: rgba(120, 168, 134, .18); }
.batch-progress i { display: block; height: 100%; border-radius: inherit; background: var(--primary); transition: width .25s ease; }
.batch-warning { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.45; font-weight: 800; }
.batch-warning .material-symbols-outlined { color: var(--tertiary); font-size: 18px; }
.submission-batch-panel.red .batch-warning { color: #8b3b2f; }
.batch-metrics { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.batch-metrics div { min-width: 0; padding: 10px 11px; border-radius: 13px; background: rgba(200, 232, 208, .16); border: 1px solid rgba(120, 168, 134, .18); }
.batch-metrics span { display: block; color: var(--muted); font-size: 11px; font-weight: 900; }
.batch-metrics b { display: block; margin-top: 4px; color: var(--text); font-size: 13px; line-height: 1.35; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-invoice-list { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.batch-invoice-list span { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 999px; padding: 5px 9px; background: rgba(248, 224, 168, .28); color: #604719; font-size: 12px; font-weight: 900; }
.batch-actions { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 132px; }
.batch-actions .btn { min-height: 38px; border-radius: 13px; padding-inline: 12px; white-space: nowrap; }
.batch-action-divider { width: 1px; height: 32px; background: rgba(120, 168, 134, .28); align-self: center; }
.batch-inline-close, .batch-inline-submit { white-space: nowrap; }
.batch-confirm-hint { max-width: 520px; align-self: center; color: var(--muted); font-size: 12px; line-height: 1.5; font-weight: 800; text-align: right; }
.wizard-actions .batch-inline-submit, .site-photo-actions .batch-inline-submit, .invoice-confirm-actions .batch-inline-submit { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.wizard-actions .batch-inline-submit:disabled, .site-photo-actions .batch-inline-submit:disabled, .invoice-confirm-actions .batch-inline-submit:disabled { opacity: .55; box-shadow: none; cursor: not-allowed; }
.task-list { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px; }
.task-card { min-width: 0; border-radius: 22px; box-shadow: var(--shadow); }
.task-card[type="button"] { color: inherit; font: inherit; }
.processing-task { grid-column: span 4; background: #eae6de; border: 1px solid rgba(196, 200, 188, .45); padding: 22px; display: grid; gap: 16px; text-align: left; }
.error-task { grid-column: span 4; background: var(--danger-soft); border: 1px solid rgba(184, 50, 48, .25); padding: 22px; display: grid; gap: 12px; color: #690005; text-align: left; }
.task-card.selected { outline: 2px solid rgba(74, 124, 89, .55); outline-offset: 3px; }
.submission-result-card.selected { border-color: rgba(74, 124, 89, .56); box-shadow: 0 10px 32px rgba(74, 124, 89, .14); }
.task-processing-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.task-file-meta { min-width: 0; display: flex; align-items: center; gap: 12px; }
.task-index { color: var(--tertiary); font-weight: 900; }
.task-file-meta b { display: block; max-width: 220px; color: var(--text); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-file-meta span:not(.task-index) { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.processing-task > .material-symbols-outlined, .task-processing-head > .material-symbols-outlined { color: var(--tertiary); }
.spin { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.task-card .progress { margin: 0; height: 8px; border-radius: 999px; background: #e4e0d8; overflow: hidden; }
.task-card .progress i { border-radius: inherit; background: var(--primary); }
.task-stage-strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; margin-top: -6px; }
.task-stage-strip span { height: 5px; border-radius: 999px; background: rgba(196, 200, 188, .55); box-shadow: inset 0 0 0 1px rgba(36, 46, 38, .06); }
.task-stage-strip span.done { background: rgba(74, 124, 89, .7); }
.task-stage-strip span.active { background: var(--primary); box-shadow: 0 0 0 3px rgba(74, 124, 89, .12); }
.task-progress-note { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.agent-process-panel { min-height: 224px; border: 1px solid rgba(196, 200, 188, .42); border-radius: 22px; background: rgba(255, 252, 246, .92); box-shadow: var(--shadow); overflow: hidden; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.agent-process-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 14px; border-bottom: 1px solid rgba(196, 200, 188, .38); }
.agent-process-head div { min-width: 0; display: grid; gap: 5px; }
.agent-process-head span { color: var(--muted); font-size: 12px; font-weight: 900; }
.agent-process-head b { color: var(--text); font-size: 18px; line-height: 1.35; font-weight: 900; overflow-wrap: anywhere; }
.agent-process-head em { flex: 0 0 auto; font-style: normal; }
.agent-process-current { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: center; padding: 16px 20px; background: rgba(200, 232, 208, .18); border-bottom: 1px solid rgba(196, 200, 188, .32); }
.agent-process-current > .material-symbols-outlined { width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center; background: var(--primary); color: #fff; font-size: 24px; }
.agent-process-current b { display: block; max-width: 100%; color: var(--text); font-size: 14px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-process-current span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.agent-step-list { display: grid; gap: 0; padding: 4px 20px 8px; }
.agent-step { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(196, 200, 188, .28); }
.agent-step:last-child { border-bottom: 0; }
.agent-step > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 999px; background: #ebe6dc; color: var(--muted); font-size: 11px; font-weight: 900; }
.agent-step.completed > span { background: var(--primary); color: #fff; }
.agent-step.running > span { background: var(--tertiary); color: #fff; box-shadow: 0 0 0 5px rgba(112, 92, 48, .12); }
.agent-step.warning > span { background: #f8e0a8; color: #554020; }
.agent-step.error > span { background: var(--danger); color: #fff; }
.agent-step.skipped > span { background: #d8d3c8; color: #6b665c; }
.agent-step.skipped > span .material-symbols-outlined { font-size: 16px; }
.agent-step.skipped b { color: var(--muted); text-decoration: line-through; }
.agent-invoice-skip-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 18px 12px; padding: 10px 12px; border-radius: 12px; background: rgba(245, 241, 234, .92); color: var(--muted); font-size: 12px; line-height: 1.55; font-weight: 800; }
.agent-invoice-skip-note .material-symbols-outlined { margin-top: 1px; font-size: 16px; color: var(--primary); }
.single-file-recognize-card { display: grid; gap: 12px; padding: 14px; border: 1px solid rgba(120, 168, 134, .28); border-radius: 16px; background: rgba(255, 252, 246, .92); }
.single-file-recognize-steps { display: grid; gap: 0; }
.single-file-recognize-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid rgba(196, 200, 188, .28); }
.single-file-recognize-step:last-child { border-bottom: 0; }
.single-file-recognize-step > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 999px; background: #ebe6dc; color: var(--muted); font-size: 11px; font-weight: 900; }
.single-file-recognize-step.completed > span { background: var(--primary); color: #fff; }
.single-file-recognize-step.warning > span { background: #f8e0a8; color: #554020; }
.single-file-recognize-step.skipped > span { background: #d8d3c8; color: #6b665c; }
.single-file-recognize-step.skipped > span .material-symbols-outlined { font-size: 15px; }
.single-file-recognize-step.skipped b { color: var(--muted); text-decoration: line-through; }
.single-file-recognize-step b { display: block; font-size: 13px; font-weight: 900; }
.single-file-recognize-step p { margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 800; }
.single-file-recognize-result { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: rgba(200, 232, 208, .16); }
.single-file-recognize-result > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.single-file-recognize-result > div span { font-size: 13px; font-weight: 950; }
.single-file-recognize-result em { border-radius: 999px; padding: 3px 8px; background: #c8e8d0; color: #002110; font-size: 11px; font-style: normal; font-weight: 900; }
.single-file-recognize-result p { display: grid; gap: 2px; }
.single-file-recognize-result p span { color: var(--muted); font-size: 11px; font-weight: 800; }
.single-file-recognize-result p b { color: var(--text); font-size: 13px; font-weight: 900; }
.single-file-recognize-note { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.55; font-weight: 800; }
.single-file-recognize-note .material-symbols-outlined { margin-top: 1px; font-size: 16px; color: var(--primary); }
.agent-step b { display: block; color: var(--text); font-size: 13px; line-height: 1.35; }
.agent-step p { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.agent-step.running b::after { content: ""; display: inline-block; width: 14px; margin-left: 4px; animation: agentDots 1.2s steps(4, end) infinite; }
.agent-audit-panel { margin: 0 18px 12px; border: 1px solid rgba(196, 166, 106, .32); border-radius: 14px; background: rgba(248, 224, 168, .12); overflow: hidden; }
.agent-audit-title { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid rgba(196, 166, 106, .28); color: #554020; }
.agent-audit-title .material-symbols-outlined { font-size: 19px; color: var(--tertiary); }
.agent-audit-title b { font-size: 13px; font-weight: 900; }
.agent-audit-title span { margin-left: auto; color: var(--muted); font-size: 11px; font-weight: 800; }
.agent-audit-rows { display: grid; gap: 1px; background: rgba(196, 166, 106, .2); }
.agent-audit-row { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; padding: 10px 12px; background: rgba(255, 252, 246, .86); }
.agent-audit-row span { color: #554020; font-size: 11px; line-height: 1.45; font-weight: 900; }
.agent-audit-row p { color: var(--text); font-size: 12px; line-height: 1.58; overflow-wrap: anywhere; }
.agent-audit-risk { display: grid; gap: 8px; padding: 12px 14px; background: rgba(255, 252, 246, .72); }
.agent-audit-risk b { color: #554020; font-size: 12px; font-weight: 900; }
.agent-audit-risk div { display: flex; flex-wrap: wrap; gap: 6px; }
.agent-audit-risk em { border-radius: 999px; padding: 4px 8px; background: rgba(255, 218, 216, .55); color: #690005; font-size: 11px; line-height: 1.35; font-style: normal; font-weight: 800; }
.agent-process-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid rgba(196, 200, 188, .38); background: var(--surface-low); color: var(--muted); font-size: 12px; font-weight: 800; }
@keyframes agentDots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75%, 100% { content: "..."; }
}
.submission-result-card { grid-column: span 12; overflow: hidden; border-radius: 24px; border: 1px solid rgba(120, 168, 134, .3); background: rgba(200, 232, 208, .18); box-shadow: var(--shadow); }
.submission-task-modal .submission-result-card { height: clamp(560px, calc(100vh - 298px), 650px); min-height: 0; display: grid; }
.submission-task-modal .submission-result-card > .duplicate-notice-stack { max-height: 150px; overflow: auto; scrollbar-width: none; }
.submission-task-modal .submission-result-card > .duplicate-notice-stack::-webkit-scrollbar { width: 0; height: 0; }
.duplicate-notice-stack { display: grid; gap: 10px; padding: 14px; background: #fff; border-top: 1px solid var(--line); }
.duplicate-notice { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px; border: 1px solid rgba(196, 166, 106, .34); border-radius: 16px; background: rgba(248, 224, 168, .16); }
.duplicate-notice.same_content, .duplicate-notice.same_ticket { border-color: rgba(184, 74, 74, .26); background: rgba(255, 218, 216, .22); }
.duplicate-notice > .material-symbols-outlined { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 999px; background: var(--tertiary); color: #fff; font-size: 23px; }
.duplicate-notice.same_content > .material-symbols-outlined, .duplicate-notice.same_ticket > .material-symbols-outlined { background: var(--danger); }
.duplicate-notice b { display: block; color: var(--text); font-size: 15px; line-height: 1.35; font-weight: 900; }
.duplicate-notice p { margin: 4px 0 0; color: #554020; font-size: 13px; line-height: 1.55; }
.duplicate-notice.same_content p, .duplicate-notice.same_ticket p { color: #690005; }
.duplicate-notice span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.4; font-weight: 800; overflow-wrap: anywhere; }
.duplicate-actions { display: flex; justify-content: flex-end; gap: 8px; }
.duplicate-actions .btn { min-height: 38px; border-radius: 13px; white-space: nowrap; }
.result-confidence { align-self: start; border-radius: 999px; padding: 5px 10px; background: #c8e8d0; color: #002110; font-size: 11px; font-weight: 900; white-space: nowrap; }
.result-confidence.missing { background: var(--danger-soft); color: #690005; }
.wizard-step { --wizard-step-min-height: 500px; position: relative; display: grid; gap: 22px; min-height: var(--wizard-step-min-height); padding: 26px; background: #fff; }
.submission-task-modal .wizard-step { --wizard-step-min-height: 100%; height: 100%; min-height: 0; overflow: hidden; align-content: start; }
.manual-project-step, .fill-step { grid-template-rows: auto minmax(0, 1fr); border-top: 1px solid var(--line); }
.fill-step { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.confirm-project-step { grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); padding: 0; border-top: 1px solid var(--line); }
.submission-task-modal .confirm-project-step { min-height: 0; }
.file-preview-panel { background: var(--surface-low); border-right: 1px solid var(--line); padding: 24px; display: grid; justify-items: center; align-content: center; text-align: center; gap: 12px; }
.submission-task-modal .file-preview-panel { min-height: 0; overflow: hidden; }
.file-preview-panel strong { max-width: 100%; color: var(--text); font-size: 14px; overflow-wrap: anywhere; }
.file-preview-panel > span { color: var(--muted); font-size: 12px; }
.merged-project-preview { align-content: start; justify-items: stretch; text-align: left; }
.submission-task-modal .merged-project-preview { height: 100%; min-height: 0; grid-template-rows: auto auto auto minmax(0, 1fr); }
.merged-project-preview .file-preview-card { justify-self: center; }
.merged-project-preview strong, .merged-project-preview > span { text-align: center; }
.merged-file-list { display: grid; gap: 8px; max-height: 520px; overflow: auto; padding: 4px; scrollbar-width: none; }
.merged-file-list::-webkit-scrollbar { width: 0; height: 0; }
.submission-task-modal .merged-file-list { min-height: 0; max-height: none; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.submission-task-modal .merged-file-list::-webkit-scrollbar { width: 8px; height: 8px; }
.submission-task-modal .merged-file-list::-webkit-scrollbar-thumb { background: rgba(120, 168, 134, .45); border-radius: 999px; }
.merged-file-list em { min-width: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 8px; padding: 8px 10px; border: 1px solid rgba(196, 200, 188, .42); border-radius: 12px; background: rgba(255, 255, 255, .72); color: var(--text); font-size: 12px; font-style: normal; font-weight: 800; overflow-wrap: anywhere; }
.merged-file-list em span { min-width: 0; display: grid; gap: 2px; }
.merged-file-list em b { color: var(--primary); font-size: 11px; line-height: 1.25; font-weight: 900; }
.merged-file-list em small { color: var(--text); font-size: 12px; line-height: 1.35; font-weight: 800; }
.merged-file-list .material-symbols-outlined { color: var(--primary); font-size: 18px; }
.batch-preview-panel em { display: inline-flex; align-items: center; min-height: 26px; border-radius: 999px; padding: 4px 10px; background: rgba(248, 224, 168, .38); color: #604719; font-style: normal; font-size: 12px; font-weight: 900; }
.file-preview-card { position: relative; width: 88px; height: 116px; border-radius: 10px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; padding: 8px; color: var(--primary); }
.file-preview-card .material-symbols-outlined { font-size: 40px; }
.file-preview-card span { position: absolute; bottom: 26px; color: rgba(46, 50, 48, .35); font-size: 8px; font-weight: 800; }
.file-preview-card b { position: absolute; top: -8px; right: -8px; min-width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center; padding: 0 5px; background: var(--tertiary); color: #fff; font-size: 9px; text-transform: uppercase; }
.wizard-main-panel { position: relative; min-height: var(--wizard-step-min-height); padding: 32px; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 22px; }
.submission-task-modal .wizard-main-panel { min-height: 0; height: 100%; overflow: hidden; }
.wizard-progress { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 0 325px 0 0; border-bottom: 0; }
.wizard-step-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.progress-note-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.wizard-field .progress-note-row .field, .wizard-field .progress-note-row .field + .field { margin-top: 0; }
.wizard-field .field + .progress-note-row, .wizard-field .progress-note-row + .field { margin-top: 14px; }
@media (max-width: 760px) { .progress-note-row { grid-template-columns: minmax(0, 1fr); } .wizard-field .progress-note-row .field + .field { margin-top: 14px; } }
.wizard-step-pill { border: 1px solid var(--line); border-radius: 999px; background: var(--surface-low); color: var(--muted); font-size: 12px; font-weight: 700; padding: 5px 12px; cursor: pointer; }
.wizard-step-pill:hover { color: var(--text); border-color: var(--primary); }
.wizard-step-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.wizard-progress span { border-radius: 999px; padding: 5px 12px; background: #8ecf9e; color: #002110; font-size: 12px; font-weight: 900; white-space: nowrap; }
.wizard-progress b { font-size: 22px; font-weight: 800; }
.icon-close { width: 36px; height: 36px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); display: grid; place-items: center; }
.icon-close:hover { background: var(--danger-soft); color: var(--danger); }
.icon-close .material-symbols-outlined { font-size: 22px; }
.project-identity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 30px; border: 0; background: transparent; }
.project-identity div { min-height: auto; padding: 0 0 6px; border-right: 0; border-bottom: 1px solid rgba(120, 168, 134, .35); display: grid; gap: 4px; }
.project-identity span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.project-identity b { color: var(--text); font-size: 15px; line-height: 1.45; word-break: break-word; }
.project-identity div:first-child b { font-family: "Literata", "Microsoft YaHei", serif; color: var(--primary); font-size: 20px; font-weight: 800; }
.editable-project-identity .confirm-project-name-field { grid-column: 1 / -1; }
.editable-project-identity .field { margin: 0; padding-bottom: 6px; border-bottom: 1px solid rgba(120, 168, 134, .35); }
.editable-project-identity .field label { display: block; min-height: auto; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.25; }
.editable-project-identity .input, .editable-project-identity .select { height: 42px; min-height: 42px; border-bottom-color: transparent; border-radius: 10px; background: rgba(245, 241, 234, .78); color: var(--text); font-size: 16px; font-weight: 800; }
.editable-project-identity .select { color: var(--primary); font-family: "Literata", "Microsoft YaHei", serif; font-size: 18px; }
.editable-project-identity .input:focus, .editable-project-identity .select:focus { border-bottom-color: transparent; background: #fff; }
.wizard-info { align-self: start; display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-left: 4px solid var(--tertiary); border-radius: 0 12px 12px 0; background: rgba(112, 92, 48, .1); color: #554020; }
.wizard-info .material-symbols-outlined { font-size: 22px; color: var(--tertiary); }
.wizard-info p { margin: 0; font-size: 14px; line-height: 1.6; }
.project-picker { max-width: 720px; margin-top: 0; }
.wizard-field { max-width: 820px; margin-top: 0; }
.submission-task-modal .wizard-field { max-height: 100%; overflow: auto; padding-right: 4px; scrollbar-width: none; }
.submission-task-modal .wizard-field::-webkit-scrollbar { width: 0; height: 0; }
.wizard-field .field { margin-top: 0; }
.wizard-field .field label { display: flex; align-items: flex-end; min-height: 22px; margin-bottom: 8px; line-height: 1.25; }
.wizard-field .input, .wizard-field .select { display: block; height: 42px; min-height: 42px; line-height: 20px; }
.wizard-field .field + .field, .wizard-field .form-grid + .field, .wizard-field .field + .form-grid { margin-top: 14px; }
.wizard-field textarea { min-height: 128px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.wizard-field .select { margin-bottom: 10px; border-radius: 14px; }
.compact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 18px 14px; }
.compact-grid .field { min-width: 0; margin-top: 0; display: grid; grid-template-rows: 30px 42px; align-items: start; }
.wizard-field .compact-grid .field + .field { margin-top: 0; }
.wizard-field.compact-grid .field + .field { margin-top: 0; }
.compact-grid .field label { white-space: nowrap; }
.compact-grid .input::-webkit-outer-spin-button, .compact-grid .input::-webkit-inner-spin-button { margin: 0; appearance: none; -webkit-appearance: none; }
.compact-grid .input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.date-input { color-scheme: light; padding-right: 12px; font-weight: 800; }
.date-input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .85; filter: sepia(18%) saturate(820%) hue-rotate(78deg) brightness(82%); }
.date-field:focus-within label { color: var(--primary); }
.quick-text-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.quick-text-buttons button { min-height: 34px; border: 1px solid rgba(74, 124, 89, .34); border-radius: 999px; background: var(--surface); color: var(--primary); padding: 6px 13px; font-size: 13px; font-weight: 800; }
.quick-text-buttons button:hover, .quick-text-buttons button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.image-stage-buttons button { display: inline-flex; align-items: center; gap: 6px; }
.image-stage-buttons button em { font-style: normal; font-size: 11px; font-weight: 700; opacity: .75; }
.field-hint { color: var(--muted); font-size: 12px; font-weight: 500; margin-left: 8px; }
.quick-tag-buttons { margin-top: 6px; }
.quick-tag-buttons button { background: rgba(200, 232, 208, .22); }
.wizard-project-aside { position: absolute; top: 96px; right: 26px; bottom: 26px; width: 300px; display: grid; gap: 14px; align-content: start; overflow: auto; scrollbar-width: none; z-index: 3; }
.wizard-project-aside::-webkit-scrollbar { width: 0; height: 0; }
.wizard-project-aside .file-preview-panel { border: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.wizard-project-aside .merged-file-list { max-height: 240px; }
.wizard-aside-project { border: 1px solid rgba(120, 168, 134, .35); border-radius: 16px; background: rgba(200, 232, 208, .18); padding: 14px 16px; display: grid; gap: 4px; }
.wizard-aside-project span { color: var(--muted); font-size: 12px; font-weight: 800; }
.wizard-aside-project b { color: var(--primary); font-family: "Literata", "Microsoft YaHei", serif; font-size: 17px; font-weight: 800; line-height: 1.4; word-break: break-word; }
.wizard-step:has(.wizard-project-aside) { padding-right: 356px; }
@media (max-width: 1100px) { .wizard-project-aside { display: none; } .wizard-step:has(.wizard-project-aside) { padding-right: 26px; } }
.wizard-actions { position: absolute; top: 26px; right: 82px; z-index: 4; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding-top: 0; border-top: 0; }
.wizard-main-panel .wizard-actions { top: 32px; right: 82px; }
.submission-task-modal .wizard-actions { top: 28px; right: 88px; }
.submission-task-modal .wizard-main-panel .wizard-actions { top: 28px; right: 88px; }
.wizard-actions .btn { border-radius: 14px; min-height: 42px; padding-inline: 20px; }
.wizard-actions .btn.primary { box-shadow: var(--shadow); }
.wizard-actions .btn .material-symbols-outlined { font-size: 18px; }
.wizard-step-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; gap: 12px; }
.wizard-step-header .wizard-step-nav { flex: 1 1 auto; min-width: 0; margin-right: auto; }
.wizard-step-header .wizard-actions { position: static; top: auto; right: auto; left: auto; z-index: auto; flex: 0 1 auto; }
.fill-step { grid-template-rows: auto auto minmax(0, 1fr); }
.fill-step .wizard-progress { padding-right: 0; }
.wizard-done { padding: 24px; background: #fff; border-top: 1px solid var(--line); }
.submitted-summary-panel { display: grid; gap: 18px; padding: 24px; background: #fff; border-top: 1px solid var(--line); }
.compact-submitted-panel { gap: 14px; }
.submitted-summary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.submitted-summary-head h4 { margin-top: 10px; color: var(--text); font-size: 22px; line-height: 1.3; font-weight: 900; }
.submitted-summary-head p { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.submitted-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.submitted-summary-card { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid rgba(120, 168, 134, .26); border-radius: 16px; background: rgba(200, 232, 208, .16); }
.submitted-summary-card.yellow { border-color: rgba(196, 166, 106, .36); background: rgba(248, 224, 168, .18); }
.submitted-summary-card > .material-symbols-outlined { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; background: var(--primary); color: #fff; font-size: 22px; }
.submitted-summary-card.yellow > .material-symbols-outlined { background: var(--tertiary); }
.submitted-summary-card span { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; font-weight: 900; }
.submitted-summary-card b { display: block; margin-top: 4px; color: var(--text); font-size: 14px; line-height: 1.35; font-weight: 900; overflow-wrap: anywhere; }
.submitted-summary-card p { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.submitted-folder-strip { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid rgba(120, 168, 134, .28); border-radius: 14px; background: rgba(200, 232, 208, .16); }
.submitted-folder-strip.yellow { border-color: rgba(196, 166, 106, .38); background: rgba(248, 224, 168, .18); }
.submitted-folder-strip > .material-symbols-outlined { width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center; background: var(--primary); color: #fff; font-size: 24px; }
.submitted-folder-strip.yellow > .material-symbols-outlined { background: var(--tertiary); }
.submitted-folder-strip span { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; font-weight: 900; }
.submitted-folder-strip b { display: block; margin-top: 3px; color: var(--text); font-size: 16px; line-height: 1.35; font-weight: 900; overflow-wrap: anywhere; }
.submitted-folder-strip .btn { min-height: 40px; border-radius: 13px; white-space: nowrap; }
.submitted-summary-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 2px; }
.submitted-summary-foot > span { min-width: 0; color: var(--muted); font-size: 12px; line-height: 1.5; font-weight: 800; overflow-wrap: anywhere; }
.submitted-summary-foot > div { flex: 0 0 auto; display: flex; gap: 10px; }
.submitted-summary-foot .btn { min-height: 38px; border-radius: 13px; }
.invoice-confirm-panel { display: grid; gap: 12px; padding: 18px 22px; border-top: 1px solid var(--line); background: #fff; }
.submission-task-modal .invoice-confirm-panel { position: relative; min-height: 0; overflow: auto; padding: 16px 22px 20px; scrollbar-width: thin; align-content: start; }
.invoice-confirm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.invoice-confirm-head span { display: inline-flex; width: fit-content; border-radius: 999px; padding: 5px 12px; background: rgba(74, 124, 89, .14); color: var(--primary); font-size: 12px; font-weight: 900; }
.invoice-confirm-head h4 { margin-top: 6px; color: var(--text); font-size: 19px; line-height: 1.25; font-weight: 900; }
.invoice-confirm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.invoice-field { min-width: 0; display: grid; gap: 3px; margin: 0; padding: 8px 14px; border: 1px solid rgba(120, 168, 134, .26); border-radius: 12px; background: rgba(245, 241, 234, .48); }
.invoice-field span { color: var(--muted); font-size: 11px; font-weight: 900; }
.invoice-field b { min-height: 26px; display: flex; align-items: center; color: var(--text); font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.invoice-field.readonly { background: rgba(200, 232, 208, .18); }
.invoice-field .input, .invoice-field .select { height: 34px; min-height: 34px; border-radius: 10px; background: #fff; font-size: 15px; font-weight: 800; }
.invoice-project-field .select { color: var(--primary); }
.invoice-confirm-grid > .invoice-field:nth-child(-n+2) { padding: 12px 14px; gap: 6px; }
.invoice-confirm-grid > .invoice-field:nth-child(-n+2) .select { height: 40px; min-height: 40px; }
.invoice-confirm-grid > .invoice-field:nth-child(-n+2) b { min-height: 40px; }
.invoice-stage-options { display: flex; flex-wrap: wrap; gap: 10px; }
.invoice-stage-option { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 8px 14px; border: 1px solid rgba(120, 168, 134, .4); border-radius: 12px; background: #fff; color: var(--text); font-size: 15px; font-weight: 800; cursor: pointer; }
.invoice-stage-option i { font-size: 20px; color: var(--muted); }
.invoice-stage-option.selected { border-color: var(--primary); background: rgba(74, 124, 89, .12); color: var(--primary); }
.invoice-stage-option.selected i { color: var(--primary); }
.invoice-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 2px; }
.invoice-confirm-actions .btn { border-radius: 14px; min-height: 42px; padding-inline: 20px; }
.site-photo-confirm-panel { display: grid; gap: 0; background: #fff; }
.submission-task-modal .site-photo-confirm-panel { height: 100%; min-height: 0; overflow: hidden; }
.site-photo-confirm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 24px 26px 18px; border-bottom: 1px solid var(--line); }
.site-photo-confirm-head h4 { margin-top: 9px; color: var(--text); font-size: 22px; line-height: 1.25; font-weight: 900; }
.site-photo-confirm-head p { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.site-photo-confirm-grid { display: grid; grid-template-columns: 36% minmax(0, 1fr); min-height: 500px; }
.submission-task-modal .site-photo-confirm-grid { min-height: 0; height: 100%; }
.site-photo-preview { border-right: 1px solid var(--line); border-bottom: 0; }
.site-photo-main-panel { min-width: 0; padding: 32px; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 22px; }
.submission-task-modal .site-photo-main-panel { position: relative; overflow: hidden; padding-top: 76px; }
.site-photo-actions { align-self: end; justify-self: end; display: flex; gap: 10px; }
.submission-task-modal .site-photo-actions { position: absolute; top: 28px; right: 88px; z-index: 4; }
.site-photo-actions .btn { border-radius: 14px; min-height: 42px; padding-inline: 20px; }
.readonly-field { min-width: 0; }
.readonly-pill { min-height: 44px; display: flex; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(245, 241, 234, .72); color: var(--text); font-weight: 800; overflow-wrap: anywhere; }
.site-photo-note { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-left: 4px solid var(--primary); border-radius: 0 14px 14px 0; background: rgba(200, 232, 208, .16); color: var(--text); }
.site-photo-note .material-symbols-outlined { color: var(--primary); font-size: 22px; }
.site-photo-note p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.todo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 20px; }
.todo-card { background: var(--surface); padding: 16px; min-height: 100px; display: flex; flex-direction: column; justify-content: space-between; }
.todo-card b { font-size: 28px; font-weight: 600; }
.todo-card span { color: var(--muted); font-size: 12px; }
.weekly-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.weekly-form-grid .field { margin-top: 0; background: #fff; border: 1px solid #d9e0ea; padding: 14px; box-shadow: 0 2px 8px rgba(15, 23, 42, .06); }
.weekly-form-grid .field:nth-child(5) { grid-column: span 1; }
.weekly-form-grid .field:nth-child(6), .weekly-form-grid .field:nth-child(7) { grid-column: span 2; }
.weekly-form-grid textarea { min-height: 98px; background: #fbfcff; border: 1px solid #d9e0ea; }
.required { color: var(--danger); margin-right: 5px; }
.suffix-input { display: grid; grid-template-columns: 1fr 58px; }
.suffix-input span { display: grid; place-items: center; background: #f4f4f4; border-bottom: 1px solid var(--outline); color: var(--muted); }
.counter { text-align: right; color: #8d8d8d; font-size: 12px; margin-top: 6px; }

.history-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.history-layout > * { min-width: 0; }
.history-page { max-width: 1180px; margin: 0 auto; padding: 22px 0 48px; }
.history-page-head { align-items: center; margin-bottom: 24px; }
.history-page-head p { max-width: 760px; }
.history-upload-shell { margin-bottom: 28px; }
.history-confirm-section { display: grid; gap: 18px; }
.history-confirm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.history-confirm-card { min-width: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.history-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: var(--surface-low); }
.history-card-head b { display: block; font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.history-card-head span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.history-confirm-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px 20px; }
.history-confirm-fields .field { margin-top: 0; }
.history-confirm-fields .field span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 800; }
.history-confirm-fields .wide { grid-column: 1 / -1; }
.history-confirm-fields textarea { min-height: 92px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.history-card-actions { display: flex; justify-content: flex-end; padding: 16px 20px; border-top: 1px solid var(--line); background: var(--surface-low); }
.history-confirmed-strip { padding: 12px 14px; border-left: 4px solid var(--ok); background: rgba(167, 240, 186, .18); color: var(--ok); font-weight: 800; }
.year-tabs, .segmented { display: flex; max-width: 100%; overflow-x: auto; background: var(--surface-low); padding: 4px; width: fit-content; }
.year-tabs button, .segmented button { border: 0; background: transparent; min-height: 36px; padding: 0 18px; color: var(--muted); }
.year-tabs button.active, .segmented button.active { background: var(--surface); color: var(--primary); font-weight: 600; box-shadow: var(--shadow); }
.timeline { display: grid; gap: 10px; }
.timeline-item { border-left: 3px solid var(--primary); background: var(--surface-low); padding: 12px; }
.timeline-item b { font-size: 13px; }
.timeline-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }

.ask-shell { max-width: 1260px; margin: 0 auto; }
.ask-minimal { max-width: 940px; min-height: calc(100vh - 185px); display: grid; align-content: center; gap: 34px; padding-bottom: 8vh; }
.ask-has-result { max-width: min(1600px, 100%); min-height: calc(100vh - 120px); display: grid; align-content: start; gap: 12px; padding: 8px 0 190px; }
.ask-title { display: grid; justify-items: center; gap: 12px; }
.ask-title h1 { font-family: "Literata", "Microsoft YaHei", serif; color: var(--text); font-size: 38px; line-height: 1.1; font-weight: 800; letter-spacing: 0; }
.ask-title span { width: 48px; height: 4px; border-radius: 999px; background: var(--primary); }
.ask-title-compact { justify-items: start; gap: 8px; animation: askTitleLift .38s ease-out both; }
.ask-title-compact h1 { font-size: 24px; }
.ask-title-compact span { width: 34px; height: 3px; }
.ask-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 8px 4px 12px; border-bottom: 1px solid rgba(196, 200, 188, .52); }
.ask-result-heading { min-width: 0; display: grid; gap: 8px; }
.ask-result-heading h1 { color: #27322d; font-size: clamp(20px, 1.65vw, 26px); line-height: 1.3; font-weight: 850; overflow-wrap: anywhere; }
.ask-result-meta { display: flex; align-items: center; gap: 14px; color: #727a75; font-size: 12.5px; }
.ask-result-status { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 4px 10px; border-radius: 999px; background: #eaf2ec; color: #1f5a43; font-weight: 800; }
.ask-result-status.is-failed { color: #9b3d32; background: #fbeceb; }
.ask-result-status.is-warning { color: #795318; background: #fbf2dc; }
.ask-quality-note { display: flex; align-items: flex-start; gap: 8px; padding: 12px 16px; border: 1px solid #eadbbd; border-radius: 10px; background: #fbf2dc; color: #795318; margin-bottom: 14px; }
.ask-quality-note .material-symbols-outlined { font-size: 20px; flex-shrink: 0; }
.ask-quality-note b, .ask-quality-note span { display: block; }
.ask-quality-note span { margin-top: 3px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.ask-result-status.is-waiting { color: #59645d; background: #f0f1ed; }
.ask-result-status .material-symbols-outlined { font-size: 16px; }
.ask-result-tools { display: flex; align-items: center; justify-content: flex-end; gap: 20px; flex: 0 0 auto; padding-top: 4px; }
.ask-result-tools .ask-soft-btn { min-height: 32px; color: #27322d; font-size: 13px; }
.ask-result-tools .ask-soft-btn .material-symbols-outlined { color: #1f5a43; font-size: 18px; }
.ask-filter { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 28px; }
.ask-input-card { position: relative; border: 1px solid rgba(196, 200, 188, .46); padding: 28px 38px 30px; margin-bottom: 24px; transition: min-height .38s ease, padding .38s ease, box-shadow .38s ease, transform .38s ease; }
.ask-only-input { min-height: 330px; margin-bottom: 0; background: #f7f5ee; border-radius: 12px; box-shadow: 0 20px 42px rgba(39, 45, 40, .14); display: grid; grid-template-rows: 1fr auto; }
.ask-has-result .ask-input-compact { position: fixed; left: max(32px, calc((100vw - 1600px) / 2)); right: max(32px, calc((100vw - 1600px) / 2)); bottom: 16px; z-index: 18; min-height: 104px; padding: 12px 16px; margin-bottom: 0; border-color: rgba(31, 90, 67, .22); border-radius: 10px; background: rgba(255, 255, 255, .97); box-shadow: 0 10px 28px rgba(39, 50, 45, .12); grid-template-rows: auto auto; animation: askInputDock .42s cubic-bezier(.2,.8,.2,1) both; backdrop-filter: blur(12px); }
.ask-input-card:focus-within { border-color: rgba(72, 133, 94, .65); box-shadow: 0 22px 48px rgba(39, 45, 40, .16), 0 0 0 3px rgba(72, 133, 94, .1); }
.ask-card-mark { position: absolute; right: 28px; top: 24px; color: rgba(196, 200, 188, .34); font-size: 54px; pointer-events: none; }
.ask-input-card textarea { width: 100%; min-height: 210px; padding: 12px 58px 18px 0; background: transparent; border: 0; color: var(--text); font-size: 20px; line-height: 1.75; resize: none; outline: none; }
.ask-input-compact textarea { min-height: 42px; max-height: 52px; padding: 2px 40px 4px 0; font-size: 16px; line-height: 1.45; }
.ask-input-compact .ask-card-mark { top: 14px; right: 20px; font-size: 30px; opacity: .62; }
.ask-input-card textarea::placeholder { color: rgba(79, 84, 78, .35); font-weight: 700; }
.ask-actions { display: flex; justify-content: space-between; gap: 18px; align-items: center; border-top: 1px solid rgba(196, 200, 188, .28); padding-top: 24px; }
.ask-input-compact .ask-actions { padding-top: 8px; border-top-color: rgba(196, 200, 188, .42); }
.ask-soft-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.ask-soft-btn { border: 0; background: transparent; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0; font-size: 14px; font-weight: 800; }
.ask-soft-btn .material-symbols-outlined { color: var(--muted); font-size: 20px; }
.ask-soft-btn:hover { color: var(--primary); }
.ask-soft-btn:hover .material-symbols-outlined { color: var(--primary); }
.ask-run-btn { min-width: 166px; min-height: 52px; border-radius: 11px; padding: 0 24px; font-size: 17px; font-weight: 900; box-shadow: 0 10px 20px rgba(72, 133, 94, .28); }
.ask-input-compact .ask-run-btn { min-width: 132px; min-height: 38px; padding: 0 18px; font-size: 14px; }
.ask-input-compact .ask-soft-btn { min-height: 28px; font-size: 12px; }
.ask-input-compact .ask-soft-btn .material-symbols-outlined { font-size: 17px; }
.ask-run-btn .material-symbols-outlined { margin-left: 6px; font-size: 25px; }
.question-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.question-card { border: 0; border-left: 4px solid var(--primary); background: var(--surface-low); padding: 16px; min-height: 130px; text-align: left; line-height: 1.55; }
.answer-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.answer-grid > * { min-width: 0; }
.answer-box { padding: 18px; line-height: 1.8; font-size: 15px; background: var(--surface); }
.ask-result-panel { border: 1px solid var(--line); background: var(--surface); padding: 20px; box-shadow: var(--shadow); animation: askResultIn .42s ease-out both; }
.ask-loading-panel { display: grid; gap: 22px; min-height: 220px; align-content: start; }
.ask-loading-head { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0 4px; }
.ask-loading-head .material-symbols-outlined { color: var(--primary); font-size: 26px; }
.ask-loading-head b { display: block; font-size: 18px; font-weight: 900; }
.ask-loading-head span { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.ask-loading-lines { display: grid; gap: 10px; }
.ask-loading-lines i { height: 14px; border-radius: 999px; background: linear-gradient(90deg, rgba(196, 200, 188, .22), rgba(72, 133, 94, .18), rgba(196, 200, 188, .22)); background-size: 200% 100%; animation: askSkeleton 1.15s ease-in-out infinite; }
.ask-loading-lines i:nth-child(2) { width: 78%; }
.ask-loading-lines i:nth-child(3) { width: 52%; }
@keyframes askInputDock {
  from { opacity: .7; transform: translateY(72px) scale(1.02); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes askTitleLift {
  from { opacity: .7; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes askResultIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes askSkeleton {
  to { background-position: -200% 0; }
}
.ask-chat { display: grid; gap: 12px; max-height: none; overflow: visible; padding: 0 0 2px; }
.ask-prior-exchanges { border: 1px solid rgba(196, 200, 188, .56); border-radius: 9px; background: rgba(255, 255, 255, .76); overflow: hidden; }
.ask-prior-exchanges > summary { min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 9px 14px; color: #36433c; cursor: pointer; list-style: none; }
.ask-prior-exchanges > summary::-webkit-details-marker { display: none; }
.ask-prior-exchanges > summary > span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 850; }
.ask-prior-exchanges > summary .material-symbols-outlined { color: #1f5a43; font-size: 18px; }
.ask-prior-exchanges > summary > em { margin-left: auto; color: #727a75; font-size: 12px; font-style: normal; }
.ask-prior-exchanges > summary::after { content: "展开"; color: #727a75; font-size: 11px; }
.ask-prior-exchanges[open] > summary::after { content: "收起"; }
.ask-prior-list { display: grid; gap: 0; border-top: 1px solid rgba(196, 200, 188, .46); }
.ask-prior-item { padding: 14px 16px; border-bottom: 1px solid rgba(196, 200, 188, .42); }
.ask-prior-item:last-child { border-bottom: 0; }
.ask-prior-item > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.ask-prior-item > header b { color: #27322d; font-size: 14px; line-height: 1.5; }
.ask-prior-favorite { flex: 0 0 auto; display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: #b99655; }
.ask-prior-favorite:hover { background: #fbf7ed; }
.ask-prior-favorite .material-symbols-outlined { font-size: 18px; }
.ask-prior-item .ask-answer { color: #59645d; font-size: 13px; }
.ask-prior-empty { color: #727a75; font-size: 12.5px; }
.ask-msg { display: flex; }
.ask-msg-user { justify-content: flex-end; }
.ask-msg-ai, .ask-msg-excel { justify-content: flex-start; }
.ask-bubble { max-width: 78%; padding: 14px 18px; border-radius: 14px; line-height: 1.75; font-size: 15px; }
.ask-bubble.ask-anim { animation: askResultIn .32s ease-out both; }
.ask-msg-col { display: grid; gap: 3px; max-width: 100%; min-width: 0; }
.ask-msg-user .ask-msg-col { justify-items: end; }
.ask-msg-ai .ask-msg-col, .ask-msg-excel .ask-msg-col { justify-items: start; flex: 1 1 auto; width: 100%; }
.ask-msg-user .ask-msg-col .ask-bubble, .ask-msg-excel .ask-msg-col .ask-bubble { max-width: 100%; }
.ask-msg-user .ask-msg-col, .ask-msg-excel .ask-msg-col { max-width: 78%; }
.ask-msg-time { color: var(--muted); font-style: normal; font-size: 11px; padding: 0 6px; }
.ask-msg-user .ask-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.ask-msg-ai .ask-bubble { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-bottom-left-radius: 4px; }
.ask-msg-excel .ask-bubble { background: rgba(72, 133, 94, .08); border: 1px dashed rgba(72, 133, 94, .4); color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.ask-msg-excel .ask-bubble .material-symbols-outlined { color: var(--primary); font-size: 20px; }
.ask-msg-ai .ask-bubble .table-wrap { margin-top: 12px; }
.ask-msg-ai .ask-bubble.ask-bubble-wide { max-width: 100%; width: 100%; }
.ask-msg-ai .ask-bubble.ask-bubble-canvas { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; line-height: 1.65; }
.ask-analysis-canvas { display: grid; gap: 12px; width: 100%; }
.ask-analysis-columns { display: grid; grid-template-columns: minmax(0, 42fr) minmax(520px, 58fr); gap: 12px; align-items: start; }
.ask-analysis-canvas--single .ask-analysis-columns { grid-template-columns: minmax(0, 1fr); }
.ask-analysis-main, .ask-analysis-insights { min-width: 0; border: 1px solid rgba(196, 200, 188, .58); border-radius: 10px; background: #fff; }
.ask-analysis-main { padding: 20px; }
.ask-analysis-insights { padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 12px; overflow: hidden; }
.ask-analysis-main .ask-analysis-header { margin: -4px 0 16px; padding: 0 0 14px; border-bottom-color: rgba(196, 200, 188, .56); border-radius: 0; background: transparent; box-shadow: none; color: #27322d; }
.ask-analysis-main .ask-analysis-kicker > .material-symbols-outlined { color: #1f5a43; background: #eaf2ec; box-shadow: none; }
.ask-analysis-main .ask-analysis-badge { border-color: rgba(31, 90, 67, .16); background: #f6f9f6; color: #425048; }
.ask-analysis-main .ask-keypoint { padding: 0 0 12px; border-bottom: 0; margin-bottom: 4px; color: #27322d; font-size: 17px; line-height: 1.55; }
.ask-analysis-main .ask-highlights { margin: 0 0 12px; padding-left: 20px; gap: 8px; color: #36433c; font-size: 13.5px; }
.ask-analysis-main .ask-answer { gap: 8px; color: #465149; font-size: 13.5px; line-height: 1.75; }
.ask-analysis-main .ask-metrics { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-top: 18px; gap: 0; border: 1px solid rgba(196, 200, 188, .56); border-radius: 9px; background: #fff; overflow: hidden; }
.ask-analysis-main .ask-metric-card { min-height: 94px; padding: 14px 16px; border: 0; border-right: 1px solid rgba(196, 200, 188, .52); border-radius: 0; background: transparent; }
.ask-analysis-main .ask-metric-card:last-child { border-right: 0; }
.ask-analysis-main .ask-metric-card .ask-metric-label, .ask-analysis-main .ask-metric-card .ask-metric-value { color: #1f5a43; }
.ask-analysis-main .ask-metric-value { font-size: 31px; }
.ask-analysis-main .ask-metric-note { padding-top: 4px; border-top: 0; }
.ask-risk-summary { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; margin-top: 18px; padding: 12px 14px; border: 1px solid rgba(185, 150, 85, .32); border-radius: 9px; background: #fbf7ed; color: #6e5527; }
.ask-risk-summary > .material-symbols-outlined { color: #b27a23; font-size: 20px; }
.ask-risk-summary div { display: grid; gap: 3px; }
.ask-risk-summary b { color: #5b4823; font-size: 13px; }
.ask-risk-summary span { font-size: 12.5px; line-height: 1.6; }
.ask-analysis-insights .ask-charts { width: 100%; min-width: 0; max-width: 100%; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 0; overflow: hidden; }
.ask-analysis-insights .ask-chart-card { width: 100%; min-width: 0; max-width: 100%; padding: 0 0 14px; border: 0; border-bottom: 1px solid rgba(196, 200, 188, .5); border-radius: 0; background: transparent; overflow: hidden; }
.ask-analysis-insights .ask-echart { width: 100%; min-width: 0; max-width: 100%; overflow: hidden; }
.ask-analysis-insights .ask-chart-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: #27322d; font-size: 14px; }
.ask-analysis-insights .ask-table-section { width: 100%; min-width: 0; max-width: 100%; margin-top: 0; }
.ask-analysis-insights .ask-table-title { margin-bottom: 7px; font-size: 13px; }
.ask-analysis-insights .table-wrap { width: 100%; min-width: 0; max-width: 100%; margin-top: 0 !important; border: 1px solid rgba(196, 200, 188, .52); border-radius: 8px; background: #fff; overflow: auto; }
.ask-analysis-insights table { width: 100%; min-width: 620px; border-collapse: collapse; }
.ask-analysis-insights th { background: #f7f6f1; color: #59645d; font-size: 11.5px; font-weight: 800; }
.ask-analysis-insights td { color: #36433c; font-size: 12px; }
.ask-analysis-insights th, .ask-analysis-insights td { padding: 8px 10px; border-bottom-color: rgba(196, 200, 188, .42); }
.ask-table-row-watch td { background: rgba(185, 150, 85, .07); }
.ask-table-row-risk td { background: rgba(211, 155, 69, .12); }
.ask-table-row-watch td:last-child, .ask-table-row-risk td:last-child { color: #9b5c16; font-weight: 800; }
.ask-analysis-provenance { display: grid; grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); gap: 0; border: 1px solid rgba(196, 200, 188, .56); border-radius: 9px; background: #fff; overflow: hidden; }
.ask-analysis-provenance > :only-child { grid-column: 1 / -1; }
.ask-analysis-provenance .ask-sources, .ask-analysis-provenance .ask-scope { min-width: 0; min-height: 68px; margin: 0; padding: 12px 18px; border: 0; border-radius: 0; background: transparent; }
.ask-analysis-provenance .ask-sources { align-content: center; border-right: 1px solid rgba(196, 200, 188, .5); }
.ask-analysis-provenance > .ask-sources:only-child { border-right: 0; }
.ask-analysis-provenance .ask-scope { display: grid; align-content: center; }
.ask-analysis-provenance .ask-scope summary { color: #27322d; font-size: 12.5px; font-weight: 850; }
.ask-analysis-provenance .ask-source-chip { border-radius: 6px; background: #eef4ef; }
.ask-analysis-footer { display: grid; gap: 8px; }
.ask-analysis-footer:empty { display: none; }
.ask-analysis-footer .ask-export-row { margin-top: 0; padding: 2px 2px 0; border-top: 0; }
.ask-analysis-footer .ask-followups { margin-top: 0; padding: 8px 0 0; border-top-color: rgba(196, 200, 188, .55); }
.ask-analysis-footer .ask-followup-chip { border-radius: 7px; background: #fff; }
.ask-bubble-failed { border-color: rgba(184, 50, 48, .35) !important; background: var(--danger-soft, #fdf0ef) !important; }
.ask-msg-ai .ask-bubble.ask-bubble-vanna {
  border-color: rgba(46, 125, 68, .32);
  background: linear-gradient(180deg, rgba(235, 247, 238, .72) 0, var(--surface) 180px);
  box-shadow: 0 16px 38px rgba(35, 82, 50, .12);
}
.ask-msg-ai .ask-bubble.ask-bubble-pi {
  border-color: rgba(74, 124, 89, .34);
  background: linear-gradient(180deg, rgba(238, 246, 236, .86) 0, var(--surface) 190px);
  box-shadow: 0 16px 38px rgba(55, 91, 65, .11);
}
.ask-msg-ai .ask-bubble.ask-bubble-pi-fallback { border-color: rgba(184, 129, 34, .42); background: linear-gradient(180deg, rgba(252, 245, 222, .88) 0, var(--surface) 190px); }
.ask-msg-ai .ask-bubble.ask-bubble-rule { border-color: rgba(45, 105, 70, .28); }
.ask-msg-ai .ask-bubble.ask-bubble-fallback { border-color: rgba(184, 129, 34, .35); }
.ask-msg-ai .ask-bubble.ask-bubble-qwen { border-color: rgba(119, 108, 81, .26); }
.ask-msg-ai .ask-bubble.ask-bubble-canvas { border: 0; background: transparent; box-shadow: none; }
.ask-analysis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -14px -18px 16px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(72, 133, 94, .2);
  border-radius: 13px 13px 0 0;
}
.ask-analysis-header--vanna {
  color: #fff;
  background:
    radial-gradient(circle at 84% 10%, rgba(218, 181, 91, .24), transparent 35%),
    linear-gradient(118deg, #183c2b 0%, #2d6846 62%, #3f7957 100%);
}
.ask-analysis-header--qwen { background: #f2eee5; color: var(--text); }
.ask-analysis-header--pi {
  color: #163f2a;
  background:
    radial-gradient(circle at 88% 8%, rgba(211, 181, 104, .18), transparent 34%),
    linear-gradient(112deg, #e5f1e4 0%, #f3f7ed 58%, #f8f2df 100%);
  box-shadow: inset 4px 0 0 #4a7c59;
}
.ask-analysis-header--pi-fallback { color: #6f4b0c; background: linear-gradient(112deg, #fbefd0 0%, #faf6e8 100%); box-shadow: inset 4px 0 0 #c58a24; }
.ask-analysis-header--rule { color: #214f36; background: #edf5ec; }
.ask-analysis-header--fallback { color: #704d12; background: #fbf2dc; }
.ask-analysis-kicker {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  min-width: 0;
}
.ask-analysis-kicker > .material-symbols-outlined {
  grid-column: 1;
  grid-row: 1 / 3;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  color: #17432d;
  background: #e4f4e9;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
  font-size: 20px;
}
.ask-analysis-header--pi-fallback .ask-analysis-kicker > .material-symbols-outlined,
.ask-analysis-header--fallback .ask-analysis-kicker > .material-symbols-outlined { color: #7a5008; background: #fff3cf; }
.ask-analysis-kicker > span { grid-column: 2; color: inherit; font-size: 11.5px; line-height: 1.35; opacity: .76; }
.ask-analysis-kicker > b { grid-column: 2; font-size: 15px; font-weight: 900; letter-spacing: .02em; line-height: 1.35; }
.ask-analysis-badges { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.ask-analysis-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 2px 9px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: inherit;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  white-space: nowrap;
}
.ask-analysis-header--qwen .ask-analysis-badge { border-color: var(--line); background: rgba(255,255,255,.62); }
.ask-analysis-header--pi .ask-analysis-badge,
.ask-analysis-header--rule .ask-analysis-badge,
.ask-analysis-header--fallback .ask-analysis-badge { border-color: rgba(54, 99, 67, .2); background: rgba(255,255,255,.64); }
.ask-analysis-badge--warning { color: #7a5008; border-color: rgba(197, 138, 36, .38) !important; background: rgba(255, 246, 219, .92) !important; }
.ask-analysis-badge .material-symbols-outlined { font-size: 14px; }
.ask-analysis-trace {
  margin-top: 12px;
  border: 1px solid rgba(46, 125, 68, .24);
  border-radius: 12px;
  background: rgba(235, 247, 238, .52);
  overflow: hidden;
}
.ask-analysis-trace > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 12px;
  color: #285c3e;
  font-size: 12.5px;
  font-weight: 850;
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.ask-analysis-trace > summary::-webkit-details-marker { display: none; }
.ask-analysis-trace > summary > span { display: inline-flex; align-items: center; gap: 6px; }
.ask-analysis-trace > summary > em { margin-left: auto; color: var(--muted); font-size: 11px; font-style: normal; font-weight: 650; }
.ask-analysis-trace > summary::after { content: "展开"; color: var(--muted); font-size: 11px; font-weight: 650; }
.ask-analysis-trace[open] > summary::after { content: "收起"; }
.ask-analysis-trace > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -3px; }
.ask-analysis-trace > summary .material-symbols-outlined { font-size: 17px; }
.ask-trace-list { display: grid; gap: 8px; margin: 0; padding: 0 12px 12px; list-style: none; }
.ask-trace-item { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid rgba(46, 125, 68, .16); border-radius: 9px; background: rgba(255,255,255,.72); }
.ask-trace-item > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11.5px; }
.ask-trace-item > div b { color: var(--text); font-size: 12px; }
.ask-trace-sql {
  margin: 0;
  max-height: 180px;
  overflow: auto;
  padding: 9px 10px;
  border-radius: 8px;
  color: #dcefe2;
  background: #1c2d24;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 11.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.ask-answer { display: grid; gap: 6px; }
.ask-keypoint { font-size: 17px; font-weight: 900; color: var(--text); line-height: 1.6; padding: 2px 0 8px; border-bottom: 1px dashed var(--line); margin-bottom: 8px; }
.ask-highlights { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 5px; font-size: 14px; }
.ask-highlights li::marker { color: var(--primary); }
.ask-progress { display: inline-block; width: 84px; height: 8px; border-radius: 999px; background: rgba(107, 114, 128, .16); overflow: hidden; vertical-align: middle; }
.ask-progress i { display: block; height: 100%; border-radius: 999px; background: #48855e; }
.ask-progress-low i { background: #e0a54b; }
.ask-progress-zero i { background: #b83230; min-width: 3px; }
.ask-progress-num { margin-left: 8px; font-variant-numeric: tabular-nums; font-weight: 700; }
.ask-num-danger { color: #b83230; font-weight: 800; }
.ask-td-progress { white-space: nowrap; }
.ask-card-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.ask-card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-low); padding: 12px 14px; display: grid; gap: 7px; align-content: start; }
.ask-card-title { font-size: 14px; font-weight: 800; color: var(--text); line-height: 1.5; word-break: break-all; }
.ask-card-title .ask-project-link { font-size: 14px; font-weight: 800; text-align: left; }
.ask-card-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.ask-card-field > span:first-child { color: var(--muted); flex: 0 0 auto; }
.ask-card-field b { font-variant-numeric: tabular-nums; text-align: right; word-break: break-all; }
.ask-card-progress { display: inline-flex; align-items: center; }
.ask-echart { width: 100%; min-height: 180px; }
.ask-fallback-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 12px; border: 1px dashed rgba(217, 119, 6, .5); border-radius: 10px; background: rgba(217, 119, 6, .06); font-size: 12.5px; color: #b45309; }
.ask-fallback-note .material-symbols-outlined { font-size: 16px; }
.ask-followups { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.ask-followups-label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.ask-followups-label .material-symbols-outlined { font-size: 16px; }
.ask-followup-chip { border: 1px solid var(--line); background: var(--surface-low); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; color: var(--text); cursor: pointer; transition: border-color .15s, background .15s; }
.ask-followup-chip:hover { border-color: var(--primary); color: var(--primary); background: rgba(72, 133, 94, .06); }
.ask-input-compact .ask-dock-followups { flex-wrap: nowrap; gap: 8px; margin: 0 0 8px; padding: 0 0 8px; border-top: 0; border-bottom: 1px solid rgba(196, 200, 188, .42); overflow-x: auto; scrollbar-width: none; }
.ask-input-compact .ask-dock-followups::-webkit-scrollbar { width: 0; height: 0; }
.ask-input-compact .ask-dock-followups .ask-followups-label, .ask-input-compact .ask-dock-followups .ask-followup-chip { flex: 0 0 auto; }
.ask-input-compact .ask-dock-followups .ask-followup-chip { border-radius: 7px; background: #fff; }
.ask-source-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 16px; }
.ask-source-field { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.6; padding: 3px 0; border-bottom: 1px dashed rgba(107, 114, 128, .18); }
.ask-source-field > span { color: var(--muted); flex: 0 0 108px; }
.ask-source-field > b { font-weight: 600; word-break: break-all; }
.ask-scope { margin-top: 10px; border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; background: var(--surface-low); }
.ask-scope summary { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none; }
.ask-scope summary .material-symbols-outlined { font-size: 16px; }
.ask-scope-body { margin-top: 8px; display: grid; gap: 4px; }
.ask-scope-row { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.6; }
.ask-scope-row > span { color: var(--muted); flex: 0 0 68px; }
.ask-scope-row > b { font-weight: 600; word-break: break-all; }
.ask-metric-delta { font-size: 12px; font-weight: 700; }
.ask-metric-delta-up { color: #b83230; }
.ask-metric-delta-down { color: #1d7a46; }
.ask-metric-delta-flat { color: var(--muted); }
.ask-queue { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 14px; border: 1px dashed var(--line); border-radius: 10px; font-size: 12.5px; color: var(--muted); }
.ask-queue .material-symbols-outlined { font-size: 16px; }
.ask-queue em { font-style: normal; background: var(--surface-low); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--text); }
.ask-fav-list { align-items: center; }
.ask-fav-label { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.ask-fav-label .material-symbols-outlined { font-size: 16px; color: #e0a54b; }
.ask-fav-chip { display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--surface-low); border-radius: 999px; overflow: hidden; }
.ask-fav-run { border: 0; background: none; padding: 6px 4px 6px 12px; font-size: 12.5px; cursor: pointer; color: var(--text); }
.ask-fav-run:hover { color: var(--primary); }
.ask-fav-del { border: 0; background: none; padding: 6px 8px 6px 2px; cursor: pointer; color: var(--muted); display: inline-flex; }
.ask-fav-del .material-symbols-outlined { font-size: 14px; }
.ask-fav-del:hover { color: #b83230; }
.ask-fav-star { border: 0; background: none; padding: 0; margin-left: 8px; cursor: pointer; color: rgba(255, 255, 255, .7); vertical-align: middle; display: inline-flex; }
.ask-fav-star .material-symbols-outlined { font-size: 16px; }
.ask-fav-star:hover { color: #ffd75e; }
@media (max-width: 1100px) {
  .ask-has-result .ask-input-compact { left: 24px; right: 24px; }
  .ask-analysis-columns { grid-template-columns: minmax(0, 1fr); }
  .ask-analysis-provenance { grid-template-columns: minmax(0, 1fr); }
  .ask-analysis-provenance .ask-sources { border-right: 0; border-bottom: 1px solid rgba(196, 200, 188, .5); }
  .ask-analysis-provenance > :only-child { grid-column: auto; border-bottom: 0; }
}
@media (max-width: 720px) {
  .ask-shell { padding: 12px 10px; }
  .ask-has-result { gap: 10px; padding: 0 0 20px; }
  .ask-result-head { align-items: stretch; flex-direction: column; gap: 10px; padding-inline: 0; }
  .ask-result-heading h1 { font-size: 22px; }
  .ask-result-meta { align-items: flex-start; flex-wrap: wrap; gap: 8px 12px; }
  .ask-result-tools { justify-content: flex-start; gap: 18px; padding-top: 0; }
  .ask-analysis-main, .ask-analysis-insights { padding: 14px; }
  .ask-analysis-main .ask-metrics { grid-template-columns: 1fr; }
  .ask-analysis-main .ask-metric-card { min-height: 76px; border-right: 0; border-bottom: 1px solid rgba(196, 200, 188, .52); }
  .ask-analysis-main .ask-metric-card:last-child { border-bottom: 0; }
  .ask-analysis-provenance .ask-sources, .ask-analysis-provenance .ask-scope { padding: 12px 14px; }
  .ask-analysis-footer .ask-export-row { gap: 12px; flex-wrap: wrap; }
  .ask-has-result .ask-input-compact { position: static; }
  .ask-has-result { padding-bottom: 20px; }
  .ask-input-compact .ask-dock-followups { flex-wrap: wrap; overflow-x: visible; }
  .ask-bubble { max-width: 100%; }
  .ask-bubble-wide { max-width: 100%; }
  .ask-metrics { grid-template-columns: repeat(2, 1fr); }
  .ask-charts { grid-template-columns: 1fr; }
  .ask-card-list { grid-template-columns: 1fr; }
  .ask-msg-ai .ask-bubble table { min-width: 0; }
  .ask-msg-ai .ask-bubble th, .ask-msg-ai .ask-bubble td { font-size: 12px; padding: 6px 8px; }
  .ask-actions { flex-wrap: wrap; gap: 8px; }
  .ask-soft-actions { flex-wrap: wrap; }
  .ask-analysis-header { align-items: flex-start; flex-direction: column; gap: 10px; }
  .ask-analysis-badges { justify-content: flex-start; }
  .ask-analysis-badge { max-width: 100%; white-space: normal; }
  .ask-trace-item > div { align-items: flex-start; flex-direction: column; gap: 2px; }
  .ask-msg-ai:has(.ask-bubble-loading) { min-width: 0; max-width: 100%; }
  .ask-bubble-loading { width: 100%; min-width: 0; max-width: 100%; }
  .ask-shell .ask-flow-row { padding-inline: 2px; }
  .ask-flow-meta { max-width: 72px; }
}
.ask-answer-p { margin: 0; }
.ask-answer-list { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.ask-answer-list li { line-height: 1.7; }
.ask-msg-ai .ask-bubble table { min-width: 560px; }
@media (max-width: 720px) {
  .ask-msg-ai .ask-bubble .ask-analysis-insights .table-wrap { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; }
  .ask-msg-ai .ask-bubble .ask-analysis-insights table { width: 620px; min-width: 620px; }
}
.ask-table-title { margin-top: 14px; font-size: 13px; font-weight: 900; color: var(--text); }
.ask-table-title + .table-wrap { margin-top: 6px; }
.ask-chart-card .ask-chart-title { font-size: 13.5px; }
.ask-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }
.ask-metric-card { display: grid; gap: 4px; align-content: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-low); }
.ask-metric-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 800; }
.ask-metric-label .material-symbols-outlined { font-size: 17px; }
.ask-metric-value { font-size: 30px; font-weight: 900; color: var(--text); line-height: 1.15; }
.ask-metric-value em { margin-left: 4px; font-style: normal; font-size: 13px; font-weight: 700; color: var(--muted); }
.ask-metric-note { color: var(--muted); font-size: 12px; line-height: 1.55; border-top: 1px dashed rgba(0,0,0,.08); padding-top: 6px; margin-top: 4px; }
.ask-metric-blue { background: #eef4fd; border-color: #cfdff7; }
.ask-metric-blue .ask-metric-label, .ask-metric-blue .ask-metric-value { color: #2563b0; }
.ask-metric-orange { background: #fdf6ec; border-color: #f3ddb8; }
.ask-metric-orange .ask-metric-label, .ask-metric-orange .ask-metric-value { color: #b4690e; }
.ask-metric-red { background: #fdf0ef; border-color: #f3cdc9; }
.ask-metric-red .ask-metric-label, .ask-metric-red .ask-metric-value { color: #bb3b2e; }
.ask-metric-green { background: #eef8f0; border-color: #cfe8d5; }
.ask-metric-green .ask-metric-label, .ask-metric-green .ask-metric-value { color: #2e7d44; }
.ask-metric-purple { background: #f4f0fb; border-color: #ded2f2; }
.ask-metric-purple .ask-metric-label, .ask-metric-purple .ask-metric-value { color: #6d4fb0; }
.ask-metric-teal { background: #ecf7f6; border-color: #c9e7e4; }
.ask-metric-teal .ask-metric-label, .ask-metric-teal .ask-metric-value { color: #1f7f76; }
.ask-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 12px; margin-top: 12px; }
.ask-chart-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ask-chart-title { margin-bottom: 10px; font-size: 13px; font-weight: 900; }
.ask-chart-title em { margin-left: 8px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
.ask-bar-list { display: grid; gap: 8px; }
.ask-bar-row { display: flex; align-items: center; gap: 10px; }
.ask-bar-label { flex: 0 0 128px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--text); }
.ask-bar-track { flex: 1 1 auto; height: 14px; border-radius: 7px; background: var(--surface-mid); overflow: hidden; }
.ask-bar-fill { display: block; height: 100%; border-radius: 7px; }
.ask-bar-value { flex: 0 0 auto; min-width: 64px; text-align: right; font-size: 12px; font-weight: 800; }
.ask-line-chart { width: 100%; height: auto; }
.ask-pie-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ask-pie-box { position: relative; width: 150px; height: 150px; flex: 0 0 auto; }
.ask-pie-chart { width: 100%; height: 100%; transform: rotate(-90deg); }
.ask-pie-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.ask-pie-center b { font-size: 22px; font-weight: 900; color: var(--text); }
.ask-pie-center span { font-size: 11px; color: var(--muted); }
.ask-pie-legend { display: grid; gap: 8px; font-size: 12.5px; }
.ask-pie-legend span { display: inline-flex; align-items: center; gap: 7px; }
.ask-pie-legend em { font-style: normal; color: var(--muted); }
.ask-pie-legend i { width: 11px; height: 11px; border-radius: 3px; flex: 0 0 auto; }
.ask-table-section { margin-top: 14px; }
.ask-table-section .ask-table-title { margin-top: 0; }
.ask-table-title em { margin-left: 8px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
.ask-table-expand { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; margin-top: 0; padding: 8px 0; border: 1px solid var(--line); border-top: 0; background: var(--surface-low); color: var(--primary); font-size: 13px; font-weight: 800; cursor: pointer; }
.ask-table-expand .material-symbols-outlined { font-size: 19px; }
.ask-table-expand:hover { background: rgba(72, 133, 94, .08); }
.ask-sources { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-low); font-size: 12px; }
.ask-sources b { display: inline-flex; align-items: center; gap: 5px; color: var(--text); font-size: 12.5px; }
.ask-sources b .material-symbols-outlined { font-size: 17px; color: var(--primary); }
.ask-sources span { padding: 3px 10px; border-radius: 999px; background: rgba(72, 133, 94, .1); color: var(--primary); font-weight: 700; }
.ask-source-chip { border: 0; padding: 3px 10px; border-radius: 999px; background: rgba(72, 133, 94, .1); color: var(--primary); font-size: 12px; font-weight: 700; cursor: pointer; transition: background .16s ease; }
.ask-source-chip:hover { background: rgba(72, 133, 94, .22); text-decoration: underline; }
.ask-source-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ask-source-chip:disabled { opacity: .55; cursor: progress; }
.ask-source-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(24, 32, 27, .45); padding: 24px; }
.ask-source-dialog { width: min(760px, 100%); max-height: 82vh; display: flex; flex-direction: column; background: var(--surface, #fff); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); overflow: hidden; }
.ask-source-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ask-source-dialog-head b { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; min-width: 0; word-break: break-all; }
.ask-source-dialog-head b .material-symbols-outlined { color: var(--primary); font-size: 20px; }
.ask-source-close { border: 0; background: transparent; cursor: pointer; color: var(--muted); display: inline-flex; padding: 4px; border-radius: 8px; }
.ask-source-close:hover { background: var(--surface-low); color: var(--text); }
.ask-source-note { margin: 0; padding: 10px 18px; font-size: 12.5px; color: var(--muted); background: var(--surface-low); }
.ask-source-body { overflow-y: auto; padding: 14px 18px 18px; display: grid; gap: 14px; }
.ask-source-body h4 { margin: 0 0 6px; font-size: 13.5px; color: var(--primary); }
.ask-source-body pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 13px; line-height: 1.7; color: var(--text); background: var(--surface-low); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ask-export-row { display: flex; gap: 20px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.ask-export-row .ask-soft-btn { font-size: 12px; min-height: 28px; }
.ask-export-row .ask-soft-btn .material-symbols-outlined { font-size: 17px; }
.ask-export-row .ask-soft-btn:disabled { opacity: .5; cursor: default; }
.ask-bubble-loading { display: block; width: 100%; min-width: 0; max-width: 100%; padding: 0; overflow: visible; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; color: #1f2430; }
.ask-progress-live { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.ask-flow-rows, .ask-flow-complete { display: grid; gap: 0; width: 100%; min-width: 0; margin: 0 0 6px; }
.ask-flow-item { min-width: 0; color: #1f2430; }
.ask-flow-item > summary { list-style: none; }
.ask-flow-item > summary::-webkit-details-marker { display: none; }
.ask-flow-row { position: relative; display: flex; min-height: 24px; align-items: center; overflow: hidden; padding: 0 8px; color: #1f2430; font-size: 12.5px; line-height: 22px; cursor: pointer; user-select: none; }
.ask-flow-row:focus-visible { outline: 2px solid rgba(72, 133, 94, .42); outline-offset: -2px; border-radius: 5px; }
.ask-flow-state { position: relative; flex: 0 0 16px; width: 16px; height: 16px; margin-right: 6px; }
.ask-flow-state::before { content: ""; position: absolute; top: 50%; left: 50%; width: 7px; height: 7px; border-radius: 50%; background: #9aa3b2; transform: translate(-50%, -50%); }
.ask-flow-item.is-running .ask-flow-state::before { width: 10px; height: 10px; background: var(--primary); animation: askFlowBlob 1.8s ease-in-out infinite; }
.ask-flow-item.is-error .ask-flow-state::before { background: #dc2626; }
.ask-flow-row b { flex: 0 0 auto; color: #1f2430; font-size: 12.5px; font-weight: 400; }
.ask-flow-separator { flex: 0 0 2px; width: 2px; height: 2px; margin: 0 8px; border-radius: 50%; background: #9aa3b2; }
.ask-flow-row-window { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
.ask-flow-row-track { display: block; width: max-content; min-width: 100%; color: #9aa3b2; white-space: nowrap; text-overflow: clip; }
.ask-flow-item:not(.is-running) .ask-flow-row-track { width: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ask-flow-meta { flex: 0 1 auto; min-width: 0; margin-left: 6px; overflow: hidden; color: #9aa3b2; font-size: 11px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.ask-flow-check { flex: 0 0 auto; margin-left: 5px; color: #17a765; font-size: 11px; }
.ask-flow-chevron { flex: 0 0 auto; margin-left: 6px; color: #9aa3b2; font-size: 10px; transition: transform .18s ease; }
.ask-flow-item[open] .ask-flow-chevron { transform: rotate(90deg); }
.ask-flow-expanded { padding: 2px 0 4px 22px; color: #6b7280; font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; }
.ask-flow-expanded > div { overflow-wrap: anywhere; }
.ask-flow-roll-in { animation: askFlowRollIn .28s ease-out both; }
.ask-flow-item.is-running .ask-flow-row::after { content: ""; position: absolute; top: 0; bottom: 0; left: -220px; width: 220px; pointer-events: none; background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.75) 55%, transparent 100%); animation: askFlowSweep 2.6s ease-out infinite; }
@keyframes askFlowRollIn { from { opacity: 0; transform: translateY(70%); } to { opacity: 1; transform: translateY(0); } }
@keyframes askFlowSweep { 0% { left: -220px; } 90%, 100% { left: 100%; } }
@keyframes askFlowBlob {
  0%, 100% { border-radius: 45% 55% 62% 38%; transform: translate(-50%, -50%) rotate(0deg) scale(.88); }
  25% { border-radius: 63% 37% 44% 56%; transform: translate(-50%, -50%) rotate(90deg) scale(1); }
  50% { border-radius: 38% 62% 57% 43%; transform: translate(-50%, -50%) rotate(180deg) scale(.92); }
  75% { border-radius: 55% 45% 36% 64%; transform: translate(-50%, -50%) rotate(270deg) scale(1); }
}
.ask-stream-preview { border-top: 1px solid rgba(196, 200, 188, .38); padding-top: 10px; color: var(--text); font-size: 12.5px; line-height: 1.65; }
#ask-stream-text { white-space: pre-wrap; }
.ask-stream-cursor { color: var(--primary); font-size: 16px; vertical-align: middle; margin-left: 4px; }
.ask-stream-hint { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 3px 12px; border-radius: 999px; background: rgba(72, 133, 94, .1); color: var(--primary); font-size: 12.5px; font-weight: 800; vertical-align: middle; white-space: nowrap; }
.ask-stream-hint[hidden] { display: none; }
.ask-stream-hint .material-symbols-outlined { font-size: 16px; }
.ask-excel-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(72, 133, 94, .1); color: var(--primary); font-size: 12px; font-weight: 800; }
.ask-excel-tag .material-symbols-outlined { font-size: 16px; }
.ask-stop-btn { background: #fdf0ef; border: 1px solid rgba(184, 50, 48, .4); color: #b83230; box-shadow: 0 10px 20px rgba(184, 50, 48, .14); }
.ask-stop-btn:hover { background: #fbe3e1; }
.ask-suggestions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.ask-suggest-chip { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 1px solid rgba(72, 133, 94, .28); border-radius: 999px; background: rgba(72, 133, 94, .06); color: var(--text); font-size: 13.5px; font-weight: 700; cursor: pointer; transition: background .16s ease, border-color .16s ease, color .16s ease; }
.ask-suggest-chip .material-symbols-outlined { font-size: 16px; color: var(--primary); }
.ask-suggest-chip:hover { background: rgba(72, 133, 94, .14); border-color: rgba(72, 133, 94, .5); color: var(--primary); }
.ask-input-card { position: relative; }
.ask-drop-hint { position: absolute; inset: 6px; display: none; align-items: center; justify-content: center; gap: 10px; border: 2px dashed rgba(72, 133, 94, .6); border-radius: 12px; background: rgba(247, 245, 238, .94); color: var(--primary); font-size: 15px; font-weight: 900; pointer-events: none; z-index: 3; }
.ask-drop-hint .material-symbols-outlined { font-size: 26px; }
.ask-input-card.ask-drop-active .ask-drop-hint { display: flex; }
.ask-td-num { text-align: right; font-variant-numeric: tabular-nums; }
.ask-th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.ask-th-sort .material-symbols-outlined { font-size: 14px; vertical-align: -2px; margin-left: 3px; color: var(--muted); opacity: .55; }
.ask-th-sort:hover .material-symbols-outlined { opacity: 1; color: var(--primary); }
.ask-th-sort.ask-th-active .material-symbols-outlined { opacity: 1; color: var(--primary); }
.ask-excel-tag button { border: 0; background: transparent; padding: 0; display: inline-flex; color: var(--muted); cursor: pointer; }
.ask-excel-tag button .material-symbols-outlined { font-size: 15px; }
.ask-excel-tag button:hover { color: var(--danger, #b3402f); }
.ask-history-panel { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); padding: 16px 20px; animation: askResultIn .32s ease-out both; }
.ask-history-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.ask-history-tools { display: flex; align-items: center; gap: 14px; }
.ask-history-search { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-low); }
.ask-history-search .material-symbols-outlined { font-size: 17px; color: var(--muted); }
.ask-history-search input { border: 0; background: transparent; outline: none; color: var(--text); font-size: 13px; width: 160px; }
.ask-history-head b { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 900; }
.ask-history-head .material-symbols-outlined { color: var(--primary); font-size: 20px; }
.ask-history-list { display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
.ask-history-item { display: flex; align-items: center; gap: 6px; width: 100%; padding: 2px 4px 2px 0; border-radius: 8px; }
.ask-history-item:hover { background: rgba(72, 133, 94, .08); }
.ask-history-open { flex: 1 1 auto; min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; background: transparent; text-align: left; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.ask-history-open span { font-size: 14px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-history-open em { font-style: normal; color: var(--muted); font-size: 12px; flex-shrink: 0; }
.ask-history-actions { display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.ask-history-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.ask-history-icon .material-symbols-outlined { font-size: 18px; }
.ask-history-icon:hover { background: rgba(72, 133, 94, .14); color: var(--primary); }
.ask-history-icon.ask-history-danger:hover { background: rgba(184, 50, 48, .12); color: #b83230; }
.ask-history-empty { color: var(--muted); font-size: 13px; padding: 12px 4px; }
.ask-project-link { border: 0; background: transparent; padding: 0; color: var(--primary); font-size: inherit; font-weight: 700; text-align: left; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(72, 133, 94, .4); }
.ask-project-link:hover { text-decoration-color: var(--primary); }
.ask-project-link .material-symbols-outlined { font-size: 15px; }
.source-list { display: grid; gap: 8px; }
.source-item { background: var(--surface-low); padding: 10px; color: var(--muted); font-size: 13px; }

.admin-page { display: grid; gap: 20px; padding: 22px 0 48px; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.admin-head h1 { font-family: "Literata", "Microsoft YaHei", serif; font-size: 34px; font-weight: 800; line-height: 1.1; }
.admin-head p { margin-top: 9px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.admin-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.admin-metrics div { min-height: 94px; background: var(--surface); padding: 15px; display: flex; flex-direction: column; justify-content: space-between; }
.admin-metrics span { color: var(--muted); font-size: 12px; font-weight: 800; }
.admin-metrics b { color: var(--primary); font-size: 26px; font-weight: 900; }
.admin-danger-zone { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border: 1px solid rgba(184, 50, 48, .2); background: rgba(255, 218, 216, .25); padding: 18px 20px; border-radius: 18px; }
.admin-danger-zone span { color: var(--danger); font-size: 12px; font-weight: 900; }
.admin-danger-zone h3 { margin-top: 8px; font-size: 20px; line-height: 1.2; font-weight: 900; }
.admin-danger-zone p { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.6; max-width: 900px; }
.admin-danger-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; text-align: right; }
.admin-danger-meta span { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; background: #fff; color: var(--muted); border: 1px solid rgba(184, 50, 48, .18); font-size: 12px; font-weight: 800; }
.btn.danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: #992624; }
.admin-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr); gap: 20px; align-items: start; }
.admin-layout > * { min-width: 0; }

/* 驾驶舱 / AI 质量看板 */
.driver-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.driver-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px 8px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); min-width: 0; }
.driver-label { color: var(--muted); font-size: 12px; font-weight: 800; }
.driver-value { font-size: 30px; font-weight: 900; line-height: 1.1; }
.driver-sub { color: var(--muted); font-size: 12px; font-weight: 700; }
.driver-card .spark { width: 100%; height: 44px; margin-top: 4px; }
.spark { display: block; width: 100%; }
.spark-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.panel-body { padding: 16px 18px; }
.alert-list { display: grid; gap: 0; }
.alert-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: default; }
.alert-card[data-jump-view] { cursor: pointer; }
.alert-card[data-jump-view]:hover { background: var(--surface-low); }
.alert-card b { font-size: 14px; }
.alert-card p { margin-top: 2px; color: var(--muted); font-size: 12px; }
.alert-card > div { flex: 1; min-width: 0; }
.alert-card i { color: var(--muted); }
.alert-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; background: var(--primary); }
.alert-red .alert-dot { background: #b83230; }
.alert-yellow .alert-dot { background: #c79a2e; }
.alert-blue .alert-dot { background: #3b6fb0; }
.todo-list { display: grid; gap: 0; }
.todo-row { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; font-size: 14px; font-weight: 700; cursor: pointer; }
.todo-row:hover { background: var(--surface-low); }
.todo-row.done { color: var(--muted); }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { flex: 0 0 auto; }
.donut-total { font-size: 22px; font-weight: 900; fill: var(--text); }
.donut-label { font-size: 11px; font-weight: 700; fill: var(--muted); }
.donut-legend { display: grid; gap: 8px; flex: 1; min-width: 160px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.legend-row b { margin-left: auto; }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; }
.admin-bars { display: grid; gap: 12px; }
.admin-bar-row { display: flex; align-items: center; gap: 12px; }
.admin-bar-label { width: 168px; flex: 0 0 auto; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-bar-track { flex: 1; height: 12px; border-radius: 6px; background: var(--surface-mid); overflow: hidden; }
.admin-bar-fill { height: 100%; border-radius: 6px; }
.admin-bar-value { flex: 0 0 auto; width: 64px; text-align: right; font-size: 13px; font-weight: 800; }
@media (max-width: 1080px) { .driver-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.admin-personnel-panel .panel-head { align-items: center; }
.admin-search { max-width: 320px; min-height: 36px; background: var(--surface); }
.admin-table-wrap { max-height: calc(100vh - 360px); }
.admin-personnel-table { min-width: 1240px; }
.admin-personnel-table th, .admin-personnel-table td { white-space: nowrap; vertical-align: middle; font-size: 13px; }
.admin-personnel-table td:nth-child(2),
.admin-personnel-table td:nth-child(3) { font-family: "Nunito Sans", monospace; color: var(--muted); }
.admin-agent-column { display: grid; gap: 16px; }
.admin-task-list { display: grid; gap: 0; max-height: 315px; overflow: auto; }
.admin-task-item { width: 100%; min-height: 70px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.admin-task-item:hover, .admin-task-item.active { background: var(--primary-soft); }
.admin-task-item b { display: block; font-size: 14px; line-height: 1.35; }
.admin-task-item span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.admin-task-item em { flex: 0 0 auto; font-style: normal; }
.admin-task-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.admin-task-summary div { min-height: 74px; background: var(--surface); padding: 12px; display: grid; align-content: center; gap: 5px; }
.admin-task-summary span { color: var(--muted); font-size: 11px; font-weight: 800; }
.admin-task-summary b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.admin-step-list { display: grid; gap: 10px; padding: 16px; }
.admin-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 12px; background: var(--surface-low); border-left: 3px solid var(--line); }
.admin-step.completed { border-left-color: var(--ok); }
.admin-step.running { border-left-color: var(--primary); }
.admin-step.warning, .admin-step.queued { border-left-color: #d97706; }
.admin-step.error { border-left-color: var(--danger); }
.admin-step i { width: 26px; height: 26px; border-radius: 999px; background: var(--surface-mid); display: grid; place-items: center; color: var(--muted); font-style: normal; font-size: 12px; font-weight: 900; }
.admin-step b { display: block; font-size: 13px; }
.admin-step p { margin-top: 5px; color: var(--text); font-size: 13px; line-height: 1.55; }
.admin-step span { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; }
.admin-error { margin: 0 16px 16px; padding: 12px; background: var(--danger-soft); color: var(--danger); font-size: 12px; line-height: 1.55; }
.empty-table { padding: 18px; color: var(--muted); font-size: 13px; }

.agent-console-page { display: grid; gap: 18px; padding: 22px 0 48px; }
.agent-console-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.agent-console-head h1 { font-family: "Literata", "Microsoft YaHei", serif; font-size: 34px; font-weight: 800; line-height: 1.1; }
.agent-console-head p { margin-top: 9px; max-width: 880px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.agent-console-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.agent-console-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.agent-console-metrics div { min-height: 86px; background: var(--surface); padding: 14px; display: grid; align-content: space-between; gap: 12px; }
.agent-console-metrics span { color: var(--muted); font-size: 12px; font-weight: 900; }
.agent-console-metrics b { color: var(--primary); font-size: 24px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-console-toolbar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--surface-low); border: 1px solid var(--line); }
.agent-console-toolbar > span { color: var(--muted); font-size: 12px; font-weight: 900; white-space: nowrap; }
.agent-console-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid rgba(116, 121, 110, .35); padding: 0 11px; min-height: 38px; }
.agent-console-search .material-symbols-outlined { color: var(--muted); font-size: 20px; }
.agent-console-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.agent-console-layout { display: grid; grid-template-columns: minmax(320px, .36fr) minmax(0, 1fr); gap: 18px; align-items: start; min-height: calc(100vh - 340px); }
.agent-console-sidebar, .agent-console-main { min-width: 0; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.agent-console-sidebar { position: sticky; top: 92px; max-height: calc(100vh - 112px); display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.agent-console-sidebar-head { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--line); background: rgba(245, 241, 234, .7); }
.agent-console-sidebar-head b { font-size: 15px; font-weight: 900; }
.agent-console-sidebar-head span { color: var(--muted); font-size: 12px; font-weight: 800; }
.agent-console-task-list { overflow: auto; display: grid; align-content: start; }
.agent-console-task { width: 100%; min-height: 118px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); padding: 13px 14px; display: grid; gap: 12px; text-align: left; }
.agent-console-task:hover, .agent-console-task.active { background: rgba(200, 232, 208, .34); }
.agent-console-task-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.agent-console-task-title b { min-width: 0; color: var(--text); font-size: 14px; line-height: 1.35; font-weight: 900; overflow-wrap: anywhere; }
.agent-console-task-title em { flex: 0 0 auto; font-style: normal; }
.agent-console-task-main p { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.55; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.agent-console-task-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 800; }
.agent-console-task-foot span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-console-main { overflow: hidden; }
.agent-console-empty { min-height: 360px; display: grid; place-items: center; padding: 28px; color: var(--muted); font-size: 14px; text-align: center; }
.agent-console-detail-head { min-height: 100px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,252,246,.96), rgba(245,241,234,.72)); }
.agent-console-detail-head span { color: var(--primary); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.agent-console-detail-head h2 { margin-top: 5px; color: var(--text); font-size: 22px; line-height: 1.25; font-weight: 900; overflow-wrap: anywhere; }
.agent-console-detail-head p { margin-top: 7px; color: var(--muted); font-family: "Nunito Sans", monospace; font-size: 12px; }
.agent-console-detail-head em { flex: 0 0 auto; font-style: normal; }
.agent-console-meta-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.agent-console-meta-grid div { min-height: 70px; background: var(--surface); padding: 11px 12px; display: grid; align-content: center; gap: 5px; }
.agent-console-meta-grid span { color: var(--muted); font-size: 11px; font-weight: 900; }
.agent-console-meta-grid b { color: var(--text); font-size: 13px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-console-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, .38fr); gap: 0; align-items: stretch; }
.agent-console-timeline { min-width: 0; border-right: 1px solid var(--line); }
.agent-console-section-title { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid rgba(196, 200, 188, .35); }
.agent-console-section-title b { font-size: 14px; font-weight: 900; }
.agent-console-section-title span { color: var(--muted); font-size: 12px; font-weight: 800; }
.agent-console-step-list { display: grid; gap: 10px; padding: 14px; max-height: calc(100vh - 470px); overflow: auto; }
.agent-console-step { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 13px; border: 1px solid rgba(196, 200, 188, .48); background: var(--surface-low); }
.agent-console-step i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 999px; background: var(--surface-mid); color: var(--muted); font-style: normal; font-size: 12px; font-weight: 900; }
.agent-console-step.completed i, .agent-console-step.done i, .agent-console-step.submitted i { background: var(--ok); color: #fff; }
.agent-console-step.running i, .agent-console-step.queued i, .agent-console-step.pending i { background: var(--tertiary); color: #fff; }
.agent-console-step.error i, .agent-console-step.failed i { background: var(--danger); color: #fff; }
.agent-console-step-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.agent-console-step-head b { color: var(--text); font-size: 14px; line-height: 1.35; font-weight: 900; }
.agent-console-step-head span { flex: 0 0 auto; color: var(--muted); font-size: 11px; font-weight: 800; }
.agent-console-step p { margin-top: 7px; color: var(--text); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.agent-console-step em { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; font-style: normal; font-weight: 900; }
.agent-step-content { margin-top: 8px; border: 1px solid rgba(196, 200, 188, .5); border-radius: 10px; background: rgba(245, 241, 234, .56); }
.agent-step-content summary { cursor: pointer; padding: 8px 12px; color: var(--muted); font-size: 12px; font-weight: 800; user-select: none; }
.agent-step-content[open] summary { border-bottom: 1px solid rgba(196, 200, 188, .5); }
.agent-step-content pre { margin: 0; padding: 10px 12px; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; color: var(--text); font-family: "Nunito Sans", "Microsoft YaHei", sans-serif; font-size: 12px; line-height: 1.6; }
.agent-console-side { min-width: 0; display: grid; align-content: start; gap: 12px; padding: 14px; max-height: calc(100vh - 426px); overflow: auto; background: rgba(245, 241, 234, .56); }
.agent-console-log { border: 1px solid rgba(196, 200, 188, .5); background: var(--surface); }
.agent-console-log.error { background: rgba(255, 218, 216, .45); border-color: rgba(184, 50, 48, .22); }
.agent-console-log.warning { background: rgba(248, 224, 168, .22); border-color: rgba(112, 92, 48, .22); }
.agent-console-log pre { margin: 0; padding: 12px 14px 14px; color: var(--text); white-space: pre-wrap; word-break: break-word; font-family: "Nunito Sans", "Microsoft YaHei", sans-serif; font-size: 13px; line-height: 1.65; }
.agent-console-usage-list { display: grid; gap: 1px; background: rgba(196, 200, 188, .35); }
.agent-console-usage-list div { background: var(--surface); padding: 11px 14px; }
.agent-console-usage-list b { display: block; color: var(--text); font-size: 13px; font-weight: 900; }
.agent-console-usage-list span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 800; }
.agent-console-usage-list p, .agent-console-muted { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.knowledge-page { display: grid; gap: 18px; padding: 22px 0 48px; }
.knowledge-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.knowledge-metrics div { min-height: 86px; background: var(--surface); padding: 14px; display: grid; align-content: space-between; gap: 12px; }
.knowledge-metrics span { color: var(--muted); font-size: 12px; font-weight: 900; }
.knowledge-metrics b { color: var(--primary); font-size: 22px; line-height: 1.15; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-layout { display: grid; grid-template-columns: minmax(280px, .32fr) minmax(0, .42fr) minmax(360px, .36fr); gap: 18px; align-items: start; min-height: calc(100vh - 360px); }
.knowledge-list, .knowledge-main, .knowledge-graph-panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.knowledge-list, .knowledge-graph-panel { position: sticky; top: 92px; max-height: calc(100vh - 112px); display: grid; grid-template-rows: auto minmax(0, 1fr); }
.knowledge-item-list { overflow: auto; display: grid; align-content: start; }
.knowledge-item { width: 100%; min-height: 104px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); padding: 13px 14px; text-align: left; display: grid; gap: 7px; }
.knowledge-item:hover, .knowledge-item.active { background: rgba(200, 232, 208, .34); }
.knowledge-item b { color: var(--text); font-size: 14px; line-height: 1.35; font-weight: 900; overflow-wrap: anywhere; }
.knowledge-item span { color: var(--muted); font-size: 12px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.knowledge-item em { color: var(--primary); font-size: 11px; font-style: normal; font-weight: 900; }
.knowledge-main { display: grid; gap: 0; }
.knowledge-detail { border-bottom: 1px solid var(--line); }
.knowledge-preview { padding: 14px 16px; color: var(--text); font-size: 13px; line-height: 1.7; background: rgba(245, 241, 234, .5); max-height: 180px; overflow: auto; white-space: pre-wrap; }
.knowledge-chunks { min-height: 0; }
.knowledge-chunk-list { display: grid; gap: 10px; padding: 14px; max-height: calc(100vh - 610px); overflow: auto; }
.knowledge-chunk { border: 1px solid rgba(196, 200, 188, .48); background: var(--surface-low); padding: 12px; }
.knowledge-chunk div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.knowledge-chunk b { color: var(--primary); font-size: 13px; font-weight: 900; }
.knowledge-chunk span { color: var(--muted); font-size: 11px; font-weight: 800; }
.knowledge-chunk p { margin-top: 8px; color: var(--text); font-size: 12px; line-height: 1.65; }
.knowledge-graph { width: 100%; height: 100%; min-height: 430px; background: radial-gradient(circle at 50% 50%, rgba(200,232,208,.2), rgba(255,252,246,.92)); }
.knowledge-graph line { stroke: rgba(116, 121, 110, .36); stroke-width: 1.2; }
.knowledge-node circle { stroke: rgba(255,255,255,.92); stroke-width: 2; filter: drop-shadow(0 6px 10px rgba(46, 50, 48, .12)); }
.knowledge-node text { fill: var(--text); font-size: 11px; font-weight: 900; text-anchor: middle; paint-order: stroke; stroke: rgba(255,252,246,.92); stroke-width: 3px; stroke-linejoin: round; }
.knowledge-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.knowledge-status-card { min-height: 104px; padding: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); display: grid; align-content: space-between; gap: 8px; }
.knowledge-status-card span { color: var(--muted); font-size: 12px; font-weight: 900; }
.knowledge-status-card b { font-size: 20px; line-height: 1.15; font-weight: 900; overflow-wrap: anywhere; }
.knowledge-status-card p { color: var(--muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.knowledge-status-card.green { border-color: rgba(72, 133, 94, .28); background: rgba(235, 248, 239, .88); }
.knowledge-status-card.green b { color: var(--ok); }
.knowledge-status-card.warning { border-color: rgba(196, 143, 50, .28); background: rgba(255, 247, 226, .9); }
.knowledge-status-card.warning b { color: #9a6a13; }
.knowledge-status-card.red { border-color: rgba(184, 50, 48, .28); background: rgba(255, 235, 232, .9); }
.knowledge-status-card.red b { color: var(--danger); }
.knowledge-tools { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(320px, .78fr) minmax(280px, .58fr); gap: 18px; align-items: start; }
.knowledge-tool-card { min-width: 0; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.knowledge-tool-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px; align-items: center; border-bottom: 1px solid rgba(196, 200, 188, .35); }
.knowledge-query-box { min-height: 42px; }
.knowledge-query-results, .knowledge-sync-list { display: grid; gap: 1px; background: rgba(196, 200, 188, .35); max-height: 250px; overflow: auto; }
.knowledge-query-results article, .knowledge-sync-list article { background: var(--surface); padding: 11px 13px; }
.knowledge-query-results article div, .knowledge-sync-list article div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.knowledge-query-results b, .knowledge-sync-list b { min-width: 0; color: var(--text); font-size: 13px; line-height: 1.35; font-weight: 900; overflow-wrap: anywhere; }
.knowledge-query-results span, .knowledge-sync-list span { flex: 0 0 auto; color: var(--primary); font-size: 12px; font-weight: 900; }
.knowledge-query-results em, .knowledge-sync-list em { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-style: normal; font-weight: 800; }
.knowledge-query-results p, .knowledge-sync-list p, .knowledge-eval-summary p { margin-top: 7px; color: var(--text); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.agent-console-empty.compact { min-height: 116px; }
.knowledge-eval-actions { display: flex; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid rgba(196, 200, 188, .35); }
.knowledge-eval-summary { padding: 12px; display: grid; gap: 10px; }
.knowledge-eval-summary > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.knowledge-eval-summary > div > div { min-height: 64px; background: var(--surface-low); padding: 10px; display: grid; gap: 5px; }
.knowledge-eval-summary span { color: var(--muted); font-size: 12px; font-weight: 900; }
.knowledge-sync-list article.green { box-shadow: inset 3px 0 0 var(--ok); }
.knowledge-sync-list article.warning { box-shadow: inset 3px 0 0 #c48f32; }
.knowledge-sync-list article.red { box-shadow: inset 3px 0 0 var(--danger); }

.excel-shell { border: 1px solid #cfd6e4; overflow: hidden; background: #fff; }
.excel-bar { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; background: #f3f6fb; border-bottom: 1px solid #d8dfeb; color: #475467; font-size: 12px; font-weight: 600; }
.excel-grid-wrap { max-height: 520px; overflow: auto; background: #fff; }
.excel-grid { border-collapse: separate; border-spacing: 0; table-layout: fixed; min-width: 2900px; width: max-content; }
.excel-grid th, .excel-grid td { border: 0; border-right: 1px solid #d9e0ea; border-bottom: 1px solid #d9e0ea; padding: 5px 7px; height: 32px; color: #111827; font-size: 12px; font-weight: 500; line-height: 1.35; background: #fff; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.excel-grid .corner, .excel-grid .col-head, .excel-grid .row-head { position: sticky; background: #edf2f7; color: #475467; text-align: center; z-index: 4; font-weight: 700; }
.excel-grid .corner { left: 0; top: 0; width: 44px; min-width: 44px; z-index: 8; }
.excel-grid .col-head { top: 0; min-width: 120px; width: 120px; }
.excel-grid .row-head { left: 0; width: 44px; min-width: 44px; z-index: 5; }
.excel-grid .title-cell { background: #fff2cc; text-align: center; font-size: 16px; font-weight: 700; }
.excel-grid .note-cell { background: #fff2cc; color: #7c2d12; font-weight: 600; }
.excel-grid .header-cell { background: #d9ead3; color: #1f2937; font-weight: 700; white-space: normal; }
.excel-grid .ai-risk { background: #fee2e2; box-shadow: inset 3px 0 0 var(--danger); }
.excel-grid .ai-missing { background: #fef3c7; box-shadow: inset 3px 0 0 #d97706; }
.excel-grid .ai-issue { background: #ffedd5; box-shadow: inset 3px 0 0 #ea580c; }
.excel-grid .ai-investment { background: #dcfce7; box-shadow: inset 3px 0 0 var(--ok); }
.excel-legend { display: flex; gap: 12px; flex-wrap: wrap; padding: 9px 10px; border-top: 1px solid #d8dfeb; background: #fbfcff; color: #475467; font-size: 12px; }
.legend-dot { width: 10px; height: 10px; display: inline-block; margin-right: 5px; }

.toast { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 130; }
.toast-item { width: min(420px, calc(100vw - 40px)); background: var(--ink); color: #fff; padding: 13px 15px; box-shadow: var(--shadow); font-size: 13px; line-height: 1.55; }
.toast-item b { color: var(--ok-soft); }

.app-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(46, 50, 48, .32);
  backdrop-filter: blur(5px);
}

.app-confirm-dialog {
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(120, 168, 134, .34);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(46, 50, 48, .22);
}


.app-confirm-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(200, 232, 208, .38);
  color: var(--primary);
}

.app-confirm-icon .material-symbols-outlined { font-size: 28px; }
.app-confirm-content { min-width: 0; }

.app-confirm-content h3 {
  color: var(--text);
  font-size: 21px;
  line-height: 1.3;
  font-weight: 900;
}

.app-confirm-content p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.app-prompt-input {
  margin-top: 14px;
  width: 100%;
}

.invoice-confirm-dialog { width: min(640px, 100%); }
.invoice-confirm-evidence { display: grid; gap: 8px; margin-top: 14px; padding: 11px 12px; border: 1px solid rgba(204, 133, 42, .28); border-radius: 12px; background: rgba(255, 247, 230, .82); color: var(--text); font-size: 12px; line-height: 1.5; }
.invoice-confirm-evidence > div { display: grid; gap: 3px; }
.invoice-confirm-evidence-label { color: var(--muted); font-weight: 900; }
.invoice-confirm-candidates { display: grid; gap: 5px; }
.invoice-confirm-candidate-list { display: flex; flex-wrap: wrap; gap: 6px; }
.invoice-confirm-candidate { border: 1px solid rgba(204, 133, 42, .42); border-radius: 8px; padding: 5px 8px; background: #fff; color: #8a5514; font: inherit; font-weight: 800; cursor: pointer; }
.invoice-confirm-candidate:hover { border-color: #c78325; background: #fff4db; }
.invoice-confirm-candidate:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.invoice-confirm-no-candidate { color: var(--muted); }
.move-target-dialog { width: min(600px, 100%); }
.move-target-select { width: 100%; min-height: 42px; margin-top: 14px; border-radius: 12px; font-weight: 800; }
.invoice-confirm-modes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.invoice-confirm-modes label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); font-size: 13px; font-weight: 800; cursor: pointer; }
.invoice-confirm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.invoice-confirm-field { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
.invoice-confirm-field .input { width: 100%; min-height: 40px; }
.invoice-confirm-effective { margin-top: 12px; }
.invoice-confirm-hint { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }

.app-confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
}

.app-confirm-actions .btn {
  min-height: 42px;
  border-radius: 14px;
  padding-inline: 20px;
}

.archive-tag-picker-dialog { width: min(560px, 100%); }
.archive-tag-picker-dialog .archive-tag-picker-hint { margin-top: 5px; color: var(--muted); font-size: 13px; }
.archive-tag-picker-content { display: grid; gap: 16px; margin-top: 14px; }
.archive-tag-picker-group { display: grid; gap: 7px; }
.archive-tag-picker-group-name { color: var(--muted); font-size: 13px; font-weight: 900; letter-spacing: .02em; }
.archive-tag-picker-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.archive-tag-picker-chip {
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid rgba(74, 124, 89, .32);
  border-radius: 999px;
  background: rgba(200, 232, 208, .18);
  color: var(--primary);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.archive-tag-picker-chip:hover { border-color: var(--primary); background: var(--primary-soft); }
.archive-tag-picker-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.project-profile-dialog { width: min(820px, 100%); max-height: calc(100dvh - 48px); overflow: auto; }
.project-profile-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.project-profile-field { min-width: 0; display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 800; }
.project-profile-field.wide { grid-column: 1 / -1; }
.project-profile-field .input { min-height: 42px; border: 1px solid rgba(196, 200, 188, .8); border-radius: 11px; background: var(--surface); }

.upload-project-picker { max-width: 760px; width: min(760px, 92vw); }
.upload-project-search { margin: 10px 0 8px; width: 100%; }
.upload-project-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.upload-project-recent-label { display: inline-flex; align-items: center; gap: 3px; color: var(--muted, #8a877e); font-size: 12px; font-weight: 800; }
.upload-project-recent-label .material-symbols-outlined { font-size: 15px; }
.upload-project-recent-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid rgba(74, 124, 89, .3); border-radius: 999px; background: rgba(200, 232, 208, .22); color: var(--primary, #2f5d3f); font-size: 12px; font-weight: 800; padding: 5px 12px; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.upload-project-recent-chip:hover { background: rgba(200, 232, 208, .45); border-color: rgba(74, 124, 89, .55); }
.direct-report-recent .upload-project-recent { margin-top: 0; }
.direct-report-project-shortcuts .upload-project-recent-chip { flex: 1 1 calc(50% - 6px); text-align: left; }
.upload-project-list {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--line, #e3e0d8);
  border-radius: 12px;
  padding: 8px;
}
.upload-project-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  padding: 10px 12px;
  font: inherit;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.upload-project-option[hidden] { display: none; }
.upload-project-option:hover { background: rgba(47, 93, 63, .08); border-color: rgba(47, 93, 63, .25); }
.upload-project-option .material-symbols-outlined { font-size: 18px; opacity: .5; }
.upload-project-empty { padding: 16px; text-align: center; color: var(--muted, #8a877e); }
.new-project-modal.project-picker-shell.direct-report-choice-modal { height: auto; min-height: 0; }
.project-picker-body.report-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px 24px 28px;
}
.report-choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  border: 1px solid var(--line, #e3e0d8);
  border-radius: 14px;
  background: transparent;
  padding: 28px 20px;
  font: inherit;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.report-choice-card:hover, .report-choice-card.drag-over {
  background: rgba(200, 232, 208, .28);
  border-color: rgba(74, 124, 89, .35);
  box-shadow: 0 4px 14px rgba(47, 93, 63, .08);
}
.report-choice-card.drag-over { border-style: dashed; }
.report-choice-card .material-symbols-outlined { font-size: 34px; opacity: .65; color: var(--primary, #2f5d3f); }
.report-choice-card b { font-size: 16px; }
.report-choice-card small { color: var(--muted, #8a877e); line-height: 1.5; }
@media (max-width: 640px) { .project-picker-body.report-choice-grid { grid-template-columns: 1fr; } }
.project-settings-children {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 2px 0 0;
}
.project-settings-children.is-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.project-settings-children em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}
.project-settings-child-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}
.project-settings-child-chips span {
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid rgba(196, 200, 188, .7);
  border-radius: 999px;
  background: rgba(245, 241, 234, .95);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-settings-child-chips .is-more {
  color: var(--primary);
  background: rgba(200, 232, 208, .28);
  border-color: rgba(74, 124, 89, .28);
}
.unmatched-import-dialog { max-width: min(560px, 92vw); }
.unmatched-import-list {
  max-height: 300px;
  overflow: auto;
  margin-top: 10px;
  border: 1px solid var(--line, #e3e0d8);
  border-radius: 10px;
  text-align: left;
}
.unmatched-import-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line, #e3e0d8);
  cursor: pointer;
}
.unmatched-import-item:last-child { border-bottom: 0; }
.unmatched-import-item:hover { background: rgba(200, 232, 208, .2); }
.unmatched-import-item input { margin-top: 3px; }
.unmatched-import-item small { display: block; color: var(--muted, #8a877e); }

.investment-import-dialog { width: min(720px, 100%); }
.investment-import-body { grid-column: 2; display: grid; gap: 14px; max-height: min(52vh, 420px); overflow: auto; padding-right: 4px; }
.investment-import-tabs { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; top: 0; z-index: 1; background: #fff; padding-bottom: 4px; }
.investment-import-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid rgba(196, 200, 188, .6); border-radius: 999px; background: var(--surface-low); color: var(--text); font-size: 13px; font-weight: 700; cursor: pointer; }
.investment-import-tab em { font-style: normal; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: rgba(196, 200, 188, .4); color: var(--muted, #8a877e); font-size: 12px; text-align: center; }
.investment-import-tab:disabled { opacity: .45; cursor: default; }
.investment-import-tab.active { border-color: var(--primary); background: rgba(200, 232, 208, .4); color: var(--primary); }
.investment-import-tab.active em { background: var(--primary); color: #fff; }
.investment-import-tab.tone-warn:not(:disabled) em { background: rgba(220, 150, 90, .18); color: #b0682e; }
.investment-import-tab.tone-warn.active { border-color: #c58a4a; background: rgba(240, 214, 182, .34); color: #a05e24; }
.investment-import-tab.tone-warn.active em { background: #c58a4a; color: #fff; }
.investment-import-group { display: none; }
.investment-import-group.active { display: block; }
.investment-import-hint { font-size: 12px; color: var(--muted, #8a877e); line-height: 1.5; }
.investment-import-group ul { margin-top: 6px; display: grid; gap: 4px; }
.investment-import-group li { display: grid; gap: 2px; padding: 7px 10px; border: 1px solid rgba(196, 200, 188, .5); border-radius: 10px; background: var(--surface-low); }
.investment-import-group li b { font-size: 13px; font-weight: 700; color: var(--text); }
.investment-import-group li span { font-size: 12px; color: var(--muted, #8a877e); }
.investment-import-empty { padding: 14px; text-align: center; color: var(--muted, #8a877e); font-size: 13px; }
.identity-binding-dialog { width: min(860px, 100%); }
.identity-binding-list { display: grid; gap: 10px; }
.identity-binding-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .9fr); gap: 14px; align-items: center; padding: 12px; border: 1px solid rgba(196, 200, 188, .6); border-radius: 12px; background: var(--surface-low); }
.identity-binding-source { display: grid; gap: 4px; min-width: 0; }
.identity-binding-source b { color: var(--text); font-size: 14px; }
.identity-binding-source span, .identity-binding-source p { color: var(--muted, #8a877e); font-size: 12px; line-height: 1.5; }
.identity-binding-row select { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid rgba(196, 200, 188, .85); border-radius: 9px; background: #fff; color: var(--text); }
.identity-coverage-warning { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid rgba(197, 138, 74, .65); border-radius: 12px; background: rgba(240, 214, 182, .3); color: #8a5422; font-size: 12px; line-height: 1.5; }
.identity-coverage-warning input { margin-top: 3px; }
.identity-coverage-warning span { display: grid; gap: 2px; }
.identity-auto-matches { padding: 9px 12px; border: 1px solid rgba(196, 200, 188, .6); border-radius: 10px; background: #fff; }
.identity-auto-matches summary { cursor: pointer; color: var(--primary); font-size: 13px; font-weight: 700; }
.identity-auto-matches ul { display: grid; gap: 5px; margin-top: 8px; }
.identity-auto-matches li { display: grid; gap: 2px; padding: 6px 8px; border-radius: 8px; background: var(--surface-low); }
.identity-auto-matches li b { font-size: 12px; }
.identity-auto-matches li span { color: var(--muted, #8a877e); font-size: 11px; }
@media (max-width: 720px) { .identity-binding-row { grid-template-columns: 1fr; } }

.app-confirm-dialog.project-picker-shell, .new-project-modal.project-picker-shell {
  width: min(760px, 92vw);
  max-width: none;
  height: min(680px, calc(100dvh - 48px));
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(196, 200, 188, .68);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 28px 76px rgba(46, 50, 48, .24);
  overflow: hidden;
}
.project-picker-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); background: rgba(255, 252, 246, .92); }
.project-picker-title { min-width: 0; display: flex; align-items: flex-start; gap: 14px; }
.project-picker-icon { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; background: rgba(200, 232, 208, .4); color: var(--primary); }
.project-picker-icon .material-symbols-outlined { font-size: 26px; }
.project-picker-title > div:last-child { min-width: 0; }
.project-picker-title h3 { color: var(--text); font-size: 21px; line-height: 1.3; font-weight: 900; }
.project-picker-title p { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.project-picker-body { min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px 24px; background: #fff; }
.project-picker-recent { display: grid; gap: 8px; }
.project-picker-label { color: var(--text); font-size: 12px; line-height: 1.4; font-weight: 900; }
.project-picker-recent .upload-project-recent { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 0; }
.project-picker-recent .upload-project-recent-chip { width: 100%; min-width: 0; padding-inline: 10px; }
.project-picker-field { display: grid; gap: 8px; }
.project-picker-search { position: relative; display: block; }
.project-picker-search > .material-symbols-outlined { position: absolute; z-index: 1; left: 13px; top: 50%; color: var(--muted); font-size: 20px; transform: translateY(-50%); pointer-events: none; }
.project-picker-search .upload-project-search { width: 100%; min-height: 44px; margin: 0; border-radius: 12px; padding-left: 42px; background: #fff; }
.project-picker-shell .upload-project-list { min-height: 0; max-height: none; flex: 1 1 auto; gap: 0; border-radius: 12px; padding: 0; }
.project-picker-shell .upload-project-option { min-height: 46px; border-radius: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; }
.project-picker-shell .upload-project-option:last-child { border-bottom: 0; }
.project-picker-shell .upload-project-option:hover, .project-picker-shell .upload-project-option.selected { border-color: rgba(74, 124, 89, .2); background: rgba(200, 232, 208, .28); color: var(--primary); }
.project-picker-shell .upload-project-recent-chip.selected { border-color: rgba(74, 124, 89, .62); background: rgba(200, 232, 208, .55); }
.project-picker-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 20px; border-top: 1px solid var(--line); background: rgba(255, 252, 246, .9); }
.project-picker-actions .btn { min-height: 42px; border-radius: 13px; padding-inline: 20px; }
.project-picker-actions .btn:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 1180px) {
  .login { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .archive-grid, .submission-layout, .history-layout, .answer-grid { grid-template-columns: 1fr; }
  .history-confirm-grid { grid-template-columns: 1fr; }
  .project-detail-page { padding-right: 0; }
  .project-detail-hero, .detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; width: auto; max-height: none; overflow: visible; }
  .detail-side-actions { justify-content: flex-start; }
  .detail-navlayout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .detail-nav, .detail-nav-body { min-width: 0; max-width: 100%; }
  .detail-nav-list { max-width: 100%; }
  .detail-nav { position: static; }
  .detail-nav-list { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  .detail-nav-body [data-detail-target="finance"], .detail-nav-body [data-detail-target="finance"] .side-facts { grid-template-columns: 1fr; }
  .detail-hero-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-stage-grid { grid-template-columns: 1fr; }
  .file-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weekly-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weekly-form-grid .field:nth-child(5), .weekly-form-grid .field:nth-child(6), .weekly-form-grid .field:nth-child(7) { grid-column: span 1; }
  .drawer { position: static; }
  .question-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-toolbar { grid-template-columns: 1fr; }
  .archive-filter-row { grid-template-columns: 1fr; }
  .archive-search { margin-left: 0; max-width: none; }
  .archive-report-row { justify-self: start; }
  .task-workbench { grid-template-columns: 1fr; }
  .task-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .submission-batch-panel { grid-template-columns: 1fr; }
  .batch-actions { flex-direction: row; justify-content: flex-start; flex-wrap: wrap; }
  .processing-task, .error-task { grid-column: span 1; }
  .submitted-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .submission-history-item { grid-template-columns: 1fr; align-items: stretch; }
  .submission-history-actions { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .page { padding: 14px; }
  .project-profile-grid { grid-template-columns: 1fr; }
  .project-profile-field.wide { grid-column: auto; }
  .topnav { height: auto; display: flex; padding: 12px; align-items: flex-start; flex-direction: column; gap: 12px; }
  .wordmark { justify-self: start; order: -1; }
  .top-left { flex-direction: column; align-items: flex-start; gap: 12px; }
  .top-tabs { min-height: auto; flex-wrap: wrap; gap: 12px; }
  .top-tabs button { min-height: 32px; }
  .app-grid, .metric-grid, .todo-grid, .form-grid, .question-grid { grid-template-columns: 1fr; }
  .history-confirm-fields { grid-template-columns: 1fr; }
  .detail-kpi-grid, .detail-facts, .detail-hero-meta, .detail-brief-grid, .detail-stage-grid, .detail-stage-status, .detail-field-groups, .file-category-grid { grid-template-columns: 1fr; }
  .project-detail-hero { padding: 16px; }
  .project-detail-hero h1 { font-size: 26px; }
  .detail-source-pill { max-width: 100%; }
  .detail-relation-summary { grid-template-columns: 1fr; }
  .detail-relation-links .detail-item { grid-template-columns: 1fr; gap: 4px; }
  .detail-relation-links .detail-item b { white-space: normal; }
  .detail-mini-meta { min-height: 58px; }
  .detail-stage-head { align-items: flex-start; flex-direction: column; }
  .project-relation-form { grid-template-columns: 1fr; }
  .project-relation-form:has(#relation-root-field:not(.hidden)), .project-relation-form:has(#relation-parent-field:not(.hidden)) { grid-template-columns: 1fr; }
  .project-relation-actions { width: 100%; justify-content: stretch; flex-wrap: wrap; }
  .project-relation-actions .btn { flex: 1 1 140px; }
  .project-settings-backdrop { padding: 8px; }
  .project-settings-modal { max-height: calc(100dvh - 16px); border-radius: 18px; }
  .project-settings-head { padding: 16px; }
  .project-settings-head h3 { font-size: 19px; }
  .project-settings-toolbar { align-items: stretch; flex-direction: column; padding: 11px 12px; }
  .project-settings-toolbar-actions { align-items: stretch; flex-direction: column; }
  .project-settings-profile-filter { justify-content: space-between; }
  .project-settings-profile-filter .select { flex: 1; min-width: 0; }
  .project-settings-footer { align-items: stretch; flex-direction: column; padding: 12px; }
  .project-settings-footer > div { width: 100%; }
  .project-settings-footer .btn { flex: 1; }
  .project-settings-card { grid-template-columns: 44px minmax(0, 1fr) 36px; }
  .project-settings-material-profile { grid-column: 1 / -1; }
  .project-settings-card-meta { grid-template-columns: 1fr; }
  .project-settings-profile-q { grid-template-columns: minmax(0, 1fr) 92px auto; gap: 6px; }
  .project-settings-profile-opts { width: 100%; }
  .detail-stage-timeline { grid-template-columns: 1fr; gap: 12px; padding: 14px 16px; }
  .detail-stage-timeline::before { left: 33px; right: auto; top: 30px; bottom: 30px; width: 2px; height: auto; background: rgba(74, 124, 89, .24); }
  .detail-stage-step { min-height: 44px; grid-template-columns: 34px minmax(0, 1fr); justify-items: stretch; align-items: center; align-content: center; gap: 12px; text-align: left; }
  .detail-stage-node { box-shadow: 0 0 0 6px rgba(245, 241, 234, .92); }
  .detail-stage-copy b { font-size: 13px; }
  .detail-stage-line { min-height: auto; }
  .detail-stage-line::before { left: 31px; top: 49px; }
  .detail-stage-line-head { padding: 13px 14px 8px; }
  .detail-stage-items { padding: 4px 14px 14px 46px; }
  .detail-stage-item { grid-template-columns: 1fr; gap: 2px; }
  .detail-stage-item::before { left: -19px; top: 12px; }
  .detail-narrative { min-height: auto; }
  .detail-field-groups { padding: 12px; gap: 12px; }
  .detail-content-note { margin: 0 12px 12px; }
  .detail-fact, .side-facts .detail-fact { grid-template-columns: 1fr; gap: 5px; }
  .detail-record span { white-space: normal; }
  .weekly-form-grid { grid-template-columns: 1fr; }
  .app-card, .metric { border-right: 0; border-bottom: 1px solid var(--line); }
  .year-tabs, .segmented { width: 100%; }
  .hero { flex-direction: column; align-items: stretch; }
  .archive-filter-row { grid-template-columns: 1fr; }
  .archive-search-input-row { flex-direction: column; }
  .archive-search .input { flex-basis: auto; width: 100%; max-width: none; }
  .archive-report-row { flex-wrap: wrap; }
  .archive-report-type-backdrop { padding: 12px; }
  .archive-report-type-dialog { padding: 16px; border-radius: 18px; }
  .archive-report-type-grid { grid-template-columns: 1fr; }
  .home-hero h1 { font-size: 32px; }
  .hero h1 { font-size: 26px; }
  .app-confirm-dialog.project-picker-shell, .new-project-modal.project-picker-shell { width: calc(100vw - 24px); height: calc(100dvh - 24px); border-radius: 16px; }
  .project-picker-head { padding: 18px 16px 14px; }
  .project-picker-body { padding: 14px 16px; }
  .project-picker-actions { padding: 14px 16px 16px; }
  .project-picker-title p { font-size: 12px; }
  .project-picker-recent .upload-project-recent { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .submission-card-head { align-items: flex-start; flex-direction: column; }
  .submission-entry-heading p { margin-left: 0; }
  .submission-entry-grid { grid-template-columns: 1fr; }
  .submission-entry-card { min-height: 280px; }
  .submission-entry-footer { gap: 12px; }
  .submission-entry-aux { align-items: flex-start; flex-direction: column; }
  .task-list { grid-template-columns: 1fr; }
  .task-workbench .task-list { grid-template-columns: 1fr; }
  .batch-metrics { grid-template-columns: 1fr; }
  .batch-actions .btn { width: 100%; }
  .processing-task, .error-task, .submission-result-card { grid-column: span 1; }
  .duplicate-notice { grid-template-columns: 38px minmax(0, 1fr); align-items: start; }
  .duplicate-actions { grid-column: 1 / -1; justify-content: stretch; flex-wrap: wrap; }
  .duplicate-actions .btn { flex: 1 1 140px; }
  .submitted-summary-grid { grid-template-columns: 1fr; }
  .submitted-summary-foot { align-items: flex-start; flex-direction: column; }
  .submitted-summary-foot > div { width: 100%; flex-wrap: wrap; }
  .submission-card-footer { align-items: stretch; flex-direction: column; }
  .submission-upload-footer-actions { align-items: stretch; flex-direction: column; }
  .upload-secondary-actions { width: 100%; }
  .upload-option-button { flex: 1 1 160px; }
  .submission-task-entry-card { align-items: stretch; flex-direction: column; }
  .submission-task-entry-card .btn { width: 100%; }
  .submission-task-view-tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
  .submission-task-view-tabs::-webkit-scrollbar { width: 0; height: 0; }
  .submission-task-view-tabs button { flex: 0 0 min(220px, 78vw); }
  .submission-batch-heading { align-items: stretch; flex-direction: column; gap: 10px; }
  .submission-batch-heading > div:first-child { align-items: flex-start; flex-wrap: wrap; width: 100%; }
  .submission-batch-heading b { white-space: normal; overflow-wrap: anywhere; }
  .submission-batch-heading-actions { align-items: stretch; justify-content: flex-start; flex-wrap: wrap; width: 100%; }
  .submission-batch-heading-actions .btn { flex: 1 1 160px; }
  .submission-other-tasks-bar { align-items: stretch; flex-direction: column; }
  .submission-other-tasks-bar .btn { width: 100%; }
  .submission-modal-backdrop { padding: 12px; }
  .submission-modal-panel { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); border-radius: 16px; }
  .submission-task-modal { width: calc(100vw - 24px); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); border-radius: 16px; }
  .submission-modal-head { padding: 16px; }
  .submission-task-modal-head { align-items: flex-start; flex-wrap: wrap; }
  .submission-task-total-badge { min-width: 28px; height: 28px; font-size: 14px; }
  .submission-task-modal-head > .submission-task-modal-actions { margin-left: auto; }
  .submission-task-modal-actions .close-all-tasks-btn { min-height: 36px; padding-inline: 12px; }
  .submission-modal-body { padding: 16px; }
  .submission-task-modal .submission-modal-body { padding: 12px; }
  .submission-task-modal .wizard-actions,
  .submission-task-modal .wizard-main-panel .wizard-actions,
  .submission-task-modal .site-photo-actions { right: 18px; top: 18px; }
  .submission-history-actions { flex-direction: column; align-items: stretch; }
  .submission-history-actions .btn { width: 100%; }
  .agent-process-head, .agent-process-foot { align-items: flex-start; flex-direction: column; }
  .file-browser-overlay { padding: 12px; }
  .file-browser-panel { width: calc(100vw - 24px); height: calc(100vh - 24px); border-radius: 14px; }
  .file-browser-head { padding: 16px; }
  .file-browser-head h3 { font-size: 18px; }
  .file-explorer-toolbar { grid-template-columns: auto minmax(0, 1fr); align-items: start; padding: 10px; }
  .file-explorer-summary { grid-column: 1 / -1; justify-items: start; min-width: 0; }
  .file-explorer-search { grid-column: 1 / -1; }
  .file-explorer-search input { width: 100%; flex: 1 1 auto; }
  .file-explorer-actionbar { grid-template-columns: 1fr; align-items: stretch; gap: 8px; padding: 10px; }
  .file-transfer-actions, .file-bulk-actions { align-items: stretch; }
  .file-transfer-actions .file-action-btn, .file-bulk-actions .file-action-btn { flex: 1 1 110px; }
  .file-move-select { flex: 1 1 180px; width: auto; min-width: 0; }
  .file-upload-target { max-width: none; white-space: normal; }
  .file-explorer.has-preview .file-explorer-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr); }
  .file-preview-full { border-top: 1px solid var(--line); }
  .file-explorer-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px 8px; padding: 14px; }
  .file-explorer-item { min-height: 128px; height: auto; grid-template-rows: 56px 20px 16px; gap: 4px; padding: 12px 6px 14px; }
  .file-explorer-item.file { min-height: 148px; grid-template-rows: 56px 38px 16px; }
  .file-explorer-item.file .file-explorer-name { -webkit-line-clamp: 2; }
  .file-explorer-icon { width: 56px; height: 56px; }
  .file-explorer-icon .material-symbols-outlined { font-size: 48px; }
  .file-explorer-item.file .file-explorer-icon .material-symbols-outlined { font-size: 44px; }
  .file-explorer-icon.file-icon em { bottom: 9px; }
  .file-explorer-listview .file-explorer-item.file { grid-template-columns: 34px minmax(0, 1fr); }
  .file-explorer-listview .file-explorer-item.file .file-explorer-meta { display: none; }
  .file-explorer-listview .file-explorer-item-wrap .file-explorer-item.file { padding-right: 48px; }
  .file-explorer-listview .file-explorer-select { right: 10px; }
  .file-invoice-detail-line { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 4px; }
  .ask-minimal { min-height: calc(100vh - 150px); gap: 22px; padding-bottom: 3vh; }
  .ask-title h1 { font-size: 30px; }
  .ask-only-input { min-height: 300px; }
  .ask-input-card { padding: 22px 20px; }
  .ask-input-card textarea { min-height: 180px; padding-right: 36px; font-size: 17px; }
  .ask-card-mark { right: 18px; top: 20px; font-size: 42px; }
  .ask-actions { align-items: stretch; flex-direction: column; }
  .ask-soft-actions { justify-content: space-between; gap: 14px; }
  .ask-run-btn { width: 100%; }
  .app-loading-shell { min-height: calc(100vh - 96px); padding: 20px 0; }
  .app-loading-card { grid-template-columns: 1fr; justify-items: start; padding: 22px; }
  .app-loading-copy h1 { font-size: 24px; }
}

.archive-dashboard-page {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
  padding: 0;
  overflow: auto;
}
.archive-dashboard-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body:has(.archive-dashboard-page) #page-root.page {
  max-width: none;
  width: 100%;
  height: calc(100vh - 72px);
  box-sizing: border-box;
  padding: 14px 22px 16px;
  overflow: hidden;
}
.archive-dashboard-scope-nav {
  position: sticky;
  top: 8px;
  align-self: start;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 8px 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.archive-dashboard-scope-heading {
  display: grid;
  justify-items: center;
  gap: 0;
  padding: 0;
  margin: 0;
  border-bottom: 0;
}
.archive-dashboard-scope-heading strong {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}
.archive-dashboard-scope-heading span { display: none; }
.archive-dashboard-scope-list {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 100%;
}
.archive-dashboard-scope-tab {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 4px 2px 2px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}
.archive-dashboard-scope-tab::before { display: none; }
.archive-dashboard-scope-tab:hover,
.archive-dashboard-scope-tab:focus-visible { background: rgba(74, 124, 89, .06); color: var(--text); outline: none; }
.archive-dashboard-scope-tab.is-active { background: transparent; color: var(--primary); box-shadow: none; }
.archive-dashboard-scope-tab:focus-visible { outline: 3px solid rgba(47, 93, 63, .64); outline-offset: 2px; }
.archive-dashboard-scope-tab.is-active:focus-visible { outline-color: rgba(47, 93, 63, .64); }
.archive-dashboard-scope-icon {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(74, 124, 89, .1);
  color: var(--primary);
}
.archive-dashboard-scope-icon .material-symbols-outlined { font-size: 20px; }
.archive-dashboard-scope-tab.is-active .archive-dashboard-scope-icon {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 16px rgba(74, 124, 89, .22);
}
.archive-dashboard-scope-copy { min-width: 0; display: grid; justify-items: center; gap: 1px; }
.archive-dashboard-scope-copy strong,
.archive-dashboard-scope-copy em {
  color: inherit;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 800;
  font-style: normal;
  text-align: center;
}
.archive-dashboard-scope-icon > b {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  border: 1px solid rgba(74, 124, 89, .18);
  font-size: 9px;
  line-height: 16px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 2px 6px rgba(46, 50, 48, .08);
}
.archive-dashboard-scope-tab.is-active .archive-dashboard-scope-icon > b {
  background: #fff;
  color: var(--primary);
  border-color: transparent;
}
.archive-dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  margin-bottom: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(196, 200, 188, .48);
  border-radius: 10px;
  background: rgba(245, 241, 234, .72);
  box-shadow: 0 5px 14px rgba(46, 50, 48, .04);
}
.archive-dashboard-head h1 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 950;
  line-height: 1.15;
}
.archive-dashboard-head-copy { min-width: 0; display: grid; gap: 2px; }
.archive-dashboard-head-copy > span { color: var(--primary); font-size: 10px; line-height: 1.2; font-weight: 900; letter-spacing: .02em; }
.archive-dashboard-head-copy > p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.35; font-weight: 650; }
.archive-dashboard-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.archive-dashboard-sync {
  flex: 0 0 auto;
  min-height: 34px;
  border-radius: 9px;
  padding: 5px 13px;
}
.archive-dashboard-sync .material-symbols-outlined { font-size: 17px; }
.archive-dashboard-enter {
  flex: 0 0 auto;
  min-height: 34px;
  border-radius: 9px;
  padding: 5px 13px;
  box-shadow: 0 6px 15px rgba(72, 133, 94, .16);
}
.archive-dashboard-enter .material-symbols-outlined { font-size: 17px; }
.archive-dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  flex: 0 0 auto;
  gap: 9px;
  margin-bottom: 9px;
}
.archive-dashboard-kpi {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 74px;
  padding: 10px 13px;
  border: 1px solid rgba(74, 124, 89, .2);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 7px 18px rgba(46, 50, 48, .045);
}
.archive-dashboard-kpi-icon {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: rgba(200, 232, 208, .72);
  color: var(--primary);
}
.archive-dashboard-kpi-icon .material-symbols-outlined { font-size: 20px; }
.archive-dashboard-kpi-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.archive-dashboard-kpi-copy b {
  color: var(--primary);
  font-size: 22px;
  font-weight: 950;
  line-height: 1.1;
}
.archive-dashboard-kpi-copy em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}
.archive-dashboard-kpi.is-risk {
  border-color: rgba(184, 50, 48, .22);
  background: rgba(253, 240, 239, .72);
}
.archive-dashboard-kpi.is-risk .archive-dashboard-kpi-icon {
  background: rgba(245, 205, 202, .72);
  color: var(--danger);
}
.archive-dashboard-kpi.is-risk b { color: var(--danger); }
.archive-dashboard-kpi[data-archive-dashboard-risk-open] {
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.archive-dashboard-kpi[data-archive-dashboard-risk-open]:hover,
.archive-dashboard-kpi[data-archive-dashboard-risk-open]:focus-visible {
  border-color: rgba(184, 50, 48, .46);
  box-shadow: 0 9px 22px rgba(184, 50, 48, .12);
  outline: none;
  transform: translateY(-1px);
}
.archive-dashboard-risk-backdrop { z-index: 78; }
.archive-dashboard-risk-modal {
  width: min(1080px, calc(100% - 48px));
  max-height: calc(100dvh - 36px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border: 1px solid rgba(196, 200, 188, .68);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(46, 50, 48, .24);
  overflow: hidden;
}
.archive-dashboard-risk-head { align-items: center; }
.archive-dashboard-risk-head > div { min-width: 0; }
.archive-dashboard-risk-head p { color: var(--muted); font-size: 13px; line-height: 1.5; font-weight: 700; }
.archive-dashboard-risk-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 252, 246, .78);
}
.archive-dashboard-risk-search {
  position: relative;
  display: block;
  flex: 0 1 250px;
  min-width: 190px;
}
.archive-dashboard-risk-search > .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.archive-dashboard-risk-search .material-symbols-outlined {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 18px;
  pointer-events: none;
}
.archive-dashboard-risk-search .input {
  width: 100%;
  min-height: 38px;
  padding-left: 38px;
  border-radius: 999px;
  background: #fff;
}
.archive-dashboard-risk-filters {
  display: flex;
  flex: 1 1 500px;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}
.archive-dashboard-risk-filter {
  min-height: 30px;
  border: 1px solid rgba(74, 124, 89, .2);
  border-radius: 999px;
  padding: 4px 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.archive-dashboard-risk-filter:hover,
.archive-dashboard-risk-filter:focus-visible {
  border-color: rgba(74, 124, 89, .5);
  color: var(--primary);
  outline: none;
}
.archive-dashboard-risk-filter.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.archive-dashboard-risk-table-wrap { min-height: 0; overflow: auto; background: #fff; }
.archive-dashboard-risk-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.archive-dashboard-risk-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-low);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}
.archive-dashboard-risk-table td {
  padding: 14px 10px;
  border-bottom: 1px solid rgba(196, 200, 188, .46);
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  vertical-align: top;
}
.archive-dashboard-risk-table tbody tr:last-child td { border-bottom: 0; }
.archive-dashboard-risk-table tbody tr[data-archive-dashboard-risk-project] { cursor: pointer; }
.archive-dashboard-risk-table tbody tr[data-archive-dashboard-risk-project]:hover,
.archive-dashboard-risk-table tbody tr[data-archive-dashboard-risk-project]:focus-visible { background: rgba(200, 232, 208, .35); outline: none; }
.archive-dashboard-risk-table th:nth-child(1),
.archive-dashboard-risk-table td:nth-child(1) { width: 5%; text-align: center; }
.archive-dashboard-risk-table th:nth-child(2),
.archive-dashboard-risk-table td:nth-child(2) { width: 22%; }
.archive-dashboard-risk-table th:nth-child(3),
.archive-dashboard-risk-table td:nth-child(3) { width: 13%; }
.archive-dashboard-risk-table th:nth-child(4),
.archive-dashboard-risk-table td:nth-child(4) { width: 10%; text-align: center; }
.archive-dashboard-risk-table th:nth-child(5),
.archive-dashboard-risk-table td:nth-child(5) { width: 28%; }
.archive-dashboard-risk-table th:nth-child(6),
.archive-dashboard-risk-table td:nth-child(6) { width: 14%; }
.archive-dashboard-risk-table th:nth-child(7),
.archive-dashboard-risk-table td:nth-child(7) { width: 8%; text-align: center; }
.archive-dashboard-risk-project-name { font-weight: 800; overflow-wrap: anywhere; }
.archive-dashboard-risk-material-count {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.archive-dashboard-risk-material-count.is-danger { background: rgba(184, 50, 48, .14); color: var(--danger); }
.archive-dashboard-risk-material-count.is-warning { background: rgba(224, 165, 75, .18); color: #a56d16; }
.archive-dashboard-risk-material-count.is-caution { background: rgba(246, 211, 101, .24); color: #92701b; }
.archive-dashboard-risk-material-count.is-empty { color: var(--muted); }
.archive-dashboard-risk-materials { color: var(--muted); overflow-wrap: anywhere; }
.archive-dashboard-risk-material-chip {
  display: inline-block;
  margin: 0 4px 4px 0;
  border-radius: 7px;
  padding: 3px 7px;
  background: var(--surface-low);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}
.archive-dashboard-risk-invoice {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.archive-dashboard-risk-overdue { color: var(--danger); font-weight: 900; }
.archive-dashboard-chart-grid,
.archive-dashboard-lower-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
  margin-bottom: 12px;
}
.archive-dashboard-chart-grid {
  flex: 1.15 1 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.archive-dashboard-lower-grid {
  flex: 1 1 0;
  margin-bottom: 0;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
}
.archive-dashboard-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 7px 18px rgba(46, 50, 48, .04);
}
.archive-dashboard-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.archive-dashboard-card-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}
.archive-dashboard-card-unit {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}
.archive-dashboard-card-unit small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  white-space: nowrap;
}
.archive-dashboard-echart {
  width: 100%;
  flex: 1 1 auto;
  min-height: 140px;
  height: auto;
}
.archive-dashboard-empty {
  display: grid;
  min-height: 40px;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
}
.archive-dashboard-progress-list,
.archive-dashboard-project-list {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  gap: 9px;
  overflow: hidden;
}
.archive-dashboard-progress-row {
  display: grid;
  gap: 5px;
}
.archive-dashboard-progress-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.archive-dashboard-progress-meta strong {
  flex: 1 1 auto;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.archive-dashboard-progress-meta span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
}
.archive-dashboard-progress-meta em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}
.archive-dashboard-progress-track {
  position: relative;
  height: 9px;
  border-radius: 999px;
  background: rgba(196, 200, 188, .42);
  overflow: hidden;
}
.archive-dashboard-progress-track i {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: var(--primary);
}
.archive-dashboard-progress-track b {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
}
.archive-dashboard-project-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}
.archive-dashboard-project-table th,
.archive-dashboard-project-table td {
  height: 31px;
  padding: 4px 5px;
  border-bottom: 1px solid rgba(196, 200, 188, .38);
  font-size: 10px;
  line-height: 1.2;
  vertical-align: middle;
}
.archive-dashboard-project-table th {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}
.archive-dashboard-project-table tr:last-child td { border-bottom: 0; }
.archive-dashboard-project-table tbody tr[data-dashboard-open-detail] {
  cursor: pointer;
}
.archive-dashboard-project-table tbody tr[data-dashboard-open-detail]:hover {
  background: rgba(200, 232, 208, .35);
}
.archive-dashboard-project-table th:nth-child(1),
.archive-dashboard-project-table td:nth-child(1) { width: 42px; text-align: center; }
.archive-dashboard-project-table th:nth-child(2),
.archive-dashboard-project-table td:nth-child(2) { width: 28%; }
.archive-dashboard-project-table th:nth-child(3),
.archive-dashboard-project-table td:nth-child(3) { width: 22%; }
.archive-dashboard-project-table th:nth-child(4),
.archive-dashboard-project-table td:nth-child(4) { width: 19%; }
.archive-dashboard-project-table th:nth-child(5),
.archive-dashboard-project-table td:nth-child(5) { width: 25%; }
.archive-dashboard-project-name,
.archive-dashboard-project-unit {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.archive-dashboard-project-name {
  color: var(--text);
  font-weight: 700;
}
.archive-dashboard-project-unit { color: var(--muted); }
.archive-dashboard-project-plan {
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
}
.archive-dashboard-rank {
  display: inline-grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  background: #d7ddd7;
  color: #5f685f;
  font-size: 10px;
  font-weight: 800;
}
.archive-dashboard-rank-1 {
  background: #e0a54b;
  color: #fff;
}
.archive-dashboard-rank-2 {
  background: #aeb7b1;
  color: #fff;
}
.archive-dashboard-rank-3 {
  background: #b77b54;
  color: #fff;
}
.archive-dashboard-mini-progress {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.archive-dashboard-mini-track {
  flex: 1 1 auto;
  height: 6px;
  border-radius: 999px;
  background: rgba(196, 200, 188, .42);
  overflow: hidden;
}
.archive-dashboard-mini-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}
.archive-dashboard-mini-progress > span {
  flex: 0 0 30px;
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

@media (max-width: 1200px) {
  .archive-dashboard-page { grid-template-columns: 80px minmax(0, 1fr); }
  .archive-dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-dashboard-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-dashboard-card { min-height: 220px; }
}
@media (max-width: 820px) {
  body:has(.archive-dashboard-page) { height: auto; overflow: auto; }
  body:has(.archive-dashboard-page) #page-root.page { height: auto; overflow: visible; }
  .archive-dashboard-page { height: auto; min-height: 0; display: block; padding: 14px 0 40px; overflow: visible; }
  .archive-dashboard-main { display: block; }
  .archive-dashboard-scope-nav { position: static; display: block; margin-bottom: 10px; padding: 0; }
  .archive-dashboard-scope-heading { display: none; }
  .archive-dashboard-scope-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .archive-dashboard-scope-tab { min-height: 0; padding: 6px 4px; }
  .archive-dashboard-scope-icon { width: 38px; height: 38px; }
  .archive-dashboard-head { align-items: stretch; flex-direction: column; padding: 16px; }
  .archive-dashboard-head h1 { font-size: 26px; }
  .archive-dashboard-actions { display: grid; width: 100%; grid-template-columns: 1fr; }
  .archive-dashboard-enter, .archive-dashboard-sync { width: 100%; }
  .archive-dashboard-kpis,
  .archive-dashboard-chart-grid,
  .archive-dashboard-lower-grid { grid-template-columns: 1fr; }
  .archive-dashboard-chart-grid,
  .archive-dashboard-lower-grid { flex: none; }
  .archive-dashboard-card { min-height: 0; }
  .archive-dashboard-echart { height: 230px; min-height: 0; flex: 0 0 230px; }
}

@media (max-width: 900px) {
  .archive-dashboard-risk-backdrop { padding: 12px; }
  .archive-dashboard-risk-modal {
    width: 100%;
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
  }
  .archive-dashboard-risk-head { padding: 16px; }
  .archive-dashboard-risk-head h3 { font-size: 19px; }
  .archive-dashboard-risk-toolbar { align-items: stretch; padding: 11px 16px; }
  .archive-dashboard-risk-search { flex: 1 1 100%; min-width: 0; }
  .archive-dashboard-risk-filters { flex-basis: 100%; }
  .archive-dashboard-risk-table th,
  .archive-dashboard-risk-table td { padding-inline: 7px; font-size: 11px; }
  .archive-dashboard-risk-table th:nth-child(1),
  .archive-dashboard-risk-table td:nth-child(1) { width: 5%; }
  .archive-dashboard-risk-table th:nth-child(2),
  .archive-dashboard-risk-table td:nth-child(2) { width: 18%; }
  .archive-dashboard-risk-table th:nth-child(3),
  .archive-dashboard-risk-table td:nth-child(3) { width: 12%; }
  .archive-dashboard-risk-table th:nth-child(4),
  .archive-dashboard-risk-table td:nth-child(4) { width: 11%; }
  .archive-dashboard-risk-table th:nth-child(5),
  .archive-dashboard-risk-table td:nth-child(5) { width: 28%; }
  .archive-dashboard-risk-table th:nth-child(6),
  .archive-dashboard-risk-table td:nth-child(6) { width: 18%; }
  .archive-dashboard-risk-table th:nth-child(7),
  .archive-dashboard-risk-table td:nth-child(7) { width: 8%; }
  .archive-dashboard-risk-material-chip { padding-inline: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .app-card.is-loading::after,
  .app-card.is-loading .card-icon,
  .app-loading-shell,
  .app-loading-card::before,
  .app-loading-icon,
  .app-loading-steps i::after,
  .page-view-enter,
  .ask-bubble.ask-anim,
  .ask-flow-item.is-running .ask-flow-state::before,
  .ask-flow-item.is-running .ask-flow-row::after,
  .ask-flow-roll-in,
  .ask-bubble-loading .spin {
    animation: none;
  }
  .ask-flow-roll-in { transform: none; }
  .ask-flow-chevron { transition: none; }
  .archive-dashboard-scope-tab,
  .archive-dashboard-scope-tab::before { transition: none; }
  .archive-table-view-select-shell { transition: none; }
}

/* 工作节点计划时间表 */
.plan-timeline-panel .plan-timeline-head { flex-wrap: wrap; }
.plan-timeline-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plan-timeline-actions .btn { text-decoration: none; }
.plan-timeline-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-low); font-size: 12px; color: var(--muted); }
.plan-timeline-legend span { display: inline-flex; align-items: center; gap: 6px; }
.plan-timeline-legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.plan-timeline-legend .dot.red { background: var(--danger); }
.plan-timeline-legend .dot.orange { background: #d2691e; }
.plan-timeline-legend .dot.yellow { background: #c79100; }
.plan-timeline-legend .dot.green { background: var(--ok); }
.plan-timeline-body { padding: 6px 16px 14px; }
.plan-timeline-empty { color: var(--muted); font-size: 13px; line-height: 1.7; padding: 12px 0; }
.plan-node-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.plan-node-row:last-child { border-bottom: none; }
.plan-node-rail { display: flex; flex-direction: column; align-items: center; padding-top: 2px; }
.plan-node-dot { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-mid); color: var(--muted); }
.plan-node-dot i { font-size: 18px; }
.plan-node-row.level-red .plan-node-dot { background: var(--danger-soft); color: #750e13; }
.plan-node-row.level-orange .plan-node-dot { background: #ffe8d4; color: #7a3a00; }
.plan-node-row.level-yellow .plan-node-dot { background: var(--warn-soft); color: #684e00; }
.plan-node-row.level-green .plan-node-dot { background: var(--ok-soft); color: #022d0d; }
.plan-node-row.level-red { background: rgba(184, 50, 48, .05); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.plan-node-body { flex: 1; min-width: 0; }
.plan-node-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.plan-node-titles { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-node-titles b { font-size: 15px; }
.plan-node-stage { font-size: 11px; color: var(--muted); background: var(--surface-low); padding: 2px 7px; border-radius: 4px; }
.plan-node-times { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; align-items: center; }
.plan-time { display: inline-flex; flex-direction: column; line-height: 1.3; }
.plan-time em { font-size: 11px; color: var(--muted); font-style: normal; }
.plan-time b { font-size: 13px; }
.plan-time.now b { color: var(--primary); }
.plan-time.miss b { color: var(--danger); }
.plan-time.done b { color: var(--ok); }
.plan-node-mat { font-size: 12px; color: var(--muted); }
.plan-node-hint { font-size: 12px; font-weight: 600; color: #7a3a00; }
.plan-node-row.level-red .plan-node-hint { color: var(--danger); }
.plan-node-legacy { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.plan-node-seq { font-size: 11px; font-weight: 700; color: var(--primary); background: var(--surface-low); min-width: 20px; text-align: center; padding: 2px 6px; border-radius: 4px; }
.plan-node-remark { margin-top: 4px; font-size: 12px; color: var(--muted); line-height: 1.4; }
.plan-node-group { margin-bottom: 6px; }
.plan-node-group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0 4px; margin-top: 6px; border-bottom: 2px solid var(--line); }
.plan-line-tag { font-size: 13px; font-weight: 700; color: var(--primary); }
.plan-line-count { font-size: 12px; color: var(--muted); }

/* 顶部节点提醒铃铛 + 弹窗 */
.notif { position: relative; display: inline-flex; }
.notif-bell { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.notif-bell:hover { background: var(--surface-mid); }
.notif-bell .material-symbols-outlined { font-size: 22px; }
.notif-bell.has-unread { border-color: var(--danger); color: var(--danger); }
.notif-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.notif-badge.hidden { display: none; }
.notif-popup { position: absolute; top: calc(100% + 10px); right: 0; width: 420px; max-width: calc(100vw - 32px); max-height: 70vh; overflow: hidden; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 48px rgba(36, 46, 38, .22); z-index: 60; animation: notif-pop .14s ease; }
.notif-popup.hidden { display: none; }
@keyframes notif-pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.notif-popup-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.notif-popup-title { font-size: 15px; font-weight: 700; color: var(--text); display: inline-flex; align-items: center; gap: 7px; }
.notif-popup-title i { font-size: 19px; color: var(--primary); }
.notif-mark-all { border: 1px solid var(--line); background: var(--surface-low); color: var(--primary); font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.notif-mark-all:hover:not(:disabled) { background: var(--surface-mid); }
.notif-mark-all:disabled { color: var(--muted); cursor: default; opacity: .6; }
.notif-popup-sub { padding: 9px 16px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.notif-popup-sub b { font-weight: 700; }
.notif-popup-sub b.red { color: var(--danger); }
.notif-popup-sub b.yellow { color: #a07800; }
.notif-popup-list { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.notif-empty { color: var(--muted); font-size: 13px; padding: 22px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.notif-card { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; padding: 11px 12px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 10px; background: var(--surface-low); cursor: pointer; transition: background .15s ease; }
.notif-card:hover { background: var(--surface-mid); }
.notif-card.overdue { border-left-color: var(--danger); }
.notif-card.upcoming { border-left-color: #c79100; }
.notif-card.info { border-left-color: var(--primary); }
.notif-card.info .notif-dot { background: var(--primary); }
.notif-card.info .notif-card-icon { background: var(--primary-soft); color: var(--primary); }
.notif-card.is-read { background: transparent; opacity: .72; }
.notif-card.is-read .notif-card-subject { font-weight: 500; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: var(--danger); }
.notif-card.upcoming .notif-dot { background: #c79100; }
.notif-card.is-read .notif-dot { background: transparent; border: 1px solid var(--line); }
.notif-card-icon { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-card-icon i { font-size: 18px; }
.notif-card.overdue .notif-card-icon { background: var(--danger-soft); color: #750e13; }
.notif-card.upcoming .notif-card-icon { background: var(--warn-soft); color: #684e00; }
.notif-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.notif-card-subject { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.45; }
.notif-card-meta { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.notif-card-meta span { display: inline-flex; align-items: center; gap: 3px; }
.notif-card-meta i { font-size: 14px; }
.notif-card-status { flex-shrink: 0; align-self: flex-start; }

/* 项目列表行内预详情卡 */
.archive-row { cursor: pointer; }
.archive-row:hover td { background: #e8f0ff; }
.archive-weekly-table .archive-row:hover .sticky-sequence, .archive-weekly-table .archive-row:hover .sticky-name { background: #e8f0ff; }
.archive-row.expanded td { background: var(--surface-mid); }
.archive-weekly-table .archive-row.expanded .sticky-sequence, .archive-weekly-table .archive-row.expanded .sticky-name { background: var(--surface-mid); }
.archive-stats-toolbar { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.archive-stats-toggle { min-height: 38px; border-radius: 12px; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.archive-advanced-actions .btn,
.archive-import-investment-btn {
  height: 38px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
}
.archive-advanced-actions .btn .material-symbols-outlined,
.archive-import-investment-btn .material-symbols-outlined { font-size: 17px; line-height: 1; }
.archive-stats-toggle .material-symbols-outlined { font-size: 17px; }
.archive-stats-toggle.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.archive-selection-bar { margin: 0 0 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 1px 2px rgba(36, 46, 38, .05); }
.archive-selection-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.archive-selection-count { font-size: 14px; font-weight: 700; color: var(--text); }
.archive-selection-count b { color: var(--primary); font-size: 16px; margin: 0 2px; }
.archive-selection-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.archive-selection-actions .btn { display: inline-flex; align-items: center; gap: 4px; }
.archive-selection-actions .btn .material-symbols-outlined { font-size: 17px; }
.archive-selection-hint { font-size: 12px; color: var(--muted); }
.archive-selection-metrics { display: flex; flex-wrap: wrap; gap: 10px; }
.archive-selection-metric { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: rgba(74, 124, 89, .08); }
.archive-selection-metric span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archive-selection-metric b { font-size: 18px; font-weight: 900; color: var(--text); }
.archive-selection-bar.is-empty .archive-selection-metric b { color: var(--muted); }
.archive-expand-caret { font-size: 18px; vertical-align: middle; color: var(--muted); margin-right: 4px; transition: transform .15s ease; }
.archive-row.expanded .archive-expand-caret { color: var(--primary); }
.archive-preview-row td { padding: 0; background: var(--surface-low); border-bottom: 2px solid var(--line); }
.archive-preview-card { display: grid; grid-template-columns: 240px 1fr 1.1fr; gap: 18px; padding: 18px 20px; align-items: stretch; }
.archive-preview-card.loading { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; padding: 24px 20px; }
.archive-preview-card.loading i { font-size: 18px; }
.preview-col { min-width: 0; }
.preview-col-title { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 10px; letter-spacing: .02em; }
.preview-col-cover { display: flex; }
.preview-cover-img { width: 100%; height: 168px; object-fit: cover; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.preview-cover-empty { width: 100%; height: 168px; border: 1px dashed var(--line); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); background: var(--surface); }
.preview-cover-empty i { font-size: 32px; }
.preview-cover-wrap { position: relative; width: 100%; cursor: pointer; }
.preview-cover-empty span { font-size: 12px; }
.preview-intro-grid { display: flex; flex-direction: column; gap: 8px; }
.preview-intro-row { display: flex; justify-content: flex-start; gap: 12px; font-size: 13px; border-bottom: 1px dashed var(--line); padding-bottom: 7px; }
.preview-intro-row:last-child { border-bottom: none; }
.preview-intro-row span { color: var(--muted); flex-shrink: 0; min-width: 68px; }
.preview-intro-row b { font-weight: 600; text-align: left; }
.preview-intro-content { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 4px; }
.preview-intro-content-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.preview-intro-content p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text); max-height: 96px; overflow-y: auto; overflow-wrap: anywhere; }
.preview-col-timeline { display: flex; flex-direction: column; }
.preview-timeline-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.preview-timeline-item { display: flex; align-items: flex-start; gap: 9px; }
.preview-timeline-item i { font-size: 18px; flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-mid); color: var(--muted); }
.preview-timeline-item.red i { background: var(--danger-soft); color: #750e13; }
.preview-timeline-item.orange i { background: #ffe8d4; color: #7a3a00; }
.preview-timeline-item.yellow i { background: var(--warn-soft); color: #684e00; }
.preview-timeline-item.green i { background: var(--ok-soft); color: #022d0d; }
.preview-timeline-body { min-width: 0; }
.preview-timeline-body b { font-size: 13px; font-weight: 600; display: block; }
.preview-timeline-body span { font-size: 12px; color: var(--muted); }
.preview-timeline-more { font-size: 12px; color: var(--muted); margin-top: 8px; }
.preview-timeline-empty { font-size: 13px; color: var(--muted); padding: 8px 0; line-height: 1.7; }
.preview-open-detail { margin-top: 14px; align-self: flex-start; text-decoration: none; }
.preview-open-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.preview-open-actions .preview-open-detail, .preview-open-actions .preview-open-folder { margin-top: 14px; }
.preview-open-folder i { font-size: 18px; }
@media (max-width: 900px) {
  .archive-preview-card { grid-template-columns: 1fr; }
  .preview-cover-img, .preview-cover-empty { height: 140px; }
}
.file-explorer-download { right: 80px; color: #3d6b52; border-color: rgba(61, 107, 82, .2); }
.file-explorer-rename { right: 44px; color: #6b6455; border-color: rgba(107, 100, 85, .2); }
.file-explorer-download:hover { background: #eef7f1; }
.file-explorer-rename:hover { background: #f7f4ec; }

/* 详情页：进展与计划 */
.detail-progress-panel { overflow: visible; border: 0; background: transparent; }
.detail-progress-panel > .panel-head,
.detail-progress-panel > .detail-stage-tabs,
.detail-progress-summary-card,
.detail-roadmap-panel { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 8px 22px rgba(46, 50, 48, .045); }
.detail-progress-panel > .panel-head { min-height: 62px; padding: 12px 16px; }
.detail-progress-panel > .detail-stage-tabs { margin-top: 14px; overflow: hidden; }
.detail-progress-panel .detail-stage-timeline { padding: 18px 22px 16px; }
.detail-progress-panel .detail-stage-timeline::before { top: 40px; }
.detail-progress-panel .detail-stage-step { gap: 8px; }
.detail-progress-summary-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.detail-progress-summary-card { min-width: 0; overflow: hidden; }
.detail-progress-summary-head { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.detail-progress-summary-head > span { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-size: 14px; font-weight: 900; }
.detail-progress-summary-head > span i { color: var(--primary); font-size: 19px; }
.detail-progress-stage-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 15px 16px 10px; }
.detail-progress-stage-title b { color: var(--text); font-size: 22px; line-height: 1.1; font-weight: 950; }
.detail-progress-stage-title em { color: var(--primary); font-size: 12px; font-style: normal; font-weight: 900; }
.detail-progress-keyfields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0 16px 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--line); }
.detail-progress-keyfields .detail-stage-cap { grid-column: 1 / -1; min-height: 34px; margin: 0; padding: 7px 11px; background: rgba(200, 232, 208, .28); }
.detail-progress-keyfields .detail-stage-item { min-height: 52px; grid-template-columns: 90px minmax(0, 1fr); align-items: center; gap: 10px; padding: 9px 11px; background: var(--surface); }
.detail-progress-keyfields .detail-stage-item::before { display: none; }
.detail-progress-keyfields .detail-stage-item-filler { padding: 0; }
.detail-progress-keyfields .detail-line-empty { grid-column: 1 / -1; padding: 16px; background: var(--surface); }
.detail-progress-panel > .plan-timeline-legend { margin: 14px 0 0; padding: 10px 16px; border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; background: var(--surface-low); }
.detail-progress-panel .detail-line-stack { margin-top: 0; }
.detail-roadmap-panel { border-radius: 0 0 14px 14px; box-shadow: 0 8px 22px rgba(46, 50, 48, .045); }
.detail-roadmap-panel .detail-stage-line-head { min-height: 62px; padding: 13px 18px 10px; border-bottom: 1px solid var(--line); }
.detail-roadmap-panel .detail-stage-items { gap: 8px; padding: 14px 18px 18px 56px; }
.detail-roadmap-panel.detail-stage-line::before { left: 31px; top: 77px; bottom: 28px; }
.detail-roadmap-panel .detail-stage-cap-node { margin: 0 0 2px -38px; padding: 0 0 6px; }
.detail-roadmap-panel .plan-line-item { grid-template-columns: 42px minmax(0, 1fr); gap: 12px; margin: 0; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.detail-roadmap-panel .plan-line-item::before { left: -31px; top: 18px; width: 12px; height: 12px; }
.detail-roadmap-panel .plan-line-item.is-current { border-color: rgba(74, 124, 89, .4); background: rgba(200, 232, 208, .2); box-shadow: inset 3px 0 0 var(--primary); }
.detail-roadmap-panel .plan-line-item > span { color: var(--primary); font-size: 13px; }
.detail-roadmap-panel .plan-line-top { gap: 7px 10px; }
.detail-roadmap-panel .plan-line-meta { margin-top: 2px; }

/* 详情页：计划节点表 */
.plan-edit-panel { padding: 18px; border-radius: 14px; }
.plan-edit-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.plan-edit-heading { min-width: 0; display: grid; gap: 5px; }
.plan-edit-heading h3 { color: var(--text); font-size: 20px; line-height: 1.2; font-weight: 950; }
.plan-edit-heading p { max-width: 700px; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.4; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.plan-edit-heading > span { color: var(--muted); font-size: 12px; font-weight: 800; }
.plan-edit-actions { flex: 0 0 auto; justify-content: flex-end; }
.plan-edit-actions .btn { min-height: 36px; border-radius: 9px; }
.plan-edit-panel .plan-card-list { max-height: 680px; overflow: auto; scrollbar-width: thin; }
.plan-edit-panel .plan-edit-status { border-radius: 999px; padding: 4px 10px; font-weight: 850; }
.plan-edit-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px 0; color: var(--muted); font-size: 12px; font-weight: 800; }
.plan-edit-footer .plan-edit-foot { margin: 0; }

/* 详情页：AI 提醒 */
.detail-alert-panel { padding: 18px; border-radius: 14px; }
.detail-alert-intro { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.detail-alert-intro > div { display: grid; gap: 4px; }
.detail-alert-intro h3 { color: var(--text); font-size: 20px; line-height: 1.2; font-weight: 950; }
.detail-alert-intro p { color: var(--muted); font-size: 12px; line-height: 1.45; font-weight: 750; }
.detail-alert-intro .detail-section-projname { text-align: center; }
.detail-alert-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 16px; }
.detail-alert-main { min-width: 0; }
.detail-alert-filters { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-low); }
.detail-alert-filters button { min-height: 31px; padding: 5px 16px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 850; cursor: pointer; }
.detail-alert-filters button.active { background: var(--primary); color: #fff; }
.detail-alert-filters button[data-detail-alert-filter="high"].active { background: #b83230; }
.detail-alert-list { display: grid; gap: 12px; margin-top: 12px; }
.detail-alert-card { width: 100%; min-width: 0; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease; }
.detail-alert-card:hover { transform: translateY(-1px); border-color: rgba(74, 124, 89, .38); box-shadow: 0 7px 18px rgba(31, 45, 34, .07); }
.detail-alert-card.lv-high { border-color: rgba(184, 50, 48, .34); }
.detail-alert-card.lv-medium { border-color: rgba(201, 138, 0, .38); }
.detail-alert-card-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; }
.detail-alert-card-icon i { font-size: 24px; }
.detail-alert-card.lv-high .detail-alert-card-icon { background: var(--danger-soft); color: #b83230; }
.detail-alert-card.lv-medium .detail-alert-card-icon { background: var(--warn-soft); color: #a46f00; }
.detail-alert-card.lv-low .detail-alert-card-icon { background: rgba(200, 232, 208, .45); color: var(--primary); }
.detail-alert-card-body { min-width: 0; display: grid; gap: 5px; }
.detail-alert-card-body > b { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 15px; line-height: 1.4; font-weight: 950; }
.detail-alert-card-body > b em { padding: 2px 7px; border-radius: 999px; font-size: 11px; line-height: 1.5; font-style: normal; font-weight: 850; }
.detail-alert-card.lv-high .detail-alert-card-body > b em { background: var(--danger-soft); color: #750e13; }
.detail-alert-card.lv-medium .detail-alert-card-body > b em { background: var(--warn-soft); color: #684e00; }
.detail-alert-card.lv-low .detail-alert-card-body > b em { background: rgba(120, 140, 120, .16); color: #4a5a4a; }
.detail-alert-card-body > span { color: var(--muted); font-size: 12px; line-height: 1.55; font-weight: 750; }
.detail-alert-card-body > strong { display: flex; align-items: flex-start; gap: 6px; color: #4a6b50; font-size: 12px; line-height: 1.5; font-weight: 850; }
.detail-alert-card-body > strong i, .detail-alert-card-body > small i { flex: 0 0 auto; color: var(--primary); font-size: 15px; }
.detail-alert-card-body > small { display: flex; align-items: center; gap: 5px; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.4; font-weight: 750; }
.detail-alert-card-jump { display: inline-flex; align-items: center; gap: 5px; padding: 8px 11px; border: 1px solid rgba(74, 124, 89, .4); border-radius: 9px; color: var(--primary); font-size: 12px; font-weight: 900; white-space: nowrap; }
.detail-alert-card-jump i { font-size: 17px; }

@media (max-width: 1180px) {
  .detail-progress-summary-grid, .detail-alert-layout { grid-template-columns: 1fr; }
  .plan-edit-intro { flex-direction: column; }
  .plan-edit-actions { justify-content: flex-start; }
  .plan-card { grid-template-columns: 44px minmax(0, 1fr); }
  .plan-card-dates, .plan-card .plan-edit-status { grid-column: 2; }
  .plan-card .plan-edit-status { justify-self: start; }
}

@media (max-width: 760px) {
  .detail-progress-summary-grid, .detail-progress-keyfields { grid-template-columns: 1fr; }
  .detail-progress-keyfields .detail-stage-cap { grid-column: auto; }
  .detail-progress-keyfields .detail-stage-item-filler { display: none; }
  .detail-progress-panel .detail-stage-timeline { padding: 14px 16px; }
  .detail-roadmap-panel .detail-stage-items { padding-left: 46px; }
  .plan-edit-panel, .detail-alert-panel { padding: 14px; }
  .plan-edit-footer { align-items: flex-start; flex-direction: column; }
  .detail-alert-intro { grid-template-columns: 1fr auto; }
  .detail-alert-intro .detail-section-projname { grid-column: 1 / -1; padding: 0; text-align: left; }
  .detail-alert-card { grid-template-columns: 40px minmax(0, 1fr); }
  .detail-alert-card-icon { width: 40px; height: 40px; }
  .detail-alert-card-jump { grid-column: 2; justify-self: start; }
}

.history-project-table-modal { width: min(100vw - 28px, 1760px); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); grid-template-rows: auto minmax(0, 1fr) auto; }
.history-project-archive-page { padding: 12px 20px 0; min-height: 0; }
.history-project-archive-page .archive-weekly-table { max-height: 100%; }
.history-project-table-wrap.archive-weekly-table th.history-op-col, .history-project-table-wrap.archive-weekly-table td.history-op-col { position: sticky; right: 0; z-index: 2; width: 128px; min-width: 128px; max-width: 128px; background: var(--surface); box-shadow: -1px 0 0 var(--line); }
.history-project-table-wrap.archive-weekly-table tbody tr:nth-child(even) td.history-op-col { background: var(--surface-low); }
.history-project-table-wrap.archive-weekly-table .archive-row:hover td.history-op-col { background: #e8f0ff; }
.history-project-table-detail-btn { min-height: 34px; padding: 0 10px; white-space: nowrap; }
.history-project-detail-modal { width: min(100vw - 28px, 1280px); max-height: calc(100dvh - 24px); }
.history-project-detail-body { overflow: auto; padding: 18px; }
.history-project-detail-body .detail-navlayout { align-items: flex-start; }
.history-project-detail-panel { margin-top: 16px; }
.history-project-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 12px; }
.history-project-detail-grid .detail-narrative { min-height: auto; padding: 10px 12px; gap: 10px; }
.history-project-detail-grid .detail-narrative p { margin-top: 4px; line-height: 1.6; }
.history-project-detail-grid .detail-narrative p { white-space: pre-wrap; word-break: break-word; }
.history-project-table-input { width: 100%; border: 0; background: transparent; padding: 0; font: inherit; color: inherit; outline: none; }
.history-project-table-input::placeholder { color: var(--muted); }
.history-project-table-input:focus { background: #fff; box-shadow: 0 0 0 2px rgba(74, 124, 89, .35); border-radius: 6px; padding: 2px 6px; }

.statistics-authority-status { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 10px; border: 1px solid #bfd8c5; border-radius: 999px; background: #edf7ef; color: #27623a; font-size: 12px; white-space: nowrap; }
.statistics-authority-status.pending { border-color: #e1d5b5; background: #fff8e8; color: #7a5d16; }
.statistics-authority-status .material-symbols-outlined { font-size: 17px; }
.statistics-authority-panel { padding: 18px; }
.statistics-authority-panel .panel-head h3 { display: inline-flex; align-items: center; gap: 7px; }
.statistics-authority-panel .panel-head h3 .material-symbols-outlined { color: #3f7d51; }
.statistics-authority-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.statistics-authority-meta { margin: 2px 0 14px; color: var(--muted); font-size: 12px; }
.statistics-authority-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.statistics-authority-item { min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-low); }
.statistics-authority-item > span:first-child { display: block; min-height: 32px; margin-bottom: 5px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.statistics-authority-item > b, .statistics-authority-item .detail-stage-editable { max-width: 100%; font-size: 14px; }
.statistics-authority-item.is-manual { border-color: #dfc777; background: #fff9e8; }

/* ===== 手机端适配（仅 ≤760px 小屏生效，不影响桌面端） ===== */
@media (max-width: 760px) {
  /* 登录页 */
  .login-panel { padding: 28px 20px; border-right: 0; }
  .login-panel h1 { font-size: 22px; }
  .brand-row { margin-bottom: 24px; }

  /* 避免 iOS 聚焦输入框时自动放大 */
  .input, .select, textarea { font-size: 16px; }

  /* 顶部导航 */
  .topnav { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 8px 12px; gap: 6px 10px; }
  .wordmark { order: -2; font-size: 18px; }
  .top-actions { order: -1; width: auto; margin-left: auto; flex-wrap: nowrap; gap: 8px; justify-content: flex-end; }
  .top-actions #me { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
  .top-left { order: 1; width: 100%; flex-direction: row; gap: 8px; }
  .avatar { width: 30px; height: 30px; }
  .notif-bell { width: 32px; height: 32px; }
  .top-actions .btn { padding: 6px 10px; }
  .notif-popup { right: auto; left: 0; }

  /* 通用工具条 / 面板 */
  .toolbar { padding: 12px; }
  .panel-head { flex-wrap: wrap; }
  .hero-actions { justify-content: flex-start; }

  /* 项目总表页：小屏改为整页滚动 */
  body:has(.archive-page) { height: auto; overflow: auto; }
  body:has(.archive-page) #page-root.page { height: auto; overflow: visible; }
  .archive-page { height: auto; display: block; }
  .archive-page .archive-weekly-table { height: auto; max-height: calc(100dvh - 200px); }
  .archive-weekly-table { --archive-col-0: 46px; --archive-col-1: 150px; }
  .archive-toolbar { padding: 12px; }
  .archive-hierarchy-view { flex-direction: column; align-items: stretch; gap: 10px; }
  .archive-hierarchy-stats { justify-content: flex-start; }
  .archive-adv-grid { grid-template-columns: 1fr; }
  .archive-adv-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .archive-adv-row .archive-adv-label { grid-column: 1 / -1; }
  .archive-adv-row .select { grid-column: 1 / -1; }
  .archive-adv-actions { flex-direction: column; align-items: stretch; }
  .archive-adv-action-btns { width: 100%; }
  .archive-adv-action-btns .btn.primary { flex: 1; }
  .archive-report-row { width: 100%; flex-direction: column; align-items: stretch; }
  .archive-report-row .archive-weekly-selector .select { width: 100%; }
  .archive-search-input-row .btn { border-left: 0; border-top: 1px solid var(--line); }
  .archive-preview-card { padding: 14px; }

  /* 项目详情页 */
  .project-detail-page { padding: 14px 0 40px; }
  .project-detail-top { gap: 10px; }
  .detail-image-progress { grid-template-columns: 1fr; gap: 12px; padding: 14px; }
  .detail-image-progress.detail-contract-amount-row { grid-template-columns: 1fr; }
  .detail-image-progress.detail-contract-amount-row > b { text-align: left; }
  .hierarchy-amount-breakdown { width: 100%; grid-template-columns: 1fr; }
  .detail-image-progress.detail-contract-amount-row .hierarchy-amount-breakdown { grid-column: auto; }
  .detail-progress-keyfields { grid-template-columns: 1fr; }
  .detail-progress-keyfields .detail-stage-item { grid-template-columns: 90px minmax(0, 1fr); }
  .statistics-authority-grid { grid-template-columns: 1fr; }
  .statistics-authority-badges { justify-content: flex-start; }

  /* 入库向导 / 上传流程 */
  .wizard-main-panel { padding: 18px 14px; }
  .wizard-progress { padding: 0 96px 0 0; }
  .wizard-progress b { font-size: 17px; }
  .project-identity { grid-template-columns: 1fr; }
  .compact-grid { grid-template-columns: 1fr; }
  .confirm-project-step { grid-template-columns: 1fr; }
  .invoice-confirm-grid { grid-template-columns: 1fr; }
  .site-photo-confirm-grid { grid-template-columns: 1fr; }
  .site-photo-preview { border-right: 0; border-bottom: 1px solid var(--line); }
  .site-photo-main-panel { padding: 20px 14px; }
  .submission-task-modal .site-photo-main-panel { padding-top: 76px; }
  .submitted-folder-strip { grid-template-columns: 42px minmax(0, 1fr); }
  .submitted-folder-strip .btn { grid-column: 1 / -1; }
  .agent-process-current { padding: 12px; }
  .wizard-done, .submitted-summary-panel { padding: 16px 14px; }

  /* 管理端 */
  .admin-layout, .agent-console-layout, .agent-console-columns, .knowledge-layout, .knowledge-tools { grid-template-columns: 1fr; }
  .admin-metrics, .agent-console-metrics, .agent-console-meta-grid, .knowledge-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-status-grid, .driver-grid, .admin-task-summary { grid-template-columns: 1fr; }
  .agent-console-sidebar, .knowledge-list, .knowledge-graph-panel { position: static; max-height: none; }
  .agent-console-step-list, .agent-console-side, .knowledge-chunk-list { max-height: none; }
  .admin-table-wrap { max-height: none; }

  /* 领导问数 */
  .ask-has-result { padding: 24px 0 32px; }
  .ask-chat { max-height: none; }

  /* 填报入口 */
  .submission-page { padding: 14px 0 40px; }
  .submission-page-head { align-items: stretch; flex-direction: column; gap: 14px; margin-bottom: 20px; }
  .submission-page-head h1 { font-size: 27px; }
  .submission-head-actions { justify-content: flex-start; }
}

.folder-match-backdrop { z-index: 140; }
.folder-match-dialog { width: min(980px, 100%); min-height: min(620px, calc(100dvh - 48px)); max-height: calc(100dvh - 48px); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: 0; padding: 0; overflow: hidden; }
.folder-match-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.folder-match-head span { color: var(--primary); font-size: 12px; font-weight: 950; letter-spacing: .04em; }
.folder-match-head h3 { color: var(--text); font-size: 22px; line-height: 1.3; font-weight: 950; }
.folder-match-body { min-height: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 0; }
.folder-match-files { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; padding: 16px 8px 16px 20px; border-right: 1px solid var(--line); background: rgba(253, 251, 247, .8); }
.folder-match-files-head { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 10px; margin-bottom: 12px; }
.folder-match-files-head > .material-symbols-outlined { color: var(--primary); font-size: 24px; }
.folder-match-files-head b { display: block; font-size: 15px; font-weight: 900; }
.folder-match-files-head span { color: var(--muted); font-size: 12px; font-weight: 800; }
.folder-match-block { display: grid; gap: 8px; }
.folder-match-block > span { color: var(--muted); font-size: 12px; font-weight: 900; }
.folder-match-file-list { min-height: 0; overflow: auto; display: grid; align-content: start; gap: 8px; padding: 0 10px 4px 0; scrollbar-width: thin; scrollbar-color: rgba(74, 124, 89, .45) transparent; }
.folder-match-file-list::-webkit-scrollbar { width: 8px; }
.folder-match-file-list::-webkit-scrollbar-thumb { background: rgba(74, 124, 89, .38); border-radius: 999px; }
.folder-match-files li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px; border-radius: 12px; background: #fff; border: 1px solid rgba(196, 200, 188, .4); }
.folder-match-files li .material-symbols-outlined { color: var(--primary); font-size: 20px; }
.folder-match-files li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 800; }
.folder-match-tag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-style: normal; font-weight: 900; }
.folder-match-tag.hit { background: #d7e8fb; color: #24527d; }
.folder-match-tag.photo { background: #dcecdc; color: #2f5a38; }
.folder-match-tag.material { background: #f3e0c4; color: #7a4e16; }

/* 领导问数：克制的纵向数据分析报告 */
.ask-analysis-canvas {
  --ask-report-line: rgba(124, 135, 123, .24);
  --ask-report-line-strong: rgba(74, 124, 89, .32);
  --ask-report-paper: rgba(255, 253, 249, .94);
  --ask-report-soft: rgba(239, 246, 239, .74);
  display: grid;
  align-content: start;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  gap: 16px;
}

.ask-report-section {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.ask-report-section:empty {
  display: none;
}

.ask-report-section-title {
  width: 100%;
}

.ask-report-execution {
  gap: 5px;
  padding: 9px 12px;
  border: 1px solid var(--ask-report-line);
  border-radius: 10px;
  background: rgba(250, 249, 245, .72);
}

.ask-report-execution .ask-report-section-title {
  min-height: 20px;
  color: #59645d;
  font-size: 12px;
}

.ask-report-execution .ask-report-section-title::before {
  width: 3px;
  height: 12px;
  background: rgba(74, 124, 89, .68);
}

.ask-report-execution .ask-flow-complete {
  margin: 0;
}

.ask-report-execution .ask-flow-row {
  min-height: 22px;
  padding-inline: 0;
  color: #526058;
  font-size: 12px;
}

/* 旧版 42/58 双栏保留结构兼容，但统一改为单列报告流。 */
.ask-analysis-columns,
.ask-analysis-canvas--single .ask-analysis-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.ask-analysis-main,
.ask-analysis-insights {
  width: 100%;
  min-width: 0;
}

.ask-analysis-main {
  display: grid;
  gap: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ask-analysis-insights {
  display: grid;
  gap: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.ask-scope-strip {
  display: flex;
  align-items: center;
  gap: 8px 18px;
  min-width: 0;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--ask-report-line);
  border-radius: 10px;
  background: rgba(248, 247, 242, .88);
  color: #59645d;
  font-size: 12px;
  line-height: 1.45;
}

.ask-scope-strip > * {
  min-width: 0;
}

.ask-scope-strip b,
.ask-scope-strip strong {
  color: #34443a;
  font-weight: 850;
}

.ask-scope-strip span,
.ask-scope-strip em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-style: normal;
}

.ask-scope-strip span + span,
.ask-scope-strip em + em {
  position: relative;
  padding-left: 18px;
}

.ask-scope-strip span + span::before,
.ask-scope-strip em + em::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(74, 124, 89, .54);
  transform: translateY(-50%);
}

.ask-scope-strip .material-symbols-outlined {
  color: var(--primary);
  font-size: 16px;
}

.ask-conclusion-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: clamp(20px, 2.4vw, 30px);
  overflow: hidden;
  border: 1px solid var(--ask-report-line-strong);
  border-radius: 14px;
  background:
    radial-gradient(circle at 96% 0%, rgba(167, 205, 177, .18), transparent 36%),
    linear-gradient(145deg, rgba(250, 253, 249, .98), rgba(242, 248, 242, .9));
  box-shadow: 0 10px 28px rgba(50, 73, 56, .055);
}

.ask-conclusion-card::before {
  content: "";
  position: absolute;
  inset: 18px auto 18px 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--primary);
}

.ask-conclusion-card > :first-child {
  margin-top: 0;
}

.ask-conclusion-card .ask-keypoint,
.ask-conclusion-card > p,
.ask-conclusion-card > strong {
  max-width: 1040px;
  color: #25342b;
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.62;
  font-weight: 850;
  letter-spacing: -.012em;
}

.ask-core-conclusion {
  margin: 0;
  padding: 0;
  border: 0;
  color: #25342b;
  overflow-wrap: anywhere;
}

.ask-core-conclusion b {
  color: #245b3c;
  font-weight: 950;
}

.ask-conclusion-card .ask-answer {
  gap: 8px;
  color: #465149;
  font-size: 14px;
  line-height: 1.8;
}

.ask-section-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 28px;
  margin: 0;
  color: #2c3931;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 900;
  letter-spacing: .01em;
}

.ask-section-heading::before {
  content: "";
  flex: 0 0 4px;
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: var(--primary);
}

.ask-section-heading > span:first-child,
.ask-section-heading > b:first-child,
.ask-section-heading > strong:first-child {
  margin-right: auto;
}

.ask-section-heading em,
.ask-section-heading small {
  margin-left: auto;
  color: #747c76;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.ask-report-conclusion > .ask-report-section-title,
.ask-report-metrics > .ask-report-section-title,
.ask-report-findings > .ask-report-section-title,
.ask-report-charts > .ask-report-section-title,
.ask-report-tables > .ask-report-section-title {
  margin-bottom: 1px;
}

.ask-key-findings {
  display: grid;
  counter-reset: ask-finding;
  gap: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--ask-report-line);
  border-radius: 12px;
  background: var(--ask-report-paper);
  list-style: none;
}

.ask-key-findings > li,
.ask-key-findings > article,
.ask-key-findings > div {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  min-height: 54px;
  align-items: start;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(196, 200, 188, .42);
  color: #3e4a43;
  font-size: 13.5px;
  line-height: 1.72;
}

.ask-key-findings > li {
  counter-increment: ask-finding;
}

.ask-key-findings > :last-child {
  border-bottom: 0;
}

.ask-key-findings > li::before,
.ask-key-findings > article::before,
.ask-key-findings > div::before {
  content: counter(ask-finding);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  background: #eaf2ec;
  color: #2f6a48;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
}

.ask-key-findings > article::before,
.ask-key-findings > div::before {
  content: "";
  width: 8px;
  height: 8px;
  margin: 8px 0 0 8px;
  background: var(--primary);
}

.ask-report-findings .ask-highlights {
  margin: 0;
  padding-left: 0;
  color: #3e4a43;
}

.ask-answer-detail {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--ask-report-line);
  border-radius: 12px;
  background: rgba(255, 253, 249, .82);
  color: #4b564f;
  font-size: 13.5px;
  line-height: 1.82;
}

details.ask-answer-detail {
  padding: 0;
  overflow: hidden;
}

details.ask-answer-detail > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 16px;
  color: #405047;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

details.ask-answer-detail > summary::-webkit-details-marker {
  display: none;
}

details.ask-answer-detail > summary::after {
  content: "展开";
  margin-left: auto;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

details.ask-answer-detail[open] > summary::after {
  content: "收起";
}

details.ask-answer-detail > :not(summary) {
  margin-inline: 16px;
}

details.ask-answer-detail > :last-child {
  margin-bottom: 16px;
}

.ask-report-details-body {
  padding-top: 2px;
  color: #4b564f;
}

.ask-report-details-body .ask-answer-list {
  margin-block: 7px;
}

.ask-analysis-main .ask-metrics {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  margin-top: 0;
  border: 1px solid var(--ask-report-line);
  border-radius: 12px;
  background: var(--ask-report-line);
}

.ask-report-metrics.ask-analysis-main {
  gap: 10px;
}

.ask-analysis-main .ask-metric-card {
  min-height: 96px;
  padding: 16px 18px;
  border: 0;
  border-radius: 0;
  background: var(--ask-report-paper);
}

.ask-analysis-main .ask-metric-card + .ask-metric-card {
  border-left: 0;
}

.ask-analysis-main .ask-metric-value {
  color: #285b3f;
  font-size: clamp(25px, 2.2vw, 33px);
  font-variant-numeric: tabular-nums;
}

.ask-analysis-visuals,
.ask-analysis-tables {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 18px 20px 20px;
  border: 1px solid var(--ask-report-line);
  border-radius: 12px;
  background: var(--ask-report-paper);
}

.ask-analysis-visuals .ask-charts,
.ask-analysis-insights .ask-analysis-visuals .ask-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  gap: 14px;
  width: 100%;
  margin-top: 0;
  overflow: visible;
}

.ask-analysis-visuals .ask-chart-card,
.ask-analysis-insights .ask-analysis-visuals .ask-chart-card {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(196, 200, 188, .52);
  border-radius: 10px;
  background: #fff;
}

.ask-analysis-tables .ask-table-section,
.ask-analysis-insights .ask-analysis-tables .ask-table-section {
  display: grid;
  gap: 0;
  width: 100%;
  min-width: 0;
  margin-top: 0;
}

.ask-analysis-tables .table-wrap,
.ask-analysis-insights .ask-analysis-tables .table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 7px !important;
  border: 1px solid rgba(196, 200, 188, .58);
  border-radius: 10px 10px 0 0;
  background: #fff;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(74, 124, 89, .38) transparent;
}

.ask-analysis-tables .table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.ask-analysis-tables .table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(74, 124, 89, .32);
}

.ask-analysis-tables table,
.ask-analysis-insights .ask-analysis-tables table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.ask-analysis-tables th,
.ask-analysis-tables td,
.ask-analysis-insights .ask-analysis-tables th,
.ask-analysis-insights .ask-analysis-tables td {
  padding: 11px 13px;
  border-bottom: 1px solid rgba(196, 200, 188, .4);
  font-size: 12.5px;
}

.ask-analysis-tables th,
.ask-analysis-insights .ask-analysis-tables th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f5ef;
  color: #536057;
  font-weight: 850;
}

.ask-analysis-tables tbody tr:nth-child(even) td {
  background: rgba(247, 246, 241, .62);
}

.ask-table-expand {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(74, 124, 89, .26);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, #f8faf7, #eef4ef);
  color: #2f6948;
  font-size: 12.5px;
  font-weight: 850;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.ask-table-expand:hover {
  background: #e4efe6;
  color: #24583b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .74);
}

.ask-table-expand:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.ask-analysis-provenance {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border-color: var(--ask-report-line);
  border-radius: 10px;
  background: rgba(248, 247, 242, .76);
}

.ask-report-provenance {
  display: grid;
  align-content: start;
  overflow: hidden;
}

.ask-report-provenance > .ask-report-section-title {
  min-height: 42px;
  padding: 11px 16px 9px;
  border-bottom: 1px solid rgba(196, 200, 188, .42);
  background: rgba(245, 245, 239, .72);
  font-size: 13px;
}

.ask-report-provenance .ask-scope {
  margin-top: 0;
}

.ask-report-provenance .ask-analysis-trace {
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid rgba(196, 200, 188, .42);
}

.ask-analysis-provenance .ask-sources {
  border-right: 0;
  border-bottom: 1px solid rgba(196, 200, 188, .42);
}

.ask-analysis-provenance > .ask-sources:only-child {
  border-bottom: 0;
}

/* 流式输出只预留结论与核心指标区域，不虚构尚未生成的图表和表格。 */
.ask-loading-report-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-height: clamp(260px, 34vh, 340px);
  padding: 2px 0 10px;
  transition: min-height .2s ease, gap .2s ease, padding .2s ease;
}

.ask-loading-report-shell > * {
  min-width: 0;
}

.ask-loading-report-shell .ask-scope-strip {
  min-height: 34px;
  padding-block: 7px;
}

.ask-loading-report-shell .ask-conclusion-card {
  min-height: 96px;
  padding: 16px 20px;
  gap: 9px;
}

.ask-loading-report-shell > .ask-analysis-visuals[data-ask-skeleton],
.ask-loading-report-shell > .ask-analysis-tables[data-ask-skeleton] {
  display: none;
}

.ask-loading-report-shell.has-stream-answer {
  min-height: 0;
  gap: 0;
  padding-bottom: 0;
}

.ask-loading-report-shell.has-stream-answer > [data-ask-skeleton] {
  display: none;
}

.ask-loading-report-shell.has-stream-answer .ask-stream-preview {
  min-height: 72px;
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--ask-report-line-strong);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(250, 253, 249, .98), rgba(242, 248, 242, .82));
  color: #34443a;
  font-size: 13.5px;
  line-height: 1.78;
}

.ask-loading-skeleton {
  position: relative;
  display: block;
  width: 100%;
  min-height: 14px;
  overflow: hidden;
  border-radius: 7px;
  background: #e9e8e1;
  color: transparent !important;
  pointer-events: none;
}

.ask-loading-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 18%, rgba(255, 255, 255, .76) 46%, transparent 74%);
  transform: translateX(-100%);
  animation: askReportSkeleton 1.35s ease-in-out infinite;
}

.ask-loading-skeleton--eyebrow { width: 108px; min-height: 11px; }
.ask-loading-skeleton--title { width: min(78%, 720px); min-height: 25px; border-radius: 9px; }
.ask-loading-skeleton--line { width: min(100%, 920px); }
.ask-loading-skeleton--line-short { width: min(62%, 620px); }
.ask-loading-skeleton--metric { min-height: 64px; border-radius: 9px; }
.ask-loading-skeleton--visual { min-height: 0; border-radius: 12px; }
.ask-loading-skeleton--table { min-height: 0; border-radius: 12px; }

.ask-loading-report-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ask-loading-report-body {
  display: grid;
  gap: 10px;
  min-height: 118px;
  padding: 18px 20px;
  border: 1px solid var(--ask-report-line);
  border-radius: 12px;
  background: var(--ask-report-paper);
}

@keyframes askReportSkeleton {
  to { transform: translateX(100%); }
}

@media (max-width: 900px) {
  .ask-analysis-canvas { gap: 14px; }
  .ask-analysis-columns { gap: 14px; }
  .ask-analysis-visuals,
  .ask-analysis-tables { padding: 16px; }
  .ask-analysis-main .ask-metrics,
  .ask-loading-report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .ask-analysis-canvas { gap: 12px; }
  .ask-scope-strip {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    padding: 10px 12px;
  }
  .ask-scope-strip span + span,
  .ask-scope-strip em + em { padding-left: 0; }
  .ask-scope-strip span + span::before,
  .ask-scope-strip em + em::before { display: none; }
  .ask-conclusion-card { padding: 18px 18px 18px 20px; }
  .ask-conclusion-card .ask-keypoint,
  .ask-conclusion-card > p,
  .ask-conclusion-card > strong { font-size: 17px; line-height: 1.68; }
  .ask-key-findings > li,
  .ask-key-findings > article,
  .ask-key-findings > div { padding: 13px 14px; }
  .ask-answer-detail { padding: 15px 14px; }
  .ask-analysis-visuals,
  .ask-analysis-tables { padding: 14px 12px; }
  .ask-analysis-main .ask-metrics { grid-template-columns: minmax(0, 1fr); }
  .ask-loading-report-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .ask-analysis-main .ask-metric-card { min-height: 82px; }
  .ask-analysis-tables table,
  .ask-analysis-insights .ask-analysis-tables table { width: 680px; min-width: 680px; }
  .ask-table-expand { min-height: 44px; }
  .ask-loading-report-shell { min-height: 290px; gap: 9px; }
  .ask-loading-report-shell.has-stream-answer { min-height: 0; gap: 0; }
  .ask-loading-report-shell .ask-conclusion-card { min-height: 104px; padding: 15px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .ask-loading-skeleton::after { display: none; animation: none; }
  .ask-table-expand { transition: none; }
  .ask-loading-report-shell { transition: none; }
}

/* 领导问数：Sigma 式连续回答。真实思考与工具轨迹仍由上方 ask-report-execution 独立承载。 */
.ask-has-result {
  max-width: 1120px;
}

.ask-has-result .ask-input-compact {
  left: max(32px, calc((100vw - 1120px) / 2));
  right: max(32px, calc((100vw - 1120px) / 2));
}

.ask-msg-ai .ask-bubble.ask-bubble-canvas {
  padding: 24px 26px 18px;
  border: 1px solid #d8dcda;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}

.ask-msg-ai .ask-bubble.ask-bubble-canvas > .ask-analysis-canvas {
  max-width: none;
  gap: 0;
}

.ask-answer-continuous {
  display: grid;
  min-width: 0;
  gap: 0;
}

.ask-answer-continuous .ask-scope-strip {
  min-height: 0;
  margin: 2px 0 12px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #7a827d;
  font-size: 11px;
}

.ask-answer-continuous .ask-scope-strip b,
.ask-answer-continuous .ask-scope-strip strong {
  color: #4f5953;
  font-weight: 800;
}

.ask-answer-continuous .ask-analysis-visuals {
  display: grid;
  gap: 0;
  padding: 20px 22px 14px;
  border: 1px solid #dfe3df;
  border-radius: 4px;
  background: #fff;
}

.ask-answer-continuous .ask-analysis-visuals .ask-charts {
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  margin: 0;
}

.ask-answer-continuous .ask-analysis-visuals .ask-chart-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ask-answer-continuous .ask-analysis-visuals .ask-chart-card + .ask-chart-card {
  padding-top: 20px;
  border-top: 1px solid #eceeeb;
}

.ask-answer-continuous .ask-chart-title {
  margin-bottom: 8px;
  color: #303934;
  font-size: 15px;
  font-weight: 900;
}

.ask-answer-continuous .ask-chart-title em {
  color: #7b837e;
  font-size: 11px;
}

.ask-sigma-copy {
  display: grid;
  gap: 0;
  padding: 18px 1px 5px;
  color: #38423c;
  font-size: 14.5px;
  line-height: 1.76;
}

.ask-sigma-copy .ask-core-conclusion {
  max-width: none;
  color: #38423c;
  font-size: 15.5px;
  line-height: 1.76;
  font-weight: 400;
  letter-spacing: 0;
}

.ask-sigma-copy .ask-core-conclusion b,
.ask-sigma-copy b {
  color: #26352c;
  font-weight: 900;
}

.ask-sigma-copy .ask-key-findings {
  display: block;
  margin: 12px 0 11px;
  padding-left: 21px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  list-style: disc;
}

.ask-sigma-copy .ask-key-findings > li {
  display: list-item;
  min-height: 0;
  padding: 3px 0;
  border: 0;
  color: #38423c;
  font-size: 14px;
  line-height: 1.72;
}

.ask-sigma-copy .ask-key-findings > li::before {
  display: none;
  content: none;
}

.ask-sigma-detail-copy {
  margin-top: 11px;
  color: #465149;
}

.ask-sigma-detail-copy .ask-answer {
  gap: 7px;
  font-size: 14px;
  line-height: 1.76;
}

.ask-sigma-copy .ask-risk-summary {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 3px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #707a73;
}

.ask-sigma-copy .ask-risk-summary > .material-symbols-outlined {
  margin-top: 2px;
  color: #b17a27;
  font-size: 16px;
}

.ask-sigma-copy .ask-risk-summary div {
  display: block;
}

.ask-sigma-copy .ask-risk-summary b {
  margin-right: 4px;
  color: #707a73;
  font-size: 12px;
}

.ask-sigma-copy .ask-risk-summary span {
  color: #707a73;
  font-size: 12px;
  line-height: 1.65;
}

.ask-inline-followup.ask-followup-chip {
  width: 100%;
  margin-top: 13px;
  padding: 1px 0 1px 12px;
  border: 0;
  border-left: 2px solid #dfe5e0;
  border-radius: 0;
  background: transparent;
  color: #69726c;
  font-size: 13px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.65;
  text-align: left;
  cursor: pointer;
}

.ask-inline-followup.ask-followup-chip:hover {
  border-left-color: #4a7c59;
  background: transparent;
  color: #245b3c;
}

.ask-answer-support {
  margin-top: 10px;
  border-top: 1px solid #eceeeb;
}

.ask-answer-support > summary {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 8px 2px 4px;
  color: #245b3c;
  font-size: 11.5px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.ask-answer-support > summary::-webkit-details-marker {
  display: none;
}

.ask-answer-support > summary:focus:not(:focus-visible) {
  outline: none;
}

.ask-answer-support > summary:focus-visible {
  outline: 2px solid #6f927a;
  outline-offset: 2px;
}

.ask-answer-support > summary .material-symbols-outlined {
  font-size: 14px;
  transition: transform .18s ease;
}

.ask-answer-support[open] > summary .material-symbols-outlined {
  transform: rotate(90deg);
}

.ask-answer-support-body {
  display: grid;
  gap: 16px;
  margin-top: 8px;
  padding: 16px;
  border: 1px solid #d8dcda;
  border-radius: 4px;
  background: #fff;
}

.ask-answer-support:not([open]) > .ask-answer-support-body {
  display: none;
}

.ask-answer-support-body .ask-report-section-title,
.ask-support-block > h3 {
  margin: 0;
  color: #344039;
  font-size: 13px;
  font-weight: 900;
}

.ask-support-block {
  display: grid;
  gap: 8px;
}

.ask-answer-support-body .ask-analysis-main,
.ask-answer-support-body .ask-analysis-tables,
.ask-answer-support-body .ask-analysis-provenance {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ask-answer-support-body .ask-analysis-main .ask-metrics {
  margin: 0;
}

.ask-answer-support-body .ask-analysis-tables .table-wrap {
  margin-top: 0 !important;
}

.ask-answer-continuous .ask-analysis-footer .ask-export-row {
  justify-content: flex-start;
  gap: 16px;
  margin: 6px 0 0;
  padding: 4px 1px 0;
  border: 0;
}

.ask-answer-continuous .ask-analysis-footer .ask-soft-btn {
  min-height: 26px;
  color: #69736c;
  font-size: 11px;
  font-weight: 700;
}

.ask-answer-continuous .ask-analysis-footer .ask-soft-btn .material-symbols-outlined {
  font-size: 16px;
}

@media (max-width: 900px) {
  .ask-has-result .ask-input-compact {
    left: 20px;
    right: 20px;
  }

  .ask-msg-ai .ask-bubble.ask-bubble-canvas {
    padding: 20px 18px 16px;
  }
}

@media (max-width: 720px) {
  .ask-answer-continuous .ask-scope-strip {
    gap: 3px;
    margin-bottom: 10px;
    padding: 0;
  }

  .ask-answer-continuous .ask-analysis-visuals {
    padding: 16px 12px 10px;
  }

  .ask-sigma-copy {
    padding-top: 15px;
  }

  .ask-sigma-copy .ask-core-conclusion {
    font-size: 15px;
  }

  .ask-answer-support-body {
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ask-answer-support > summary .material-symbols-outlined {
    transition: none;
  }
}

.folder-match-tag.invoice { background: #ead8f2; color: #5b3a72; }
.folder-match-result { display: grid; align-content: start; gap: 14px; padding: 18px 22px 22px; }
.folder-match-status { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; }
.folder-match-spinner { width: 36px; height: 36px; display: grid; place-items: center; position: relative; }
.folder-match-status .material-symbols-outlined { font-size: 32px; }
.folder-match-status.ok .material-symbols-outlined { color: var(--primary); }
.folder-match-status.busy .folder-match-spinner::before { content: ""; position: absolute; inset: 0; border-radius: 999px; border: 3px solid rgba(168, 118, 30, .16); border-top-color: #a8761e; animation: spin .75s linear infinite; }
.folder-match-status.busy .material-symbols-outlined { color: #a8761e; font-size: 20px; animation: spin 1.05s linear infinite; }
.folder-match-status.busy b::after { content: ""; display: inline-block; width: 16px; animation: agentDots 1.2s steps(4, end) infinite; }
.folder-match-status.miss .material-symbols-outlined { color: var(--muted); }
.folder-match-status b { display: block; font-size: 16px; font-weight: 950; }
.folder-match-status p { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; font-weight: 800; }
.folder-match-project { padding: 12px 14px; border-radius: 12px; background: rgba(200, 232, 208, .28); color: var(--primary); font-size: 15px; font-weight: 950; }
.folder-match-reason { padding: 10px 12px; border-radius: 10px; background: rgba(245, 241, 234, .9); color: var(--muted); font-size: 12px; line-height: 1.5; font-weight: 800; }
.folder-match-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.folder-match-stats div { display: grid; justify-items: start; gap: 6px; min-height: 88px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid rgba(196, 200, 188, .4); }
.folder-match-stats em { font-size: 12px; font-style: normal; font-weight: 800; }
.folder-match-stats b { font-size: 22px; font-weight: 950; line-height: 1; }
.folder-match-stats .material-symbols-outlined { font-size: 18px; }
.folder-match-stats .is-material { background: #f8eee0; border-color: #ecd2ad; color: #7a4e16; }
.folder-match-stats .is-photo { background: #e6f0e7; border-color: #c5dcc8; color: #2f5a38; }
.folder-match-stats .is-invoice { background: #efe4f5; border-color: #d8c4e4; color: #5b3a72; }
.folder-match-actions { display: flex; justify-content: flex-end; align-items: stretch; gap: 10px; padding: 16px 22px 20px; border-top: 1px solid var(--line); }
.folder-match-project-btn { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: min(620px, calc(100% - 168px)); padding: 10px 14px; text-align: left; white-space: normal; line-height: 1.35; }
.folder-match-project-btn span { min-width: 0; flex: 1; font-weight: 900; }
.folder-match-project-btn .material-symbols-outlined { flex: none; font-size: 18px; }
.folder-write-banner { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: #eef5ee; border: 1px solid #c5dcc8; color: #2f5a38; }
.folder-write-banner .material-symbols-outlined { color: var(--primary); font-size: 26px; }
.folder-write-banner b { display: block; font-size: 14px; font-weight: 950; }
.folder-write-banner p { margin-top: 2px; color: #5a6b5c; font-size: 12px; line-height: 1.5; font-weight: 800; }
.folder-write-banner em { font-style: normal; font-size: 16px; font-weight: 950; color: var(--primary); }
@media (max-width: 860px) {
  .folder-match-body { grid-template-columns: 1fr; }
  .folder-match-files { border-right: 0; border-bottom: 1px solid var(--line); max-height: 280px; }
  .folder-match-stats { grid-template-columns: 1fr; }
}

/*
 * 领导问数：开源 Agent 报告骨架。
 * DOM/交互模式改编自 assistant-ui（MIT），业务数据、图表和流式事件仍由本系统提供。
 */
.ask-has-result {
  width: min(1000px, calc(100% - 48px));
  max-width: 1000px;
  padding: 30px 0 56px;
}

.ask-result-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px 12px;
  margin: 0 auto 18px;
  padding: 0 0 8px;
  border: 0;
}

.ask-result-heading {
  display: contents;
}

.ask-result-eyebrow {
  grid-column: 1;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #49725a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .035em;
}

.ask-result-eyebrow .material-symbols-outlined {
  font-size: 17px;
}

.ask-result-heading h1 {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: end;
  max-width: 90%;
  margin: 0;
  padding: 12px 18px;
  border-radius: 14px 14px 4px 14px;
  background: #f0f1ee;
  color: #27322d;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
}

.ask-result-meta {
  grid-column: 1 / -1;
  grid-row: 3;
  margin: 0;
}

.ask-result-status {
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #5f6b63;
  font-size: 12px;
}

.ask-result-status .material-symbols-outlined {
  color: #4d825f;
  font-size: 16px;
}

.ask-result-tools {
  grid-column: 2;
  grid-row: 1;
  gap: 5px;
  padding-top: 0;
}

.ask-result-tools .ask-soft-btn {
  min-height: 36px;
  padding-inline: 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.ask-result-tools .ask-soft-btn:hover {
  background: rgba(55, 89, 67, .07);
}

.ask-chat,
.ask-msg-ai,
.ask-msg-ai .ask-msg-col {
  width: 100%;
  max-width: none;
}

.ask-msg-ai .ask-bubble.ask-bubble-canvas,
.ask-msg-ai .ask-bubble.ask-bubble-loading {
  width: 100%;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ask-agent-report {
  --ask-agent-paper: rgba(255, 255, 255, .94);
  --ask-agent-soft: #f4f7f3;
  --ask-agent-line: rgba(69, 88, 75, .14);
  --ask-agent-muted: #718078;
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: none;
}

.ask-agent-execution {
  min-height: 0;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ask-agent-execution .ask-flow-complete,
.ask-agent-execution .ask-flow-rows {
  margin: 0;
}

.ask-agent-execution .ask-flow-row {
  min-height: 25px;
  padding-inline: 2px;
}

.ask-agent-execution .ask-flow-row b {
  color: #35463b;
  font-weight: 800;
}

.ask-agent-execution .ask-flow-row-track,
.ask-agent-execution .ask-flow-meta {
  color: #859189;
}

.ask-agent-artifact {
  display: grid;
  gap: 24px;
}

.ask-agent-artifact .ask-quality-note,
.ask-agent-artifact > .ask-risk-summary {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #855d24;
}

.ask-agent-artifact .ask-scope-strip {
  min-height: 44px;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid var(--ask-agent-line);
  border-radius: 14px;
  background: rgba(250, 250, 247, .92);
  color: var(--ask-agent-muted);
  font-size: 11.5px;
}

.ask-agent-artifact .ask-scope-strip-item {
  display: inline-flex;
  gap: 5px;
}

.ask-agent-artifact .ask-scope-strip-item em {
  color: #89948d;
  font-weight: 700;
}

.ask-agent-artifact .ask-scope-strip-item b {
  color: #405047;
  font-weight: 850;
}

.ask-agent-hero {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 0;
  align-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #27322d;
  box-shadow: none;
}

.ask-agent-hero::after {
  content: none;
}

.ask-agent-hero-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #25786b;
  font-size: 14px;
  font-weight: 600;
}

.ask-agent-hero-label .material-symbols-outlined {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #25786b;
  color: #fff;
  font-size: 18px;
}

.ask-agent-hero-label em {
  margin-left: auto;
  color: rgba(236, 248, 239, .63);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.ask-agent-hero .ask-core-conclusion {
  position: relative;
  z-index: 1;
  max-width: 100%;
  color: #27322d;
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.58;
  font-weight: 600;
}

.ask-agent-hero .ask-core-conclusion b {
  color: #25786b;
  font-weight: 750;
}

.ask-agent-hero .ask-risk-summary {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(250, 245, 230, .85);
}

.ask-agent-hero .ask-risk-summary b,
.ask-agent-hero .ask-risk-summary span,
.ask-agent-hero .ask-risk-summary .material-symbols-outlined {
  color: inherit;
}

.ask-agent-kpi-panel,
.ask-agent-chart-panel,
.ask-agent-insight-panel,
.ask-agent-table-panel {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ask-agent-panel-heading {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.ask-agent-panel-heading > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #26372d;
  font-size: 14px;
  font-weight: 900;
}

.ask-agent-panel-heading .material-symbols-outlined {
  color: #4b7e5a;
  font-size: 18px;
}

.ask-agent-panel-heading em {
  color: #89948d;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.ask-agent-kpi-panel .ask-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ask-agent-kpi-panel .ask-metric-card {
  min-height: 0;
  padding: 4px 18px;
  border: 0;
  border-right: 1px solid var(--ask-agent-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ask-agent-kpi-panel .ask-metric-card:last-child {
  border-right: 0;
}

.ask-agent-kpi-panel .ask-metric-label {
  color: #78847c;
  font-size: 13px;
}

.ask-agent-kpi-panel .ask-metric-label .material-symbols-outlined {
  display: none;
}

.ask-agent-kpi-panel .ask-metric-note {
  border: 0;
  margin: 0;
  padding: 0;
}

.ask-agent-kpi-panel .ask-metric-value {
  color: #25786b;
  font-size: clamp(24px, 2.2vw, 32px);
  overflow-wrap: anywhere;
}

.ask-agent-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.ask-agent-result-grid.is-text-only {
  grid-template-columns: minmax(0, 1fr);
}

.ask-agent-chart-panel,
.ask-agent-insight-panel {
  display: grid;
  align-content: start;
}

.ask-agent-chart-panel .ask-charts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin: 0;
}

.ask-agent-chart-panel .ask-chart-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ask-agent-chart-panel .ask-chart-card + .ask-chart-card {
  padding-top: 18px;
  border-top: 1px solid var(--ask-agent-line);
}

.ask-agent-chart-panel .ask-chart-title {
  margin-bottom: 8px;
  color: #3b4a41;
  font-size: 16px;
}

.ask-agent-chart-panel .ask-echart {
  min-height: 180px;
}

.ask-agent-insight-panel {
  background: linear-gradient(180deg, #f6f8f4, #f9faf8);
}

.ask-agent-insight-panel .ask-key-findings {
  display: grid;
  gap: 9px;
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ask-agent-insight-panel .ask-key-findings > li {
  grid-template-columns: 27px minmax(0, 1fr);
  min-height: 0;
  padding: 12px;
  border: 1px solid rgba(69, 88, 75, .11);
  border-radius: 13px;
  background: rgba(255, 255, 255, .86);
  color: #455249;
  font-size: 13px;
  line-height: 1.62;
}

.ask-agent-insight-panel .ask-key-findings > li::before {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  background: #e6f0e7;
  color: #3e7350;
  font-size: 10px;
  font-weight: 900;
  content: counter(ask-finding, decimal-leading-zero);
}

.ask-agent-narrative .ask-answer,
.ask-agent-narrative {
  color: #46534a;
  font-size: 13.5px;
  line-height: 1.74;
}

.ask-agent-empty-visual {
  display: grid;
  min-height: 210px;
  place-items: center;
  align-content: center;
  gap: 9px;
  border: 1px dashed rgba(69, 88, 75, .18);
  border-radius: 14px;
  background: #f8faf7;
  color: #849087;
  font-size: 12px;
}

.ask-agent-empty-visual .material-symbols-outlined {
  color: #6a9675;
  font-size: 30px;
}

.ask-agent-empty-copy {
  margin: 0;
  color: #66736b;
  font-size: 13px;
  line-height: 1.7;
}

.ask-agent-table-panel {
  padding-bottom: 14px;
}

.ask-agent-table-panel .ask-table-section {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ask-agent-table-panel .ask-table-title {
  display: none;
}

.ask-agent-table-panel.has-multiple-tables .ask-table-section + .ask-table-section {
  margin-top: 18px;
}

.ask-agent-table-panel.has-multiple-tables .ask-table-title {
  display: flex;
  margin: 0 0 9px;
  color: #415248;
  font-size: 12px;
  font-weight: 900;
}

.ask-agent-table-panel .table-wrap {
  margin: 0 !important;
  overflow: auto;
  border: 1px solid var(--ask-agent-line);
  border-radius: 14px;
  background: #fff;
}

.ask-agent-table-panel table {
  /* 按内容自然宽度铺开，但不小于容器宽度：列少时填满，列多时可横向滚动 */
  width: auto;
  min-width: 100%;
}

/* 项目名称列给足宽度，否则会被逐字换行、把整行撑得很高 */
.ask-agent-table-panel table .ask-cell-name,
.ask-analysis-tables table .ask-cell-name,
.ask-analysis-insights table .ask-cell-name {
  min-width: 220px;
  width: 24%;
}

.ask-agent-table-panel table .ask-cell-name .ask-project-link,
.ask-analysis-tables table .ask-cell-name .ask-project-link,
.ask-analysis-insights table .ask-cell-name .ask-project-link {
  display: inline-block;
  line-height: 1.45;
  text-align: left;
}

/* 表头与数值不换行：表头换行会让整个表头区变高，数值换行没有意义 */
.ask-agent-table-panel thead th,
.ask-analysis-tables thead th,
.ask-analysis-insights thead th {
  white-space: nowrap;
}

.ask-agent-table-panel table .ask-td-num,
.ask-analysis-tables table .ask-td-num,
.ask-analysis-insights table .ask-td-num {
  white-space: nowrap;
}

/* 行内边距略收紧，配合上面两点把行高降到 1 行文字的高度 */
.ask-agent-table-panel table th,
.ask-agent-table-panel table td {
  padding: 9px 12px;
}

/* 除名称列与长文本列外，单元格内容一律不换行：
   短文本列（责任单位/当前阶段/投资口径）换行没有意义，只会撑高行 */
.ask-agent-table-panel table td {
  white-space: nowrap;
}
.ask-agent-table-panel table td.ask-cell-name,
.ask-agent-table-panel table td.ask-cell-text {
  white-space: normal;
}

/* 长文本列限宽并只保留 2 行，完整内容通过 hover 查看 */
.ask-agent-table-panel table .ask-cell-text {
  min-width: 150px;
  max-width: 300px;
}

.ask-agent-table-panel table .ask-cell-text .ask-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  word-break: break-word;
}

.ask-agent-table-panel thead th {
  background: #f4f7f3;
  color: #536158;
  font-size: 11.5px;
}

.ask-agent-table-panel tbody td {
  font-size: 12.5px;
}

.ask-agent-table-panel .ask-table-expand {
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-radius: 11px;
  background: #f5f7f4;
}

.ask-agent-evidence {
  margin: 0;
  overflow: hidden;
  border: 0;
  border-block: 1px solid var(--ask-agent-line);
  border-radius: 0;
  background: transparent;
}

.ask-agent-evidence > summary {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 0;
  color: #415047;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.ask-agent-evidence > summary::-webkit-details-marker {
  display: none;
}

.ask-agent-evidence > summary:focus-visible {
  outline: 2px solid #25786b;
  outline-offset: 3px;
}

.ask-agent-evidence > summary > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ask-agent-evidence > summary .material-symbols-outlined {
  color: #4c7d5b;
  font-size: 18px;
}

.ask-agent-evidence > summary em {
  margin-left: auto;
  color: #8a958e;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.ask-agent-evidence > summary .ask-agent-evidence-chevron {
  color: #829087;
  transition: transform .2s ease;
}

.ask-agent-evidence[open] > summary .ask-agent-evidence-chevron {
  transform: rotate(90deg);
}

.ask-agent-evidence-body {
  display: grid;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--ask-agent-line);
}

.ask-agent-evidence-copy {
  display: grid;
  gap: 8px;
  padding-top: 15px;
}

.ask-agent-evidence-copy h3 {
  margin: 0;
  color: #334139;
  font-size: 13px;
}

.ask-agent-evidence-body .ask-analysis-provenance {
  gap: 12px;
  padding: 15px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ask-agent-followup {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ask-agent-line);
  border-radius: 16px;
  background: #fff;
}

.ask-agent-followup > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6c7971;
  font-size: 11.5px;
  font-weight: 850;
  white-space: nowrap;
}

.ask-agent-followup > span .material-symbols-outlined {
  color: #4d805c;
  font-size: 17px;
}

.ask-agent-followup .ask-inline-followup.ask-followup-chip {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 8px 11px;
  border: 0;
  border-radius: 11px;
  background: #f4f7f3;
  color: #315e40;
  font-size: 12.5px;
  font-style: normal;
  font-weight: 800;
}

.ask-agent-followup .ask-inline-followup.ask-followup-chip:hover {
  background: #eaf2ea;
  color: #214f33;
}

.ask-agent-followup .ask-inline-followup .material-symbols-outlined {
  font-size: 17px;
}

.ask-agent-actions {
  padding: 2px 2px 0;
}

.ask-agent-actions .ask-export-row {
  justify-content: flex-start;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.ask-agent-actions .ask-soft-btn {
  min-height: 34px;
  padding-inline: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #6d7971;
  font-size: 11.5px;
}

.ask-agent-actions .ask-soft-btn:hover {
  background: rgba(55, 89, 67, .07);
  color: #315f41;
}

.ask-bubble-failed:has(.ask-agent-failure) {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ask-agent-failure {
  display: grid;
  gap: 10px;
}

.ask-agent-failure-panel {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 22px 24px;
  border: 1px solid rgba(162, 69, 54, .2);
  border-radius: 18px;
  background: #fff8f6;
}

.ask-agent-failure-panel > .material-symbols-outlined {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f8dfda;
  color: #a24536;
}

.ask-agent-failure-panel span {
  display: block;
  margin-bottom: 5px;
  color: #8c3d31;
  font-size: 12px;
  font-weight: 900;
}

.ask-agent-failure-panel .ask-answer-p {
  margin: 0;
  color: #4f433f;
}

.ask-agent-failure-panel .ask-retry-btn {
  min-height: 34px;
  margin-top: 14px;
  padding: 0 12px;
  border: 1px solid rgba(162, 69, 54, .24);
  border-radius: 10px;
  background: #fff;
  color: #8c3d31;
}

.ask-has-result .ask-input-compact {
  position: static;
  width: min(1100px, 100%);
  margin: 22px auto 0;
  min-height: 78px;
  padding: 10px 11px 9px 17px;
  border: 1px solid rgba(47, 77, 58, .2);
  border-radius: 23px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 14px 38px rgba(32, 55, 40, .1);
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto;
  align-items: center;
  animation: none;
}

.ask-input-compact textarea {
  min-height: 48px;
  max-height: 78px;
  padding: 12px 10px 8px 0;
  font-size: 15px;
  line-height: 1.45;
}

.ask-input-compact .ask-actions {
  align-self: center;
  gap: 8px;
  padding: 0;
  border: 0;
}

.ask-input-compact .ask-soft-actions {
  flex-wrap: nowrap;
}

.ask-input-compact .ask-soft-btn {
  min-height: 36px;
  padding-inline: 9px;
  border: 0;
  border-radius: 10px;
  background: #f5f7f4;
}

.ask-input-compact .ask-run-btn {
  min-width: 84px;
  min-height: 44px;
  border-radius: 15px;
  box-shadow: none;
}

.ask-loading-report-shell {
  min-height: 420px;
}

.ask-loading-report-shell .ask-agent-hero {
  min-height: 100px;
  background: transparent;
  box-shadow: none;
}

.ask-loading-report-shell .ask-agent-result-grid {
  min-height: 220px;
}

.ask-loading-report-shell .ask-agent-insight-panel {
  gap: 18px;
}

.ask-loading-report-shell.has-stream-answer {
  min-height: 0;
}

@media (max-width: 1050px) {
  .ask-agent-result-grid,
  .ask-agent-result-grid.is-text-only {
    grid-template-columns: minmax(0, 1fr);
  }

  .ask-agent-chart-panel .ask-echart {
    min-height: 240px;
  }
}

@media (max-width: 720px) {
  .ask-has-result {
    width: calc(100% - 32px);
    padding-top: 20px;
    padding-bottom: 32px;
  }

  .ask-result-head {
    gap: 12px;
  }

  .ask-result-heading h1 {
    max-width: 100%;
    font-size: 16px;
  }

  .ask-result-tools {
    padding-top: 0;
  }

  .ask-agent-hero {
    min-height: 0;
    padding: 0;
    border-radius: 0;
  }

  .ask-agent-hero-label em {
    display: none;
  }

  .ask-agent-kpi-panel,
  .ask-agent-chart-panel,
  .ask-agent-insight-panel,
  .ask-agent-table-panel {
    padding: 0;
    border-radius: 0;
  }

  .ask-agent-kpi-panel .ask-metrics {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
  }

  .ask-agent-kpi-panel .ask-metric-card {
    min-height: 0;
    padding: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .ask-agent-kpi-panel .ask-metric-card:last-child {
    border-bottom: 0;
  }

  .ask-agent-followup {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .ask-has-result .ask-input-compact {
    position: static;
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    margin-top: 18px;
    border-radius: 18px;
  }

  .ask-input-compact .ask-actions {
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ask-agent-evidence > summary .ask-agent-evidence-chevron {
    transition: none;
  }
}
