/* ============ 管理后台 ============ */

.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); background: var(--bg); }
.admin-sidebar {
  background: var(--surface); border-right: 1px solid var(--line);
  padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.admin-brand__mark { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 16px; }
.admin-brand__txt strong { display: block; font-size: 14.5px; font-weight: 800; }
.admin-brand__txt span { display: block; font-size: 11px; color: var(--ink-3); }
.admin-nav { display: flex; flex-direction: column; gap: 3px; }
.admin-nav__label { font-size: 10.5px; font-weight: 750; letter-spacing: .13em; color: var(--ink-3); padding: 12px 10px 6px; }
.admin-nav__item {
  display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2); transition: .18s ease;
}
.admin-nav__item:hover { background: var(--surface-tint); color: var(--brand); }
.admin-nav__item--active { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.admin-nav__item .ic { color: currentColor; }
.admin-sidebar__foot { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-3); line-height: 1.7; }

.admin-topbar {
  height: 64px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 30px; position: sticky; top: 0; z-index: 20;
}
.admin-topbar__title { font-size: 15px; font-weight: 750; }
.admin-topbar__hint { font-size: 12.5px; color: var(--ink-3); }
.admin-user { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.admin-user__avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-size: 13px; font-weight: 800;
}
.admin-user__name { font-size: 13px; font-weight: 650; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-main { padding: 28px 30px 56px; min-width: 0; }
.admin-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-page-head h1 { font-size: 22px; margin-bottom: 5px; }
.admin-page-head p { font-size: 13px; color: var(--ink-3); }

/* ---------- 登录 ---------- */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 32px 20px;
  background:
    radial-gradient(700px 380px at 15% 5%, #e7efff 0%, transparent 70%),
    radial-gradient(620px 340px at 88% 90%, #eaf2ff 0%, transparent 72%),
    #f7f9fc;
}
.auth-card { width: min(100%, 428px); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 34px 34px 30px; }
.auth-card__mark { width: 46px; height: 46px; border-radius: 13px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 21px; font-weight: 800; margin-bottom: 20px; box-shadow: 0 7px 18px rgba(29,78,216,.22); }
.auth-card h1 { font-size: 22px; margin-bottom: 8px; }
.auth-card__sub { font-size: 13px; color: var(--ink-3); line-height: 1.75; margin-bottom: 24px; }
.auth-tabs { display: flex; gap: 4px; background: var(--surface-tint); padding: 4px; border-radius: 9px; margin-bottom: 22px; }
.auth-tab { flex: 1; border: 0; background: transparent; padding: 8px 10px; border-radius: 7px; font-size: 13px; font-weight: 650; color: var(--ink-2); transition: .18s ease; }
.auth-tab--active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-s); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 7px; color: var(--ink-2); }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 9px;
  padding: 10px 12px; outline: 0; font-size: 13.5px; transition: .18s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29,78,216,.10); }
.field textarea { resize: vertical; min-height: 90px; line-height: 1.75; }
.field__hint { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.6; }
.field__row { display: flex; gap: 9px; }
.auth-error { background: #fdf1ef; border: 1px solid #f3d6d1; color: #a3402f; border-radius: 9px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 16px; line-height: 1.6; }
.auth-note { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 11.8px; color: var(--ink-3); line-height: 1.8; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--brand); margin-top: 18px; }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-s); }
.stat-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.stat-card__top span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.stat-card__icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.stat-card strong { font-size: 27px; font-weight: 800; line-height: 1.1; letter-spacing: -.03em; }
.stat-card__foot { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }

/* ---------- 面板与表格 ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-s); overflow: hidden; }
.panel__head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel__head h2 { font-size: 15px; }
.panel__head .spacer { flex: 1; }
.panel__filters { display: flex; gap: 8px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; font-size: 11.5px; font-weight: 750; letter-spacing: .04em; color: var(--ink-3);
  background: var(--surface-soft); padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--surface-soft); }
.table-title { font-size: 13.5px; font-weight: 650; line-height: 1.5; max-width: 380px; }
.table-title small { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 400; margin-top: 3px; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 6px; }
.status-badge--published { background: #e8f6f2; color: #0e7a6d; }
.status-badge--draft { background: #f2f4f7; color: #6b7a8d; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.empty-row { text-align: center; padding: 48px 20px !important; color: var(--ink-3); font-size: 13px; }

/* ---------- 编辑器 ---------- */
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
.editor-main, .editor-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-s); padding: 22px 24px; }
.editor-section { margin-bottom: 26px; }
.editor-section:last-child { margin-bottom: 0; }
.editor-section__title { font-size: 13.5px; font-weight: 750; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.editor-section__title .ic { color: var(--brand); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field--full { grid-column: 1 / -1; }
.field textarea.editor-textarea { min-height: 400px; font-family: var(--mono); font-size: 13px; line-height: 1.8; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row__txt strong { display: block; font-size: 13px; }
.switch-row__txt span { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.switch { position: relative; width: 40px; height: 23px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch__track { position: absolute; inset: 0; background: #cfd8e5; border-radius: 99px; transition: .2s ease; cursor: pointer; }
.switch__track::after { content: ''; position: absolute; width: 17px; height: 17px; background: #fff; border-radius: 50%; top: 3px; left: 3px; transition: .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.switch input:checked + .switch__track { background: var(--brand); }
.switch input:checked + .switch__track::after { transform: translateX(17px); }
.editor-actions { display: flex; gap: 9px; margin-top: 18px; flex-wrap: wrap; }

/* ---------- 正文工具栏 / 表格·图片·小视频插入 ---------- */
.md-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; margin-bottom: 8px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-s) var(--radius-s) 0 0; }
.md-tool { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 6px; padding: 5px 10px; font-size: 12px; font-weight: 650; line-height: 1.5; cursor: pointer; }
.md-tool:hover { border-color: var(--brand); color: var(--brand); }
.md-tool--accent { color: var(--brand); border-color: rgba(26, 119, 255, .28); background: rgba(26, 119, 255, .06); }
.md-tool--on { background: var(--brand); color: #fff; border-color: var(--brand); }
.md-toolbar__sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.md-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.md-editor--single { grid-template-columns: 1fr; }
.md-editor__label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 11.5px; color: var(--ink-3); }
.md-editor__label span:first-child { font-weight: 650; color: var(--ink-2); }
.md-editor__source textarea.editor-textarea { min-height: 420px; }
.md-editor__view[hidden] { display: none; }
.md-preview { min-height: 420px; max-height: 720px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); overflow: auto; }
.md-preview[hidden], .md-pane[hidden], .md-upload-preview[hidden] { display: none; }
@media (max-width: 1180px) { .md-editor { grid-template-columns: 1fr; } }
.modal--media { width: min(100%, 620px); max-height: 88vh; overflow-y: auto; }
.md-form .field { margin-bottom: 14px; }
.md-tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.md-tab { border: 0; background: transparent; padding: 9px 14px; font-size: 13px; font-weight: 650; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; }
.md-tab--on { color: var(--brand); border-bottom-color: var(--brand); }
.md-table-grid { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-s); }
.md-grid { border-collapse: collapse; width: 100%; }
.md-grid th, .md-grid td { border: 1px solid var(--line); padding: 0; }
.md-grid input { width: 100%; min-width: 90px; border: 0; padding: 8px 10px; font-size: 12.5px; background: transparent; color: var(--ink); }
.md-grid th input { background: var(--surface-soft); font-weight: 700; }
.md-grid input:focus { outline: 2px solid var(--brand); outline-offset: -2px; }
.md-upload-preview { margin-top: 12px; border: 1px dashed var(--line); border-radius: var(--radius-s); padding: 10px; text-align: center; }
.md-upload-preview img { max-width: 100%; max-height: 220px; border-radius: 6px; }
#md-modal-error .auth-error { margin: 10px 0 0; }
.preview-box { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px; background: var(--surface-soft); }
.preview-box__cover { height: 96px; border-radius: var(--radius-s); margin-bottom: 12px; }
.btn--sm { padding: 5px 10px; font-size: 12px; font-weight: 600; }
.cover-picker { display: flex; align-items: center; gap: 12px; margin: 2px 0 8px; }
.cover-picker__preview { width: 136px; height: 76px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border: 1px dashed var(--line-strong, #c8d3e4); border-radius: var(--radius-s); background: var(--surface-soft); color: var(--ink-3); font-size: 11.5px; }
.cover-picker__preview--on { border-style: solid; }
.cover-picker__preview img { width: 100%; height: 100%; object-fit: contain; }
.cover-picker__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.cover-picker__file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
@media (max-width: 640px) { .cover-picker { flex-direction: column; align-items: flex-start; } }
.preview-box strong { display: block; font-size: 13.5px; line-height: 1.5; }
.preview-box p { font-size: 11.8px; color: var(--ink-3); margin-top: 6px; line-height: 1.6; }

/* ---------- 分类管理 ---------- */
.cat-rows { display: flex; flex-direction: column; }
.cat-row { display: flex; align-items: center; gap: 14px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.cat-row:last-child { border-bottom: 0; }
.cat-row__swatch { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.cat-row__txt { flex: 1; min-width: 0; }
.cat-row__txt strong { display: block; font-size: 13.8px; }
.cat-row__txt > span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.cat-row__txt strong .small { font-weight: 500; }
.cat-row__slug { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); background: var(--surface-soft); padding: 4px 8px; border-radius: 5px; }

.modal-mask { position: fixed; inset: 0; background: rgba(18, 30, 46, .38); display: grid; place-items: center; padding: 20px; z-index: 200; }
.modal-mask[hidden] { display: none; }
.modal { width: min(100%, 480px); background: var(--surface); border-radius: var(--radius-l); box-shadow: 0 24px 70px rgba(18,30,46,.24); padding: 26px 28px; }
.modal h2 { font-size: 18px; margin-bottom: 18px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }

/* ---------- 站点设置 ---------- */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
.settings-form, .settings-preview { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-s); padding: 22px 24px; }
.settings-section { margin-bottom: 26px; }
.settings-section:last-of-type { margin-bottom: 0; }
.settings-actions { display: flex; gap: 9px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.settings-preview__card { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 18px; background: var(--surface-soft); }
.settings-preview__brand { display: flex; align-items: center; gap: 11px; }
.settings-preview__brand strong { display: block; font-size: 16px; font-weight: 800; line-height: 1.3; }
.settings-preview__brand small { display: block; font-size: 9.5px; letter-spacing: .12em; color: var(--ink-3); margin-top: 3px; font-weight: 650; }
.settings-preview__divider { height: 1px; background: var(--line); margin: 18px 0 14px; }
.settings-preview__label { font-size: 12.5px; font-weight: 750; margin-bottom: 10px; }
.settings-preview__row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.settings-preview__row:last-child { margin-bottom: 0; }
.settings-preview__row .ic { color: var(--brand); flex: none; }
.qr-upload { display: flex; gap: 14px; align-items: flex-start; }
.qr-upload__preview { width: 92px; height: 92px; flex: none; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--surface-soft); display: grid; place-items: center; overflow: hidden; }
.qr-upload__preview img { width: 100%; height: 100%; object-fit: contain; }
.qr-upload__side { min-width: 0; }
.qr-upload__buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.qr-upload__side .field__hint { margin-top: 8px; }
.settings-preview__qr { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.settings-preview__qr[hidden], .settings-preview__icp[hidden] { display: none; }
.settings-preview__qr img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.settings-preview__qr span { font-size: 11.5px; color: var(--ink-3); }
.settings-preview__icp { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); text-align: center; font-size: 11px; color: var(--ink-3); display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.settings-preview__icp i { font-style: normal; color: var(--line-strong); }

/* 主题选择器 */
.theme-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.theme-card {
  position: relative; display: flex; align-items: center; gap: 13px; text-align: left;
  border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface);
  padding: 14px; transition: .16s ease; cursor: pointer;
}
.theme-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.theme-card--on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.theme-card__swatch {
  width: 58px; height: 46px; flex: none; border-radius: 8px; padding: 7px;
  display: flex; flex-direction: column; gap: 4px; overflow: hidden;
}
.theme-card__swatch i { display: block; border-radius: 3px; }
.theme-card__swatch i:first-child { height: 9px; }
.theme-card__swatch i:nth-child(2) { height: 5px; opacity: .7; }
.theme-card__swatch i:last-child { height: 5px; opacity: .45; }
.theme-card__swatch--business { background: linear-gradient(140deg, #1b2028, #0b1c3a); }
.theme-card__swatch--business i { background: #1a77ff; }
.theme-card__swatch--tech { background: linear-gradient(140deg, #0a1530, #071021); }
.theme-card__swatch--tech i { background: #22d3ee; }
.theme-card__swatch--classic { background: linear-gradient(140deg, #eef3ff, #fff); border: 1px solid #dbe4f2; }
.theme-card__swatch--classic i { background: #1d4ed8; }
.theme-card__meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.theme-card__meta strong { font-size: 13.5px; font-weight: 750; }
.theme-card__meta small { font-size: 11px; color: var(--ink-3); line-height: 1.5; }
.theme-card__check {
  position: absolute; top: 8px; right: 8px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--brand); color: #fff; display: none; place-items: center;
}
.theme-card--on .theme-card__check { display: grid; }

/* 预览卡随主题切换 */
.settings-preview__card.theme-business { background: #0b1c3a; border-color: #1a3a72; color: #dceaff; }
.settings-preview__card.theme-business .settings-preview__brand small,
.settings-preview__card.theme-business .settings-preview__icp { color: #8fa8cc; }
.settings-preview__card.theme-business .settings-preview__row { color: #b4c7e4; }
.settings-preview__card.theme-business .settings-preview__row .ic { color: #4d9bff; }
.settings-preview__card.theme-business .settings-preview__divider { background: #1a3a72; }
.settings-preview__card.theme-tech { background: #0b1730; border-color: #1d3358; color: #dceaff; }
.settings-preview__card.theme-tech .settings-preview__brand small,
.settings-preview__card.theme-tech .settings-preview__icp { color: #7f96b8; }
.settings-preview__card.theme-tech .settings-preview__row { color: #b4c7e4; }
.settings-preview__card.theme-tech .settings-preview__row .ic { color: #22d3ee; }
.settings-preview__card.theme-tech .settings-preview__divider { background: #1d3358; }
.settings-preview__card.theme-classic { background: var(--surface-soft); }

.notice {
  background: var(--brand-soft); border: 1px solid #d6e2ff; color: var(--brand-deep);
  border-radius: var(--radius-s); padding: 12px 15px; font-size: 12.5px; line-height: 1.75; margin-bottom: 20px;
}
.notice--warn { background: #fff8ea; border-color: #f2e0b8; color: #8a6112; }

@media (max-width: 1000px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: 12px 16px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-brand { border: 0; padding: 0; margin: 0; flex: none; }
  .admin-nav { flex-direction: row; gap: 4px; }
  .admin-nav__label, .admin-sidebar__foot { display: none; }
  .admin-nav__item { white-space: nowrap; padding: 8px 10px; }
  .admin-topbar { padding: 0 18px; }
  .admin-main { padding: 22px 18px 44px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .editor-grid, .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .field-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .admin-topbar__hint { display: none; }
  .admin-user__name { display: none; }
  .auth-card { padding: 26px 22px; }
}

/* ---- 首页装修 ---- */
.deco-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.deco-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fff; }
.deco-row:last-child { border-bottom: 0; }
.deco-row:nth-child(even) { background: var(--surface-soft, #f8fafc); }
.deco-row__check { display: flex; align-items: center; gap: 6px; font-size: 12px; min-width: 64px; cursor: pointer; }
.deco-row__check input { accent-color: var(--brand, #1a77ff); }
.deco-row__name { font-weight: 650; font-size: 13.5px; min-width: 132px; }
.deco-row__desc { flex: 1; color: var(--ink-3, #8492a6); font-size: 12px; }
.deco-row__move { display: flex; gap: 4px; }
.deco-move { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; color: var(--ink-2); }
.deco-move:hover { border-color: var(--brand, #1a77ff); color: var(--brand, #1a77ff); }
.deco-cards { display: grid; gap: 14px; }
.deco-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--surface-soft, #f8fafc); }
.deco-card__title { font-weight: 700; font-size: 13px; margin-bottom: 10px; }
.deco-img-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.deco-thumb { width: 72px; height: 44px; border-radius: 6px; border: 2px solid transparent; background-size: cover; background-position: center; cursor: pointer; }
.deco-thumb:hover { border-color: var(--brand, #1a77ff); }
.deco-thumb--sm { width: 56px; height: 36px; }
.deco-swatches { display: flex; gap: 8px; margin-top: 8px; }
.deco-swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-strong, #d3dce8); cursor: pointer; }
.deco-swatch:hover { box-shadow: 0 0 0 2px var(--brand, #1a77ff); }
.deco-aside { position: sticky; top: 20px; }
.deco-preview { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: #fff; }
.deco-preview__accent { width: 100%; height: 8px; border-radius: 99px; margin-bottom: 14px; }
.deco-preview__title { font-size: 12px; color: var(--ink-3, #8492a6); margin-bottom: 10px; }
.deco-preview__flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.deco-preview__flow span { padding: 5px 9px; border-radius: 6px; background: var(--brand-soft, #e8f1ff); color: var(--brand, #1a77ff); font-size: 12px; font-weight: 600; }
.deco-preview__flow i { font-style: normal; color: var(--ink-3, #8492a6); font-size: 11px; }
@media (max-width: 640px) {
  .deco-row { flex-wrap: wrap; }
  .deco-row__desc { display: none; }
}

/* ---- 流量统计 ---- */
.stat-grid--traffic { margin-top: 14px; }
.traffic-chart { display: flex; align-items: flex-end; gap: 6px; height: 156px; padding: 16px 4px 0; }
.traffic-bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.traffic-bar__fill { display: block; width: 100%; max-width: 30px; min-height: 3px; background: linear-gradient(180deg, #5aa9ff, #1a77ff); border-radius: 6px 6px 0 0; }
.traffic-bar small { margin-top: 7px; font-size: 10px; color: var(--ink-3, #8492a6); white-space: nowrap; }
.traffic-list { padding: 4px 0; }
.traffic-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.traffic-row:last-child { border-bottom: 0; }
.traffic-row a { flex: 1; min-width: 0; color: var(--ink-1); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.traffic-row a:hover { color: var(--brand, #1a77ff); }
.traffic-row b { color: var(--brand, #1a77ff); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .traffic-chart { gap: 3px; }
  .traffic-bar small { display: none; }
}

/* ---- 导航设置 ---- */
.nav-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.nav-row { display: grid; grid-template-columns: 52px minmax(110px, 1.1fr) 96px minmax(130px, 1.3fr) 118px 76px 94px; gap: 8px; align-items: center; padding: 10px; border-bottom: 1px solid var(--line); background: #fff; }
.nav-row:last-child { border-bottom: 0; }
.nav-row:nth-child(even) { background: var(--surface-soft, #f8fafc); }
.nav-row input.nav-label, .nav-row input.nav-href, .nav-row select { width: 100%; height: 34px; padding: 0 8px; font-size: 12.5px; border: 1px solid var(--line-strong, #d3dce8); border-radius: 6px; background: #fff; color: var(--ink-1); }
.nav-row input:focus, .nav-row select:focus { outline: 2px solid var(--brand-soft, #e8f1ff); border-color: var(--brand, #1a77ff); }
.nav-row__check { display: flex; align-items: center; gap: 5px; font-size: 12px; cursor: pointer; }
.nav-row__check input { accent-color: var(--brand, #1a77ff); }
.nav-row__move { display: flex; gap: 4px; }
.nav-move { width: 27px; height: 28px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; color: var(--ink-2); font-size: 12px; padding: 0; }
.nav-move:hover { border-color: var(--brand, #1a77ff); color: var(--brand, #1a77ff); }
.nav-move--del:hover { border-color: #dc2626; color: #dc2626; }
.nav-toolbar { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.nav-preview { display: flex; flex-wrap: wrap; gap: 7px; }
.nav-preview__item { padding: 6px 10px; border-radius: 6px; background: var(--brand-soft, #e8f1ff); color: var(--brand, #1a77ff); font-size: 12px; font-weight: 600; }
.nav-preview__item--cta { background: var(--brand, #1a77ff); color: #fff; }
.notice code { font-family: var(--mono, monospace); font-size: 12px; background: var(--surface-soft, #f1f5f9); padding: 1px 5px; border-radius: 4px; }
@media (max-width: 900px) {
  .nav-row { grid-template-columns: 52px 1fr 1fr; }
}

/* ---------- 客服消息工作台 ---------- */
.chat-admin__panel { padding: 0; overflow: hidden; }
.chat-admin__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.chat-admin__head h2 { font-size: 17px; margin: 0 0 5px; }
.chat-admin__head p { color: var(--ink-2); font-size: 12.5px; margin: 0; }
.chat-admin__grid { display: grid; grid-template-columns: 320px 1fr; min-height: 520px; }
.chat-admin__list { border-right: 1px solid var(--line); overflow-y: auto; max-height: 640px; background: var(--surface-soft); }
.chat-admin__listhead { padding: 12px 14px; font-size: 12px; color: var(--ink-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface-soft); }
.chat-admin__listhead strong { color: var(--accent); }
.chat-session { width: 100%; display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; border: none; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; }
.chat-session:hover { background: var(--surface-tint); }
.chat-session--active { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.chat-session--closed { opacity: .62; }
.chat-session__avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; }
.chat-session__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-session__top { display: flex; align-items: center; gap: 6px; }
.chat-session__top strong { font-size: 13px; }
.chat-session__top time { margin-left: auto; font-size: 10.5px; color: var(--ink-3); flex: none; }
.chat-session__tag { font-style: normal; font-size: 10px; color: var(--ink-3); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 4px; }
.chat-session__contact { font-size: 11px; color: var(--ink-2); }
.chat-session__last { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-session__unread { min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10.5px; line-height: 18px; text-align: center; padding: 0 5px; flex: none; }
.chat-admin__thread { display: flex; flex-direction: column; min-width: 0; }
.chat-admin__loading { padding: 40px 20px; text-align: center; color: var(--ink-3); font-size: 13px; }
.chat-admin__empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--ink-3); text-align: center; padding: 40px 20px; }
.chat-admin__empty p { font-size: 14px; color: var(--ink-2); margin: 0; }
.chat-admin__empty small { font-size: 12px; }
.chat-admin__empty--sm { padding: 30px 16px; gap: 6px; }
.chat-thread__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-thread__head strong { display: block; font-size: 14px; }
.chat-thread__head small { display: block; font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }
.chat-thread__log { flex: 1; overflow-y: auto; max-height: 440px; padding: 18px; background: var(--surface-soft); display: flex; flex-direction: column; gap: 12px; }
.chat-thread__form { padding: 14px 18px 18px; border-top: 1px solid var(--line); }
.chat-thread__form textarea { width: 100%; resize: vertical; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 13.5px; line-height: 1.6; }
.chat-thread__form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.chat-thread__form textarea:disabled { opacity: .55; }
.chat-thread__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 9px; }
.chat-thread__actions .field__hint { font-size: 11px; color: var(--ink-3); }
@media (max-width: 900px) {
  .chat-admin__grid { grid-template-columns: 1fr; }
  .chat-admin__list { border-right: none; border-bottom: 1px solid var(--line); max-height: 260px; }
  .chat-admin__thread { min-height: 420px; }
}
