:root {
  --theme: #2f6bff;
  --theme-dark: #1f54d8;
  --paper: #f7f4ec;
  --ink: #1a1a1a;
  --muted: #667085;
  --line: #d9dde5;
  --danger: #c41e3a;
  --ok: #0f7b4a;
  --shadow: 0 8px 28px rgba(16, 24, 40, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: #eef2f7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--theme); text-decoration: none; }
button, .btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

/* ========== H5 Letter锛堝榻愬競闈㈢嚎涓婂緥甯堝嚱鐗堝紡锛?========== */
.h5-body {
  min-height: 100vh;
  background: #f2f3f5;
  padding-bottom: 118px;
}

.h5-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--theme, #2f6bff);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.h5-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 10px 16px;
}

.letter-image-card {
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.letter-image {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
  cursor: zoom-in;
}

.letter-img-tip {
  margin: 0;
  padding: 12px 14px;
  font-size: 13px;
  color: #b91c1c;
  background: #fef2f2;
}

.img-preview-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow: auto;
}

.img-preview-mask img {
  max-width: 100%;
  max-height: none;
  width: auto;
  height: auto;
}

.letter-sheet {
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  padding: 18px 16px 16px;
  position: relative;
  overflow: hidden;
}

.letter-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.letter-head img,
.logo-fallback {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-fallback {
  border-radius: 6px;
  background: var(--theme, #2f6bff);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
}

.letter-head .firm {
  font-size: 17px;
  font-weight: 700;
  color: #1f2a37;
  line-height: 1.3;
}

.letter-title {
  text-align: center;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 8px;
  margin: 4px 0 8px;
  color: #111;
}

.letter-no {
  text-align: right;
  color: #333;
  font-size: 14.5px;
  margin-bottom: 16px;
}

.letter-body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: #222;
  word-break: break-word;
}

.letter-body .indent {
  text-indent: 2em;
  margin: 0 0 0.75em;
}

.letter-body .plain {
  margin: 0 0 0.75em;
  text-indent: 0;
  font-weight: 600;
}

.pay-box {
  margin: 8px 0 14px;
  padding: 10px 12px;
  background: #f7f8fa;
  border-left: 3px solid var(--theme, #2f6bff);
  font-size: 14px;
  line-height: 1.8;
}

.pay-box div span {
  display: inline-block;
  min-width: 4.5em;
  color: #667085;
  margin-right: 6px;
}

.sign-block {
  position: relative;
  min-height: 128px;
  margin-top: 8px;
  padding-right: 8px;
}

.sign-text {
  text-align: right;
  font-size: 14px;
  line-height: 1.8;
  color: #222;
  padding-top: 8px;
}

.seal-area {
  position: absolute;
  right: 0;
  top: 0;
  width: 210px;
  height: 130px;
  pointer-events: none;
}

.seal {
  position: absolute;
  opacity: 0.9;
  mix-blend-mode: multiply;
}

.seal.lawyer {
  right: 96px;
  top: 18px;
  width: 86px;
}

.seal.firm {
  right: 0;
  top: 8px;
  width: 112px;
}

.letter-disclaimer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px dashed #e5e7eb;
  font-size: 11px;
  line-height: 1.65;
  color: #98a2b3;
}

/* 瀵归綈 a.z42.cn锛氬妗堟潯榛樿鏀惰捣锛?show 鏃朵粠搴曟爮涓婃柟寮瑰嚭 */
.copyright {
  --copyright-height: 64px;
  color: #fff;
  text-align: center;
  z-index: 24;
  background-color: #333;
  width: 100%;
  height: 0;
  transition: height 0.3s;
  position: fixed;
  bottom: 0;
  left: 0;
  overflow: hidden;
  line-height: 1.45;
  font-size: 13px;
}

.copyright.home-copyright {
  /* 鎶埌銆屽緥甯堝嚱楠岃瘉銆嶅簳鏍忎笂鏂?*/
  bottom: 48px;
  bottom: calc(48px + env(safe-area-inset-bottom));
}

.copyright p {
  margin: 0;
  padding: 0;
  color: #fff;
  font-size: 13px;
}

.copyright span {
  display: block;
  margin-top: 2px;
}

.copyright a {
  color: #fff;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.copyright.show {
  height: var(--copyright-height);
  padding: 10px 0;
}

/* 鐣欒█閫夐」锛氬榻愰害绌楀弻鍒?chip + 鍙充笅瑙掔孩鍕?*/
.msg-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 8px 0 12px;
  text-align: left;
}

.msg-options input[type="radio"] {
  visibility: hidden;
  width: 0;
  height: 0;
  position: absolute;
}

.msg-options .msg-radio {
  flex: 0 0 40%;
  margin: 5px;
  padding: 10px 6px;
  text-align: center;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
  color: #333;
  line-height: 1.35;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
}

.msg-options .msg-radio.checked {
  border: 1px solid #c00;
  border-radius: 2px;
}

.msg-options .msg-radio.checked::before {
  content: "";
  border: 12px solid red;
  border-color: transparent red red transparent;
  display: block;
  position: absolute;
  bottom: 0;
  right: 0;
}

.msg-options .msg-radio.checked::after {
  content: "";
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3e%3cpath d='M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z' fill='%23fff'/%3e%3c/svg%3e") 7px 6px / 60% no-repeat;
  width: 20px;
  height: 20px;
  display: block;
  position: absolute;
  bottom: 0;
  right: 1px;
}

.msg-sheet textarea {
  border: 1px solid #ccc;
  border-radius: 5px;
  width: calc(100% - 10px);
  margin: 10px 5px;
  padding: 10px;
  box-sizing: border-box;
  font: inherit;
}

.home-card {
  margin-top: 48px;
}

.h5-side {
  position: fixed;
  right: 0;
  top: 34%;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: 56px;
  border-radius: 10px 0 0 10px;
  overflow: hidden;
  background: rgba(47, 107, 255, 0.95);
  box-shadow: -2px 4px 14px rgba(47, 107, 255, 0.28);
}

.h5-side a,
.h5-side button {
  background: transparent;
  color: #fff;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding: 10px 4px 8px;
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
  display: block;
  width: 100%;
}

.h5-side a:last-child,
.h5-side button:last-child {
  border-bottom: 0;
}

.h5-side .ico {
  display: grid;
  place-items: center;
  margin: 0 auto 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.call-fab {
  position: fixed;
  right: 14px;
  bottom: 126px;
  z-index: 31;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.35);
  font-size: 11px;
  line-height: 1;
  text-decoration: none;
}

.h5-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--theme, #2f6bff);
}

.h5-bottom .verify-btn {
  display: block;
  width: 100%;
  margin: 0 auto;
  height: 48px;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  line-height: 48px;
}

.h5-side-show {
  position: fixed;
  right: 0;
  top: 42%;
  z-index: 30;
  width: 28px;
  height: 44px;
  border: 0;
  border-radius: 8px 0 0 8px;
  background: rgba(47, 107, 255, 0.95);
  color: #fff;
  font-size: 18px;
  line-height: 44px;
  padding: 0;
}

.receipt-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.receipt-card {
  width: min(360px, 100%);
  background: #fff;
  border-radius: 12px;
  padding: 18px 16px;
}

.receipt-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.receipt-card p {
  margin: 0;
  color: #475467;
  font-size: 14px;
  line-height: 1.6;
}

.receipt-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.receipt-actions .btn {
  flex: 1;
}

.msg-sheet .msg-tip {
  margin: 0 0 10px;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.msg-sheet textarea {
  width: 100%;
  min-height: 110px;
  border: 1px solid #d0d7e2;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
  margin-bottom: 4px;
}

.toast {
  position: fixed;
  left: 50%;
  top: 20%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 99;
  display: none;
}

.verify-card, .empty-card {
  max-width: 720px;
  margin: 18px auto;
  background: #fff;
  border-radius: 12px;
  padding: 22px 18px;
  box-shadow: var(--shadow);
}

.verify-card h1 {
  margin: 0 0 8px;
  font-size: 20px;
  color: var(--theme);
}

.verify-card .meta {
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.7;
  color: #333;
}

.verify-card .badge {
  display: inline-block;
  background: #e8f6ee;
  color: var(--ok);
  border: 1px solid #b7e0c7;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  margin-bottom: 10px;
}

/* ========== Admin ========== */
.admin-body {
  min-height: 100vh;
  background: #f4f6fa;
  color: #18212f;
}

.admin-shell {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 100vh;
}

.admin-nav {
  background: #f5f7fa;
  color: #1f2a37;
  padding: 16px 12px 18px;
  border-right: 1px solid #e6eaf0;
}
.admin-nav .brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px 2px;
  margin-bottom: 4px;
}
.admin-nav .brand {
  font-size: 17px;
  font-weight: 650;
  margin-bottom: 0;
  line-height: 1.3;
  padding: 0;
  letter-spacing: 0.01em;
  color: #101828;
}
.admin-nav .brand-mark {
  display: none;
}
.admin-nav .nav-gear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #667085;
  flex: none;
  margin: 0;
  padding: 0;
}
.admin-nav .nav-gear:hover,
.admin-nav .nav-gear.on {
  background: #fff;
  color: #2f6bff;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.08);
}
.admin-nav .nav-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #667085;
  padding: 4px 8px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid #e6eaf0;
}
.admin-nav .nav-user-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-nav .nav-pwd-btn {
  border: 0;
  background: transparent;
  color: #2f6bff;
  font: inherit;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
  flex: none;
}
.admin-nav .nav-pwd-btn:hover { text-decoration: underline; }
.admin-nav .nav-sec {
  margin: 12px 12px 4px;
  font-size: 12px;
  color: #98a2b3;
  line-height: 1.2;
}
.admin-nav .nav-logout {
  margin-top: 20px;
  padding: 8px 12px 0;
  border-top: 1px solid #e6eaf0;
}
.admin-nav .nav-exit {
  width: 100%;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #667085;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.admin-nav .nav-exit:hover {
  background: #eef2f7;
  color: #344054;
}
.pwd-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(16, 24, 40, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.pwd-mask[hidden] { display: none !important; }
.pwd-dialog {
  width: min(400px, 100%);
  background: #fff;
  border-radius: 12px;
  padding: 16px 16px 14px;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.18);
}
.pwd-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.pwd-x {
  border: 0;
  background: transparent;
  color: #98a2b3;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.pwd-form label { display: block; margin-bottom: 10px; font-size: 13px; color: #344054; }
.pwd-form input { margin-top: 4px; }
.pwd-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.pwd-msg { margin: 0 0 8px; }

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #344054;
  padding: 9px 12px;
  border-radius: 8px;
  margin-bottom: 2px;
  font-size: 14px;
}
.admin-nav .ni,
.admin-nav svg.ni {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
  flex: none;
  display: block;
  overflow: hidden;
}

.admin-nav a:hover {
  background: rgba(47, 107, 255, 0.06);
  color: #1d2939;
}
.admin-nav a.active,
.admin-nav a.active:hover {
  background: #fff;
  color: #2f6bff;
  box-shadow: 0 1px 6px rgba(16, 24, 40, 0.08);
  font-weight: 600;
}

.admin-main {
  padding: 16px 20px 32px;
  min-width: 0;
}
.admin-main--narrow { max-width: none; }
.browse-hd {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.browse-filter {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.browse-filter select,
.browse-filter input {
  width: auto;
  min-width: 0;
  margin: 0;
}
.letters-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef1f6;
}
.letters-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}
.letters-search {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  margin-left: auto;
  flex: 0 0 auto;
}
.admin-body .letters-search input {
  width: 220px;
  min-width: 160px;
  max-width: 220px;
  margin: 0;
  flex: 0 0 auto;
}
.admin-body .letters-search select {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
  margin: 0;
  flex: 0 0 auto;
}
.admin-body .letters-search .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}
.admin-top h1 { margin: 0; font-size: 18px; font-weight: 700; }
.page-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: #8a97ab;
}

/* 鈥斺€?琛ㄥ崟椤碉細涓诲尯閾烘弧锛岀敤澶氬垪鎺у埗鍗曟瀹藉害 鈥斺€?*/
.settings-page {
  width: 100%;
  max-width: none;
  padding-bottom: 72px;
}
.settings-page .admin-top h1 { font-size: 17px; }
.settings-form { width: 100%; max-width: none; }

.admin-body .af-panel {
  max-width: none;
  width: 100%;
}
.admin-body .af-hint {
  max-width: none;
  margin: -4px 0 12px;
  line-height: 1.65;
  color: #475467;
  font-size: 13px;
}
.admin-body .af-lead {
  margin: 0 0 14px;
  line-height: 1.65;
  color: #475467;
  font-size: 13px;
}
.admin-body .af-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  min-width: 0;
  position: relative;
}
.admin-body .af-field > span,
.admin-body .af-field > label {
  font-size: 13px;
  color: #344054;
  line-height: 1.35;
}
.admin-body .af-field .hint {
  margin: 0;
}
.admin-body .af-grid {
  display: grid;
  gap: 12px 14px;
  margin-bottom: 12px;
}
.admin-body .af-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-body .af-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-body .af-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-body .af-span-2 { grid-column: span 2; }
.admin-body .af-span-3 { grid-column: span 3; }
.admin-body .af-span-full { grid-column: 1 / -1; }
@media (max-width: 1100px) {
  .admin-body .af-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .admin-body .af-grid-2,
  .admin-body .af-grid-3,
  .admin-body .af-grid-4 { grid-template-columns: 1fr; }
  .admin-body .af-span-2,
  .admin-body .af-span-3,
  .admin-body .af-span-full { grid-column: auto; }
}

.set-card {
  background: #fff;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}
.set-card-hd {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #eef1f6;
}
.set-card-hd::before {
  content: '';
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: #2f6bff;
  flex: none;
  align-self: center;
}
.set-card-hd b {
  font-size: 13px;
  font-weight: 650;
  color: #152033;
}
.set-card-hd i {
  font-style: normal;
  font-size: 12px;
  color: #95a1b3;
}

.set-grid {
  display: grid;
  gap: 10px 16px;
  padding: 14px;
}
.set-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.set-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.set-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-4 { grid-column: 1 / -1; }

/* 设置 / 新建：短框按内容收紧，卡片仍铺满 */
.settings-page .set-grid.pack {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
}
.settings-page .set-grid.pack .set-row {
  flex: 0 0 auto;
}
.settings-page .set-grid.pack .span-2,
.settings-page .set-grid.pack .span-3,
.settings-page .set-grid.pack .span-4 {
  grid-column: auto;
}
.admin-body .set-row.fw-s { width: 160px; }
.admin-body .set-row.fw-m { width: 220px; }
.admin-body .set-row.fw-l { width: 300px; }
.admin-body .set-row.fw-xl { width: 420px; }
.admin-body .set-row.fw-2xl { width: 520px; }
.admin-body .set-row.fw-full {
  width: 100%;
  max-width: 760px;
}
.admin-body .set-row.fw-wide {
  width: 100%;
  max-width: none;
}
@media (max-width: 720px) {
  .admin-body .set-row.fw-s,
  .admin-body .set-row.fw-m,
  .admin-body .set-row.fw-l,
  .admin-body .set-row.fw-xl,
  .admin-body .set-row.fw-2xl,
  .admin-body .set-row.fw-full {
    width: 100%;
    max-width: none;
  }
}

.set-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin: 0;
  min-width: 0;
}
.set-row em {
  font-style: normal;
  font-size: 13px;
  color: #344054;
  text-align: left;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
}
.set-row input,
.set-row select,
.set-row textarea {
  width: 100%;
  min-height: 36px;
  height: auto;
  padding: 8px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  color: #101828;
  box-sizing: border-box;
}
.set-row input::placeholder,
.set-row textarea::placeholder {
  color: #b4becc;
  opacity: 1;
}
.set-row em.req::after,
.upload-tile-t.req::after {
  content: ' *';
  color: #e11d48;
  font-weight: 700;
}
.req-mark { color: #e11d48; font-weight: 700; }
.flash-err {
  border: 1px solid #f5c2c7;
  background: #fff5f5;
  color: #b42318;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 13px;
}
.set-row textarea {
  height: auto;
  min-height: 64px;
  padding: 8px 10px;
  line-height: 1.5;
  resize: vertical;
  align-self: stretch;
}
.set-row:has(textarea) {
  align-items: start;
}
.set-row:has(textarea) em {
  padding-top: 8px;
}
.set-row input:focus,
.set-row select:focus,
.set-row textarea:focus {
  outline: none;
  border-color: #2f6bff;
  box-shadow: 0 0 0 2px rgba(47, 107, 255, 0.12);
}
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

.set-row .color-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.set-row .color-swatch {
  width: 32px;
  height: 32px;
  padding: 2px;
  border: 1px solid #d5dde8;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.set-split {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
  margin-bottom: 0;
  align-items: start;
}
.set-split .set-card { margin-bottom: 12px; }

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
}
.upload-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 10px;
  border: 1px dashed #cfd7e3;
  border-radius: 8px;
  background: #f8fafc;
  min-width: 0;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.upload-tile:hover {
  border-color: #2f6bff;
  background: #f3f7ff;
}
.upload-tile-t {
  font-size: 12px;
  font-weight: 650;
  color: #344054;
}
.upload-tile img {
  height: 56px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  align-self: flex-start;
  background: #fff;
  border-radius: 4px;
  padding: 4px;
}
.upload-ph {
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #eef2f7;
  color: #98a2b3;
  font-size: 12px;
}
.upload-tile input[type="file"] {
  font-size: 11px;
  padding: 0;
  border: 0;
  height: auto;
  background: transparent;
}
.upload-tile em {
  font-style: normal;
  font-size: 10px;
  color: #98a2b3;
  word-break: break-all;
  line-height: 1.3;
}

.set-tip {
  margin: 0;
  padding: 0 14px 12px;
  font-size: 12px;
  color: #8a97ab;
  line-height: 1.5;
}
.set-grid.cols-1 {
  grid-template-columns: 1fr;
}
.how-card {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #78350f;
  line-height: 1.65;
}
.how-card b { color: #92400e; }
.how-card ol { margin: 8px 0 0; padding-left: 1.2em; }
.how-card li { margin: 4px 0; }
.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.guide-table th {
  background: #f7f9fc;
  color: #5f6e84;
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid #eef1f6;
  text-align: left;
}
.guide-table td {
  padding: 10px;
  border-bottom: 1px solid #eef1f6;
  vertical-align: middle;
}
.guide-table td small {
  display: block;
  margin-top: 2px;
  color: #95a1b3;
  font-size: 11px;
}
.guide-table .ex {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}
.guide-table .bad { color: #e11d48; }
.guide-table input {
  width: 100%;
  height: 34px;
  padding: 5px 10px;
  border: 1px solid #d5dde8;
  border-radius: 5px;
  font-size: 13px;
}
.guide-table input:focus {
  outline: none;
  border-color: #2f6bff;
  box-shadow: 0 0 0 2px rgba(47, 107, 255, 0.12);
}
.sms-preview {
  margin: 12px 14px 14px;
  padding: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}
.sms-preview-hd {
  font-size: 12px;
  font-weight: 650;
  color: #475467;
  margin-bottom: 8px;
}
.sms-preview-body {
  font-size: 13px;
  line-height: 1.65;
  color: #1f2937;
  word-break: break-all;
}
.var-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px;
}
.var-btn {
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  line-height: 1.4;
}
.var-btn:hover {
  background: #e0e7ff;
  border-color: #a5b4fc;
}
.set-more {
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
  overflow: hidden;
}
.set-more > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 650;
  color: #344054;
  user-select: none;
}
.set-more > summary::-webkit-details-marker { display: none; }
.set-more > summary::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 8px;
  vertical-align: 1px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #2f6bff;
}
.set-more[open] > summary::before {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid #2f6bff;
  border-bottom: 0;
  vertical-align: 2px;
}
.set-more .set-card {
  border: 0;
  border-top: 1px solid #eef1f6;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}

.set-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
}
.sticky-foot {
  position: sticky;
  bottom: 0;
  margin: 0 -20px -32px;
  padding: 12px 20px;
  background: rgba(244, 246, 250, 0.92);
  border-top: 1px solid #e6ebf2;
  backdrop-filter: blur(8px);
}
.set-foot .hint { margin: 0; font-size: 12px; color: #8a97ab; }
.set-foot .btn,
.settings-page .admin-top .btn {
  height: 34px;
  padding: 0 18px;
  border-radius: 6px;
  font-size: 13px;
}

@media (max-width: 1200px) {
  .set-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .set-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-3, .span-4 { grid-column: 1 / -1; }
  .set-split { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .set-grid.cols-4,
  .set-grid.cols-3,
  .set-grid.cols-2 { grid-template-columns: 1fr; }
  .span-2, .span-3, .span-4 { grid-column: auto; }
  .set-row { gap: 4px; }
  .set-row em { text-align: left; }
  .upload-grid { grid-template-columns: 1fr 1fr; }
}

.cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.card .label { color: var(--muted); font-size: 12px; }
.card .value { font-size: 26px; font-weight: 700; margin-top: 6px; }
.card .rate { margin-top: 6px; font-size: 12px; color: #344054; }
.card .hint-inline { color: var(--muted); font-weight: 400; }

.cards-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.stats-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.seg a {
  padding: 7px 12px;
  color: #475467;
  font-size: 13px;
}
.seg a.on, .seg a:hover {
  background: var(--theme);
  color: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}
.chart-wrap { position: relative; min-height: 260px; }

.funnel { display: grid; gap: 12px; margin-top: 8px; }
.funnel-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.funnel-row .bar {
  height: 10px;
  background: #eef2f7;
  border-radius: 999px;
  overflow: hidden;
}
.funnel-row .bar i {
  display: block;
  height: 100%;
  background: #98a2b3;
  border-radius: 999px;
}
.funnel-row b { font-size: 12px; color: #344054; white-space: nowrap; }

@media (max-width: 1100px) {
  .cards-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: 1fr; }
}

.panel {
  background: #fff;
  border: 1px solid #ebeef5;
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}
.panel-compact { padding: 12px 14px 14px; }
.admin-body .panel > h3 {
  margin: 0 0 14px;
  padding-left: 10px;
  border-left: 3px solid #2f6bff;
  font-size: 15px;
  font-weight: 600;
  color: #101828;
  line-height: 1.3;
}
.sec-title {
  margin: 14px 0 8px;
  font-size: 14px;
  font-weight: 650;
  color: #1f2a37;
}
.sec-title:first-child { margin-top: 0; }
.flash-ok {
  border: 1px solid #b7e0c7;
  background: #f3faf6;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 13px;
}
.form-actions { margin-top: 12px; }
.color-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.color-swatch {
  width: 36px;
  height: 34px;
  padding: 2px;
  border-radius: 6px;
  flex-shrink: 0;
  cursor: pointer;
}
.thumb-sm { height: 40px; margin-top: 4px; display: block; }
.thumb-md { height: 56px; margin-top: 4px; display: block; }
.thumb-lg { height: 72px; margin-top: 4px; display: block; }

.admin-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-body th, .admin-body td {
  padding: 11px 10px;
  border-bottom: 1px solid #eef1f6;
  text-align: left;
  vertical-align: top;
}
.admin-body th {
  color: #667085;
  font-weight: 600;
  background: #fafbfd;
}

/* 绠＄悊鍚庡彴鎸夐挳锛氬榻愬父瑙?SaaS 涓昏壊鎸夐挳瑙傛劅锛屼笉褰卞搷 H5 鍑戒欢椤?*/
.admin-body .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: #2f6bff;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(47, 107, 255, 0.2);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.admin-body .btn:hover { background: #1f54d8; }
.admin-body .btn:active { background: #1a47b8; }
.admin-body .btn.secondary {
  background: #fff;
  color: #344054;
  border-color: #d0d5dd;
  box-shadow: none;
}
.admin-body .btn.secondary:hover {
  background: #f8fafc;
  border-color: #98a2b3;
  color: #101828;
}
.admin-body .btn.danger {
  background: #fff;
  color: #c41e3a;
  border-color: #fecdca;
  box-shadow: none;
}
.admin-body .btn.danger:hover {
  background: #fff5f5;
  border-color: #f97066;
}
.admin-body .btn.small {
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 6px;
}

.link-access-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 420px;
}
.link-access-check {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  color: #344054;
  line-height: 1.45;
  cursor: pointer;
}
.link-access-check input {
  width: auto;
  margin-top: 3px;
  flex: 0 0 auto;
}
.link-access-field {
  display: block;
  margin: 0;
}
.link-access-label {
  display: block;
  font-size: 13px;
  color: #667085;
  margin-bottom: 6px;
}
.link-access-field input[type="datetime-local"] {
  width: 100%;
  max-width: 280px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-grid--tight {
  gap: 8px 12px;
}
.form-grid .full { grid-column: 1 / -1; }
.admin-body label {
  display: block;
  font-size: 13px;
  color: #344054;
  margin-bottom: 6px;
  line-height: 1.35;
}
.admin-body input,
.admin-body select,
.admin-body textarea {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  color: #101828;
  background: #fff;
  line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.admin-body input:hover,
.admin-body select:hover,
.admin-body textarea:hover {
  border-color: #98a2b3;
}
.admin-body input:focus,
.admin-body select:focus,
.admin-body textarea:focus {
  outline: none;
  border-color: #2f6bff;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.12);
}
.admin-body .admin-top h1 {
  font-size: 20px;
  font-weight: 650;
  color: #101828;
  letter-spacing: 0;
}
.admin-body .hint {
  color: #667085;
  font-size: 12px;
  line-height: 1.55;
}
.admin-body .page-sub {
  color: #667085;
}
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  flex: none;
  border: none;
  border-radius: 0;
  background: transparent;
}
.export-batch-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 6px 2px;
  margin: 0;
  font-size: 13px;
  color: #18212f;
  cursor: pointer;
}
.export-batch-row .export-batch {
  margin-top: 2px;
}
.export-batch-text {
  flex: 1;
  min-width: 0;
  text-align: left;
  line-height: 1.45;
  word-break: break-all;
}
textarea { min-height: 72px; resize: vertical; }
.hint { color: #667085; font-size: 11px; margin-top: 4px; }

.status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #eef2f7;
}
.status.opened { background: #e8f1ff; color: #1e4b8c; }
.status.receipted { background: #e8f6ee; color: #0f7b4a; }
.status.rejected { background: #fdecec; color: #b42318; }
.status.ready, .status.draft { background: #f2f4f7; color: #475467; }

.login-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(22, 119, 255, 0.08), transparent 42%),
    radial-gradient(ellipse at 82% 80%, rgba(114, 46, 209, 0.06), transparent 38%),
    #f5f7fb;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.login-stage {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 400px 1fr;
  align-items: center;
  gap: 56px;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.login-aside {
  padding: 12px 8px;
  color: #1d2129;
  background: transparent;
}
.login-kicker {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: #86909c;
}
.login-aside h1 {
  margin: 0 0 16px;
  font-size: 32px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.35;
  background: linear-gradient(90deg, #1d2129 0%, #1677ff 55%, #722ed1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-aside-desc {
  margin: 0;
  color: #4e5969;
  font-size: 14px;
  line-height: 1.9;
}
.login-card {
  background: #fff;
  padding: 36px 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(29, 33, 41, 0.06);
  order: -1;
}
.login-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 650;
  color: #1d2129;
}
.login-sub {
  margin: 0 0 22px;
  color: #667085;
  font-size: 13px;
}
.login-card label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  color: #344054;
  font-weight: 600;
}
.login-card input {
  width: 100%;
  margin-top: 6px;
  height: 44px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
  background: #fbfcfe;
}
.login-card input:focus {
  outline: none;
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.15);
}
.login-submit {
  width: 100%;
  height: 40px;
  margin-top: 8px;
  border-radius: 6px;
  background: #1677ff;
  color: #fff;
  font-weight: 500;
}
.login-submit:hover { background: #4096ff; }
.login-card .error {
  background: #fdecec;
  color: #b42318;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 13px;
}
@media (max-width: 720px) {
  .login-stage { grid-template-columns: 1fr; }
  .login-aside { padding: 28px 24px 20px; }
  .login-aside h1 { font-size: 26px; }
  .login-card { padding: 28px 22px 32px; }
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}

.sms-box {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

@media (max-width: 960px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .admin-nav .brand { margin: 0; padding: 0; }
  .admin-nav .nav-user { border: 0; margin: 0; padding: 0 8px; }
  .admin-nav .nav-logout { margin: 0; padding: 0; }
  .admin-nav .nav-logout .btn { width: auto; }
  .admin-nav a { white-space: nowrap; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
}

/* 侧栏联系我们：与留言/复制/下载同色同款，号码不挤在侧栏里 */


/* 联系我们：与侧栏其它按钮同款，不单独露号；避免 iOS 把 tel 链接染成黑/蓝 */
.h5-side #btnContactUs,
.h5-side a#btnContactUs,
.h5-side a#btnDownload {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-decoration: none !important;
  background: transparent !important;
}
.h5-side #btnContactUs .ico,
.h5-side #btnContactUs svg,
.h5-side a#btnContactUs .ico,
.h5-side a#btnContactUs svg,
.h5-side a#btnDownload .ico,
.h5-side a#btnDownload svg {
  color: #fff !important;
  fill: currentColor !important;
}
.h5-side a,
.h5-side a:link,
.h5-side a:visited,
.h5-side a:hover,
.h5-side a:active {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-decoration: none !important;
}
