/* 定额快报价 · 试算页 / 账号页样式（复用 styles.css 的设计变量）
 *
 * 工程表格式排版：窄边框、等宽数字、少阴影；工业橙只出现在三档价格上。
 */

.trial-page { padding: 36px 0 60px; background: var(--paper); }
.trial-head { max-width: 780px; margin-bottom: 24px; }
.trial-head h1 { font-size: clamp(26px, 3.6vw, 34px); margin: 0 0 10px; letter-spacing: -.012em; }
.trial-lead { max-width: 780px; margin: 0; font-size: 15px; color: var(--muted); }

.trial-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 20px; align-items: start; }
.trial-form { display: flex; flex-direction: column; gap: 14px; }
.trial-result { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 78px; }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head h2 { font-size: 15px; margin: 0; letter-spacing: .01em; }
.panel-hint { font-size: 12px; color: var(--muted); }
.result-panel .panel-head { margin-bottom: 6px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }

.grid-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px 14px; }
.tier-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* 防止输入框的固有宽度把网格撑出容器（390px 下会出现横向溢出） */
.grid-fields > *,
.trial-form .field,
.trial-form .field input,
.trial-form .field select,
.save-box input,
.panel { min-width: 0; }
.trial-form, .trial-result { min-width: 0; }
.table-wrap { max-width: 100%; }
.trial-form .field { margin-bottom: 0; }
.trial-form .field > label { font-size: 12.5px; color: #33424f; }
.trial-form .field input[type=text],
.trial-form .field select,
.save-box input[type=text] {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); font: inherit; font-size: 14.5px;
  color: var(--ink); background: #fff; font-variant-numeric: tabular-nums;
}
.trial-form .field.invalid input,
.trial-form .field.invalid select { border-color: var(--danger); background: #fffafa; }

/* 工序表：接近工程表格式 */
.table-wrap { overflow-x: auto; }
.ops-table, .result-table { margin: 0; font-size: 13px; border: 1px solid var(--line); }
.ops-table th, .ops-table td { border: 1px solid var(--line); padding: 6px 7px; }
.ops-table th { background: var(--surface-2); font-weight: 600; white-space: nowrap; font-size: 11.5px; color: var(--muted); }
.ops-table input, .ops-table select {
  width: 100%; padding: 6px 7px; border: 1px solid var(--line);
  border-radius: 4px; font: inherit; font-size: 13px; background: #fff;
  font-variant-numeric: tabular-nums;
}
.ops-table td:first-child, .ops-table th:first-child { min-width: 116px; }
.ops-table select { min-width: 104px; }
.ops-table .ops-col { width: 40px; }
.ops-table .empty { text-align: center; color: var(--muted); padding: 12px; }
.btn-link {
  background: none; border: none; color: var(--danger); cursor: pointer;
  font: inherit; font-size: 12.5px; padding: 3px; white-space: nowrap;
}
.btn-link:hover { text-decoration: underline; }

/* 结果表：金额强化数字层级，价格用工业橙 */
.result-table th, .result-table td { border: 1px solid var(--line); padding: 9px 8px; }
.result-table th { background: var(--surface-2); font-size: 11.5px; color: var(--muted); white-space: nowrap; font-weight: 600; }
.result-table td.right, .result-table th.right { text-align: right; }
.result-table .qty { font-family: var(--mono); font-size: 12.5px; color: #33424f; }
.result-table .price { color: var(--orange-dark); font-weight: 700; font-size: 14.5px; }
.result-table td:nth-child(3) { font-size: 14.5px; }
.result-table td:nth-child(4) { font-weight: 600; }
.result-table .empty { text-align: center; color: var(--muted); padding: 16px; }

.breakdown { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.breakdown h3 { font-size: 12.5px; margin: 0 0 8px; color: var(--muted); font-weight: 600; }
.breakdown dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin: 0; font-size: 12.5px; }
.breakdown dt { color: var(--muted); }
.breakdown dd { margin: 0; text-align: right; font-family: var(--mono); }
.breakdown dd strong { color: var(--orange-dark); }

.save-box { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.save-box label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 7px; }
.save-row { display: flex; gap: 8px; }
.save-row input { flex: 1; min-width: 0; }
.save-box .small { margin: 8px 0 0; }
.save-box .form-status { margin: 8px 0 0; font-size: 12.5px; }

.privacy-note h3 { font-size: 13.5px; margin: 0 0 8px; }
.privacy-note ul { margin: 0 0 10px; padding-left: 18px; font-size: 12.5px; color: #33424f; }
.privacy-note li { margin: 5px 0; }
.small { font-size: 12.5px; }
.trial-cta { margin-top: 22px; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 手机端常驻三档价格摘要 ---------- */
.price-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none;
  background: #101820;
  border-top: 1px solid #2b3a48;
  box-shadow: 0 -4px 16px rgba(16, 23, 30, .22);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
}
.price-dock .dock-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.price-dock [data-dock] { min-width: 0; border-left: 1px solid #2b3a48; padding-left: 8px; }
.price-dock [data-dock]:first-child { border-left: none; padding-left: 0; }
.price-dock .dock-qty { display: block; font-size: 10.5px; color: #93a5b4; line-height: 1.4; }
.price-dock .dock-price {
  display: block; font-family: var(--mono); font-size: 14px; font-weight: 700;
  color: #ffb37a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.price-dock .dock-note { margin: 5px 0 0; font-size: 10.5px; color: #7d8d9d; text-align: center; }

/* ---------- 账号页 ---------- */
.account-page { padding: 36px 0 60px; background: var(--paper); }
.account-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
#authPanel[hidden] + #profilePanel { grid-column: 1 / -1; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.auth-tab {
  padding: 8px 12px; border: none; border-bottom: 2px solid transparent;
  background: transparent; cursor: pointer; font: inherit; font-weight: 600;
  font-size: 14px; color: var(--muted);
}
.auth-tab.active { color: var(--blue-dark); border-bottom-color: var(--blue); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 8px; }
.seg button { border: none; background: #fff; padding: 6px 13px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.seg button.active { background: var(--blue); color: #fff; }
.hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.profile-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.profile-contact { font-size: 18px; font-weight: 700; word-break: break-all; font-family: var(--mono); }
.badge-pending {
  display: inline-block; font-size: 11.5px; background: var(--orange-soft);
  color: var(--orange-dark); border-radius: 2px; padding: 2px 8px; margin-left: 8px;
}
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 16px; font-size: 13px; margin: 12px 0 0; }
.meta-grid div { border-top: 1px solid var(--line); padding-top: 7px; }
.meta-grid div span { display: block; color: var(--muted); font-size: 11.5px; }
.trials-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.trial-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; background: var(--surface-2); }
.trial-item .ti-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.trial-item .ti-title { font-weight: 700; }
.trial-item .ti-meta { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.trial-item .ti-prices { margin-top: 7px; font-size: 12.5px; color: #2c3843; display: flex; gap: 14px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.trial-item .ti-ops { margin-top: 8px; display: flex; gap: 8px; }
.wechat-box { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 12px; font-size: 12.5px; color: var(--muted); }
.wechat-box strong { color: var(--ink); }
.wechat-box .btn { margin-top: 8px; cursor: not-allowed; opacity: .6; }
.empty-state { color: var(--muted); font-size: 13.5px; text-align: center; padding: 20px 0; }

@media (max-width: 960px) {
  .trial-layout, .account-grid { grid-template-columns: 1fr; }
  .trial-result { position: static; }
}
@media (max-width: 720px) {
  .price-dock { display: block; }
  /* 给固定摘要条留出空间，避免遮住提交按钮和页脚 */
  .trial-page { padding-bottom: 96px; }
}
@media (max-width: 560px) {
  .tier-fields { grid-template-columns: 1fr; }
  .panel { padding: 15px 14px; }
  .result-table th, .result-table td { padding: 7px 6px; font-size: 12px; }
  .result-table .price { font-size: 13.5px; }
}

/* ==========================================================================
   Visual system v2 · 试算工作台与账号页
   ========================================================================== */

.trial-page, .account-page {
  position: relative;
  padding-top: 46px;
  background:
    radial-gradient(circle at 91% 0%, rgba(36, 95, 216, .07), transparent 27rem),
    linear-gradient(180deg, #f5f7f9 0, var(--paper) 30rem);
}
.trial-page::before, .account-page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 230px;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(34, 65, 92, .038) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 65, 92, .038) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, #000, transparent);
}
.trial-page > .container, .account-page > .container { position: relative; z-index: 1; }
.trial-head { max-width: 830px; margin-bottom: 28px; }
.trial-head h1 {
  margin-bottom: 12px;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", sans-serif;
  font-size: clamp(30px, 3.7vw, 41px);
  line-height: 1.3;
  letter-spacing: -.035em;
}
.trial-head .eyebrow {
  margin-bottom: 12px;
  padding: 4px 8px;
  border: 1px solid #c7d8f3;
  border-radius: 4px;
  background: #edf3fd;
  font-size: 10px;
}
.trial-lead { line-height: 1.8; }
.trial-assurance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}
.trial-assurance span {
  padding: 5px 9px;
  border: 1px solid #d6e0e8;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: #506273;
  font-size: 11px;
}
.trial-assurance span::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--blue);
  vertical-align: 1px;
}

.trial-layout { gap: 22px; }
.trial-form { gap: 15px; }
.trial-result { top: 82px; gap: 15px; }
.panel {
  padding: 20px 21px;
  border-color: #d6e0e7;
  border-radius: 11px;
  box-shadow: 0 5px 18px rgba(18, 35, 49, .055);
}
.trial-form > .panel { position: relative; overflow: hidden; }
.trial-form > .panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: #adc0d0;
}
.trial-form > .panel:first-child::before { background: var(--blue); }
.panel-head { margin-bottom: 14px; }
.panel-head-spaced { margin-top: 20px; }
.panel-head h2 { font-size: 15px; letter-spacing: .015em; }
.panel-hint { line-height: 1.55; }
.grid-fields { gap: 13px 14px; }
.trial-form .field > label { margin-bottom: 6px; color: #41515f; }
.trial-form .field input[type=text],
.trial-form .field select,
.save-box input[type=text],
.account-page .field input {
  width: 100%;
  min-height: 40px;
  border-color: #bcc9d3;
  border-radius: 7px;
  background: #fcfdfe;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.trial-form .field input[type=text]:focus,
.trial-form .field select:focus,
.save-box input[type=text]:focus,
.account-page .field input:focus {
  outline: 0;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(36, 95, 216, .12);
}
.ops-table {
  border-color: #d3dee5;
  border-radius: 7px;
  overflow: hidden;
}
.ops-table th { background: #f2f5f7; }
.ops-table input, .ops-table select { border-radius: 5px; background: #fcfdfe; }
.btn-sm { min-height: 34px; }

.result-panel {
  position: relative;
  overflow: hidden;
  border-color: #ccd8e1;
  background:
    radial-gradient(circle at 100% 0%, rgba(232, 93, 11, .075), transparent 15rem),
    #fff;
  box-shadow: 0 12px 34px rgba(19, 39, 55, .09);
}
.result-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), #f1a064 58%, transparent);
}
.result-panel .panel-head { padding-top: 2px; }
.result-table { border-radius: 7px; overflow: hidden; }
.result-table th { background: #f2f4f6; }
.result-table .price { color: #bf4700; }
.breakdown { background: #f8fafb; border: 1px solid #e1e8ed; border-radius: 7px; padding: 12px; }
.breakdown h3 { color: #526472; letter-spacing: .02em; }
.save-box { margin-top: 15px; }
.save-row { align-items: stretch; }
.save-row .btn { min-width: 84px; }
.privacy-note {
  border-color: #dbe4e9;
  background: rgba(246, 249, 250, .86);
  box-shadow: none;
}
.privacy-note h3 { letter-spacing: .01em; }
.privacy-note li { line-height: 1.65; }
.trial-cta { margin-top: 24px; }

/* 单价停靠条：手机端保持清晰，不遮挡最后一段内容 */
.price-dock {
  padding-top: 9px;
  background: rgba(10, 17, 23, .98);
  border-top-color: rgba(255, 255, 255, .12);
  box-shadow: 0 -10px 28px rgba(10, 20, 29, .24);
  backdrop-filter: blur(14px);
}
.price-dock .dock-inner { gap: 10px; }
.price-dock [data-dock] { border-left-color: rgba(255, 255, 255, .12); }
.price-dock .dock-qty { color: #9fb0bd; }
.price-dock .dock-price { color: #ffb37a; }
.price-dock .dock-note { color: #8497a6; }

/* 账号工作台 */
.account-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .72fr);
  gap: 22px;
}
#authPanel { align-self: start; }
#authPanel[hidden] + #profilePanel { grid-column: 1 / -1; }
#profilePanel:not([hidden]) ~ .account-aside { display: none; }
.account-grid > .panel { padding: 23px 24px 24px; }
.auth-tabs {
  gap: 5px;
  margin-bottom: 20px;
  padding: 4px;
  border: 1px solid #d9e2e8;
  border-radius: 8px;
  background: #f1f4f6;
}
.auth-tab {
  flex: 1;
  padding: 9px 12px;
  border: 0;
  border-radius: 6px;
}
.auth-tab.active {
  border: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(16, 31, 43, .1);
}
.seg {
  margin-bottom: 9px;
  border-color: #bcc9d3;
  border-radius: 7px;
}
.seg button { min-height: 31px; padding: 5px 14px; }
.seg button.active { background: var(--blue); }
.account-page .field { margin-bottom: 17px; }
.account-page .field input {
  height: 44px;
  padding: 10px 12px;
  font-size: 15px;
}
.account-page .hint { line-height: 1.55; }
.account-page .form-actions { margin-top: 18px; }
.account-page .form-actions .btn { min-height: 43px; }
.wechat-box {
  margin-top: 19px;
  padding-top: 14px;
  line-height: 1.65;
}
.account-page .wechat-box .btn { width: 100%; }

.account-aside {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  padding: 30px 27px;
  border: 1px solid rgba(146, 174, 196, .28);
  border-radius: 12px;
  background:
    radial-gradient(circle at 92% 5%, rgba(54, 119, 226, .3), transparent 15rem),
    linear-gradient(135deg, #101a23, #1a2c3a);
  color: #d7e1e9;
  box-shadow: 0 18px 42px rgba(16, 31, 43, .16);
}
.account-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(135deg, #000, transparent 78%);
  pointer-events: none;
}
.account-aside > * { position: relative; z-index: 1; }
.account-aside-mark {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  margin-bottom: 25px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 10px;
  background: linear-gradient(145deg, #3679ef, #1f55bd);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 9px 24px rgba(0, 0, 0, .22);
  font-size: 20px;
  font-weight: 700;
}
.account-aside .section-kicker { color: #f3a16b; }
.account-aside h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 25px;
  line-height: 1.35;
  letter-spacing: -.02em;
}
.account-aside > p:not(.section-kicker) { margin: 0; color: #aebecb; font-size: 13px; line-height: 1.8; }
.account-benefits {
  list-style: none;
  margin: 24px 0 25px;
  padding: 0;
}
.account-benefits li {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.account-benefits li > span {
  flex: 0 0 28px;
  padding-top: 1px;
  color: #7fa7f0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}
.account-benefits strong { display: block; color: #eff5f9; font-size: 13.5px; }
.account-benefits small { display: block; margin-top: 3px; color: #93a6b4; font-size: 11.5px; line-height: 1.6; }
.account-aside-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #ffbd8c;
  font-size: 13px;
  font-weight: 600;
}
.account-aside-link:hover { color: #fff; text-decoration: none; }
.account-aside-link span { transition: transform .16s ease; }
.account-aside-link:hover span { transform: translateX(3px); }

@media (max-width: 960px) {
  .account-grid { grid-template-columns: 1fr; }
  #authPanel[hidden] + #profilePanel { grid-column: auto; }
  .account-aside { min-height: 0; }
}

@media (max-width: 720px) {
  .trial-page, .account-page { padding-top: 34px; }
  .trial-head { margin-bottom: 22px; }
  .trial-head h1 { font-size: 30px; }
  .trial-assurance { gap: 6px; margin-top: 14px; }
  .trial-assurance span { padding: 4px 7px; font-size: 10px; }
  .panel { padding: 17px 15px; }
  .trial-form > .panel::before { top: 15px; height: 18px; }
  .panel-head { margin-bottom: 12px; }
  .account-grid > .panel { padding: 19px 16px 20px; }
  .account-aside { padding: 25px 21px; }
  .account-aside h2 { font-size: 23px; }
}
