/* ============================================================
   高企自评与节税测算 · 页面样式
   配色沿用官网：深蓝 #1B3A6B · 橙 #FF8C42
   ============================================================ */

.asm-wrap { max-width: 1180px; margin: 0 auto; padding: 28px 24px 64px; }
.asm-title { font-size: 26px; font-weight: 700; color: var(--blue-800); margin-bottom: 6px; }
.asm-sub { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.asm-note-line {
  font-size: 12px; color: var(--muted); background: var(--blue-50);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 18px;
}

/* ---------- Tab ---------- */
.asm-tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 22px; flex-wrap: wrap; }
.asm-tab {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--muted);
  padding: 10px 18px; border-bottom: 2px solid transparent; margin-bottom: -2px;
  font-family: inherit;
}
.asm-tab.active { color: var(--blue-800); border-bottom-color: var(--orange); }
.asm-panel { display: none; }
.asm-panel.active { display: block; }

/* ---------- 区块 ---------- */
.asm-sec { margin-bottom: 26px; }
.asm-sec-h {
  font-size: 16px; font-weight: 700; color: var(--blue-800);
  margin-bottom: 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.asm-sec-h .max { font-size: 12px; font-weight: 400; color: var(--muted); }
.asm-sec-h .subtotal {
  margin-left: auto; font-size: 12px; font-weight: 600; color: var(--blue-700);
  background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: 999px; padding: 2px 10px;
  white-space: nowrap;
}
.asm-sec-tip { font-size: 12px; color: var(--muted); line-height: 1.7; margin-bottom: 10px; }

/* ---------- 基础信息 ---------- */
.asm-base { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 22px; }
.asm-field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.asm-field input, .asm-field select {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff;
}
.asm-field input:focus, .asm-field select:focus { outline: 2px solid var(--blue-100); border-color: var(--blue-600); }

/* ---------- 表格 ---------- */
.asm-tblbox { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.asm-tbl { width: 100%; border-collapse: collapse; min-width: 860px; }
.asm-tbl th, .asm-tbl td { padding: 10px 12px; text-align: left; vertical-align: top; font-size: 13px; }
.asm-tbl thead th {
  background: var(--blue-50); color: var(--blue-800); font-weight: 600; font-size: 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.asm-tbl tbody tr + tr td { border-top: 1px solid var(--line); }
.asm-tbl .c-idx { width: 38px; color: var(--muted); }
.asm-tbl .c-name { width: 190px; }
.asm-tbl .c-target { width: 128px; color: var(--blue-700); font-weight: 600; white-space: normal; }
.asm-tbl .c-actual { width: 128px; text-align: right; font-variant-numeric: tabular-nums; }
.asm-tbl .c-judge { width: 76px; text-align: center; }
.asm-tbl .c-fill { min-width: 260px; }
.asm-tbl .c-level { min-width: 320px; }
.asm-tbl .c-score { width: 74px; text-align: right; }
.asm-tbl .col-freeze { position: sticky; left: 0; background: #fff; }

.asm-cellname { font-weight: 600; color: var(--text); }
.asm-hint { font-size: 11px; color: var(--muted); line-height: 1.5; margin-top: 5px; }
.asm-hint-btn {
  appearance: none; border: 1px solid var(--line); background: var(--blue-50); color: var(--blue-700);
  border-radius: 999px; font-size: 11px; padding: 1px 8px; cursor: pointer; font-family: inherit; margin-left: 4px;
}
.asm-hint-full { display: none; font-size: 11px; color: var(--muted); background: #FAFBFD; border-radius: 6px; padding: 6px 8px; margin-top: 6px; line-height: 1.6; }
.asm-hint-full.open { display: block; }

/* 表内输入 */
.asm-in {
  width: 84px; font-family: inherit; font-size: 13px; padding: 5px 8px;
  border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: #fff;
}
.asm-in.wide { width: 150px; }
.asm-in:focus { outline: 2px solid var(--blue-100); border-color: var(--blue-600); }
.asm-unit { font-size: 12px; color: var(--muted); margin-left: 4px; }
.asm-fillrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.asm-filllabel { font-size: 12px; color: var(--muted); min-width: 92px; }

/* 徽章 */
.badge { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.badge.ok { background: #E8F5E9; color: #2E7D32; }
.badge.no { background: #FDECEA; color: #C62828; }
.badge.wait { background: #F1EFE8; color: #5F5E5A; }

/* 档位 chip */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  appearance: none; font-family: inherit; font-size: 12px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  border-radius: 7px; padding: 4px 8px; line-height: 1.4;
}
.chip:hover { border-color: var(--blue-600); }
.chip.on { background: var(--blue-800); border-color: var(--blue-800); color: #fff; font-weight: 600; }
.chip .lv { font-weight: 600; margin-right: 3px; }
.chip .sc { opacity: .75; font-size: 11px; }
.asm-auto { font-size: 11px; color: var(--orange-dark); margin-top: 6px; }

.asm-score { font-size: 15px; font-weight: 700; color: var(--blue-800); }
.asm-score-range { font-size: 11px; color: var(--muted); }
.asm-stepper { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; }
.asm-stepper button {
  appearance: none; width: 20px; height: 20px; border-radius: 5px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 13px; line-height: 1; color: var(--blue-800); font-family: inherit;
}
.asm-stepper button:disabled { opacity: .35; cursor: default; }

/* ---------- 汇总 ---------- */
.asm-summary {
  background: var(--blue-50); border: 1px solid var(--blue-100);
  border-radius: 12px; padding: 18px 20px; margin-top: 22px;
}
.asm-sum-line1 { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.asm-sum-label { font-size: 13px; color: var(--muted); }
.asm-sum-score { font-size: 30px; font-weight: 700; color: var(--blue-800); font-variant-numeric: tabular-nums; }
.asm-sum-pass { font-size: 13px; color: var(--muted); }
.asm-sum-div { height: 1px; background: var(--blue-100); margin: 12px 0; }
.asm-sum-items { font-size: 13px; color: var(--text); line-height: 1.9; }
.asm-sum-cond { font-size: 13px; color: var(--muted); }
.asm-sum-conc { font-size: 16px; font-weight: 700; margin-top: 8px; }
.asm-sum-conc.good { color: #2E7D32; }
.asm-sum-conc.borderline { color: #BA7517; }
.asm-sum-conc.weak, .asm-sum-conc.blocked { color: #C62828; }
.asm-sum-conc.incomplete { color: var(--blue-700); }
.asm-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.asm-btn {
  appearance: none; font-family: inherit; font-size: 14px; cursor: pointer;
  border-radius: 8px; padding: 9px 18px; border: 1px solid var(--blue-800); background: var(--blue-800); color: #fff;
}
.asm-btn.ghost { background: #fff; color: var(--blue-800); }
.asm-btn.orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.asm-btn:disabled { opacity: .45; cursor: default; }

/* ---------- 报告 ---------- */
#report-body { background: #fff; }
.rp-paper {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 40px 42px; max-width: 820px; margin: 0 auto;
}
.rp-head { border-bottom: 2px solid var(--blue-800); padding-bottom: 12px; margin-bottom: 18px; }
.rp-title { font-size: 22px; font-weight: 700; color: var(--blue-800); }
.rp-meta { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.7; }
.rp-h2 { font-size: 15px; font-weight: 700; color: var(--blue-800); margin: 22px 0 8px; }
.rp-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.rp-tbl th, .rp-tbl td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.rp-tbl th { background: var(--blue-50); font-weight: 600; color: var(--blue-800); }
.rp-tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.rp-concl { border: 2px solid var(--blue-800); border-radius: 10px; padding: 14px 16px; margin: 16px 0; }
.rp-concl .big { font-size: 26px; font-weight: 700; color: var(--blue-800); }
.rp-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.rp-step { flex: 1 1 130px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--blue-50); }
.rp-step .n { font-size: 12px; color: var(--orange-dark); font-weight: 700; }
.rp-step .t { font-size: 13px; font-weight: 600; color: var(--blue-800); margin: 3px 0; }
.rp-step .d { font-size: 11px; color: var(--muted); }
.rp-disclaimer { font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 20px; padding-top: 10px; line-height: 1.7; }
.rp-empty { text-align: center; padding: 60px 20px; color: var(--muted); font-size: 14px; }

/* ---------- 节税 ---------- */
.tax-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.tax-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: #fff; }
.tax-card h4 { font-size: 14px; font-weight: 700; color: var(--blue-800); margin: 0 0 10px; }
.tax-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.tax-row label { min-width: 130px; color: var(--muted); font-size: 12px; }
.tax-out { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; font-size: 13px; line-height: 1.9; }
.tax-out .big { font-size: 20px; font-weight: 700; color: var(--blue-800); font-variant-numeric: tabular-nums; }
.tax-out .warn { color: #C62828; }
.tax-tips { font-size: 12px; color: var(--muted); line-height: 1.8; margin-top: 14px; }

/* ---------- 弹窗 ---------- */
.asm-mask { position: fixed; inset: 0; background: rgba(20,41,75,.42); display: none; z-index: 900; }
.asm-mask.open { display: block; }
.asm-modal {
  position: fixed; z-index: 901; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 92%; max-width: 460px; background: #fff; border-radius: 14px; padding: 22px;
  display: none; max-height: 88vh; overflow-y: auto;
}
.asm-modal.open { display: block; }
.asm-modal h3 { font-size: 17px; font-weight: 700; color: var(--blue-800); margin: 0 0 6px; }
.asm-modal .m-sub { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.asm-modal .mf { margin-bottom: 12px; }
.asm-modal .mf label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.asm-modal .mf input {
  width: 100%; font-family: inherit; font-size: 14px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px;
}
.asm-check { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--text); line-height: 1.6; margin: 10px 0; }
.asm-check input { margin-top: 3px; }
.asm-check .d { color: var(--muted); display: block; margin-top: 3px; }
.asm-mask-close { position: absolute; right: 14px; top: 12px; font-size: 20px; cursor: pointer; color: var(--muted); border: 0; background: none; }

@media (max-width: 640px) {
  .asm-wrap { padding: 18px 14px 44px; }
  .asm-title { font-size: 21px; }
  .asm-sum-score { font-size: 26px; }
  .rp-paper { padding: 20px 16px; }
}

/* ---------- 打印 ---------- */
@media print {
  @page { size: A4; margin: 14mm; }
  .site-header, .site-footer, .asm-tabs, .asm-wrap > .asm-title, .asm-wrap > .asm-sub,
  .asm-wrap > .asm-note-line, .no-print, .asm-mask, .asm-modal { display: none !important; }
  .asm-wrap { padding: 0; margin: 0; max-width: none; }
  .asm-panel { display: none !important; }
  .asm-panel#panel-report { display: block !important; }
  .rp-paper { border: 0; border-radius: 0; padding: 0; max-width: none; }
  .rp-h2 { page-break-after: avoid; }
  .rp-tbl { page-break-inside: avoid; }
  body { background: #fff; }
}
