/* ============================================================
   FTIR.fun — Halal Origin Pre-screening 清真专版（完整独立设计系统）
   设计语言：深祖母绿 × 金箔金 × 拱形
   说明：装饰一律使用纯中性元素（金线、圆环、菱形 ◆），
   不使用任何具宗教/政治符号含义的纹样（八角星、星月等），
   避免文化敏感争议。
   本文件为 /halal/ 四页面（workbench / login / result / print）
   的唯一样式来源，布局与组件全部为 halal 专属，不复用站内骨架。
   ============================================================ */

/* ════════════ 设计令牌 ════════════ */
:root {
  /* 祖母绿系 */
  --halal-e-950: #04251b;
  --halal-e-900: #073524;
  --halal-e-800: #0a4531;
  --halal-e-700: #0e5d43;
  --halal-e-600: #147a58;
  --halal-e-500: #2d8f68;
  --halal-e-300: #9fd4bb;
  --halal-e-100: #e2f0e9;
  /* 金箔系 */
  --halal-g-600: #a8841d;
  --halal-g-500: #c9a227;
  --halal-g-400: #d9b84a;
  --halal-g-300: #f2d98c;
  --halal-g-200: #faf0d0;
  /* 中性 */
  --halal-ivory: #f8f4ea;
  --halal-sand: #efe8d8;
  --halal-ink: #14281f;
  --halal-muted: #5c6f66;
  --halal-muted-light: #8a9b92;
  /* 语义（红/琥珀/绿保持认知一致） */
  --halal-pass: #34a853;
  --halal-warn: #d97706;
  --halal-fail: #dc2626;
}

/* ════════════ 通用组件 ════════════ */

/* 菱形点缀 */
.hal-diamond {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.hal-diamond::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--halal-g-500);
  transform: rotate(45deg);
  box-sizing: border-box;
}

/* 金箔主按钮 */
.hal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid var(--halal-g-500);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--halal-g-500), var(--halal-g-600));
  color: #fffdf4;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
  transition: filter .18s, transform .12s, box-shadow .18s;
  box-shadow: 0 2px 8px rgba(168, 132, 29, 0.28);
}
.hal-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 14px rgba(168, 132, 29, 0.38);
}
.hal-btn:active {
  transform: translateY(1px);
}
.hal-btn:disabled {
  filter: grayscale(0.7) brightness(0.85);
  cursor: not-allowed;
  box-shadow: none;
}
.hal-btn::before {
  content: "◆";
  font-size: 9px;
  color: var(--halal-g-300);
}

/* 描边次按钮 */
.hal-btn--ghost {
  background: transparent;
  border-color: var(--halal-g-500);
  color: var(--halal-g-500);
  box-shadow: none;
}
.hal-btn--ghost::before { color: inherit; }
.hal-btn--ghost:hover {
  background: rgba(201, 162, 39, 0.1);
  box-shadow: none;
  filter: none;
}

/* 小链接按钮（行内动作） */
.hal-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border: 1px solid var(--halal-g-500);
  border-radius: 6px;
  background: transparent;
  color: var(--halal-g-500);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
}
.hal-link:hover { background: rgba(201, 162, 39, 0.12); }

.hal-link--danger {
  border-color: rgba(220, 38, 38, 0.4);
  color: var(--halal-fail);
}
.hal-link--danger:hover { background: rgba(220, 38, 38, 0.08); }

.hal-link--ok {
  border-color: rgba(52, 168, 83, 0.4);
  color: var(--halal-pass);
}
.hal-link--ok:hover { background: rgba(52, 168, 83, 0.08); }

/* 徽章 */
.hal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.hal-badge::before { content: "◆"; font-size: 7px; }
.hal-badge--pass  { border-color: rgba(52,168,83,.45);  color: var(--halal-pass);  background: rgba(52,168,83,.08); }
.hal-badge--warn  { border-color: rgba(217,119,6,.5);  color: var(--halal-warn);  background: rgba(217,119,6,.1); }
.hal-badge--fail  { border-color: rgba(220,38,38,.45);  color: var(--halal-fail);  background: rgba(220,38,38,.08); }
.hal-badge--gold  { border-color: rgba(201,162,39,.5); color: #8a6a10; background: rgba(201,162,39,.12); }
.hal-badge--gold::before { color: var(--halal-g-500); }

/* 印章式结果徽章 */
.hal-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border: 2px solid var(--halal-g-500);
  border-radius: 10px;
  background: rgba(201, 162, 39, 0.12);
  color: #7c5f0d;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 2px rgba(201, 162, 39, 0.22);
}
/* 结论印章按结论着色时，让 hal-badge--* 的颜色生效并保留印章体量 */
.hal-seal--tone {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 14px;
  text-align: center;
  box-shadow: none;
  border-width: 2px;
}

/* 表单元素 */
.hal-field {
  display: grid;
  gap: 5px;
}
.hal-field label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hal-field label::before {
  content: "◆";
  font-size: 7px;
  color: var(--halal-g-500);
}
.hal-field label .req { color: var(--halal-fail); }
.hal-field small {
  font-size: 10px;
  opacity: 0.75;
}
.hal-input,
.hal-field input[type="text"],
.hal-field input[type="password"],
.hal-field input[type="file"],
.hal-field textarea,
.hal-field select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #f3efe3;              /* 深色背景必须浅色文字 */
  caret-color: #f3efe3;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.hal-field input::placeholder,
.hal-field textarea::placeholder {
  color: rgba(243, 239, 227, 0.45);
}
.hal-field textarea { min-height: 56px; resize: vertical; }
.hal-field input:focus,
.hal-field textarea:focus,
.hal-field select:focus {
  outline: none;
  border-color: var(--halal-g-400);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.18);
}
.hal-field input:disabled,
.hal-field select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.hal-field select option { background: #0d2b1e; color: #f5f0e0; }
.hal-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.85;
}
.hal-check::before { display: none; }
.hal-check input { accent-color: var(--halal-g-500); }

/* 空状态 */
.hal-empty {
  padding: 20px;
  border: 1px dashed rgba(201, 162, 39, 0.4);
  border-radius: 10px;
  text-align: center;
  font-size: 12px;
  opacity: 0.75;
}

/* 深色域下的 Guide 步骤卡（空态引导复用） */
.hal-body--dark .hal-guide-step {
  background: rgba(201, 162, 39, 0.08);
  border-color: rgba(201, 162, 39, 0.35);
}
.hal-body--dark .hal-guide-step strong { color: #f6f1e2; }
.hal-body--dark .hal-guide-step span:last-child { color: rgba(226, 232, 226, 0.72); }

/* ════════════ 深色域：工作台 / 登录（祖母绿之夜） ════════════ */
.hal-body--dark {
  margin: 0;
  background:
    radial-gradient(1100px 480px at 50% -10%, rgba(20, 122, 88, 0.25), transparent 60%),
    var(--halal-e-950);
  min-height: 100vh;
}

/* 顶部金线 */
.hal-topline {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--halal-g-500) 18%, var(--halal-g-300) 50%, var(--halal-g-500) 82%, transparent);
}

/* ── 内容最大宽度：宽屏不再满屏拉伸 ── */
.hal-main-wrap {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
}

/* ── 页眉横条（非窗口） ── */
.hal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 26px;
  background:
    linear-gradient(90deg, rgba(7, 53, 36, 0.96), rgba(10, 69, 49, 0.92) 60%, rgba(7, 53, 36, 0.96));
  border-bottom: 1px solid rgba(201, 162, 39, 0.35);
}
.hal-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.hal-header__mark {
  width: 40px;
  height: 40px;
  border: 1px solid var(--halal-g-500);
  border-radius: 50%;
  background: rgba(201, 162, 39, 0.1);
  flex-shrink: 0;
  position: relative;
}
.hal-header__mark::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1.5px solid var(--halal-g-400);
  border-radius: 50%;
}
.hal-header__mark::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--halal-g-300);
  transform: rotate(45deg);
  box-sizing: border-box;
}
.hal-header__title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #f7f2e2;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hal-header__sub {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--halal-g-300);
  opacity: 0.85;
  margin-top: 2px;
}
.hal-header__side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.hal-header__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.12);
  color: var(--halal-g-300);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hal-header__chip::before { content: "◆"; font-size: 7px; }
.hal-header__user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 999px;
  color: #d9e8dc;
  font-size: 11px;
  font-weight: 600;
}
.hal-header__user::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--halal-e-500);
  box-shadow: 0 0 0 2px rgba(45, 143, 104, 0.3);
}

/* 语言切换下拉（清真风格） */
.hal-lang select {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 7px;
  background: rgba(201, 162, 39, 0.1);
  color: var(--halal-g-300);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  max-width: 150px;
}
.hal-lang select:focus {
  outline: none;
  border-color: var(--halal-g-400);
}
.hal-lang select option {
  background: #0d2b1e;
  color: #f5f0e0;
}

/* ── Hero：拱形顶 · 深绿渐变 ── */
.hal-hero {
  position: relative;
  margin: 26px 26px 0;
  padding: 30px 34px 26px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-top: 2px solid var(--halal-g-400);
  border-radius: 22px 22px 10px 10px;   /* 清真寺拱门轮廓 */
  background:
    radial-gradient(60% 120% at 88% -20%, rgba(242, 217, 140, 0.16), transparent 55%),
    linear-gradient(135deg, var(--halal-e-800), var(--halal-e-900) 60%, var(--halal-e-950));
  box-shadow: 0 16px 40px rgba(4, 37, 27, 0.5);
  overflow: hidden;
}
.hal-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 12px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.12);
  color: var(--halal-g-300);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hal-hero__eyebrow::before { content: "◆"; font-size: 8px; }
.hal-hero h1 {
  margin: 14px 0 8px;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0.01em;
  color: #fdf9ea;
}
.hal-hero p {
  margin: 0;
  max-width: 640px;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(226, 240, 233, 0.82);
}
/* 右下角装饰：同心圆环（纯几何，无符号含义） */
.hal-hero__deco {
  position: absolute;
  right: 22px;
  bottom: 18px;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(242, 217, 140, 0.3);
  border-radius: 50%;
  pointer-events: none;
}
.hal-hero__deco::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(242, 217, 140, 0.22);
  border-radius: 50%;
}
.hal-hero__deco::after {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(242, 217, 140, 0.35);
  border-radius: 50%;
}

/* 边界声明横幅 */
.hal-note {
  display: flex;
  gap: 12px;
  margin: 18px 26px 0;
  padding: 13px 18px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-left: 3px solid var(--halal-g-500);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.14), rgba(201, 162, 39, 0.03));
  color: #e8dfb8;
  font-size: 12px;
  line-height: 1.6;
}
.hal-note strong {
  color: var(--halal-g-300);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.hal-note--warn {
  border-color: rgba(217, 119, 6, 0.45);
  border-left-color: var(--halal-warn);
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.14), rgba(217, 119, 6, 0.03));
  color: #eccfa4;
}
.hal-note--warn strong { color: var(--halal-warn); }

/* ── 主体两栏 ── */
.hal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  padding: 22px 26px;
  align-items: start;
}
/* 侧栏无内容时(无参考库且无历史)自动单列,不留空侧栏 */
.hal-layout--solo { grid-template-columns: minmax(0, 1fr); }
.hal-main { display: grid; gap: 18px; min-width: 0; }
.hal-side {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 18px;
}

/* ── 步骤卡片：拱形顶 + 金线 + 菱形编号 ── */
.hal-card {
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-top: 2px solid rgba(201, 162, 39, 0.55);
  border-radius: 14px 14px 10px 10px;
  background: rgba(7, 41, 28, 0.88);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}
.hal-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
  cursor: pointer;
  user-select: none;
}
.hal-card__head:hover { background: rgba(201, 162, 39, 0.05); }
.hal-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border: 1.5px solid var(--halal-g-500);
  border-radius: 50%;
  background: rgba(201, 162, 39, 0.12);
  color: var(--halal-g-300);
  font-size: 13px;
  font-weight: 800;
  font-family: Georgia, "Times New Roman", serif;
  flex-shrink: 0;
}
.hal-card__title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #f7f2e2;
  flex: 1;
}
.hal-card__arrow {
  font-size: 12px;
  color: rgba(242, 217, 140, 0.6);
  transition: transform .25s;
}
.hal-card__arrow.open { transform: rotate(90deg); }
.hal-card__body { padding: 18px; }
.hal-card__desc {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(226, 240, 233, 0.7);
}
.hal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.hal-form-grid .hal-field--full { grid-column: 1 / -1; }
.hal-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

/* 判别区网格 */
.hal-region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.hal-region {
  position: relative;
  padding: 14px 14px 12px;
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 10px;
  background: rgba(10, 69, 49, 0.35);
}
.hal-region::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--halal-g-500), transparent);
}
.hal-region strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--halal-g-300);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.hal-region strong::before {
  content: "◆";
  font-size: 8px;
  color: var(--halal-g-500);
}
.hal-region span {
  display: block;
  color: #f7f2e2;
  font-size: 15px;
  font-weight: 800;
  font-family: Georgia, "Times New Roman", serif;
}
.hal-region small {
  display: block;
  margin-top: 4px;
  color: rgba(226, 240, 233, 0.6);
  font-size: 11px;
  line-height: 1.45;
}

/* 侧栏小节 */
.hal-side-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f7f2e2;
}
.hal-side-title::before {
  content: "◆";
  font-size: 9px;
  color: var(--halal-g-500);
}
.hal-lib-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(201, 162, 39, 0.2);
  border-radius: 8px;
  background: rgba(10, 69, 49, 0.25);
  margin-bottom: 6px;
}
.hal-lib-item__name { font-size: 12px; font-weight: 700; color: #f7f2e2; }
.hal-lib-item__meta { font-size: 10px; color: rgba(226, 240, 233, 0.55); }
.hal-ref-list { margin: 2px 0 8px 14px; display: grid; gap: 4px; }
.hal-ref-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(201, 162, 39, 0.14);
  border-radius: 6px;
  background: rgba(4, 37, 27, 0.5);
  font-size: 11px;
}
.hal-ref-link {
  color: var(--halal-g-300);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hal-ref-link:hover { text-decoration: underline; }

/* 历史记录 */
.hal-history {
  display: grid;
}
.hal-history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 2px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.14);
  font-size: 11px;
  flex-wrap: wrap;
}
.hal-history-item:last-child { border-bottom: none; }
.hal-history-item strong {
  min-width: 68px;
  color: #e8e2c8;
  font-size: 11px;
}
.hal-history-item .hal-badge { font-size: 9px; padding: 2px 8px; }
.hal-history-item .hal-badge::before { display: none; }
.hal-history-meta { color: rgba(226, 240, 233, 0.55); font-size: 10px; }
.hal-history-actions { margin-left: auto; display: flex; gap: 5px; }

/* 消息条 */
.hal-msg {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  border: 1px solid;
}
.hal-msg--error { background: rgba(220, 38, 38, 0.12); color: #f2a9a9; border-color: rgba(220, 38, 38, 0.3); }
.hal-msg--success { background: rgba(52, 168, 83, 0.12); color: #9fd6ae; border-color: rgba(52, 168, 83, 0.3); }

/* 页脚声明条 */
.hal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 26px 22px;
  padding: 12px 18px;
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 10px;
  background: rgba(7, 41, 28, 0.7);
  font-size: 11px;
  color: rgba(226, 240, 233, 0.6);
}
.hal-footer__mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--halal-g-300);
}
.hal-footer__mark::before { content: "◆"; font-size: 8px; }
.hal-footer__sep { color: rgba(201, 162, 39, 0.4); }

/* ════════════ 登录页 ════════════ */
.hal-login {
  min-height: calc(100vh - 3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  box-sizing: border-box;
}
.hal-login-card {
  width: 460px;
  max-width: 100%;
  padding: 40px 38px 34px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-top: 3px solid var(--halal-g-500);
  border-radius: 46px 46px 16px 16px;   /* 米哈拉布拱门 */
  background:
    linear-gradient(180deg, rgba(10, 69, 49, 0.95), rgba(7, 41, 28, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.hal-login-card__mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border: 2px solid var(--halal-g-500);
  border-radius: 50%;
  background: rgba(201, 162, 39, 0.1);
  position: relative;
  box-shadow: 0 0 0 6px rgba(201, 162, 39, 0.1);
}
.hal-login-card__mark::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1.5px solid var(--halal-g-400);
  border-radius: 50%;
}
.hal-login-card__mark::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--halal-g-300);
  transform: rotate(45deg);
  box-sizing: border-box;
}
.hal-login-card h1 {
  margin: 0 0 6px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #f7f2e2;
}
.hal-login-card__sub {
  margin: 0 auto 26px;
  max-width: 340px;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(226, 240, 233, 0.65);
}
.hal-login-field { margin-bottom: 16px; }
.hal-login-errors {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.1);
  color: #f2a9a9;
  font-size: 12px;
}
.hal-login-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 6px;
  border: 1px solid var(--halal-g-400);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--halal-g-500), var(--halal-g-600));
  color: #fffdf4;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: filter .18s;
}
.hal-login-submit:hover { filter: brightness(1.08); }

.hal-login-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #f6f1e2;
}
.hal-login-desc {
  margin: 0 0 20px;
  text-align: center;
  font-size: 12px;
  line-height: 1.65;
  color: rgba(226, 232, 226, 0.72);
}
.hal-login-links {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: rgba(226, 232, 226, 0.45);
}
.hal-login-links a { color: var(--halal-g-300); text-decoration: none; }
.hal-login-links a:hover { text-decoration: underline; }

/* ════════════ Guide 使用指南页（浅色长文） ════════════ */
.hal-guide-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 30px 22px 48px;
  display: grid;
  gap: 18px;
}
.hal-guide-hero {
  text-align: center;
  padding: 34px 22px 8px;
}
.hal-guide-hero h1 {
  margin: 10px 0 8px;
  font-size: 28px;
  font-weight: 800;
  color: var(--halal-e-900);
  letter-spacing: 0.01em;
}
.hal-guide-hero p {
  margin: 0 auto;
  max-width: 640px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--halal-muted);
}
.hal-guide-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.hal-guide-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.hal-guide-step {
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 14px 14px 8px 8px;
  padding: 14px 12px;
  display: grid;
  gap: 6px;
  background: rgba(201, 162, 39, 0.05);
}
.hal-guide-step__num {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--halal-g-500);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.hal-guide-step strong { font-size: 13px; color: var(--halal-e-900); }
.hal-guide-step span:last-child { font-size: 11px; line-height: 1.55; color: var(--halal-muted); }
.hal-guide-h3 {
  margin: 22px 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--halal-e-800);
}
.hal-guide-h3::before { content: "◆ "; font-size: 10px; color: var(--halal-g-600); }
.hal-guide-note-inline {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(201, 162, 39, 0.12);
  border-left: 3px solid var(--halal-g-500);
  font-size: 12px;
  color: #7c5f0d;
}
.hal-guide-cta {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 8px 0 4px;
}
@media (max-width: 860px) {
  .hal-guide-cols { grid-template-columns: 1fr; }
  .hal-guide-steps { grid-template-columns: 1fr 1fr; }
}

/* ════════════ 浅色域：结果页（象牙沙底） ════════════ */
.hal-body--light {
  margin: 0;
  background:
    radial-gradient(900px 400px at 50% -8%, rgba(201, 162, 39, 0.08), transparent 55%),
    var(--halal-ivory);
  min-height: 100vh;
}
.hal-result-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 22px 48px;
  display: grid;
  gap: 20px;
}

/* 结果 Hero */
.hal-result-hero {
  position: relative;
  padding: 30px 34px 26px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-top: 3px solid var(--halal-g-500);
  border-radius: 22px 22px 10px 10px;
  background:
    radial-gradient(60% 120% at 88% -20%, rgba(242, 217, 140, 0.18), transparent 55%),
    linear-gradient(135deg, var(--halal-e-800), var(--halal-e-900) 60%, var(--halal-e-950));
  box-shadow: 0 14px 36px rgba(4, 37, 27, 0.28);
  overflow: hidden;
}
.hal-result-hero__deco {
  position: absolute;
  right: 20px;
  bottom: 16px;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(242, 217, 140, 0.3);
  border-radius: 50%;
  pointer-events: none;
}
.hal-result-hero__deco::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(242, 217, 140, 0.22);
  border-radius: 50%;
}
.hal-result-hero__deco::after {
  content: "";
  position: absolute;
  inset: 21px;
  border: 1px solid rgba(242, 217, 140, 0.35);
  border-radius: 50%;
}
.hal-result-hero h1 {
  margin: 12px 0 8px;
  font-size: 30px;
  font-weight: 800;
  color: #fdf9ea;
  line-height: 1.2;
}
.hal-result-hero p {
  margin: 0;
  max-width: 620px;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(226, 240, 233, 0.8);
}
.hal-result-hero__badge {
  position: absolute;
  top: 26px;
  right: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.14);
  color: var(--halal-g-300);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hal-result-hero__badge::before { content: "◆"; font-size: 8px; }

/* 结果头部卡 */
.hal-result-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 26px;
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-top: 2px solid var(--halal-g-500);
  border-radius: 14px 14px 10px 10px;
  background: linear-gradient(180deg, #fdf9ea, #f6efdc);
  box-shadow: 0 6px 20px rgba(10, 69, 49, 0.08);
}
.hal-result-head__kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a6a10;
}
.hal-result-head h2 {
  margin: 6px 0 8px;
  font-size: 26px;
  font-weight: 800;
  color: var(--halal-e-800);
  line-height: 1.2;
}
.hal-result-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 12px;
  color: var(--halal-muted);
}
.hal-result-head__meta span::before {
  content: "◆ ";
  font-size: 7px;
  color: var(--halal-g-500);
}
.hal-result-head__side {
  display: grid;
  justify-items: end;
  gap: 12px;
  flex-shrink: 0;
}
.hal-result-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 参数摘要条 */
.hal-stat-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 20px 24px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.08), rgba(10, 69, 49, 0.06));
}
.hal-stat {
  display: grid;
  gap: 5px;
}
.hal-stat + .hal-stat { border-left: 1px solid rgba(201, 162, 39, 0.25); padding-left: 20px; }
.hal-stat__label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a6a10;
}
.hal-stat__value {
  font-size: 17px;
  font-weight: 800;
  color: var(--halal-e-800);
  font-family: Georgia, "Times New Roman", serif;
}

/* 结果面板 */
.hal-panel {
  padding: 22px 24px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 12px;
  background: #fdf9ea;
  box-shadow: 0 3px 12px rgba(10, 69, 49, 0.05);
}
.hal-panel__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.3);
}
.hal-panel__head::before {
  content: "◆";
  font-size: 9px;
  color: var(--halal-g-500);
}
.hal-panel__head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--halal-e-800);
  letter-spacing: 0.01em;
}
.hal-panel--grid { display: grid; }
.hal-panel--grid-2 {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 20px;
}
.hal-panel--grid-bottom {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr);
  gap: 20px;
}

/* 键值列表 */
.hal-dl {
  display: grid;
  gap: 12px;
  margin: 0;
}
.hal-dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 9px;
  border-bottom: 1px dashed rgba(201, 162, 39, 0.3);
}
.hal-dl div:last-child { border-bottom: none; }
.hal-dl dt { font-size: 12px; color: var(--halal-muted); }
.hal-dl dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--halal-e-800);
  text-align: right;
}

/* 提示框 */
.hal-callout {
  padding: 14px 18px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.1), rgba(201, 162, 39, 0.03));
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.hal-callout strong { color: var(--halal-e-800); font-size: 13px; }
.hal-callout p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--halal-muted); }
.hal-list-block strong { color: var(--halal-e-800); font-size: 13px; }
.hal-bullet-list { margin: 8px 0 0; padding-left: 20px; color: var(--halal-muted); font-size: 12.5px; line-height: 1.7; }

/* 表格 */
.hal-table-wrap { overflow-x: auto; }
.hal-table {
  width: 100%;
  border-collapse: collapse;
}
.hal-table th,
.hal-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.28);
  text-align: left;
  font-size: 12.5px;
}
.hal-table th {
  color: var(--halal-e-800);
  font-weight: 800;
  letter-spacing: 0.04em;
  background: rgba(201, 162, 39, 0.1);
  white-space: nowrap;
}
.hal-table td { color: var(--halal-ink); }
.hal-table tbody tr:hover { background: rgba(201, 162, 39, 0.05); }

/* 图表 */
.hal-canvas { width: 100%; min-height: 320px; }

/* 历史列表 */
.hal-history-card {
  display: grid;
  gap: 10px;
}
.hal-history-card__item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 10px;
  background: rgba(253, 249, 234, 0.7);
}
.hal-history-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.hal-history-card__id { font-size: 12px; color: var(--halal-muted); }
.hal-history-card__meta { display: flex; gap: 10px; font-size: 11px; color: var(--halal-muted-light); }

/* 浅色域下的判别区卡片 */
.hal-body--light .hal-region {
  background: rgba(253, 249, 234, 0.85);
  border-color: rgba(201, 162, 39, 0.4);
}
.hal-body--light .hal-region strong { color: #8a6a10; }
.hal-body--light .hal-region span { color: var(--halal-e-800); }
.hal-body--light .hal-region small { color: var(--halal-muted); }

/* ════════════ 打印域（象牙纸） ════════════ */
.hal-print {
  margin: 0;
  background: #efe9db;
  color: var(--halal-ink);
  font-family: Georgia, "Times New Roman", "Noto Serif", serif;
}
.hal-print__sheet {
  max-width: 1100px;
  margin: 0 auto;
  padding: 34px 26px;
  display: grid;
  gap: 20px;
}
.hal-print__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 26px;
  border: 2px solid var(--halal-e-800);
  border-top: 6px double var(--halal-e-800);
  border-radius: 4px;
  background: #fdf9ea;
}
.hal-print__kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a6a10;
}
.hal-print__head h1 {
  margin: 6px 0;
  font-size: 26px;
  color: var(--halal-e-800);
  font-weight: 800;
}
.hal-print__head p { margin: 0; font-size: 12px; color: var(--halal-muted); }
.hal-print__seal {
  flex-shrink: 0;
  padding: 8px 16px;
  border: 2px solid var(--halal-g-500);
  border-radius: 10px;
  background: rgba(201, 162, 39, 0.12);
  color: #7c5f0d;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 2px rgba(201, 162, 39, 0.2);
}
.hal-print__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.hal-print .hal-panel { background: #fdf9ea; }
.hal-print__note { font-size: 12px; line-height: 1.6; }

/* ════════════ 响应式 ════════════ */
/* 窄窗口(1081~1280px)工作台优先单列,避免“窄主列 + 空侧栏”;
   仅作用于工作台两栏,result/print 页布局不受影响 */
@media (max-width: 1280px) and (min-width: 1081px) {
  .hal-layout { grid-template-columns: 1fr; }
  .hal-side { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1080px) {
  .hal-layout { grid-template-columns: 1fr; }
  .hal-side { position: static; grid-template-columns: 1fr 1fr; }
  .hal-panel--grid-2,
  .hal-panel--grid-bottom,
  .hal-print__grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .hal-form-grid { grid-template-columns: 1fr; }
  .hal-header { flex-wrap: wrap; padding: 12px 16px; }
  .hal-hero { margin: 16px 16px 0; padding: 22px 20px 18px; }
  .hal-hero h1 { font-size: 24px; }
  .hal-result-hero h1 { font-size: 24px; }
  .hal-result-hero__badge { position: static; margin-top: 12px; }
  .hal-note { margin: 14px 16px 0; }
  .hal-layout { padding: 16px; }
  .hal-side { grid-template-columns: 1fr; }
  .hal-footer { margin: 0 16px 16px; flex-wrap: wrap; }
  .hal-stat-bar { grid-template-columns: 1fr; }
  .hal-stat + .hal-stat { border-left: none; padding-left: 0; border-top: 1px solid rgba(201, 162, 39, 0.25); padding-top: 12px; }
  .hal-result-head { flex-direction: column; }
  .hal-result-head__side { justify-items: start; }
  .hal-result-head__badge, .hal-print__seal { align-self: flex-start; }
}
