:root {
  --primary-color: #ff434f;
  --secondary-color: #e3e3e3;
  --text-color-lightest: #e7e9ec;
  --text-color-darker: #2e2e2e;
  --text-color-dark: #494949;
  --text-color-gray: #8b8b8b;
  --text-color-dark-gray: #727272;
  --text-color-light-gray: #c6c6c6;
  --backdrop-color: rgba(42, 42, 42, 0.69);
  --section-bg: #f9fbfb;
  --footer-bg: #181818;
  --card-shadow: 0 0 18px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Helvetica, "PingFang SC", "Microsoft Yahei", sans-serif;
  font-size: 14px;
  color: var(--text-color-dark);
  background: var(--section-bg);
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ---------- Login (hero style) ---------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(var(--backdrop-color), rgba(24, 24, 24, 0.85)),
    linear-gradient(135deg, #1a2a3a 0%, #2c3e50 50%, #121820 100%);
  color: var(--text-color-lightest);
}
.login-card {
  width: min(400px, 100%);
  background: #fff;
  color: var(--text-color-dark);
  border-radius: 4px;
  padding: 36px 32px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}
.login-card h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  color: var(--text-color-darker);
}
.login-card h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  background: var(--primary-color);
  margin-top: 12px;
}
.login-card .sub {
  color: var(--text-color-dark-gray);
  margin: 14px 0 22px;
  font-size: 14px;
}
.login-card label {
  display: block;
  font-size: 13px;
  color: var(--text-color-gray);
  margin: 12px 0 6px;
}
.login-card input,
.content input,
.content select,
.content textarea {
  width: 100%;
  border: 1px solid #e5e8ea;
  background: #f4f6f7;
  color: var(--text-color-darker);
  border-radius: 4px;
  padding: 10px 12px;
  outline: none;
}
.login-card input:focus,
.content input:focus,
.content select:focus,
.content textarea:focus {
  border-color: var(--primary-color);
  background: #fff;
}
.login-card button,
.btn {
  margin-top: 22px;
  width: 100%;
  border: 0;
  border-radius: 4px;
  padding: 12px 16px;
  background: var(--primary-color);
  color: var(--text-color-lightest);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.btn.secondary {
  background: var(--secondary-color);
  color: var(--text-color-dark-gray);
  width: auto;
  margin: 0;
}
.btn.danger {
  background: #c62828;
  color: #fff;
  width: auto;
  margin: 0;
}
.btn.danger:hover { background: #a61d1d; color: #fff; }
.btn.tiny.danger { background: #c62828; }
.cancel-ul {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
  color: #2e2e2e;
}
.cancel-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #2e2e2e;
  cursor: pointer;
}
.cancel-check input { margin-top: 2px; }
.btn.secondary:hover,
.filter-btn:hover {
  background: var(--primary-color);
  color: #fff;
}
.error {
  color: var(--primary-color);
  min-height: 20px;
  font-size: 13px;
  margin-top: 10px;
}
.login-home {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: var(--text-color-gray);
  font-size: 13px;
  text-decoration: none;
}
.login-home:hover { color: var(--primary-color); }

/* ---------- Main shell ---------- */
#mainView {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
.sider {
  background: #181818;
  color: var(--text-color-lightest);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brand {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  padding: 8px 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  background: transparent;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.brand-name {
  line-height: 1.2;
}
.portal-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1.3;
}
.portal-badge.portal-admin {
  color: #fff;
  background: var(--primary-color, #ff434f);
}
.portal-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.portal-chip.portal-admin {
  color: #fff;
  background: var(--primary-color, #ff434f);
}
.top-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.sider nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.sider nav button,
.logout {
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text-color-light-gray);
  padding: 12px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
.sider nav button.active,
.sider nav button:hover {
  background: rgba(255, 67, 79, 0.15);
  color: #fff;
}
.sider nav button.active {
  border-left: 3px solid var(--primary-color);
  padding-left: 11px;
}
.logout { color: var(--primary-color); margin-top: auto; }

.content {
  padding: 28px 32px 48px;
  background: var(--section-bg);
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}
.top h2,
.top-title h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  color: var(--text-color-darker);
}
.top h2::after,
.top-title h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: var(--primary-color);
  margin-top: 10px;
}
#adminName {
  color: var(--text-color-gray);
  font-size: 13px;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ws-status {
  font-size: 12px;
  color: var(--text-color-gray);
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--secondary-color);
}
.ws-status.on {
  background: rgba(255, 67, 79, 0.12);
  color: var(--primary-color);
}
.socket-toast {
  position: fixed;
  right: 24px;
  top: 24px;
  z-index: 9999;
  min-width: 240px;
  max-width: 360px;
  background: #181818;
  color: #e7e9ec;
  border-left: 4px solid var(--primary-color);
  border-radius: 4px;
  padding: 14px 16px;
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: .25s ease;
}
.btn.tiny { padding: 4px 10px; font-size: 12px; width: auto; margin: 0 4px 0 0; }
.actions { white-space: nowrap; }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px;
  background: #e3e3e3; color: #494949;
}
.tag.on { background: rgba(255,67,79,.12); color: #ff434f; }
.tag.off { background: #eee; color: #8b8b8b; }
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  width: min(520px, 100%); background: #fff; border-radius: 4px; padding: 22px;
  box-shadow: 0 18px 48px rgba(0,0,0,.25); max-height: 90vh; overflow: auto;
}
.modal h3 { margin: 0 0 14px; color: #2e2e2e; }
.modal .form-grid { box-shadow: none; max-width: none; padding: 0; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn { width: auto; margin: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}
.card {
  background: #fff;
  border-radius: 4px;
  padding: 20px 18px;
  box-shadow: var(--card-shadow);
}
.card .n {
  font-size: 32px;
  font-weight: 600;
  color: var(--primary-color);
}
.card .l {
  color: var(--text-color-gray);
  margin-top: 8px;
  font-size: 13px;
}
.panel {
  background: #fff;
  border-radius: 4px;
  padding: 16px;
  box-shadow: var(--card-shadow);
}

.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.toolbar input {
  width: 180px;
  max-width: 180px;
  flex: 0 0 auto;
  height: 34px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0 10px;
  box-sizing: border-box;
}
.toolbar select {
  width: auto;
  min-width: 96px;
  max-width: 140px;
  flex: 0 0 auto;
  height: 34px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0 8px;
  box-sizing: border-box;
}
.toolbar .btn {
  width: auto;
  margin: 0;
  padding: 0 14px;
  height: 34px;
  flex: 0 0 auto;
}
.toolbar-orders select.sel-sm,
.toolbar select.sel-sm {
  width: 100px;
  min-width: 100px;
  max-width: 110px;
}
.toolbar-orders input {
  width: 160px;
  max-width: 160px;
}
.toolbar-orders .od-date-lab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #727272;
  white-space: nowrap;
}
.toolbar-orders .od-date-lab input[type="date"] {
  width: 138px;
  max-width: 138px;
  height: 34px;
  padding: 0 8px;
}
.od-page-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  margin: 0 0 12px;
  padding: 10px 14px;
  background: #fff;
  border-radius: 4px;
  box-shadow: var(--card-shadow);
  font-size: 13px;
  color: #494949;
}
.od-page-stats b { color: #2e2e2e; font-weight: 700; }
.od-amt { white-space: nowrap; }
.od-amt-tag { margin-left: 4px; font-size: 11px; }

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f2f3;
  text-align: left;
  font-size: 13px;
  color: var(--text-color-dark);
}
th {
  color: var(--text-color-dark-gray);
  font-weight: 600;
  background: #f4f6f7;
}
.openid-cell {
  display: inline-block; max-width: 220px; font-size: 11px; line-height: 1.35;
  word-break: break-all; color: #494949; background: #f4f6f7; padding: 2px 6px; border-radius: 3px;
}
.wx-id-block {
  display: flex; flex-direction: column; gap: 4px; min-width: 140px;
}
.wx-id-block > div {
  display: flex; flex-direction: column; gap: 2px;
}
.wx-id-k {
  font-size: 11px; color: #8b8b8b; font-weight: 500;
}
.wx-id-block .openid-cell { max-width: 260px; }

.form-grid {
  display: grid;
  gap: 10px;
  max-width: 480px;
  background: #fff;
  padding: 20px;
  border-radius: 4px;
  box-shadow: var(--card-shadow);
}
.form-grid label {
  font-size: 13px;
  color: var(--text-color-gray);
}

.btn.tiny { padding: 4px 10px; font-size: 12px; width: auto; margin: 0 4px 4px 0; }
.actions { white-space: nowrap; }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px;
  background: #e3e3e3; color: #494949;
}
.tag.on { background: rgba(255,67,79,.12); color: #ff434f; }
.tag.off { background: #eee; color: #8b8b8b; }
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  width: min(520px, 100%); background: #fff; border-radius: 4px; padding: 22px;
  box-shadow: 0 18px 48px rgba(0,0,0,.25); max-height: 90vh; overflow: auto;
}
.modal h3 { margin: 0 0 14px; color: #2e2e2e; }
.modal .form-grid { box-shadow: none; max-width: none; padding: 0; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.modal-actions .btn { width: auto; margin: 0; }
.modal.modal-wide { width: min(1080px, 96vw); }
.modal.modal-wide .form-grid { display: block; }
.modal.modal-user { width: min(640px, 96vw); }
.modal.modal-user .form-grid { display: block; }
.modal.modal-cert {
  width: min(920px, 96vw);
  padding: 20px 22px 16px;
}
.modal.modal-cert .form-grid { display: block; }

/* 入驻审核弹窗 */
.cert-review { display: flex; flex-direction: column; gap: 14px; }
.cr-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 14px 16px; background: #f7f8fa; border-radius: 8px; border: 1px solid #eef0f2;
}
.cr-company { font-size: 18px; font-weight: 700; color: #141c26; margin-bottom: 6px; }
.cr-sub { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12px; color: #8b8b8b; }
.cr-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.cr-badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px;
  background: #eef1f4; color: #494949; font-weight: 600;
}
.cr-badge.accent { background: rgba(255,67,79,.12); color: #ff434f; }
.cr-badge.warn { background: rgba(245,166,35,.16); color: #c47d00; }
.cr-badge.ok { background: rgba(57,181,74,.14); color: #2d8a3a; }
.cr-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
@media (max-width: 720px) {
  .cr-grid { grid-template-columns: 1fr; }
}
.cr-sec {
  border: 1px solid #eef0f2; border-radius: 8px; padding: 12px 14px 14px; background: #fff;
}
.cr-sec-title {
  font-size: 13px; font-weight: 700; color: #2e2e2e; margin: 0 0 10px;
  padding-bottom: 8px; border-bottom: 1px solid #f0f2f3;
}
.cr-sec-title .muted { font-weight: 400; margin-left: 6px; }
.cr-kv {
  display: grid; grid-template-columns: 120px 1fr; gap: 8px 10px; align-items: start;
}
.cr-k { font-size: 12px; color: #8b8b8b; line-height: 1.45; padding-top: 1px; }
.cr-v { font-size: 13px; color: #2e2e2e; line-height: 1.45; word-break: break-word; }
.cr-commits { margin: 0; padding-left: 18px; color: #494949; font-size: 13px; line-height: 1.55; }
.cr-commits li { margin: 4px 0; }
.cr-agree { margin: 10px 0 0; font-size: 12px; color: #07c160; }
.cr-docs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.cr-doc {
  border: 1px solid #eef0f2; border-radius: 8px; padding: 10px; background: #fafbfc;
  display: flex; flex-direction: column; gap: 8px; min-height: 160px;
}
.cr-doc.missing { opacity: .75; }
.cr-doc-name { font-size: 12px; font-weight: 600; color: #2e2e2e; line-height: 1.35; }
.cr-doc-empty { font-size: 12px; color: #b0b0b0; margin-top: auto; }
.cr-doc-hint { font-size: 11px; color: #8b8b8b; }
.cr-thumb {
  display: block; width: 100%; aspect-ratio: 1; border: none; padding: 0; margin: 0;
  border-radius: 6px; overflow: hidden; cursor: zoom-in; background: #eef1f4;
}
.cr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cr-thumb:hover { outline: 2px solid rgba(255,67,79,.45); outline-offset: 1px; }
.cr-file {
  display: inline-block; margin-top: auto; font-size: 12px; color: #ff434f; text-decoration: none;
}
.cr-file:hover { text-decoration: underline; }
.cr-reject { border-color: rgba(255,67,79,.35); background: #fff8f8; }
.cr-reject p { margin: 0; color: #ff434f; font-size: 13px; line-height: 1.5; }
.cr-review-ops { background: #fffaf6; border-color: rgba(255,122,24,.28); }
.cr-check-title { font-size: 12px; color: #727272; margin-bottom: 8px; }
.cr-checks { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.cr-check {
  display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: #2e2e2e;
  font-weight: 400; cursor: pointer;
}
.cr-check input { width: auto; margin-top: 3px; flex: 0 0 auto; }
.cr-field {
  display: block; font-size: 12px; color: #727272; margin: 8px 0 6px;
}
.cr-input {
  width: 100%; box-sizing: border-box; height: 36px; border: 1px solid #ddd;
  border-radius: 6px; padding: 0 10px; font-size: 13px; background: #fff;
}
.cr-textarea {
  width: 100%; box-sizing: border-box; min-height: 96px; border: 1px solid #ddd;
  border-radius: 6px; padding: 10px; font-size: 13px; line-height: 1.5;
  resize: vertical; font-family: inherit; background: #fff;
}
.cr-input:focus, .cr-textarea:focus {
  outline: none; border-color: rgba(255,67,79,.55); box-shadow: 0 0 0 3px rgba(255,67,79,.08);
}
.cr-open-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px;
}
.order-edit .cr-sec .cr-field:first-of-type { margin-top: 0; }
@media (max-width: 720px) {
  .cr-open-grid { grid-template-columns: 1fr; }
}
.cr-tip { margin: 10px 0 0; font-size: 12px; line-height: 1.5; }

/* 客户用户 · 签约管理（对齐入驻审核弹窗） */
.contract-manage .cm-list {
  display: flex; flex-direction: column; gap: 10px; margin-top: 10px;
}
.cm-card {
  border: 1px solid #eef0f2; border-radius: 8px; padding: 12px 14px; background: #fafbfc;
}
.cm-card-top {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px;
}
.cm-card-title { font-size: 15px; font-weight: 700; color: #141c26; }
.cm-card-sub {
  display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 12px; color: #8b8b8b; margin-bottom: 8px;
}
.cm-card-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 13px; color: #2e2e2e;
}
.cm-card-meta em {
  font-style: normal; color: #8b8b8b; margin-right: 6px; font-size: 12px;
}
.cm-card-actions {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid #eef0f2;
}
.cm-cats {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px 10px !important;
}
.cm-cat { margin: 0; }
@media (max-width: 720px) {
  .cm-card-meta { grid-template-columns: 1fr; }
}

/* 本页大图预览（叠在审核弹窗之上） */
.img-lightbox {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(10, 14, 20, 0.88);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px 32px; box-sizing: border-box;
}
.img-lightbox[hidden] { display: none !important; }
.img-lb-close {
  position: absolute; top: 16px; right: 20px;
  background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px; padding: 8px 14px; cursor: pointer; font-size: 13px;
}
.img-lb-close:hover { background: rgba(255,255,255,.22); }
.img-lb-pic {
  max-width: min(920px, 92vw); max-height: min(78vh, 860px);
  object-fit: contain; border-radius: 6px; box-shadow: 0 16px 48px rgba(0,0,0,.45);
  background: #111;
}
.img-lb-cap {
  margin-top: 14px; color: rgba(255,255,255,.88); font-size: 14px; text-align: center;
}

/* 客户用户编辑：分区 + 双列 */
.user-edit { display: flex; flex-direction: column; gap: 14px; }
.ue-sec {
  border: 1px solid #eef0f2;
  border-radius: 8px;
  padding: 12px 14px 14px;
  background: #fafbfc;
}
.ue-sec-title {
  font-size: 13px;
  font-weight: 600;
  color: #2e2e2e;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eceff1;
}
.ue-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.ue-grid .full { grid-column: 1 / -1; }
.ue-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ue-field label {
  margin: 0;
  font-size: 12px;
  color: #8b8b8b;
  font-weight: 500;
}
.ue-field input,
.ue-field select,
.ue-field textarea {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}
.ue-field input[readonly] {
  background: #f0f2f3;
  color: #727272;
}
.ue-tip {
  margin: 0;
  font-size: 12px;
  color: #8b8b8b;
  line-height: 1.5;
}
.ue-tip.warn { color: #c47d00; }
@media (max-width: 560px) {
  .ue-grid { grid-template-columns: 1fr; }
}

/* ---------- 服务商入驻管理页 ---------- */
.page-cert { display: flex; flex-direction: column; gap: 14px; }
.page-cert-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.page-cert-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #141c26;
  letter-spacing: 0.01em;
}
.page-cert-desc {
  margin: 6px 0 0;
  font-size: 13px;
  color: #8b8b8b;
  line-height: 1.5;
  max-width: 640px;
}
.seg-tabs {
  display: inline-flex;
  padding: 4px;
  background: #eef1f4;
  border-radius: 10px;
  gap: 4px;
  width: fit-content;
}
.seg-tab {
  border: 0;
  background: transparent;
  color: #5a6570;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
}
.seg-tab.on {
  background: #fff;
  color: #141c26;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.cert-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px) {
  .cert-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.cert-stat {
  background: #fff;
  border: 1px solid #eef0f2;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: var(--card-shadow);
}
.cert-stat.warn { border-color: rgba(245,166,35,.35); background: #fffaf2; }
.cert-stat.ok { border-color: rgba(57,181,74,.3); background: #f5fbf6; }
.cert-stat-n { font-size: 28px; font-weight: 700; color: #141c26; line-height: 1.1; }
.cert-stat.warn .cert-stat-n { color: #c47d00; }
.cert-stat.ok .cert-stat-n { color: #2d8a3a; }
.cert-stat-l { margin-top: 6px; font-size: 12px; color: #8b8b8b; }
.cert-std-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 16px;
  align-items: flex-start;
  padding: 14px 16px;
}
.cert-std-main { flex: 1; min-width: 240px; }
.cert-std-main strong { color: #141c26; font-size: 14px; }
.cert-std-main .muted { margin: 6px 0 0; line-height: 1.5; }
.cert-std-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cert-std-actions .btn { width: auto; margin: 0; padding: 8px 14px; height: auto; }
.cert-tier-panel { margin: 0; }
.cert-list-panel { padding: 0; overflow: hidden; }
.cert-list-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 16px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #f0f2f3;
  background: #fafbfc;
}
.cert-list-count { font-size: 12px; white-space: nowrap; }
.cert-toolbar {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.cert-toolbar input { width: 220px; max-width: 220px; }
.cert-toolbar select {
  min-width: 120px;
  max-width: 160px;
}
/* 筛选按钮与行业页 toolbar 同高同间距，避免胶囊 chip 两行错位 */
.cert-toolbar .btn {
  min-width: auto;
  padding: 0 12px;
  font-size: 13px;
  white-space: nowrap;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
  border: 1px solid #ddd;
  background: #fff;
  color: #5a6570;
  border-radius: 4px;
  padding: 0 12px;
  height: 34px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
}
.chip em {
  font-style: normal;
  margin-left: 4px;
  color: #8b8b8b;
  font-weight: 500;
}
.chip.on {
  border-color: var(--primary, #ff434f);
  background: var(--primary, #ff434f);
  color: #fff;
}
.chip.on em { color: rgba(255,255,255,.9); }
.table-wrap { overflow-x: auto; }
.cert-table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: none; border-radius: 0; }
.cert-table th, .cert-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f2f3;
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}
.cert-table th {
  background: #fff;
  color: #8b8b8b;
  font-weight: 600;
  font-size: 12px;
}
.cert-table.compact th, .cert-table.compact td { padding: 8px 10px; }
.cert-table tbody tr:hover { background: #fcfcfd; }
.cell-title { font-weight: 600; color: #141c26; line-height: 1.35; }
.cell-sub { margin-top: 3px; font-size: 12px; color: #8b8b8b; line-height: 1.4; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #727272; font-size: 12px; }
.metric-row {
  display: flex; flex-wrap: wrap; gap: 6px 12px;
  font-size: 12px; color: #727272;
}
.metric-row b { color: #2e2e2e; font-weight: 600; }
.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #eef1f4;
  color: #494949;
}
.pill.warn { background: rgba(245,166,35,.16); color: #c47d00; }
.pill.ok { background: rgba(57,181,74,.14); color: #2d8a3a; }
.pill.bad { background: rgba(255,67,79,.12); color: #ff434f; }
.pill.tier-basic { background: rgba(255,67,79,.1); color: #ff434f; }
.pill.tier-advanced { background: rgba(46,196,206,.12); color: #1a8a92; }
.pill.tier-gold { background: rgba(245,166,35,.15); color: #c47d00; }
.pill.tier-diamond { background: rgba(74,144,217,.12); color: #2d6aa8; }
.pill.tier-none { background: #eee; color: #8b8b8b; }
.empty-block {
  text-align: center;
  padding: 36px 16px;
  color: #8b8b8b;
  font-size: 13px;
}

.tier-overview { margin: 0 0 14px; padding: 14px 16px; }
.tier-ov-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.tier-lead { margin: 0 0 12px; line-height: 1.5; }
.tier-table-wrap { overflow-x: auto; }
.tier-matrix { width: 100%; min-width: 720px; border-collapse: collapse; background: #fff; }
.tier-matrix th, .tier-matrix td {
  border: 1px solid #eef0f2; padding: 10px 8px; text-align: center; font-size: 13px; vertical-align: middle;
}
.tier-matrix thead th { background: #f7f8f9; color: #2e2e2e; font-weight: 600; }
.tier-matrix th.tier-dim, .tier-matrix tbody th {
  text-align: left; width: 148px; background: #fafbfc; color: #494949; font-weight: 600; white-space: nowrap;
}
.tier-hint { font-size: 11px; color: #8b8b8b; font-weight: 400; margin-top: 2px; }
.tier-badge {
  display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 13px;
  background: rgba(255,67,79,.1); color: var(--primary-color);
}
.tier-col.tier-advanced .tier-badge { background: rgba(46,196,206,.12); color: #1a8a92; }
.tier-col.tier-gold .tier-badge { background: rgba(245,166,35,.15); color: #c47d00; }
.tier-col.tier-diamond .tier-badge { background: rgba(74,144,217,.12); color: #2d6aa8; }
.tier-inp {
  width: 100% !important; min-width: 0 !important; max-width: none !important;
  height: 34px; box-sizing: border-box; text-align: center;
}
textarea.tier-inp { height: auto; min-height: 64px; text-align: left; padding: 6px 8px; resize: vertical; font-size: 12px; }
.tier-readonly td { color: #2e2e2e; }

.hb-thumb {
  width: 72px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #eef0f2;
  background: #f4f6f7;
  display: block;
}
.hb-thumb-html {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ff434f;
  background: linear-gradient(135deg, #1a2433, #141c26);
  border-color: #2a3440;
}
.hb-edit select {
  width: 120px;
  max-width: 100%;
}
.hb-edit textarea {
  max-width: 520px;
}
.hb-edit {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.hb-edit[hidden] { display: none !important; }
.hb-edit input {
  width: 100%;
  max-width: 420px;
}

/* ---------- 网站设置 ---------- */
.ss-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 920px;
}
.ss-page-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-color-gray);
  line-height: 1.55;
}
.ss-section {
  padding: 0;
  overflow: hidden;
}
.ss-sec-head {
  padding: 14px 18px 12px;
  border-bottom: 1px solid #f0f2f3;
  background: #fafbfc;
}
.ss-sec-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-color-darker);
}
.ss-sec-head .muted {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}
.ss-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  padding: 16px 18px 18px;
}
.ss-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.ss-field > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-color-dark-gray);
}
.ss-field .ss-opt {
  font-style: normal;
  font-weight: 400;
  color: var(--text-color-gray);
  margin-left: 6px;
}
.ss-field-span2 { grid-column: 1 / -1; }
.ss-input-preview {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ss-input-preview input { flex: 1; min-width: 0; }
.ss-preview-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border: 1px solid #eef0f2;
  border-radius: 4px;
  background: #fff;
  flex: 0 0 auto;
  padding: 4px;
}
.ss-preview-ga {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex: 0 0 auto;
}
.ss-share-box {
  padding: 4px 18px 18px;
}
.ss-share-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.ss-share-item {
  position: relative;
  width: 120px;
  height: 96px;
  border: 1px solid #eef0f2;
  border-radius: 8px;
  overflow: hidden;
  background: #fafbfc;
}
.ss-share-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ss-share-del {
  position: absolute;
  right: 4px;
  top: 4px;
  border: 0;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  cursor: pointer;
}
.ss-share-add {
  display: inline-flex;
  margin-top: 12px;
  padding: 8px 14px;
  border: 1px dashed #cfd6dd;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #494949;
}
.ss-switch-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px 18px;
}
.ss-switch-meta { flex: 1; min-width: 0; }
.ss-switch-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-color-darker);
  margin-bottom: 4px;
}
.ss-switch-meta .muted {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}
.ss-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  cursor: pointer;
  user-select: none;
  margin-top: 2px;
}
.ss-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.ss-switch-ui {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #d8dde2;
  position: relative;
  transition: background .18s ease;
  flex: 0 0 auto;
}
.ss-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
  transition: transform .18s ease;
}
.ss-switch input:checked + .ss-switch-ui {
  background: var(--primary-color);
}
.ss-switch input:checked + .ss-switch-ui::after {
  transform: translateX(20px);
}
.ss-switch-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-color-dark-gray);
  min-width: 42px;
}
.ss-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 0 4px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(249,251,251,0), var(--section-bg) 28%);
  z-index: 2;
}
.ss-actions .btn {
  width: auto;
  margin: 0;
  min-width: 112px;
  height: 38px;
  padding: 0 18px;
}
@media (max-width: 720px) {
  .ss-fields { grid-template-columns: 1fr; }
  .ss-field-span2 { grid-column: auto; }
  .ss-switch-row { flex-direction: column; align-items: stretch; }
  .ss-actions { justify-content: stretch; }
  .ss-actions .btn { flex: 1; }
}

.site-footer {
  margin-top: 28px;
  padding: 16px 0 8px;
  border-top: 1px solid #e8e8e8;
  color: #8b8b8b;
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  align-items: center;
}
.site-footer a {
  color: #8b8b8b;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.site-footer a:hover { color: #ff434f; }
.site-footer img { width: 14px; height: 14px; object-fit: contain; }
.site-footer .sf-beian { display: flex; flex-wrap: wrap; gap: 10px 14px; }

.actions-inline { display: flex; flex-wrap: wrap; gap: 6px; }
.actions-inline .btn { width: auto; margin: 0; padding: 4px 10px; height: auto; font-size: 12px; }
.tag.warn { background: rgba(245,166,35,.15); color: #c47d00; }
.tag.ok { background: rgba(57,181,74,.12); color: #2d8a3a; }

/* 绑定微信用户选择器 */
.ub-wrap { margin-top: 12px; }
.ub-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.ub-row .cr-input { flex: 1; min-width: 160px; }
.ub-row .btn { width: auto; margin: 0; flex-shrink: 0; }
.ub-select {
  width: 100%;
  min-height: 110px;
  height: auto !important;
  padding: 6px 8px;
  background: #fff;
}

/* 工单时间线样式见 /shared/modal.css */

@media (max-width: 800px) {
  #mainView { grid-template-columns: 1fr; }
  .sider {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .sider nav { flex-direction: row; flex-wrap: wrap; }
  .logout { margin-top: 0; }
  .content { padding: 20px 16px 40px; }
}
