:root {
  --paper: #fbfaf7;
  --surface: #fffefb;
  --surface-strong: #ffffff;
  --ink: #09223a;
  --ink-soft: #273b4d;
  --muted: #6f767b;
  --muted-light: #979c9f;
  --line: #e3e2dc;
  --line-strong: #d4d4cd;
  --green: #0f684a;
  --green-dark: #0a553c;
  --green-soft: #eef5f0;
  --red: #c92b26;
  --red-dark: #a9231f;
  --red-soft: #fff6f4;
  --amber: #b66b16;
  --amber-soft: #fff8e9;
  --blue: #315b80;
  --blue-soft: #eef4f8;
  --radius: 10px;
  --font-ui: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Songti SC", STSong, "Noto Serif CJK SC", serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }

.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 28px 22px 22px;
  border-right: 1px solid var(--line);
  background: #fdfcf9;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 12px 32px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark { width: 72px; height: 72px; object-fit: contain; margin-left: -4px; }
.brand-name {
  margin-top: -2px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: .08em;
  white-space: nowrap;
}

.side-nav { display: grid; gap: 8px; }
.nav-item {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 15px;
  padding: 0 16px;
  border-radius: 9px;
  color: #1e2c36;
  font-size: 16px;
  text-decoration: none;
  transition: background .16s ease, color .16s ease;
}
.nav-item i { font-size: 23px; }
.nav-item:hover { background: #f3f4f0; }
.nav-item.is-active { color: var(--green); background: #edf3ef; font-weight: 600; }
.nav-item-small { min-height: 42px; padding-left: 6px; font-size: 14px; }
.nav-item-small i { font-size: 20px; }

.side-footer {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.account-row { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 5px; }
.account-row > i { color: var(--muted); font-size: 24px; }
.account-row span { flex: 1; font-size: 14px; }
.account-row form { margin: 0; }
.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.icon-button:hover { color: var(--ink); background: #f0f1ed; }
.icon-button i { font-size: 19px; }

.mobile-header, .mobile-nav { display: none; }
.app-content { min-width: 0; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(600px, 1fr) 405px;
  min-height: 100vh;
}

.workspace { min-width: 0; padding: 32px 30px 54px; }
.workspace-header {
  display: flex;
  min-height: 136px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}
.workspace-header h1, .page-header h1, .task-page-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
}
.workspace-header h1 { font-size: clamp(31px, 2.55vw, 45px); letter-spacing: .02em; }
.eyebrow {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.workspace-header .eyebrow { display: none; }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 22px;
  border: 1px solid var(--green);
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
}
.button:hover { border-color: var(--green-dark); background: var(--green-dark); }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .68; cursor: wait; transform: none; }
.button:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(15, 104, 74, .22);
  outline-offset: 2px;
}
.button i { font-size: 21px; }
.button-compact { min-height: 40px; padding: 0 14px; font-size: 14px; }
.button-block { width: 100%; }
.button-secondary { color: var(--green); background: transparent; }
.button-secondary:hover { color: #fff; }
.new-task-button { flex: none; min-width: 155px; font-size: 17px; }

.attention-section { margin-top: 30px; }
.section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.section-title h2 { margin: 0; font-size: 22px; letter-spacing: .01em; }
.section-title-attention { margin-bottom: 13px; }
.section-title-attention h2 { font-size: 20px; }
.title-rule { width: 4px; height: 23px; border-radius: 4px; background: var(--red); }
.title-rule-ink { background: var(--ink); }
.title-rule-green { background: var(--green); }
.count-badge {
  display: inline-grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.attention-task {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 14px 17px 14px 18px;
  border: 1px solid #edcbc7;
  border-left: 3px solid var(--red);
  border-radius: 8px;
  color: inherit;
  background: var(--red-soft);
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.attention-task:hover { border-color: #e5a9a3; background: #fff2ef; transform: translateY(-1px); }
.status-symbol {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  color: var(--red);
}
.status-symbol i { font-size: 20px; }
.attention-copy { display: grid; min-width: 0; gap: 4px; }
.attention-topline { display: flex; min-width: 0; align-items: center; gap: 10px; }
.attention-name { overflow: hidden; color: var(--ink); font-size: 16px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.attention-status {
  flex: none;
  padding: 2px 8px;
  border: 1px solid #efc4c0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.55;
}
.attention-detail { overflow: hidden; color: var(--ink-soft); font-size: 12px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.attention-meta { display: grid; min-width: 82px; justify-items: end; gap: 5px; }
.attention-task time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.attention-action { display: inline-flex; align-items: center; gap: 4px; color: var(--red-dark); font-size: 12px; font-weight: 700; }
.attention-action i { font-size: 14px; transition: transform .15s ease; }
.attention-task:hover .attention-action i { transform: translateX(2px); }
.row-caret { color: var(--muted); font-size: 18px; }

.task-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.task-status i { font-size: 19px; }
.status-text-waiting, .status-text-error { color: var(--red); }
.status-text-manual { color: #a54662; }
.status-text-done { color: var(--green); }
.status-text-pending { color: var(--amber); }
.status-text-processing, .status-text-pausing { color: var(--blue); }
.status-text-paused { color: var(--amber); }
.is-spinning { display: inline-block; animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.recent-section { margin-top: 34px; }
.task-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.search-box {
  display: flex;
  width: min(310px, 40%);
  min-width: 220px;
  height: 48px;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface-strong);
}
.search-box:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(15, 104, 74, .08); }
.search-box i { color: var(--muted); font-size: 20px; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-box input::placeholder { color: var(--muted-light); }

.filter-tabs { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.filter-tabs a {
  position: relative;
  min-width: 58px;
  padding: 10px 9px 12px;
  color: var(--ink-soft);
  text-align: center;
  text-decoration: none;
}
.filter-tabs a::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: -1px;
  left: 8px;
  height: 2px;
  background: transparent;
}
.filter-tabs a:hover { color: var(--green); }
.filter-tabs a.is-active { color: var(--green); font-weight: 700; }
.filter-tabs a.is-active::after { background: var(--green); }

.task-table { border-top: 1px solid var(--line); }
.task-row {
  display: grid;
  grid-template-columns: minmax(200px, 1.3fr) 118px 142px 100px 18px;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 0 8px 0 4px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  text-decoration: none;
  transition: background .14s ease;
}
.task-row:not(.task-table-head):hover, .task-row.is-selected { background: #f5f7f3; }
.task-table-head { min-height: 45px; color: var(--muted); font-size: 12px; }
.task-name { display: flex; min-width: 0; align-items: center; gap: 13px; color: var(--ink); font-weight: 560; }
.task-name > i { flex: none; color: var(--ink-soft); font-size: 22px; }
.task-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-row time { font-size: 13px; white-space: nowrap; }
.task-row > span:nth-child(4) { color: var(--ink-soft); font-size: 13px; }
.empty-state { padding: 58px 24px; text-align: center; }
.empty-state > i { color: var(--green); font-size: 38px; }
.empty-state h3 { margin: 10px 0 3px; }
.empty-state p { margin: 0 0 18px; color: var(--muted); }

.inspector {
  min-width: 0;
  padding: 28px 22px 42px;
  border-left: 1px solid var(--line);
  background: #fdfcf9;
}
.inspector-date { height: 33px; margin: 0 0 14px; color: var(--ink-soft); text-align: right; font-size: 13px; }
.inspector-card { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.inspector-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.inspector-tabs button {
  position: relative;
  height: 54px;
  border: 0;
  color: var(--ink-soft);
  background: transparent;
  font-weight: 550;
  cursor: pointer;
}
.inspector-tabs button::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: -1px;
  left: 20px;
  height: 2px;
  background: transparent;
}
.inspector-tabs button.is-active { color: var(--green); font-weight: 700; }
.inspector-tabs button.is-active::after { background: var(--green); }
.inspector-panel { padding: 24px 16px 18px; }
.inspector-panel[hidden] { display: none; }
.inspector-heading h2 { margin: 0 0 5px; font-family: var(--font-display); font-size: 27px; }

.progress-track { display: grid; grid-template-columns: repeat(3, 1fr); margin: 30px 2px 26px; }
.progress-step { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; }
.progress-step::before {
  content: "";
  position: absolute;
  top: 15px;
  right: 50%;
  left: -50%;
  height: 2px;
  background: var(--line-strong);
}
.progress-step:first-child::before { display: none; }
.progress-step > span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface);
}
.progress-step.is-done > span { border-color: var(--green); color: #fff; background: var(--green); }
.progress-step.is-done::before { background: var(--green); }
.progress-step.is-current > span { border-color: var(--red); color: var(--red); }
.progress-step b { margin-top: 3px; font-size: 12px; font-weight: 650; }
.progress-step small { color: var(--muted); font-size: 10px; }

.decision-form, .result-summary { padding-top: 20px; border-top: 1px solid var(--line); }
.decision-form > h3, .result-summary > h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 16px;
}
.decision-form > h3 i { color: var(--red); font-size: 25px; }
.pause-resume-form > h3 i { color: var(--amber); }
.pause-resume-form > .button { margin-top: 16px; }
.result-summary > h3 i { color: var(--green); font-size: 25px; }
.choice-list { overflow: hidden; margin-bottom: 14px; border: 1px solid var(--line-strong); border-radius: 7px; }
.choice-list label { display: flex; min-height: 51px; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.choice-list label + label { border-top: 1px solid var(--line); }
.choice-list label:hover { background: #f5f7f3; }
.choice-list input { width: 18px; height: 18px; accent-color: var(--green); }
.choice-list span { color: var(--ink-soft); font-size: 13px; line-height: 1.4; }
.question-excerpt, .report-excerpt { color: var(--ink-soft); font-size: 13px; line-height: 1.7; }

.field { display: grid; gap: 7px; margin: 15px 0; }
.field > span { color: var(--ink); font-size: 13px; font-weight: 650; }
.field small { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  background: var(--surface-strong);
  outline: none;
}
.field input { height: 46px; padding: 0 13px; }
.field textarea { min-height: 100px; padding: 11px 13px; line-height: 1.6; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(15, 104, 74, .08); }
.compact-field textarea { min-height: 72px; }

.supplement-upload {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 17px;
  padding: 14px 0 2px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.supplement-upload > i { color: var(--ink-soft); font-size: 28px; }
.supplement-upload > span { display: grid; flex: 1; }
.supplement-upload b { font-size: 13px; }
.supplement-upload small { color: var(--muted); font-size: 11px; }
.supplement-upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.file-selection { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.file-chip { display: inline-flex; max-width: 100%; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; color: var(--green); background: var(--green-soft); font-size: 11px; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-link { display: inline-flex; margin-top: 12px; color: var(--green); font-size: 12px; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.file-row, .source-file-link {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 9px;
  padding: 13px 2px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
  text-decoration: none;
}
.file-row i, .source-file-link i { font-size: 20px; }
.file-row span, .source-file-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row:hover, .source-file-link:hover { color: var(--green); }
.source-file-link { margin-top: 17px; }

.state-message { padding: 30px 4px; text-align: center; }
.state-message > i { color: var(--green); font-size: 42px; }
.state-message h3 { margin: 8px 0 4px; }
.state-message p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.state-message-warning > i { color: var(--red); }
.state-message-warning p { max-height: 150px; overflow: auto; text-align: left; }
.state-message form + .button, .state-message .button + .button { margin-top: 9px; }

.quick-form-heading h2 { margin: 0; font-family: var(--font-display); font-size: 27px; }
.quick-form-heading p { margin: 2px 0 16px; color: var(--muted); font-size: 12px; }
.file-drop {
  position: relative;
  display: grid;
  min-height: 170px;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 20px;
  border: 1.5px dashed #9aa9a0;
  border-radius: 8px;
  color: var(--ink-soft);
  text-align: center;
  background: #fcfdfb;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.file-drop:hover, .file-drop.is-over { border-color: var(--green); background: var(--green-soft); }
.file-drop > i { color: var(--green); font-size: 38px; }
.file-drop b { font-size: 15px; }
.file-drop span { color: var(--muted); font-size: 11px; }
.file-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.form-hint { min-height: 20px; margin: 8px 0 0; color: var(--red); font-size: 12px; }

.page-wrap { width: min(1040px, calc(100% - 64px)); margin: 0 auto; padding: 42px 0 70px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 28px; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--green); }
.back-link i { font-size: 19px; }
.page-header { max-width: 740px; margin-bottom: 40px; }
.page-header h1 { font-size: 42px; }
.page-header > p:last-child, .task-page-header p { color: var(--muted); }

.new-task-form { display: grid; gap: 18px; }
.form-section { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 28px 30px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.form-section-number { color: var(--green); font-family: var(--font-display); font-size: 24px; }
.form-section-body h2 { margin: 0; font-family: var(--font-display); font-size: 26px; }
.form-section-body > p { margin: 2px 0 20px; color: var(--muted); }
.file-drop-large { min-height: 230px; }
.preset-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.preset-list button { min-height: 37px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink-soft); background: transparent; cursor: pointer; }
.preset-list button:hover { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.form-submit-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.form-submit-bar > div { display: grid; }
.form-submit-bar span { color: var(--muted); font-size: 12px; }

.task-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.task-page-header h1 { font-size: 40px; }
.task-page-header p { margin: 5px 0 0; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid currentColor; border-radius: 999px; font-size: 13px; white-space: nowrap; }
.status-pill.status-done { color: var(--green); background: var(--green-soft); }
.status-pill.status-waiting, .status-pill.status-error { color: var(--red); background: var(--red-soft); }
.status-pill.status-processing, .status-pill.status-pausing { color: var(--blue); background: var(--blue-soft); }
.status-pill.status-paused { color: var(--amber); background: var(--amber-soft); }
.status-pill.status-pending { color: var(--amber); background: var(--amber-soft); }
.status-pill.status-manual { color: #a54662; background: #fff3f6; }

.task-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 22px; }
.task-main-column { display: grid; gap: 18px; }
.content-panel { padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.panel-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 18px; }
.panel-heading > i { color: var(--red); font-size: 31px; }
.panel-heading p { margin: 0; color: var(--red); font-size: 12px; font-weight: 700; }
.panel-heading h2 { margin: 1px 0 0; font-family: var(--font-display); font-size: 25px; }
.panel-heading-paused > i, .panel-heading-paused p { color: var(--amber); }
.question-lead { padding: 14px; border-left: 3px solid var(--red); color: var(--ink-soft); background: var(--red-soft); }
.pause-panel { border-color: #ead8b7; }
.pause-lead { padding: 14px; border-left: 3px solid var(--amber); color: var(--ink-soft); background: var(--amber-soft); }
.choice-list-wide label { align-items: flex-start; }
.choice-list-wide span { display: flex; gap: 8px; font-size: 14px; }
.choice-list-wide span b { color: var(--green); }
.supplement-upload-wide { margin: 16px 0; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 8px; }
.raw-question, .task-note { margin-top: 20px; }
details summary { color: var(--green); font-size: 13px; cursor: pointer; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-ui); }
.raw-question pre, .task-note pre { max-height: 360px; overflow: auto; padding: 14px; color: var(--ink-soft); background: #f7f6f2; font-size: 12px; line-height: 1.75; }
.panel-section-title { margin-bottom: 14px; }
.panel-section-title h2 { font-family: var(--font-display); font-size: 24px; }
.soft-count { margin-left: auto; color: var(--muted); font-size: 12px; }
.download-list, .source-list { display: grid; }
.download-list a, .source-list a {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.download-list a:first-child, .source-list a:first-child { border-top: 0; }
.download-list a > i:first-child, .source-list a > i:first-child { color: var(--green); font-size: 25px; }
.download-list a > i:last-child, .source-list a > i:last-child { color: var(--muted); font-size: 19px; }
.download-list span, .source-list span { display: grid; min-width: 0; }
.download-list b, .source-list b { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.download-list small, .source-list small { color: var(--muted); }
.download-list a:hover b, .source-list a:hover b { color: var(--green); }
.document-text { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.85; }
.revision-form { max-width: 680px; }
.state-panel, .processing-panel { display: flex; align-items: flex-start; gap: 15px; }
.state-panel > i, .processing-panel > i { color: var(--green); font-size: 34px; }
.state-panel-warning > i { color: var(--red); }
.state-panel h2, .processing-panel h2 { margin: 0; }
.state-panel p, .processing-panel p { margin: 3px 0 0; color: var(--muted); }
.state-panel form, .processing-panel form { margin-left: auto; }
.sticky-panel { position: sticky; top: 28px; }
.sticky-panel h2 { margin: 0 0 10px; font-family: var(--font-display); font-size: 23px; }
.muted-copy { color: var(--muted); }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.setting-card { display: flex; align-items: center; gap: 16px; }
.setting-card > i { color: var(--green); font-size: 38px; }
.setting-card > div { display: grid; min-width: 0; }
.setting-card span, .setting-card small { color: var(--muted); }
.setting-card b { font-size: 18px; }
.setting-card-wide { grid-column: 1 / -1; }
.path-text { overflow: hidden; font-size: 14px !important; text-overflow: ellipsis; white-space: nowrap; }
.settings-note { margin-top: 18px; }
.settings-note h2 { margin: 0 0 16px; font-family: var(--font-display); }
.settings-note ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.settings-note li { display: flex; align-items: center; gap: 10px; }
.settings-note li i { color: var(--green); font-size: 22px; }

.login-body { min-height: 100vh; }
.login-layout { display: grid; grid-template-columns: minmax(420px, .9fr) minmax(500px, 1.1fr); min-height: 100vh; }
.login-brand-panel { display: flex; flex-direction: column; justify-content: center; padding: 9vw; border-right: 1px solid var(--line); background: #f7f6f1; }
.login-brand-panel img { width: 112px; height: 112px; object-fit: contain; margin-left: -16px; }
.login-brand-panel > p { margin: 2px 0 30px; font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: .1em; }
.login-brand-panel h1 { margin: 0 0 18px; font-family: var(--font-display); font-size: clamp(38px, 4.1vw, 62px); line-height: 1.32; }
.login-brand-panel span { color: var(--muted); letter-spacing: .08em; }
.login-form-panel { display: grid; place-items: center; padding: 36px; background: var(--surface); }
.login-form { width: min(390px, 100%); }
.login-form h2 { margin: 0; font-family: var(--font-display); font-size: 38px; }
.login-form > p:not(.eyebrow) { margin: 6px 0 28px; color: var(--muted); }
.login-error { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 11px 13px; border-radius: 7px; color: var(--red); background: var(--red-soft); }
.password-field { position: relative; display: block; }
.password-field > i { position: absolute; top: 50%; left: 13px; color: var(--muted); font-size: 20px; transform: translateY(-50%); }
.password-field input { padding-left: 43px; }

@media (max-width: 1220px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { padding-right: 16px; padding-left: 16px; }
  .brand { margin-left: 10px; }
  .dashboard-grid { grid-template-columns: minmax(540px, 1fr) 360px; }
  .workspace { padding-right: 24px; padding-left: 24px; }
  .inspector { padding-right: 16px; padding-left: 16px; }
  .attention-task { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; }
  .task-row { grid-template-columns: minmax(180px, 1.25fr) 104px 128px 88px 16px; gap: 8px; }
}

@media (max-width: 980px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .mobile-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 30;
    display: flex;
    height: 64px;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(253, 252, 249, .96);
    backdrop-filter: blur(14px);
  }
  .mobile-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 18px; font-weight: 700; text-decoration: none; }
  .mobile-brand img { width: 40px; height: 40px; object-fit: contain; }
  .app-content { padding-top: 64px; padding-bottom: 76px; }
  .dashboard-grid { display: block; min-height: auto; }
  .workspace { padding: 24px 20px 42px; }
  .workspace-header { min-height: 116px; }
  .workspace-header .eyebrow { display: block; }
  .workspace-header h1 { font-size: 35px; }
  .inspector { padding: 28px 20px 42px; border-top: 1px solid var(--line); border-left: 0; }
  .inspector-date { display: none; }
  .inspector-card { max-width: 720px; margin: 0 auto; }
  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 35;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: 70px;
    border-top: 1px solid var(--line);
    background: rgba(253, 252, 249, .98);
  }
  .mobile-nav a { display: grid; place-items: center; align-content: center; gap: 2px; color: var(--muted); font-size: 10px; text-decoration: none; }
  .mobile-nav a i { font-size: 22px; }
  .mobile-nav a.is-active { color: var(--green); }
  .mobile-nav .mobile-primary { align-self: center; justify-self: center; width: 48px; height: 48px; border-radius: 50%; color: #fff; background: var(--green); }
  .mobile-nav .mobile-primary i { font-size: 26px; }
  .page-wrap { padding-top: 30px; }
  .task-detail-grid { grid-template-columns: 1fr; }
  .sticky-panel { position: static; }
}

@media (max-width: 700px) {
  body { font-size: 14px; }
  .mobile-header .button span { display: none; }
  .mobile-header .button { width: 40px; padding: 0; }
  .workspace { padding-right: 16px; padding-left: 16px; }
  .workspace-header { min-height: 106px; }
  .workspace-header h1 { max-width: 260px; font-size: 29px; line-height: 1.28; }
  .workspace-header .new-task-button { display: none; }
  .attention-section { margin-top: 26px; }
  .attention-task { grid-template-columns: 32px minmax(0, 1fr); min-height: 92px; padding: 13px 12px; }
  .attention-name { font-size: 15px; }
  .attention-topline { gap: 7px; }
  .attention-detail { white-space: normal; }
  .attention-meta { grid-column: 2; display: flex; align-items: center; justify-content: space-between; }
  .task-toolbar { display: grid; }
  .search-box { width: 100%; }
  .filter-tabs { overflow-x: auto; justify-content: space-between; }
  .filter-tabs a { min-width: 62px; }
  .task-table-head { display: none; }
  .task-row { grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; min-height: 88px; padding: 13px 4px; }
  .task-name { grid-column: 1; font-size: 14px; }
  .task-row .task-status { grid-column: 2; justify-self: end; }
  .task-row time { grid-column: 1; padding-left: 35px; color: var(--muted); font-size: 11px; }
  .task-row > span:nth-child(4) { grid-column: 2; justify-self: end; font-size: 11px; }
  .task-row > .row-caret { display: none; }
  .inspector { padding-right: 12px; padding-left: 12px; }
  .inspector-card { border-right: 0; border-left: 0; border-radius: 0; }
  .inspector-panel { padding: 22px 14px 16px; }
  .page-wrap { width: calc(100% - 32px); padding-bottom: 36px; }
  .page-header h1, .task-page-header h1 { font-size: 32px; }
  .form-section { grid-template-columns: 1fr; padding: 22px 18px; }
  .form-section-number { font-size: 18px; }
  .form-submit-bar { align-items: stretch; flex-direction: column; }
  .form-submit-bar .button { width: 100%; }
  .task-page-header { flex-direction: column; }
  .task-detail-grid { gap: 14px; }
  .content-panel { padding: 18px 15px; }
  .state-panel, .processing-panel { flex-wrap: wrap; }
  .state-panel form, .processing-panel form { width: 100%; margin-left: 0; }
  .state-panel form .button, .processing-panel form .button { width: 100%; }
  .settings-grid { grid-template-columns: 1fr; }
  .setting-card-wide { grid-column: auto; }
  .login-layout { display: block; }
  .login-brand-panel { min-height: 40vh; padding: 56px 28px 34px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-brand-panel img { width: 72px; height: 72px; }
  .login-brand-panel > p { margin-bottom: 16px; font-size: 19px; }
  .login-brand-panel h1 { margin-bottom: 8px; font-size: 34px; }
  .login-form-panel { min-height: 60vh; padding: 40px 24px 70px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
