/* 结果页之外的页面（登录、任务列表、用户管理、审计日志、个人资料、改密）
   的版式与历史控件。

   这些页面正在逐页换成真 Ant Design 组件岛。已经换过的部分由 antd 自己按
   主题渲染，本文件一律不碰——所有控件选择器都带 :not([class*="ant-"])，
   否则会出现同一张表单里输入框 8px、按钮 12px 这种两种圆角并存的情形。
   还没换的部分继续按同一套令牌重绘，保证过渡期里两者看起来仍是一套。

   选择器对着各页实际用的类名写（.btn / .form-input / .primary-button /
   .account-primary-button / .summary-card …），不是通用猜测；统一收在
   body.ht-theme 作用域下，好压过各页自己的 body.<page-class> 规则，
   而不必动用 !important。

   加载顺序：本文件必须在各页原有主题之后。 */

:root {
  /* 商业主题（任务列表、外壳）的品牌变量重定向 */
  --dd-brand: var(--ht-primary);
  --dd-brand-strong: var(--ht-primary-active);
  --dd-card: var(--ht-bg-container);
  --dd-border: var(--ht-border);
  --dd-border-strong: var(--ht-border);
  --dd-text-main: var(--ht-text);
  --dd-text-sub: var(--ht-text-secondary);
  --dd-success: var(--ht-success);
  --dd-warning: var(--ht-warning);
  --dd-error: var(--ht-error);
  --dd-shadow: var(--ht-shadow-3);
  --dd-shadow-soft: var(--ht-shadow-1);

  /* 结果页外壳那套 mac 玻璃变量，只把关键色收归统一 */
  --mac-blue: var(--ht-primary);
  --mac-blue-soft: var(--ht-primary-bg);
  --mac-text: var(--ht-text);
  --mac-sub: var(--ht-text-secondary);
}

/* ============================================================
   按钮 —— 与结果页、与 antd Button 同一规格
   ============================================================ */
body.ht-theme .btn,
body.ht-theme .primary-button,
body.ht-theme .account-primary-button,
body.ht-theme .btn-edit,
body.ht-theme .btn-delete,
body.ht-theme .table-button,
body.ht-theme .dd-user-menu button:not([class*="ant-"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--ht-control-height);
  padding: 0 16px;
  border: 1px solid var(--ht-border);
  border-radius: var(--ht-radius);
  background: var(--ht-bg-container);
  color: var(--ht-text);
  font-size: var(--ht-font-size);
  font-weight: 400;
  line-height: var(--ht-line-height);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--ht-motion-base) var(--ht-ease),
    border-color var(--ht-motion-base) var(--ht-ease),
    color var(--ht-motion-base) var(--ht-ease),
    box-shadow var(--ht-motion-base) var(--ht-ease);
}
body.ht-theme .btn-secondary:hover:not(:disabled),
body.ht-theme .btn-edit:hover:not(:disabled),
body.ht-theme .table-button:hover:not(:disabled),
body.ht-theme .dd-user-menu button:not([class*="ant-"]):hover:not(:disabled) {
  border-color: var(--ht-primary-hover);
  color: var(--ht-primary-hover);
}

/* 主操作：登录、新建项目、查询、保存。
   镜像主题把主按钮画成渐变，antd 的主按钮是平色；统一取平色。 */
body.ht-theme .btn-primary,
body.ht-theme .primary-button,
body.ht-theme .account-primary-button {
  border-color: var(--ht-primary);
  background: var(--ht-primary);
  background-image: none;
  color: #fff;
  box-shadow: 0 2px 0 var(--ht-primary-shadow);
}
body.ht-theme .btn-primary:hover:not(:disabled),
body.ht-theme .primary-button:hover:not(:disabled),
body.ht-theme .account-primary-button:hover:not(:disabled) {
  border-color: var(--ht-primary-hover);
  background: var(--ht-primary-hover);
  background-image: none;
  color: #fff;
}
body.ht-theme .btn-primary:active:not(:disabled),
body.ht-theme .primary-button:active:not(:disabled),
body.ht-theme .account-primary-button:active:not(:disabled) {
  border-color: var(--ht-primary-active);
  background: var(--ht-primary-active);
}

/* 危险：描边红字。列表里成排的实心红太吵 */
body.ht-theme .btn-delete {
  border-color: var(--ht-error-border);
  background: var(--ht-bg-container);
  color: var(--ht-error);
}
body.ht-theme .btn-delete:hover:not(:disabled) {
  border-color: var(--ht-error-hover);
  background: var(--ht-error-bg);
  color: var(--ht-error-hover);
}

/* 行内小按钮 */
body.ht-theme .btn-edit,
body.ht-theme .btn-delete,
body.ht-theme .table-button {
  height: var(--ht-control-height-sm);
  padding: 0 10px;
  border-radius: var(--ht-radius-sm);
  font-size: var(--ht-font-size-sm);
}

body.ht-theme .btn:disabled,
body.ht-theme .primary-button:disabled,
body.ht-theme .account-primary-button:disabled {
  border-color: var(--ht-border);
  background: var(--ht-fill-hover);
  background-image: none;
  color: var(--ht-text-quaternary);
  box-shadow: none;
  cursor: not-allowed;
}

body.ht-theme .btn:focus-visible,
body.ht-theme .primary-button:focus-visible,
body.ht-theme .account-primary-button:focus-visible,
body.ht-theme .btn-edit:focus-visible,
body.ht-theme .btn-delete:focus-visible,
body.ht-theme .table-button:focus-visible,
body.ht-theme .dd-user-menu button:not([class*="ant-"]):focus-visible {
  outline: 4px solid var(--ht-primary-outline);
  outline-offset: 1px;
}

/* 表头排序按钮：是控件不是按钮，只统一交互反馈 */
body.ht-theme .th-sort-btn {
  color: var(--ht-text-secondary);
  transition: color var(--ht-motion-fast) var(--ht-ease);
}
body.ht-theme .th-sort-btn:hover,
body.ht-theme .th-sort-btn.active {
  color: var(--ht-primary);
}

/* ============================================================
   输入框 —— 与 antd Input 同规格
   ============================================================ */
body.ht-theme .form-input,
body.ht-theme .form-select,
body.ht-theme .control-select,
body.ht-theme .auth-card input:not([class*="ant-"]),
body.ht-theme .account-panel input:not([class*="ant-"]),
body.ht-theme .account-dialog input:not([class*="ant-"]),
body.ht-theme .account-dialog select:not([class*="ant-"]) {
  height: var(--ht-control-height);
  padding: 0 11px;
  border: 1px solid var(--ht-border);
  border-radius: var(--ht-radius);
  background: var(--ht-bg-container);
  color: var(--ht-text);
  font-size: var(--ht-font-size);
  transition: border-color var(--ht-motion-base) var(--ht-ease),
    box-shadow var(--ht-motion-base) var(--ht-ease);
}
body.ht-theme .form-input:hover:not(:disabled),
body.ht-theme .form-select:hover:not(:disabled),
body.ht-theme .control-select:hover:not(:disabled),
body.ht-theme .auth-card input:not([class*="ant-"]):hover:not(:disabled),
body.ht-theme .account-panel input:not([class*="ant-"]):hover:not(:disabled) {
  border-color: var(--ht-primary-hover);
}
body.ht-theme .form-input:focus,
body.ht-theme .form-select:focus,
body.ht-theme .control-select:focus,
body.ht-theme .auth-card input:not([class*="ant-"]):focus,
body.ht-theme .account-panel input:not([class*="ant-"]):focus,
body.ht-theme .account-dialog input:not([class*="ant-"]):focus,
body.ht-theme .account-dialog select:not([class*="ant-"]):focus {
  outline: none;
  border-color: var(--ht-primary);
  box-shadow: 0 0 0 2px var(--ht-primary-outline);
}
/* 新建/编辑任务弹窗里的字段用 id 选择器写死过一次尺寸，权重高于类选择器，
   这里对着同一个 id 收回来，让弹窗里的输入框与页面其它地方一致。 */
body.ht-theme #create-task-modal .form-input,
body.ht-theme #create-task-modal .form-select,
body.ht-theme #edit-task-modal .form-input,
body.ht-theme #edit-task-modal .form-select {
  height: var(--ht-control-height);
  padding: 0 11px;
  border-radius: var(--ht-radius);
  border: 1px solid var(--ht-border);
  background: var(--ht-bg-container);
}
body.ht-theme #create-task-modal .form-input:focus,
body.ht-theme #create-task-modal .form-select:focus,
body.ht-theme #edit-task-modal .form-input:focus,
body.ht-theme #edit-task-modal .form-select:focus {
  border-color: var(--ht-primary);
  box-shadow: 0 0 0 2px var(--ht-primary-outline);
}

body.ht-theme textarea.form-input,
body.ht-theme #create-task-modal textarea.form-input,
body.ht-theme #edit-task-modal textarea.form-input,
body.ht-theme .account-panel textarea:not([class*="ant-"]) {
  height: auto;
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
}

/* 任务列表组件岛：只补区块间距，控件外观由主题令牌负责 */
body.ht-theme .hongtai-task-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
body.ht-theme .hongtai-task-list__filters .ant-form-item {
  margin-bottom: 0;
}
body.ht-theme .hongtai-task-list__filters .ant-form-inline {
  row-gap: 12px;
}
body.ht-theme .hongtai-task-list .ant-table-tbody > tr > td {
  font-variant-numeric: tabular-nums;
}

/* 账号页组件岛（个人资料、修改密码） */
body.ht-theme .hongtai-kicker {
  display: block;
  font-size: var(--ht-font-size-sm);
  letter-spacing: 0.08em;
}
body.ht-theme .hongtai-profile-card__title,
body.ht-theme .hongtai-password-card__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ht-text);
  margin-top: 2px;
}
body.ht-theme .hongtai-profile-card__actions {
  margin-top: 20px;
}
body.ht-theme .hongtai-password-card {
  max-width: 520px;
}
body.ht-theme .hongtai-password-card__alert {
  margin-bottom: 16px;
}
body.ht-theme .hongtai-password-card__submit {
  margin-top: 8px;
  margin-bottom: 0;
}

/* 后台组件岛（用户管理、审计日志） */
body.ht-theme .hongtai-admin {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
body.ht-theme .hongtai-admin__create {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr)) auto;
  gap: 0 16px;
  align-items: start;
}
body.ht-theme .hongtai-admin__create > .ant-form-item {
  min-width: 0;
  align-self: start;
}
/* auth.css 仍服务于历史原生表单，它的全局 input/select 规则不能决定
   Ant Design 复合控件的尺寸。创建用户区统一以 48px 为准；密码框内部的
   input 只负责文字，不再把自己的 48px min-height 叠加到外壳上。 */
body.ht-theme .hongtai-admin__create > .ant-form-item .ant-input,
body.ht-theme .hongtai-admin__create > .ant-form-item .ant-input-affix-wrapper,
body.ht-theme .hongtai-admin__create > .ant-form-item .ant-select-selector,
body.ht-theme .hongtai-admin__create > .ant-form-item .ant-btn {
  height: 48px;
  min-height: 48px;
}
body.ht-theme .hongtai-admin__create > .ant-form-item .ant-input-affix-wrapper > .ant-input {
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}
@media (min-width: 1181px) {
  body.ht-theme .hongtai-admin__create > .ant-form-item:nth-child(1) { grid-area: 1 / 1; }
  body.ht-theme .hongtai-admin__create > .ant-form-item:nth-child(2) { grid-area: 1 / 2; }
  body.ht-theme .hongtai-admin__create > .ant-form-item:nth-child(3) { grid-area: 1 / 3; }
  body.ht-theme .hongtai-admin__create > .ant-form-item:nth-child(4) { grid-area: 1 / 4; }
  body.ht-theme .hongtai-admin__create > .ant-form-item:nth-child(5) { grid-area: 1 / 5; }
}
body.ht-theme .hongtai-admin__submit {
  padding-top: 30px;
  margin-bottom: 24px;
}
@media (max-width: 1180px) {
  body.ht-theme .hongtai-admin__create {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
  body.ht-theme .hongtai-admin__submit { padding-top: 0; }
}
@media (max-width: 640px) {
  body.ht-theme .hongtai-admin__create { grid-template-columns: 1fr; }
}
body.ht-theme .hongtai-admin .ant-form-inline .ant-form-item {
  margin-bottom: 0;
}
body.ht-theme .hongtai-admin__details {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--ht-radius-sm);
  background: var(--ht-bg-layout);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: var(--ht-font-size-sm);
  line-height: 1.7;
  overflow-x: auto;
}

/* 新建项目弹窗 */
body.ht-theme .hongtai-create-task__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0 16px;
}
body.ht-theme .hongtai-company-option__name {
  font-weight: 600;
  color: var(--ht-text);
}
body.ht-theme .hongtai-company-option__uscc {
  font-size: var(--ht-font-size-sm);
  color: var(--ht-text-tertiary);
  font-variant-numeric: tabular-nums;
}

/* 登录表单是 antd 组件岛：只补它自己的排版，控件外观由主题令牌负责 */
body.ht-theme .hongtai-login-form .ant-form-item {
  margin-bottom: 18px;
}
body.ht-theme .hongtai-login-form__captcha {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
body.ht-theme .hongtai-login-form__submit {
  margin-top: 24px;
  margin-bottom: 0;
}

/* 登录与账号页是低密度的表单页，字段用同一把尺子上更大的一档，
   而不是各自一个随手写下的高度（原来是 46/48px）。 */
body.ht-theme.login-page .auth-card input:not([class*="ant-"]),
body.ht-theme.account-page .account-panel input:not([class*="ant-"]),
body.ht-theme.account-page .account-panel select:not([class*="ant-"]),
body.ht-theme.login-page .primary-button,
body.ht-theme.account-page .account-primary-button {
  height: var(--ht-control-height-lg);
  min-height: var(--ht-control-height-lg);
}
body.ht-theme.login-page .primary-button,
body.ht-theme.account-page .account-primary-button {
  padding: 0 20px;
}

/* ============================================================
   卡片与表格
   ============================================================ */
body.ht-theme .auth-card,
body.ht-theme .account-panel,
body.ht-theme .summary-card {
  border-radius: var(--ht-radius-lg);
  box-shadow: var(--ht-shadow-1);
}
body.ht-theme .summary-card {
  border: 1px solid var(--ht-border-secondary);
  transition: border-color var(--ht-motion-base) var(--ht-ease),
    box-shadow var(--ht-motion-base) var(--ht-ease);
}
body.ht-theme .summary-card:hover {
  border-color: var(--ht-primary-border);
  box-shadow: var(--ht-shadow-2);
}

body.ht-theme table th {
  color: var(--ht-text-secondary);
  font-weight: 500;
}
body.ht-theme table td {
  font-variant-numeric: tabular-nums;
}
body.ht-theme tbody tr {
  transition: background-color var(--ht-motion-fast) var(--ht-ease);
}
body.ht-theme tbody tr:hover {
  background: var(--ht-fill-hover);
}

/* 顶栏 */
body.ht-theme .site-header {
  display: flex;
  align-items: center;
  min-height: 72px;
  gap: 28px;
  padding: 14px clamp(24px, 6vw, 96px);
  background: #244f73;
  border-bottom: 1px solid var(--ht-border-secondary);
}
body.ht-theme .site-header .brand {
  flex: 0 0 auto;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}
body.ht-theme .site-header .dd-user-menu {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  margin-left: auto;
  gap: 10px;
}
body.ht-theme .site-header .dd-user-menu__identity {
  min-height: 40px;
  padding: 0 13px;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
}
body.ht-theme .site-header .dd-user-menu__identity span {
  color: rgba(255, 255, 255, 0.72);
}
body.ht-theme .site-header .dd-user-menu a,
body.ht-theme .site-header .dd-user-menu button:not([class*="ant-"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--ht-radius);
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  box-shadow: none;
}
body.ht-theme .site-header .dd-user-menu a:hover,
body.ht-theme .site-header .dd-user-menu button:not([class*="ant-"]):hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
body.ht-theme .site-header .dd-user-menu button[data-auth-logout]:not([class*="ant-"]) {
  border-color: rgba(255, 255, 255, 0.82);
  background: #fff;
  color: #244f73;
}
body.ht-theme .site-header .dd-user-menu button[data-auth-logout]:not([class*="ant-"]):hover:not(:disabled) {
  border-color: #fff;
  background: #f4f8fb;
  color: #173b5b;
}

@media (max-width: 840px) {
  body.ht-theme .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  body.ht-theme .site-header .dd-user-menu {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

/* ============================================================
   入场：卡片一次性落位，克制一档
   ============================================================ */
@keyframes ht-page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
body.ht-theme .auth-card,
body.ht-theme .account-panel,
body.ht-theme .summary-card {
  animation: ht-page-in var(--ht-motion-slow) var(--ht-ease-out) both;
}
body.ht-theme .summary-card:nth-child(2) { animation-delay: 0.05s; }
body.ht-theme .summary-card:nth-child(3) { animation-delay: 0.1s; }
body.ht-theme .summary-card:nth-child(4) { animation-delay: 0.15s; }

@media (prefers-reduced-motion: reduce) {
  body.ht-theme .auth-card,
  body.ht-theme .account-panel,
  body.ht-theme .summary-card {
    animation: none;
  }
  body.ht-theme tbody tr,
  body.ht-theme .btn,
  body.ht-theme .primary-button,
  body.ht-theme .account-primary-button,
  body.ht-theme .form-input,
  body.ht-theme .summary-card {
    transition-duration: 0.01ms;
  }
}
/* 企业 AutoComplete 的候选层挂在 body，antd 5.21 同时写入内联
   z-index:1150；必须覆盖它，才能显示在 11100 的新建项目 Modal 之上。 */
body.dd-commercial-theme .hongtai-company-autocomplete-popup {
  z-index: 11150 !important;
}

/* 报告模板 Select 与企业候选框一样挂到 body，需要高于
   z-index:11100 的新建项目 Modal，否则菜单虽展开却会被弹窗遮住。 */
body.dd-commercial-theme .hongtai-report-template-popup {
  z-index: 11150 !important;
}

/* 任务资料采集工作台 */
.collection-page { max-width: 1180px; margin: 0 auto; display: grid; gap: 20px; }
.collection-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 30px; border: 1px solid var(--ht-border-secondary); border-radius: 16px; background: #fff; box-shadow: var(--ht-shadow-1); }
.collection-hero h1 { margin: 8px 0 6px; font-size: 26px; color: var(--ht-text); }
.collection-hero p { margin: 0; color: var(--ht-text-secondary); }
.collection-hero p span { margin-left: 16px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.collection-back { color: var(--ht-primary); text-decoration: none; }
.collection-report-link { flex: 0 0 auto; padding: 11px 18px; border-radius: 9px; background: var(--ht-primary); color: #fff; text-decoration: none; }
.collection-section { padding: 26px 28px; border: 1px solid var(--ht-border-secondary); border-radius: 16px; background: #fff; box-shadow: var(--ht-shadow-1); }
.collection-section header { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.collection-section h2 { margin: 0; font-size: 22px; color: var(--ht-text); }
.collection-section h2 em { color: var(--ht-error); font-style: normal; }
.collection-section header p { margin: 7px 0 0; color: var(--ht-text-secondary); line-height: 1.65; }
.collection-step { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #e8f2ff; color: var(--ht-primary); font-size: 18px; font-weight: 700; }
.collection-time { margin-top: 3px; padding: 5px 10px; border-radius: 999px; background: #edf8f1; color: #217548; font-size: 13px; white-space: nowrap; }
.collection-scope { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; padding: 12px 14px; border: 1px solid var(--ht-border-secondary); border-radius: 11px; background: #f8fafc; }
.collection-scope label { color: var(--ht-text-secondary); font-weight: 600; }
.collection-scope select { min-width: 260px; padding: 9px 34px 9px 12px; border: 1px solid var(--ht-border); border-radius: 8px; background: #fff; color: var(--ht-text); font: inherit; }
.collection-scope__identity { margin-left: auto; color: var(--ht-text-secondary); font-size: 13px; }
.collection-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.collection-btn { min-height: 42px; padding: 0 17px; border: 1px solid var(--ht-border); border-radius: 9px; background: #fff; color: var(--ht-text); font: inherit; cursor: pointer; }
.collection-btn[hidden] { display: none !important; }
.collection-btn:hover { border-color: var(--ht-primary); color: var(--ht-primary); }
.collection-btn:disabled { cursor: wait; opacity: .55; }
.collection-btn--primary { border-color: #a8d5ff; background: #eaf5ff; color: #087bd9; }
.collection-status, .collection-notice { margin-top: 12px; padding: 10px 13px; border-radius: 9px; background: #eefaf5; color: #178a59; }
.collection-status.is-error, .collection-notice.is-error { background: #fff0f0; color: #b42318; }
.collection-progress { margin-top: 14px; padding: 18px; border: 1px solid var(--ht-border-secondary); border-radius: 12px; background: #f8fafc; }
.collection-progress__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.collection-progress__steps span { position: relative; display: flex; align-items: center; gap: 8px; color: var(--ht-text-tertiary); font-size: 13px; }
.collection-progress__steps span:not(:last-child)::after { content: ""; height: 2px; flex: 1; margin-left: 4px; background: #d9e1eb; }
.collection-progress__steps b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e6ebf1; color: #667085; }
.collection-progress__steps span.is-active, .collection-progress__steps span.is-current { color: var(--ht-primary); font-weight: 600; }
.collection-progress__steps span.is-active b, .collection-progress__steps span.is-current b { background: var(--ht-primary); color: #fff; }
.collection-progress__steps span.is-active:not(:last-child)::after { background: var(--ht-primary); }
.collection-progress__headline, .collection-progress__meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.collection-progress__headline strong { color: var(--ht-text); }
.collection-progress__headline span { color: var(--ht-primary); font-weight: 700; }
.collection-progress__bar { height: 8px; margin: 10px 0; overflow: hidden; border-radius: 999px; background: #e6ebf1; }
.collection-progress__bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--ht-primary); transition: width .25s ease; }
.collection-progress p { margin: 0 0 12px; color: var(--ht-text-secondary); }
.collection-progress__meta { color: var(--ht-text-tertiary); font-size: 12px; }
.collection-actions--compact { margin-top: 14px; }
.collection-dialog { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 60px); padding: 0; border: 0; border-radius: 15px; box-shadow: 0 26px 80px rgba(15, 23, 42, .26); }
.collection-dialog::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); }
.collection-dialog__head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--ht-border-secondary); background: #fff; }
.collection-dialog__head h2 { margin: 0; font-size: 19px; }
.collection-dialog__head button { border: 0; background: transparent; color: #667085; font-size: 28px; cursor: pointer; }
.collection-dialog pre { min-height: 260px; margin: 0; padding: 20px; overflow: auto; white-space: pre-wrap; word-break: break-word; background: #f8fafc; color: #243247; font: 13px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; }
.collection-dialog--confirm { width: min(520px, calc(100vw - 32px)); }
.collection-dialog--confirm form { margin: 0; }
.collection-dialog__body { padding: 22px 20px 8px; color: #475467; line-height: 1.7; }
.collection-dialog__body p { margin: 0 0 12px; }
.collection-dialog__warning { padding: 12px 14px; border: 1px solid #fed7aa; border-radius: 10px; background: #fff7ed; color: #c2410c; font-weight: 600; }
.collection-dialog__actions { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px 20px; }
@media (max-width: 720px) { .collection-hero { align-items: flex-start; flex-direction: column; } .collection-section header { grid-template-columns: 42px minmax(0, 1fr); } .collection-time { grid-column: 2; justify-self: start; } .collection-scope { align-items: stretch; flex-direction: column; } .collection-scope select { min-width: 0; width: 100%; } .collection-scope__identity { margin-left: 0; } .collection-progress__steps { grid-template-columns: 1fr; } .collection-progress__steps span::after { display: none; } .collection-progress__headline, .collection-progress__meta { align-items: flex-start; flex-direction: column; gap: 4px; } }

/* 报告模板管理：目录树允许任意深度，横向空间不足时只让树区域滚动。 */
body.ht-theme .hongtai-report-templates__heading,
body.ht-theme .hongtai-report-template-card__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
body.ht-theme .hongtai-report-templates__heading .ant-typography { margin: 0; }
body.ht-theme .hongtai-report-templates__list { display: grid; gap: 16px; }
body.ht-theme .hongtai-report-template-card__meta { min-width: 0; flex: 1; }
body.ht-theme .hongtai-report-template-card__meta .ant-typography { margin-bottom: 8px; }
body.ht-theme .hongtai-report-template-form__meta {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr);
  gap: 16px;
}
body.ht-theme .hongtai-report-template-form__outline-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 12px;
}
body.ht-theme .hongtai-template-tree {
  min-width: 660px;
  padding: 14px;
  border: 1px solid var(--ht-border);
  border-radius: var(--ht-radius-md);
  background: var(--ht-bg-layout);
}
body.ht-theme .hongtai-template-tree__branch { position: relative; }
body.ht-theme .hongtai-template-tree__row {
  display: grid;
  grid-template-columns: 44px minmax(260px, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px calc(var(--tree-depth) * 26px);
}
body.ht-theme .hongtai-template-tree__level {
  color: var(--ht-text-tertiary);
  font-size: var(--ht-font-size-sm);
  text-align: center;
}
body.ht-theme .hongtai-template-tree__children {
  border-left: 1px dashed var(--ht-border);
  margin-left: 20px;
}
@media (max-width: 760px) {
  body.ht-theme .hongtai-report-templates__heading,
  body.ht-theme .hongtai-report-template-card__body { align-items: stretch; flex-direction: column; }
  body.ht-theme .hongtai-report-template-form__meta { grid-template-columns: 1fr; gap: 0; }
  body.ht-theme .hongtai-report-template-form__outline-head { flex-direction: column; gap: 4px; }
}
body.ht-theme .hongtai-models__heading,
body.ht-theme .hongtai-model-card__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
body.ht-theme .hongtai-models__heading { margin: 8px 0 20px; }
body.ht-theme .hongtai-models__heading .ant-typography { margin: 0; }
body.ht-theme .hongtai-model-card { margin-bottom: 16px; }
body.ht-theme .hongtai-model-card__icon {
  flex: none; width: 64px; height: 64px; border-radius: 16px;
  display: grid; place-items: center; font-size: 32px;
  color: var(--ht-primary); background: var(--ht-primary-bg);
}
body.ht-theme .hongtai-model-card__meta { display: grid; gap: 6px; flex: 1; min-width: 0; }
body.ht-theme .hongtai-model-card__meta .ant-typography { margin: 0; }
@media (max-width: 900px) {
  body.ht-theme .hongtai-model-card__body { align-items: flex-start; flex-wrap: wrap; }
  body.ht-theme .hongtai-model-card__meta { min-width: calc(100% - 90px); }
}
