/*
 * 站维智析 · 静态样式唯一入口
 * 模块索引：01 基础 → 02 品牌导航 → 03 工作区 → 04 按钮 → 05 筛选输入
 * 06 指标 → 07 图表 → 08 表格 → 09 影响估算 → 10 反馈 → 11 对话框
 * 12 导入 → 13 工单 → 14 设置 → 15 登录 → 16 响应式 → 17 原始数据 → 18 状态
 * 各模块的具体外观与交互状态在后续同名标题下，保留原有层叠顺序。
 * 系统字体与主题变量集中在 :root；每条声明独立一行。
 * 顺序承载同权重选择器的层叠关系，调整模块顺序前请检查相邻状态。
 */
:root {
  --font-sans: "Segoe UI", "Microsoft YaHei", sans-serif;
  --paper-subtle: #f8fafb;
  --input-border: #ccd7de;
  --radius-sm: 7px;
  --radius-md: 10px;
  font-size: 14px;
  color: var(--ink);
  font-synthesis: none;
  --bg: #f4f5f0;
  --paper: #ffffff;
  --ink: #172c29;
  --ink-soft: #445d55;
  --muted: #63766b;
  --line: #dce2d9;
  --line-strong: #bfcdbf;
  --teal: #244c3d;
  --teal-dark: #17382c;
  --nav: #142c25;
  --accent: #d0ed8c;
  --red: #ab4035;
  --amber: #8c601d;
  --shadow-dialog: 0 28px 90px rgba(20, 44, 37, 0.18);
  --focus-ring: 0 0 0 3px rgba(56, 100, 64, 0.15);
  --chart-1: #2e654d;
  --chart-2: #9bb479;
  --chart-3: #4f7c82;
  --chart-4: #c3cb9c;
  --chart-5: #caa56a;
  --chart-axis: #63766b;
  --chart-line: #e5eae1;
  --chart-bar: #b1c3a4;
  --chart-area-top: #547d4b32;
  --chart-area-bottom: #547d4b00;
  --heat-1: #f0f3e6;
  --heat-2: #c9d9a6;
  --heat-3: #7da675;
  --heat-4: #315f48;
  font-family: var(--font-sans);
  --ui-secondary: #526247;
  --ui-error: #92372f;
}

/* ===== 01 全局基础 / 字体与键盘焦点 ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h2 {
  font-size: 16px;
  font-weight: 650;
  margin: 0;
}

h3 {
  font-size: 14px;
}

p {
  line-height: 1.75;
}

small {
  font-size: 11px;
}

.muted,
.hint {
  color: var(--muted);
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 650;
  color: var(--teal);
}

/* ===== 02 品牌、导航与账户组件 ===== */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: 1px;
  padding-left: 8px;
}

.brand small {
  display: block;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 750;
  font-size: 25px;
  letter-spacing: -3px;
  flex-shrink: 0;
}

.brand-mark span {
  font-size: 14px;
  transform: translateY(5px);
  margin-left: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 8px;
}

.avatar {
  width: 34px;
  height: 34px;
  background: #e2eeeb;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--teal);
  font-weight: 650;
}

.avatar.small {
  font-size: 11px;
}

.icon-button {
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: inherit;
  padding: 6px;
}

/* ===== 03 顶栏与内容区 / 保持原有布局尺寸 ===== */
main {
  margin-left: 230px;
}

.topbar {
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.breadcrumb span {
  margin: 0 14px;
  color: #ccd7dc;
}

.topbar-right {
  display: flex;
  align-items: center;
  color: var(--muted);
}

.sample-tag {
  border: 1px solid #eae5d5;
  border-radius: 5px;
  padding: 5px 8px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
}

.page-heading p {
  color: var(--muted);
  margin: 0;
}

.heading-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ===== 04 按钮、链接与上下文提示 ===== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--input-border);
  white-space: nowrap;
}

.button.full {
  width: 100%;
  margin-top: 8px;
}

.text-button {
  border: 0;
  background: none;
  color: var(--teal);
  padding: 5px 8px;
}

.text-button.danger {
  color: var(--red);
}

.text-link {
  color: var(--teal);
}

.context-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #dfe9e8;
  margin-bottom: 22px;
}

.context-banner b {
  margin-right: 18px;
}

.context-banner > div,
.context-banner > span {
  display: flex;
  align-items: center;
}

/* ===== 05 筛选与输入控件 ===== */
.filters {
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
}

.filter-field {
  flex: 1;
}

.filter-field label {
  display: block;
  margin-bottom: 8px;
}

.filter-field input,
.filter-field select {
  width: 100%;
}

.filter-field:has(input[name="q"]) {
  flex: 1.25;
}

.filters > .text-button {
  margin-bottom: 7px;
  flex-shrink: 0;
}

input,
select,
textarea {
  background: var(--paper);
  border-radius: 6px;
  outline: none;
  min-width: 0;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: var(--focus-ring);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--teal);
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 5px;
}

input[type="date"] {
  padding: 8px 9px;
}

input[type="number"] {
  width: 100%;
}

/* ===== 06 指标卡与洞察提示 ===== */
.metrics {
  display: grid;
}

.metric-card {
  position: relative;
  overflow: hidden;
}

.metric-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-icon {
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.metric-value {
  line-height: 1.1;
}

.metric-value small {
  font-weight: 400;
  margin-left: 6px;
  letter-spacing: 0;
}

.metric-note strong {
  font-weight: 550;
  margin-right: 5px;
}

.insight-strip {
  border: 1px solid #d8eae5;
  display: flex;
  gap: 13px;
  align-items: center;
}

.insight-icon {
  width: 31px;
  height: 31px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.insight-strip b {
  display: block;
  margin-bottom: 5px;
}

.insight-strip > a {
  margin-left: auto;
  white-space: nowrap;
}

/* ===== 07 面板与图表 / 图表实际颜色见文件顶部令牌 ===== */
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.panel-head p {
  margin: 7px 0 0;
}

.panel-head .unit {
  letter-spacing: 1px;
  padding-top: 5px;
}

.legend-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}

.legend-dot:before {
  content: "";
  display: block;
  background: #148f85;
  width: 7px;
  height: 7px;
  border-radius: 3px;
}

.chart-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  margin-bottom: 22px;
}

.chart-grid > .panel {
  min-width: 0;
}

.chart-main {
  grid-column: auto;
}

.risk-panel {
  margin-bottom: 20px;
}

.count-pill {
  display: inline-flex;
  border-radius: 5px;
  font-weight: 500;
  min-width: 22px;
  justify-content: center;
  padding: 3px;
  margin-left: 7px;
  vertical-align: middle;
}

.table-scroll {
  overflow: auto;
}

/* ===== 08 表格与状态标签 ===== */
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}

th {
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}

td {
  border-bottom: 1px solid #eef2f4;
}

tr:last-child td {
  border-bottom: 0;
}

td strong,
td small {
  display: block;
}

.risk-panel .panel-head {
  padding-bottom: 20px;
}

.tag {
  display: inline-flex;
  border-radius: 4px;
  line-height: 1.2;
}

/* ===== 09 影响指标与页脚 ===== */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.impact-card {
  border: 1px solid var(--line);
  border-radius: 11px;
}

.impact-card > b {
  display: block;
  letter-spacing: -0.5px;
}

.impact-card > b small {
  font-weight: 400;
  font-size: 11px;
  color: #96a5ac;
}

.impact-card > small {
  display: block;
}

footer {
  font-size: 9px;
  color: #71838f;
  display: flex;
  justify-content: space-between;
  padding: 20px 36px 25px;
}

/* ===== 10 记录分页、加载与错误反馈 ===== */
.record-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  margin: 0 0 19px;
}

.record-controls > div {
  display: flex;
  gap: 15px;
}

.record-controls select {
  font-size: 11px;
}

.inline {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: #82969f;
}

.pagination > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.loading-line {
  height: 2px;
  margin-top: -14px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, transparent, #29a295, transparent);
  animation: loading 1s infinite;
}

.loading-line.hidden {
  display: block;
  visibility: hidden;
}

@keyframes loading {
  from {
    opacity: 0.2;
  }

  to {
    opacity: 1;
  }
}

.hidden {
  display: none !important;
}

.empty {
  text-align: center;
  padding: 50px !important;
  color: #677a88;
}

.error {
  color: #b2635b;
  background: #fff3f0;
  border: 1px solid #f0d9d3;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.error-page {
  padding: 16vh 8vw;
  text-align: center;
}

.error-page h1 {
  font-size: 25px;
  margin: 25px 0 40px;
}

#toast {
  position: fixed;
  bottom: 26px;
  transform: translate(-50%, 20px);
  border-radius: 8px;
  padding: 14px 24px;
  box-shadow: 0 10px 40px #152b3925;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  max-width: 80vw;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ===== 11 对话框与详情表单 ===== */
dialog {
  border: 1px solid var(--line);
  max-width: calc(100vw - 40px);
  color: var(--ink);
  max-height: 90vh;
  overflow: auto;
}

dialog::backdrop {
  background: #102a355c;
  backdrop-filter: none;
}

dialog.wide {
  width: 680px;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}

.span2 {
  grid-column: span 2;
}

form label {
  display: block;
}

form label > input:not([type="radio"]):not([type="checkbox"]),
form label > textarea,
form label > select {
  display: block;
  width: 100%;
  margin-top: 9px;
}

form:not(.filters):not(.form-grid):not(.password-form) label {
  margin-bottom: 20px;
}

.prose {
  line-height: 1.9;
  color: #6c818c;
}

.prose p {
  margin-bottom: 18px;
}

.prose b {
  color: #3e5c68;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

.detail-grid > div {
  background: #f5f8f9;
  padding: 13px;
  border-radius: var(--radius-sm);
}

.detail-grid small {
  display: block;
  color: #6e808b;
  margin-bottom: 5px;
}

.detail-grid b {
  font-size: 12px;
  word-break: break-all;
}

/* ===== 12 数据导入与上传 ===== */
.stepper {
  display: flex;
  align-items: center;
  margin: 32px 0 35px;
  gap: 23px;
}

.stepper > div {
  display: flex;
  gap: 14px;
  align-items: center;
  color: #8a9ea6;
}

.stepper > div > b {
  font-size: 13px;
  background: #e8eef0;
  border-radius: 50%;
  width: 37px;
  height: 37px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stepper > div > span {
  font-size: 12px;
}

.stepper small {
  display: block;
  font-size: 9px;
  margin-top: 5px;
  color: #9cafb5;
}

.stepper > i {
  width: 60px;
  height: 1px;
  background: #dbe5e8;
}

.stepper > .active {
  color: var(--teal);
}

.stepper > .active > b {
  background: #dcefe8;
}

.import-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 23px;
  margin-bottom: 25px;
}

.upload-panel > h2,
.import-guide > h2 {
  margin-bottom: 24px;
}

.segmented {
  display: flex;
  background: #f2f6f7;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 24px;
}

.segmented label {
  margin: 0 !important;
  flex: 1;
  text-align: center;
  position: relative;
  font-size: 12px;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
}

.segmented span {
  display: block;
  padding: 10px;
  border-radius: 6px;
}

.segmented input:checked + span {
  background: var(--paper);
  box-shadow: 0 2px 4px #132b3610;
  color: var(--teal);
}

.drop-zone {
  height: 215px;
  border: 1.5px dashed #cadbdc;
  border-radius: 9px;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.drop-zone .upload-glyph {
  font-size: 25px;
  width: 45px;
  height: 45px;
  background: #e9f3ef;
  color: #529b8e;
  border-radius: var(--radius-md);
  text-align: center;
  padding: 6px;
  margin-bottom: 18px;
}

.drop-zone b {
  font-weight: 550;
}

.drop-zone small {
  margin-top: 9px;
}

.drop-zone input {
  position: absolute;
  width: 1px !important;
  height: 1px;
  opacity: 0;
}

.import-guide > .eyebrow {
  margin-bottom: 10px;
}

.import-guide ol {
  padding-left: 20px;
  margin: 0;
}

.import-guide li {
  padding-left: 7px;
}

.import-guide li::marker {
  color: #59a395;
}

.import-guide li p {
  margin: 6px 0 0;
}

.preview-summary {
  display: flex;
  gap: 20px;
  margin: 20px 23px;
  background: #f1f8f5;
  padding: 18px;
  border-radius: 8px;
  font-size: 12px;
}

.table-caption {
  margin: 26px 23px 16px;
  font-size: 12px;
}

.table-caption span {
  color: #96a7af;
  font-weight: 400;
  font-size: 10px;
  margin-left: 12px;
}

/* ===== 13 工单看板与时间线 ===== */
.workflow-banner {
  display: flex;
  border: 1px solid #dfebe7;
  border-radius: 12px;
  align-items: center;
  gap: 30px;
  margin-bottom: 26px;
}

.workflow-banner > div {
  display: flex;
  gap: 11px;
  align-items: center;
}

.workflow-banner i {
  font-style: normal;
  color: #a6c5ba;
}

.workflow-banner .workflow-note {
  margin-left: auto;
  font-size: 9px;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.kanban-column {
  border: 1px solid #e4e9ed;
  border-radius: 12px;
  min-height: 450px;
}

.kanban-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 4px 17px;
}

.order-card {
  background: var(--paper);
  border: 1px solid #e4e9ec;
  border-radius: var(--radius-md);
  margin-bottom: 13px;
}

.order-card h3 {
  font-weight: 600;
  line-height: 1.6;
  margin: 11px 0 8px;
}

.order-card .card-meta {
  display: flex;
  justify-content: space-between;
  gap: 5px;
}

.order-card > p {
  line-height: 1.8;
  margin: 11px 0;
}

.order-card .order-advice {
  border-top: 1px solid #eef3f4;
  padding-top: 10px;
  max-height: 80px;
  overflow: auto;
}

.order-card .button {
  padding: 7px 9px;
}

.order-card .tag {
  font-size: 8px;
}

.order-card.closed {
  opacity: 0.7;
}

.kanban-more {
  text-align: center;
  font-size: 10px;
  color: #839aa4;
  padding: 16px;
}

.timeline {
  margin-top: 25px;
}

.timeline > div {
  font-size: 11px;
  border-left: 2px solid #cee5df;
  padding: 0 0 20px 16px;
  margin-left: 6px;
}

.timeline small {
  display: block;
  color: #91a6af;
  font-size: 9px;
  margin-bottom: 7px;
}

.timeline p {
  font-size: 11px;
  color: #6a858e;
  margin: 8px 0;
}

/* ===== 14 参数设置与账户表单 ===== */
.threshold-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.threshold-card {
  border: 1px solid #e3ecea;
  border-radius: 8px;
}

.threshold-card h3 {
  margin-bottom: 18px;
}

.threshold-card label {
  display: block;
  margin-top: 14px;
}

.threshold-card input {
  display: block;
  width: 100%;
  font-size: 13px;
  margin-top: 8px;
}

.spaced {
  margin-top: 25px;
}

.panel-head input {
  font-size: 11px;
}

.password-form {
  display: flex;
  gap: 15px;
}

.password-form input {
  flex: 1;
}

/* ===== 15 登录与品牌展示 ===== */

.login-card .brand-mark {
  margin-bottom: 30px;
}

.login-card h2 {
  margin-bottom: 14px;
  letter-spacing: -0.6px;
}

.login-card .button {
  justify-content: space-between;
}

.demo-login {
  border: 1px solid #e6ecee;
  border-radius: 9px;
  line-height: 2;
}

.demo-login b {
  display: block;
  color: #5d7e88;
  margin-bottom: 7px;
  font-size: 11px;
}

.demo-login code {
  font:
    10px Consolas,
    monospace;
  color: #507b80;
}

.demo-login small {
  display: block;
  font-size: 9px;
  margin-top: 9px;
  line-height: 1.8;
  color: #9caeb6;
}

.login-card .alert {
  margin-bottom: 25px;
}

.operation-links {
  display: flex;
  gap: 8px;
}

/* ===== 16 响应式 / 大屏、平板与手机布局 ===== */
@media (min-width: 1700px) {
  :root {
    font-size: 15px;
  }
}

@media (max-width: 1200px) {
  .brand {
    font-size: 17px;
    padding-left: 4px;
  }

  main {
    margin-left: 194px;
  }

  .page-heading h1 {
    font-size: 25px;
  }

  .heading-actions .button {
    padding: 9px 10px;
  }

  .workflow-banner {
    gap: 13px;
  }

  .workflow-banner .workflow-note {
    display: none;
  }
}

@media (max-width: 960px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }

  .kanban {
    grid-template-columns: repeat(2, 1fr);
  }

  .context-banner > span {
    display: none;
  }

  .threshold-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .import-grid {
    grid-template-columns: 1fr;
  }

  .impact-grid {
    gap: 10px;
  }

  .topbar-right #clock {
    display: none;
  }
}

@media (max-width: 700px) {
  main {
    margin-left: 0;
  }

  .heading-actions {
    width: 100%;
  }

  .context-banner b {
    margin-right: 8px;
  }

  .context-banner #dataset-size {
    font-size: 9px;
  }

  .insight-strip > a {
    display: none;
  }

  .chart {
    margin-left: 4px;
    margin-right: 4px;
  }

  .impact-grid {
    grid-template-columns: 1fr;
  }

  .record-controls {
    gap: 16px;
    flex-wrap: wrap;
  }

  .record-controls > div {
    gap: 12px;
  }

  .stepper {
    gap: 10px;
  }

  .stepper > i {
    width: 15px;
  }

  .stepper > div {
    gap: 7px;
  }

  .stepper > div > b {
    width: 27px;
    height: 27px;
    font-size: 10px;
  }

  .stepper > div > span {
    font-size: 10px;
  }

  .stepper small {
    display: none;
  }

  .kanban {
    grid-template-columns: 1fr;
  }

  .workflow-banner {
    gap: 10px;
  }

  .workflow-banner > div {
    display: block;
  }

  .workflow-banner span {
    display: block;
    margin-top: 5px;
  }

  .threshold-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .password-form {
    flex-direction: column;
  }

  .login-card .brand-mark {
    display: none;
  }

  footer {
    padding: 15px 18px;
    line-height: 1.8;
  }

  footer span {
    display: none;
  }

  .form-grid {
    gap: 12px;
  }

  .workflow-banner .workflow-note {
    display: none;
  }

  .pagination > .button {
    font-size: 10px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .preview-summary {
    flex-wrap: wrap;
  }

  .threshold-card input {
    width: 100%;
  }
}

/* ===== 17 源数据工作区 / 列数与字段长文本处理 ===== */
.source-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.source-stats .panel {
  padding: 20px 24px;
}

.source-stats small {
  display: block;
  color: var(--muted, #7a8495);
}

.source-stats strong {
  display: block;
  margin-top: 8px;
}

.source-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  margin: 18px 0;
}

.source-upload label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 160px;
  font-size: 13px;
}

.source-upload input,
.source-upload select,
#source-map-form select {
  width: 100%;
  max-width: 100%;
  min-height: 40px;
  box-sizing: border-box;
}

.source-upload label:first-child {
  flex-basis: 260px;
}

.source-upload small {
  font-size: 11px;
  color: #7a8495;
}

.source-section {
  margin-top: 24px;
}

.source-pagination {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 18px;
  font-size: 12px;
  color: #748094;
}

.source-wrap {
  white-space: normal !important;
  min-width: 210px;
  max-width: 400px;
  overflow-wrap: anywhere;
}

.source-detail-dialog {
  width: min(1000px, 94vw);
  max-width: 94vw;
  max-height: 88vh;
  overflow: auto;
}

.source-fields {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 3fr;
  border: 1px solid #e5e9ef;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.source-fields dt,
.source-fields dd {
  padding: 12px;
  margin: 0;
  border-bottom: 1px solid #eef1f5;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.source-fields dd {
  white-space: pre-wrap;
  max-height: 300px;
  overflow: auto;
}

.source-confirm {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  font-size: 13px;
}

.source-confirm input {
  width: auto;
}

.source-detail-dialog .source-upload label {
  min-width: 160px;
}

#source-preview {
  margin-top: 24px;
  border-top: 1px solid #e5e9ef;
  padding-top: 20px;
}

#source-preview-table {
  max-height: 450px;
  overflow: auto;
}

@media (max-width: 900px) {
  .source-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .source-fields {
    grid-template-columns: 1fr;
  }

  .source-fields dd {
    margin-bottom: 8px;
  }

  .source-detail-dialog {
    padding: 16px;
  }

  .source-pagination {
    gap: 8px;
    flex-wrap: wrap;
  }
}

/* ===== 18 交互细节 / 无尺寸变更 ===== */
.button:active {
  box-shadow: inset 0 1px 3px rgba(16, 42, 53, 0.12);
}
.text-link:hover,
.text-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.segmented input:focus-visible + span,
.drop-zone:focus-within {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}
input:disabled,
select:disabled,
textarea:disabled {
  background: var(--paper-subtle);
  color: var(--muted);
  cursor: not-allowed;
}
.metric-value,
.impact-card > b,
.source-stats strong {
  font-variant-numeric: tabular-nums;
}
/* 系统减少动态效果偏好：仅停止装饰动画，保留反馈内容 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 工作台与登录页模块：颜色、字体、布局、组件及响应式规则。 */
/* 基础文字：统一使用系统字体，无字体下载请求。 */
body {
  -webkit-font-smoothing: antialiased;
}
h1 {
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 600;
  letter-spacing: -1.6px;
  line-height: 1.3;
  margin: 0 0 12px;
}
em {
  font-style: normal;
  color: #73864d;
}
.hint {
  font-size: 13px;
  line-height: 1.8;
}
/* 顶部工作导航：移动端由菜单按钮展开，全部入口保持可访问。 */
.app-nav {
  min-height: 88px;
  padding: 16px 30px;
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--nav);
  color: #f1f5ec;
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid #30483d;
}
.app-nav .brand,
.public-nav .brand {
  padding: 0;
  gap: 10px;
  font-size: 18px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.brand-mark {
  border-radius: 11px;
  background: var(--accent);
  color: #183c2b;
  font-family: var(--font-sans);
}
.brand small {
  color: #a7b6a7;
  font-size: 7px;
  margin-top: 6px;
  letter-spacing: 1.7px;
}
.workspace-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
}
.nav-item {
  gap: 7px;
  padding: 12px 10px;
  margin: 0;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  color: #b5c5b6;
  transition:
    background 0.2s,
    color 0.2s;
}
.nav-item svg {
  width: 16px;
  height: 16px;
}
.nav-item:hover {
  background: #294538;
  color: #fff;
}
.nav-item.active {
  background: var(--accent);
  color: #1a392b;
  box-shadow: none;
}
.nav-account {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.avatar.small {
  border-radius: 9px;
  background: #3a5747;
  color: #e6f2d5;
  width: 33px;
  height: 33px;
}
.account-name {
  font-size: 12px;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-name small {
  display: block;
  font-size: 10px;
  color: #a2b6a1;
  margin-top: 4px;
}
.logout-button {
  border: 0;
  background: none;
  color: #c4d3be;
  padding: 7px;
  display: flex;
  border-radius: 6px;
}
.logout-button:hover {
  background: #294538;
}
.nav-toggle {
  display: none;
}
/* 工作台宽度：表格的横向滚动只发生在各自容器内。 */
main.app-main {
  margin-left: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}
.topbar {
  height: 60px;
  padding: 0 max(32px, calc((100vw - 1512px) / 2));
  background: transparent;
}
.breadcrumb {
  color: var(--muted);
  font-size: 12px;
}
.topbar-right {
  font-size: 11px;
  gap: 20px;
}
.service-status {
  display: flex;
  align-items: center;
}
.live-dot {
  background: #6c9264;
  box-shadow: none;
}
.sample-tag {
  border-color: #dedfca;
  background: #f3f0df;
  color: #76632b;
  font-size: 10px;
}
.content {
  max-width: 1512px;
  padding: 42px 32px 0;
  margin: 0 auto;
}
.page-heading {
  gap: 32px;
  margin-bottom: 32px;
  align-items: center;
}
.page-heading p {
  font-size: 14px;
  line-height: 1.8;
  max-width: 740px;
}
.overview-heading {
  padding: 12px 0 6px;
}
.overview-heading h1 {
  font-size: clamp(34px, 3.4vw, 50px);
  line-height: 1.25;
}
.heading-actions {
  gap: 10px;
  flex-wrap: wrap;
}
/* 按钮和表单：提高阅读与点击舒适度，沿用原有功能状态。 */
.button {
  min-height: 42px;
  padding: 11px 17px;
  border-color: #cdd8ca;
  border-radius: 8px;
  color: #36503f;
  background: var(--paper);
  font-size: 12px;
  font-weight: 500;
  transition:
    background 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}
.button:hover {
  background: #edf2e7;
  box-shadow: none;
  border-color: #aebfa6;
}
.button.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.button.primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.text-button,
.text-link {
  font-size: 12px;
}
input,
select,
textarea {
  border: 1px solid #cdd7c9;
  padding: 11px 12px;
  color: var(--ink-soft);
  min-height: 42px;
}
input[type="checkbox"],
input[type="radio"] {
  min-height: 0;
  width: 16px;
  height: 16px;
}
form label {
  font-size: 13px;
  color: #526a56;
}
.context-banner {
  padding: 16px 19px;
  background: #e9eee2;
  border-color: #d6dfcc;
  color: #607354;
  font-size: 12px;
  line-height: 1.75;
  border-radius: 10px;
  gap: 16px;
}
.context-banner b {
  font-size: 12px;
  color: #355839;
}
.context-banner > div {
  flex-wrap: wrap;
  gap: 6px;
}
.filters {
  flex-wrap: wrap;
  padding: 20px;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 26px;
}
.filter-field {
  min-width: 125px;
}
.filter-field label {
  font-size: 11px;
  font-weight: 500;
  color: #61765c;
}
.filter-field input,
.filter-field select {
  height: 42px;
  font-size: 12px;
}
.filter-button {
  min-height: 42px;
}
/* 连续指标栏：减少重复卡片，数字排版保持主次。 */
.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 22px;
}
.metric-card {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 24px 26px;
  min-height: 164px;
  box-shadow: none;
  background: transparent;
}
.metric-card:last-child {
  border-right: 0;
}
.metric-title {
  font-size: 12px;
  color: #5b715f;
}
.metric-icon {
  background: #eef2e6;
  color: #567142;
  width: 26px;
  height: 26px;
}
.metric-value {
  font-size: clamp(28px, 2.8vw, 42px);
  font-weight: 500;
  letter-spacing: -1.5px;
  color: #213c2c;
  margin: 16px 0 12px;
}
.metric-value small {
  font-size: 12px;
  color: var(--muted);
}
.metric-note {
  color: #6c7c66;
  font-size: 11px;
  line-height: 1.6;
}
.metric-note strong {
  color: #496e44;
}
.insight-strip {
  background: #dfeacb;
  border-color: #cdddb7;
  border-radius: 10px;
  padding: 17px 22px;
  margin-bottom: 28px;
}
.insight-icon {
  background: #c6dba6;
  color: #355e31;
}
.insight-strip b {
  color: #365531;
  font-size: 12px;
}
.insight-strip div > span,
.insight-strip > a {
  color: #5e7953;
  font-size: 11px;
}
/* 三列总览：第一行 2+1，第二行 1+2，密集排列没有空单元。 */
.dashboard-bento {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 22px;
  margin-bottom: 28px;
}
.dashboard-bento > .panel:nth-child(1),
.dashboard-bento > .panel:nth-child(4) {
  grid-column: span 2;
}
.panel {
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: none;
  min-width: 0;
}
.panel-head {
  padding: 25px 26px 10px;
  gap: 20px;
  flex-wrap: wrap;
}
.panel-head h2 {
  font-size: 17px;
  letter-spacing: -0.3px;
}
.panel-head p {
  font-size: 11px;
  line-height: 1.8;
  margin-top: 8px;
}
.panel-head .unit,
.legend-dot {
  font-size: 10px;
}
.chart {
  height: 310px;
  margin: 6px 14px 0;
}
.chart.short {
  height: 275px;
}
.legend-dot::before {
  background: var(--chart-1);
}
/* 表格与标签：加大正文；长表仍使用原生横向滚动。 */
table {
  font-size: 12px;
}
th {
  font-size: 11px;
  color: #66785f;
  background: #f6f8f1;
  padding: 17px 22px;
}
td {
  padding: 18px 22px;
  color: #52664e;
  border-bottom-color: #e9ede3;
}
td strong {
  color: #29492f;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 7px;
}
td small {
  font-size: 10px;
  color: #6c8065;
}
tbody tr:hover {
  background: #f7faf2;
}
.tag {
  font-size: 10px;
  padding: 5px 8px;
  background: #edf1e8;
  color: #5f7359;
}
.tag.teal {
  color: #386b43;
  background: #e8f1e0;
}
.tag.red {
  color: #a43c32;
  background: #faece8;
}
.tag.amber {
  color: #8b611f;
  background: #f8f0dd;
}
.count-pill {
  background: #eaf0e0;
  color: #526e3a;
  font-size: 11px;
}
.pagination {
  padding: 20px 24px;
  font-size: 12px;
}
.dashboard-impact {
  gap: 22px;
  margin-top: 28px;
}
.impact-card {
  padding: 24px 26px;
  background: #e9eee1;
  border-color: #d6dfcb;
  box-shadow: none;
}
.impact-card > span {
  font-size: 12px;
  color: #5f7754;
}
.impact-card > b {
  font-size: 32px;
  font-weight: 500;
  color: #2b4a31;
  margin: 18px 0;
}
.impact-card > small {
  font-size: 11px;
  color: #6e8162;
  line-height: 1.8;
}
.workspace-next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 60px 0 0;
  padding: 38px 0;
  border-top: 1px solid #cbd5c3;
}
.workspace-next h2 {
  font-size: 30px;
  letter-spacing: -1px;
}
.workspace-next p {
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0 0;
}
.app-footer {
  align-items: center;
  gap: 24px;
  max-width: 1512px;
  margin: 48px auto 0;
  padding: 30px 32px;
  font-size: 12px;
  color: #5c7055;
  border-top: 1px solid var(--line);
}
.app-footer > a {
  color: #35523a;
  font-weight: 600;
}
.app-footer > a span {
  margin-left: 20px;
  font-weight: 400;
  color: #6b8062;
}
.app-footer > div {
  display: flex;
  gap: 22px;
  align-items: center;
}
.app-footer small {
  font-size: 10px;
}
/* 导入、工单、设置与源数据：统一空间和文字层次。 */
.upload-panel,
.import-guide {
  padding: 30px;
}
.drop-zone {
  background: #f5f8ef;
  border-color: #b9cba7;
  color: #5a7651;
}
.drop-zone b {
  font-size: 14px;
}
.drop-zone small,
.import-guide li p {
  font-size: 12px;
  color: #6a7f5e;
}
.import-guide li {
  font-size: 13px;
  color: #456a43;
  margin-bottom: 24px;
}
.workflow-banner {
  padding: 25px 28px;
  border-color: #d3deca;
  background: #e5edd9;
}
.workflow-banner b {
  font-size: 14px;
  color: #365e36;
}
.workflow-banner span {
  font-size: 12px;
  color: #718563;
}
.kanban {
  gap: 18px;
  grid-auto-flow: dense;
}
.kanban-column {
  background: #e9ede2;
  border-color: #dce4d2;
  padding: 18px 14px;
}
.kanban-title {
  font-size: 13px;
  color: #57754b;
}
.order-card {
  padding: 19px;
  border-color: #dce5d2;
  box-shadow: 0 2px 6px rgba(36, 76, 61, 0.03);
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
}
.order-card:hover {
  border-color: #acc398;
  box-shadow: 0 8px 24px rgba(36, 76, 61, 0.07);
}
.order-card h3 {
  font-size: 13px;
}
.order-card .card-meta,
.order-card > p {
  font-size: 11px;
}
.order-card .button {
  min-height: 36px;
  font-size: 11px;
}
.threshold-grid {
  padding: 24px 26px 28px;
  gap: 16px;
  grid-auto-flow: dense;
}
.threshold-card {
  padding: 20px;
  border-color: #dce4d2;
  background: #f5f8ef;
}
.threshold-card h3 {
  font-size: 14px;
  color: #496b3d;
}
.threshold-card label {
  font-size: 12px;
  color: #69835c;
}
.source-stats {
  grid-auto-flow: dense;
}
.source-stats .panel {
  background: #eaf0e0;
  border-color: #d7e1ca;
}
.source-stats small {
  font-size: 12px;
}
.source-stats strong {
  font-size: 34px;
  font-weight: 500;
  color: #365a35;
}
.source-stats + .panel {
  padding: 28px;
}
.source-stats + .panel > .panel-head {
  padding: 0 0 12px;
}
.source-upload {
  gap: 20px;
}
.source-pagination {
  padding: 0 24px 22px;
}
.source-fields dt {
  background: #f0f5e9;
  color: #526d46;
}
.password-form {
  flex-wrap: wrap;
  padding: 24px 26px 28px;
}
.password-form input {
  min-width: 190px;
}
dialog {
  border-radius: 18px;
  padding: 32px;
  width: 600px;
  box-shadow: var(--shadow-dialog);
}
.dialog-head h2 {
  font-size: 21px;
}
.prose {
  font-size: 13px;
}
#toast {
  left: 50%;
  background: #244c3d;
  color: #fff;
  font-size: 13px;
  border: 1px solid #3d6650;
}
#toast.failure {
  background: #963e32;
  border-color: #b45b4c;
}
/* 登录主视觉：Editorial Split，宽标题主动控制为两行。 */
.public-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100px;
  padding: 24px 5vw;
  gap: 24px;
  background: var(--bg);
}
.public-nav .brand {
  color: #244535;
}
.public-nav .brand small {
  color: #768469;
}
.public-nav nav {
  display: flex;
  gap: 32px;
  align-items: center;
  font-size: 12px;
}
.public-nav nav a:last-child {
  border-bottom: 1px solid #53704d;
  padding: 10px 0;
}
.public-nav nav a span {
  margin-left: 16px;
}
main.public-main {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}
.login-hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 660px;
  max-width: 1800px;
  margin: auto;
  padding: 0 24px 24px;
  gap: 20px;
}
.login-story {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 3.4vw 70px;
}
.intro-line {
  font-size: 12px;
  color: #687e55;
  display: flex;
  align-items: center;
  margin: 0 0 34px;
}
.login-story h1 {
  max-width: 760px;
  width: 100%;
  font-size: clamp(38px, 4.2vw, 76px);
  line-height: 1.35;
  letter-spacing: -2.5px;
  font-weight: 500;
  color: #203d2c;
  margin: 0 0 28px;
  white-space: nowrap;
}
.hero-description {
  font-size: 14px;
  color: #6a7c60;
  line-height: 2;
  margin-bottom: 38px;
}
.hero-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-links .button {
  min-height: 48px;
  padding: 14px 21px;
  font-size: 12px;
  gap: 26px;
}
.hero-links .hero-primary {
  background: #244c3d;
  color: #fff;
  border-color: #244c3d;
}
.hero-links .hero-primary:hover {
  background: #153a2b;
}
.hero-links .hero-secondary {
  background: transparent;
  color: #365238;
  border-color: #b8c5ac;
}
.hero-footnote {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 60px;
  font-size: 11px;
  color: #879176;
}
.footnote-line {
  width: 40px;
  height: 1px;
  background: #a0ae8e;
}
.login-visual {
  min-width: 0;
  min-height: 610px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #294837;
  isolation: isolate;
}
.editorial-image {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1);
  opacity: 0.45;
  mix-blend-mode: luminosity;
}
.image-wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(19, 49, 31, 0.03) 20%,
    rgba(17, 45, 25, 0.88) 100%
  );
}
.visual-copy {
  position: absolute;
  left: 44px;
  bottom: 46px;
  z-index: 2;
  color: #edf5e2;
}
.visual-copy > span {
  font-size: 11px;
  letter-spacing: 2px;
  color: #c5d7b1;
}
.visual-copy p {
  font-size: clamp(28px, 2.6vw, 44px);
  line-height: 1.55;
  letter-spacing: -1px;
  margin: 20px 0 26px;
}
.visual-copy small {
  font-size: 10px;
  color: #b1c19f;
}
.network-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.network-orbit span {
  position: absolute;
  width: 350px;
  height: 350px;
  border: 1px solid rgba(214, 235, 176, 0.22);
  border-radius: 50%;
  left: 52%;
  top: 8%;
}
.network-orbit span:nth-child(2) {
  width: 470px;
  height: 470px;
  left: 42%;
  top: -2%;
}
.network-orbit span:nth-child(3) {
  width: 590px;
  height: 590px;
  left: 32%;
  top: -12%;
}
/* 文字带：只展示平台能力，不加入虚构客户与认证。 */
.capability-marquee {
  overflow: hidden;
  padding: 30px 0;
  border-top: 1px solid #d9e0cf;
  border-bottom: 1px solid #d9e0cf;
  margin-top: 45px;
}
.marquee-track {
  width: max-content;
  display: flex;
  gap: 56px;
  align-items: center;
  animation: capability-scroll 40s linear infinite;
}
.marquee-track span {
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 400;
  color: #85936f;
  letter-spacing: -1px;
}
.marquee-track i {
  font-style: normal;
  font-size: 26px;
  color: #b8c3a6;
}
@keyframes capability-scroll {
  to {
    transform: translateX(-50%);
  }
}
/* 三项能力手风琴：桌面横向伸缩，手机纵向展开。 */
.capabilities-section,
.flow-section {
  max-width: 1500px;
  padding: 130px 5vw;
  margin: auto;
  scroll-margin-top: 30px;
}
.section-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 60px;
}
.section-intro h2 {
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1.4;
  letter-spacing: -1.8px;
  font-weight: 500;
}
.section-intro > p {
  color: #778568;
  font-size: 13px;
  line-height: 2;
  margin: 0 0 7px;
}
.horizontal-accordion {
  display: flex;
  gap: 16px;
}
.capability-item {
  flex: 1;
  min-width: 0;
  background: #e8eddf;
  border: 1px solid #d9e1ce;
  border-radius: 14px;
  padding: 27px;
  overflow: hidden;
}
.capability-item.is-expanded {
  flex: 1.45;
  background: #dce7c7;
}
.capability-item > button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 15px;
  color: #3b5b30;
}
.accordion-symbol {
  font-size: 23px;
  font-weight: 300;
}
.capability-body svg {
  width: 100%;
  height: 130px;
  margin: 36px 0 22px;
  fill: none;
  stroke: #6a8656;
  stroke-width: 1.5;
  transition: transform 0.7s ease;
}
.capability-item:hover .capability-body svg {
  transform: scale(1.05);
}
.capability-body h3 {
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 16px;
  color: #3b5b30;
}
.capability-body p {
  font-size: 12px;
  line-height: 2;
  margin: 0;
}
/* GSAP 流程叠卡：仅介绍页使用，不遮挡工作台操作内容。 */
.flow-section {
  background: #e8eddf;
  border-radius: 20px;
  margin-bottom: 40px;
}
.flow-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.flow-card {
  border: 1px solid #ccd8bd;
  border-radius: 16px;
  padding: 42px 44px;
  background: #f7f9f2;
  min-height: 230px;
  position: relative;
  transform-origin: center top;
}
.flow-card:nth-child(2) {
  background: #e1ebcf;
}
.flow-card:nth-child(3) {
  background: #d2e1b7;
}
.flow-kicker {
  color: #6b8356;
  font-size: 12px;
}
.flow-card h3 {
  font-size: clamp(23px, 2.4vw, 34px);
  line-height: 1.5;
  font-weight: 500;
  color: #36512b;
  margin: 20px 0 14px;
}
.flow-card p {
  font-size: 13px;
  max-width: 660px;
  line-height: 1.9;
  margin: 0;
}
.flow-arrow {
  position: absolute;
  right: 45px;
  top: 40px;
  font-size: 30px;
  color: #8aa471;
}
/* 登录操作区：继续使用原有 POST 表单、CSRF 与权限体系。 */
.login-action {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9vw;
  background: #17392a;
  padding: 100px max(5vw, calc((100vw - 1350px) / 2));
  color: #f3f8e9;
}
.login-action-copy {
  padding: 28px 0;
}
.login-action-copy > h2 {
  font-size: clamp(38px, 4vw, 62px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -2px;
}
.login-action-copy > h2 em {
  color: #c9e88e;
}
.guide-carousel {
  max-width: 440px;
  margin-top: 65px;
}
.guide-quote {
  color: #b3c6a3;
  font-size: 15px;
  line-height: 2;
  min-height: 65px;
  margin: 0 0 28px;
}
.guide-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #819b71;
  font-size: 11px;
}
.guide-controls > div {
  display: flex;
  gap: 10px;
}
.guide-controls button {
  border: 1px solid #567547;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  background: transparent;
  color: #d4e6ba;
  font-size: 16px;
  transition: background 0.2s;
}
.guide-controls button:hover {
  background: #34552c;
}
.login-card {
  background: #f8faf3;
  color: #203e2b;
  border: 1px solid #dae5cc;
  border-radius: 16px;
  padding: 40px;
  margin: 0;
  max-width: 480px;
  width: 100%;
  align-self: center;
  justify-self: end;
}
.login-card h2 {
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 13px;
}
.login-card > .muted {
  font-size: 13px;
  margin-bottom: 30px;
}
.login-card form label {
  color: #587148;
  font-size: 12px;
  margin-bottom: 21px;
}
.login-card form input {
  background: #fff;
  height: 47px;
  font-size: 13px;
  border-color: #cad6bc;
}
.login-card .button {
  min-height: 48px;
  height: auto;
  background: #274d34;
  color: #fff;
  border-color: #274d34;
  font-size: 13px;
  padding: 14px 17px;
}
.login-policy {
  font-size: 10px;
  line-height: 1.8;
  margin: 22px 0 0;
}
.demo-login {
  background: #edf2e5;
  border-color: #dce5ce;
  padding: 16px;
  color: #6e825a;
  font-size: 11px;
  margin-top: 24px;
}
.demo-login summary {
  font-size: 12px;
  color: #4a6a38;
  cursor: pointer;
}
.demo-login[open] summary {
  margin-bottom: 12px;
}
.public-footer {
  align-items: center;
  gap: 24px;
  padding: 34px 5vw;
  font-size: 11px;
  color: #70825e;
  background: var(--bg);
}
.public-footer .brand {
  font-size: 18px;
  color: #36542f;
  padding: 0;
}
/* 响应式：桌面主次网格，平板双列，手机纵向访问。 */
@media (min-width: 1700px) {
  .chart {
    height: 340px;
  }
  .chart.short {
    height: 300px;
  }
}
@media (max-width: 1250px) {
  .app-nav {
    padding: 16px 24px;
    gap: 20px;
    flex-wrap: wrap;
  }
  .workspace-nav {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
    gap: 8px;
  }
  .nav-account {
    margin-left: auto;
  }
  .login-story h1 {
    font-size: clamp(36px, 4.4vw, 56px);
  }
  .login-story {
    padding-left: 2.4vw;
    padding-right: 1vw;
  }
}
@media (max-width: 960px) {
  .content {
    padding: 32px 24px 0;
  }
  .topbar {
    padding: 0 24px;
  }
  .service-status {
    display: none;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-card {
    border-bottom: 1px solid var(--line);
    min-height: 156px;
  }
  .metric-card:nth-child(2) {
    border-right: 0;
  }
  .metric-card:nth-child(n + 3) {
    border-bottom: 0;
  }
  .dashboard-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
  .dashboard-bento > .panel:nth-child(1),
  .dashboard-bento > .panel:nth-child(4) {
    grid-column: span 2;
  }
  .dashboard-bento > .panel:nth-child(4) {
    order: 4;
  }
  .app-footer {
    flex-wrap: wrap;
    padding: 26px 24px;
  }
  .login-hero {
    grid-template-columns: 1fr;
    padding: 0 20px 20px;
  }
  .login-story {
    padding: 50px 4vw 55px;
  }
  .login-story h1 {
    font-size: clamp(42px, 6.8vw, 68px);
  }
  .login-visual {
    min-height: 430px;
  }
  .capabilities-section,
  .flow-section {
    padding: 90px 5vw;
  }
  .capability-item {
    padding: 20px;
  }
  .capability-body h3 {
    font-size: 19px;
  }
  .login-action {
    gap: 40px;
    padding: 80px 5vw;
  }
  .login-card {
    padding: 30px;
  }
}
@media (max-width: 700px) {
  .app-nav {
    min-height: 76px;
    padding: 16px 18px;
    gap: 14px;
  }
  .app-nav .brand {
    font-size: 17px;
  }
  .app-nav .brand-mark {
    width: 35px;
    height: 35px;
  }
  .nav-toggle {
    display: inline-flex;
    min-height: 36px;
    padding: 8px 10px;
    font-size: 11px;
    margin-left: auto;
    background: transparent;
    color: #d4e3ca;
    border-color: #486044;
  }
  .nav-account {
    margin-left: 0;
  }
  .account-name,
  .nav-account .avatar {
    display: none;
  }
  .workspace-nav {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 4px;
  }
  .workspace-nav.is-open {
    display: grid;
  }
  .nav-item {
    padding: 12px;
    font-size: 12px;
  }
  .nav-item svg {
    display: block;
  }
  .topbar {
    height: 52px;
    padding: 0 18px;
  }
  .breadcrumb {
    font-size: 11px;
  }
  .breadcrumb span {
    margin: 0 9px;
  }
  .content {
    padding: 30px 18px 0;
  }
  .page-heading {
    flex-direction: column;
    gap: 20px;
    margin-bottom: 26px;
  }
  .page-heading h1,
  .overview-heading h1 {
    font-size: 32px;
    line-height: 1.4;
    letter-spacing: -1.3px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .context-banner {
    padding: 14px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .context-banner > span {
    display: flex;
  }
  .filters {
    padding: 16px;
    gap: 12px;
  }
  .filter-field {
    min-width: 120px;
    flex: 1 1 calc(50% - 12px);
  }
  .filter-field:has(input[name="q"]) {
    flex: 1 1 100%;
  }
  .metric-card {
    padding: 19px 15px;
    min-height: 150px;
  }
  .metric-title {
    font-size: 11px;
  }
  .metric-value {
    font-size: 29px;
    letter-spacing: -1px;
  }
  .metric-note {
    font-size: 10px;
  }
  .insight-strip {
    padding: 15px;
  }
  .insight-strip b {
    font-size: 11px;
    line-height: 1.7;
  }
  .dashboard-bento {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .dashboard-bento > .panel:nth-child(n) {
    grid-column: auto;
    order: initial;
  }
  .panel-head {
    padding: 22px 18px 8px;
    gap: 12px;
  }
  .panel-head input {
    width: 100%;
  }
  .chart,
  .chart.short {
    height: 280px;
    margin: 5px 8px 0;
  }
  .dashboard-impact {
    gap: 14px;
  }
  .workspace-next {
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 0;
    margin-top: 40px;
  }
  .workspace-next h2 {
    font-size: 26px;
  }
  .app-footer {
    margin-top: 24px;
    padding: 25px 18px;
    gap: 20px;
  }
  .app-footer > a span {
    display: block;
    margin: 10px 0 0;
    font-size: 11px;
  }
  .app-footer > div {
    flex-wrap: wrap;
    gap: 18px;
    font-size: 11px;
  }
  .app-footer small {
    width: 100%;
  }
  .threshold-grid {
    gap: 12px;
    padding: 18px;
  }
  .threshold-card {
    padding: 16px;
  }
  .workflow-banner {
    padding: 18px;
    flex-wrap: wrap;
  }
  .workflow-banner span {
    font-size: 10px;
  }
  .upload-panel,
  .import-guide {
    padding: 22px;
  }
  .source-stats + .panel {
    padding: 20px;
  }
  .source-pagination {
    padding: 0 18px 18px;
  }
  .pagination {
    gap: 12px;
    flex-wrap: wrap;
  }
  .password-form input {
    min-width: 0;
    width: 100%;
  }
  dialog {
    padding: 24px;
    max-width: calc(100vw - 28px);
  }
  .form-grid > label {
    grid-column: span 2;
  }
  .public-nav {
    min-height: 82px;
    padding: 20px;
  }
  .public-nav nav {
    gap: 0;
    font-size: 11px;
  }
  .public-nav nav a:not(:last-child) {
    display: none;
  }
  .login-hero {
    padding: 0 14px 14px;
    gap: 10px;
    min-height: 0;
  }
  .login-story {
    padding: 42px 10px 38px;
  }
  .intro-line {
    margin-bottom: 26px;
    font-size: 11px;
  }
  .login-story h1 {
    font-size: clamp(29px, 7.4vw, 46px);
    letter-spacing: -1.5px;
    line-height: 1.45;
    margin-bottom: 23px;
  }
  .hero-description {
    font-size: 12px;
    margin-bottom: 28px;
  }
  .hero-links {
    gap: 10px;
  }
  .hero-links .button {
    padding: 13px 15px;
    min-height: 46px;
    gap: 16px;
    font-size: 11px;
  }
  .hero-footnote {
    font-size: 10px;
    margin-top: 32px;
  }
  .login-visual {
    min-height: 360px;
    border-radius: 12px;
  }
  .visual-copy {
    left: 26px;
    bottom: 30px;
  }
  .visual-copy p {
    font-size: 29px;
  }
  .capability-marquee {
    padding: 22px 0;
    margin-top: 25px;
  }
  .marquee-track {
    gap: 28px;
  }
  .marquee-track span {
    font-size: 25px;
  }
  .capabilities-section,
  .flow-section {
    padding: 70px 22px;
  }
  .section-intro {
    flex-direction: column;
    gap: 24px;
    margin-bottom: 35px;
  }
  .section-intro h2 {
    font-size: 32px;
    line-height: 1.5;
  }
  .horizontal-accordion {
    flex-direction: column;
  }
  .capability-item {
    padding: 24px;
  }
  .capability-body svg {
    height: 110px;
    margin: 22px 0 14px;
  }
  .capability-item:not(.is-expanded) .capability-body {
    display: none;
  }
  .flow-section {
    border-radius: 0;
    margin-bottom: 0;
  }
  .flow-card {
    padding: 28px;
    min-height: 250px;
  }
  .flow-card h3 {
    font-size: 23px;
    max-width: 260px;
  }
  .flow-card p {
    font-size: 12px;
  }
  .flow-arrow {
    right: 28px;
    top: 26px;
    font-size: 24px;
  }
  .login-action {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 65px 22px;
  }
  .login-action-copy {
    padding: 0;
  }
  .login-action-copy > h2 {
    font-size: 43px;
  }
  .guide-carousel {
    margin-top: 35px;
  }
  .guide-quote {
    min-height: 54px;
    font-size: 13px;
    margin-bottom: 16px;
  }
  .login-card {
    max-width: none;
    padding: 27px;
  }
  .public-footer {
    flex-wrap: wrap;
    padding: 30px 22px;
    gap: 20px;
    font-size: 10px;
  }
  .public-footer > span {
    display: block;
    order: 3;
    width: 100%;
  }
}
/* 减少动态效果：内容始终可见，停用循环与滚动堆叠。 */
@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
    transform: none;
  }
  .editorial-image,
  .flow-card {
    transform: none !important;
  }
  .flow-card {
    position: relative !important;
    top: auto !important;
  }
  .capability-body svg {
    transition: none;
  }
}

/* 隐藏原生上传/分段控件：不让通用控件最小高度改变视觉隐藏。 */
.drop-zone input,
.segmented input {
  min-height: 0;
}

/* 可访问性与操作反馈补充；每条声明独立成行，便于维护。 */
body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}
button,
a,
input,
select,
summary {
  touch-action: manipulation;
}
h1,
h2 {
  text-wrap: balance;
}
/* 跳过重复导航：只在键盘聚焦时显示，目标不会被固定顶栏覆盖。 */
.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 2000;
  padding: 12px 18px;
  background: #fff;
  color: #17382c;
  border: 2px solid #244c3d;
  border-radius: 8px;
  transform: translateY(-180%);
}
.skip-link:focus {
  transform: translateY(0);
}
#main-content,
.chart-data,
#preview-panel,
#source-records-panel {
  scroll-margin-top: 160px;
}
.app-nav :focus-visible,
.login-action-copy :focus-visible {
  outline: 3px solid #d0ed8c;
  outline-offset: 4px;
}
.app-nav .nav-toggle:hover,
.app-nav .nav-toggle[aria-expanded="true"] {
  background: #304c40;
  color: #f1f5ec;
  border-color: #a7bea2;
}
.control-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #526247;
  min-width: 0;
}
.record-controls > div {
  align-items: flex-end;
  flex-wrap: wrap;
}
.password-form label {
  flex: 1 1 190px;
  min-width: 0;
  margin: 0;
}
.password-form label input {
  width: 100%;
  min-width: 0;
}
.password-form {
  align-items: flex-end;
}
input::placeholder,
textarea::placeholder {
  color: #62705f;
  opacity: 1;
}
/* 已校验过的小字号文字使用更深色；保留原有主色和信息层级。 */
.order-card .card-meta,
.order-card > p,
.login-card > .muted,
.login-policy,
.capability-body p,
.flow-card p,
.panel-head p,
.panel-head .unit,
.legend-dot {
  color: var(--ui-secondary);
}
/* 错误始终保留到重试；对话框内部也能直接看到并聚焦。 */
.form-error,
.field-error {
  color: var(--ui-error);
  font-size: 13px;
  line-height: 1.8;
}
.form-error {
  grid-column: 1 / -1;
  flex-basis: 100%;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #fcf0ee;
  border: 1px solid #d8aaa3;
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.field-error {
  display: block;
  margin-top: 5px;
}
[aria-invalid="true"] {
  border-color: var(--ui-error);
}
[aria-busy="true"] {
  cursor: progress;
}
button[aria-busy="true"]::after,
form[aria-busy="true"] button:not([type="button"]):not([type="reset"])::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ui-progress 0.8s linear infinite;
}
@keyframes ui-progress {
  to {
    transform: rotate(360deg);
  }
}
dialog {
  overscroll-behavior: contain;
}
/* 图表与文字数据共享同一份响应；展开后可直接用键盘阅读数值。 */
.chart-data {
  margin: 0 24px 22px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.chart-data summary {
  cursor: pointer;
  color: #244c3d;
  font-size: 12px;
  padding: 8px 0;
}
.chart-data summary:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}
.chart-data td {
  font-variant-numeric: tabular-nums;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.marquee-controls {
  display: flex;
  justify-content: flex-end;
  padding: 10px 5vw 0;
}
.marquee-controls + .capability-marquee {
  margin-top: 12px;
}
.capability-item {
  transition: background 0.3s;
}
/* 长业务文字可折行；表格仍在独立区域内横向滚动。 */
.order-card h3,
.order-card > p,
.account-name {
  overflow-wrap: anywhere;
}
#toast {
  transition:
    opacity 0.2s,
    transform 0.2s;
}
@media (max-width: 700px) {
  .control-label {
    flex: 1 1 140px;
  }
  #main-content {
    scroll-margin-top: 85px;
  }
  .chart-data {
    margin: 0 18px 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  button[aria-busy="true"]::after,
  form[aria-busy="true"]
    button:not([type="button"]):not([type="reset"])::after {
    animation: none;
  }
}

/* 公共工作台入场：替代只为标题加载 GSAP，减少动态效果时保持静态。 */
@keyframes workspace-enter {
  from {
    opacity: 0.5;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .app-main .page-heading {
    animation: workspace-enter 0.55s ease-out;
  }
}
/* 全部原生选择框显式使用主题色；摘要键盘焦点沿用全站焦点样式。 */
select {
  background-color: var(--paper);
  color: var(--ink-soft);
}
summary:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

/* 手机账户表单纵向排列，标签不沿用桌面横排的 flex-basis。 */
@media (max-width: 700px) {
  .password-form {
    align-items: stretch;
  }
  .password-form label {
    flex: 0 1 auto;
    width: 100%;
  }
}

/* 辅助文字对比度：轻背景上的时间、分页和来源说明使用统一深色。 */
td small,
.pagination,
.source-pagination,
.timeline small,
.timeline p,
.kanban-more,
.metric-note,
.breadcrumb,
.topbar-right,
.workflow-banner span,
.public-footer,
.hero-footnote,
.section-intro p,
.flow-kicker {
  color: var(--ui-secondary);
}
.sample-tag {
  color: #715d2c;
}
.guide-controls {
  color: #c6d8b6;
}
/* 工单“继续加载”后可能超过50项，离屏卡片延迟渲染。 */
.order-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 280px;
}
