:root {
  --green: #07c160;
  --green-dark: #06ad56;
  --sidebar: #1f2329;
  --sidebar-hover: #2a2f36;
  --sidebar-active: #07c160;
  --bg: #f0f2f5;
  --panel: #ffffff;
  --text: #1f2329;
  --muted: #8a919f;
  --line: #e5e6eb;
  --danger: #fa5151;
  --warn: #ff8f1f;
  --shadow: 0 8px 28px rgba(31, 35, 41, 0.08);
  --radius: 8px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
}

.hidden { display: none !important; }

/* Login */
.login-view {
  min-height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(7, 193, 96, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgba(18, 183, 245, 0.12), transparent 50%),
    linear-gradient(160deg, #1a1f24 0%, #2b323a 55%, #1f2329 100%);
}
.login-card {
  width: min(400px, 92vw);
  background: var(--panel);
  border-radius: 12px;
  padding: 32px 28px 24px;
  box-shadow: var(--shadow);
}
.login-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}
.login-brand h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.04em;
}
.login-brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(145deg, #07c160, #10a37f);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 22px;
  box-shadow: 0 8px 18px rgba(7, 193, 96, 0.35);
}
.brand-mark.sm {
  width: 36px;
  height: 36px;
  font-size: 16px;
  border-radius: 9px;
}
.login-form label,
#login-form label {
  display: block;
  margin-bottom: 14px;
}
#login-form label span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
#login-form input,
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  outline: none;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#login-form input:focus,
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.15);
}
.field textarea { min-height: 96px; resize: vertical; }
.captcha-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.captcha-row input { flex: 1; }
.captcha-img {
  width: 130px;
  height: 48px;
  border-radius: 6px;
  border: 1px solid var(--line);
  cursor: pointer;
  background: #f2f3f5;
}
.form-error {
  color: var(--danger);
  font-size: 13px;
  margin: 0 0 12px;
}

/* Shell */
.app-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100%;
}
.sidebar {
  background: var(--sidebar);
  color: #c9cdd4;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: sticky;
  top: 0;
}
.sidebar-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar-brand strong {
  display: block;
  color: #fff;
  font-size: 15px;
}
.sidebar-brand small {
  color: #8a919f;
  font-size: 12px;
}
.sidebar-nav {
  padding: 12px 8px 24px;
  overflow: auto;
}
.nav-group {
  margin: 14px 10px 6px;
  font-size: 12px;
  color: #6b7280;
  letter-spacing: 0.06em;
}
.nav-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active {
  background: rgba(7, 193, 96, 0.18);
  color: #07c160;
  font-weight: 600;
}

.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  height: 56px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-title { font-size: 16px; font-weight: 600; }
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-chip {
  background: #f2f3f5;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  color: #4e5969;
}
.link-muted {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}
.link-muted:hover { color: var(--green); }

.content {
  padding: 20px 24px 40px;
  flex: 1;
  min-height: 0;
}
.content.content--editor {
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Cards / stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--line);
}
.stat-card .label { color: var(--muted); font-size: 13px; }
.stat-card .value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.stat-card .value.green { color: var(--green); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.panel-body { padding: 16px; }
.panel-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.list-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.list-tab {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.list-tab:hover { color: var(--text); }
.list-tab.active {
  color: var(--green);
  font-weight: 600;
  border-bottom-color: var(--green);
}
.tag-draft {
  margin-left: 8px;
  background: #fff7e8;
  color: #d46b08;
  vertical-align: middle;
}

/* Table */
.table-wrap { overflow: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data th,
table.data td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
table.data th {
  background: #fafbfc;
  color: #4e5969;
  font-weight: 600;
  white-space: nowrap;
}
table.data tr:hover td { background: #fafbfc; }
.cell-muted { color: var(--muted); }
.cell-ellipsis {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thumb {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  background: #f2f3f5;
  border: 1px solid var(--line);
}
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e8f8ef;
  color: var(--green-dark);
  font-size: 12px;
  margin: 0 4px 4px 0;
}
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Buttons */
.btn {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  background: #f2f3f5;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { filter: brightness(0.98); }
.btn-primary {
  background: var(--green);
  color: #fff;
}
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
}
.btn-danger {
  background: #fff;
  color: var(--danger);
  border-color: #ffd0d0;
}
.btn-link {
  background: transparent;
  color: var(--green);
  padding: 0;
  border: 0;
}
.btn-block { width: 100%; }
.icon-btn {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
}

/* Form fields in panels */
.form-grid {
  display: grid;
  gap: 14px;
}
.form-grid.two {
  grid-template-columns: 1fr 1fr;
}
.field label {
  display: block;
  font-size: 13px;
  color: #4e5969;
  margin-bottom: 6px;
}
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.friend-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.friend-section-head label {
  margin: 0;
}
.friend-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}
.friend-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px 14px 14px;
  box-shadow: 0 2px 8px rgba(31, 35, 41, 0.04);
}
.friend-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.friend-card__head strong {
  font-size: 13px;
  color: #4e5969;
}
.friend-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
.friend-card__grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.friend-card__grid input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  color: var(--text);
  outline: none;
  background: #fff;
}
.friend-card__grid input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.15);
}
.friend-card__full {
  grid-column: 1 / -1;
}
.friend-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.friend-pager .btn:disabled,
.list-pager .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.list-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}
@media (max-width: 700px) {
  .friend-card__grid {
    grid-template-columns: 1fr;
  }
}

.kv-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.kv-list-head {
  display: grid;
  grid-template-columns: 90px 1fr 1.4fr 40px 90px 64px;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  padding: 0 2px 4px;
}
.kv-list-head--friend {
  grid-template-columns: 1fr 1.2fr 1.2fr 1.2fr 64px;
}
.kv-list-head--nav,
.kv-row--nav {
  grid-template-columns: 90px 1fr 1.4fr 88px 64px;
}
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}
.check-inline input {
  width: auto !important;
  margin: 0;
}
.kv-row {
  display: grid;
  grid-template-columns: 90px 1fr 1.4fr 40px 90px 64px;
  gap: 8px;
  align-items: center;
}
.kv-row--friend {
  grid-template-columns: 1fr 1.2fr 1.2fr 1.2fr 64px;
}
.kv-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  outline: none;
  background: #fff;
}
.kv-row input[type="color"] {
  padding: 2px;
  height: 36px;
  cursor: pointer;
}
.kv-row input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.15);
}

.mail-tpl {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}
.mail-tpl__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.mail-tpl .field {
  margin: 0;
}
.mail-tpl textarea {
  width: 100%;
  min-height: 140px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  background: #fff;
}
.mail-tpl input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  outline: none;
  background: #fff;
}

.social-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.social-card__top {
  display: grid;
  grid-template-columns: 90px 1fr 40px 90px 64px;
  gap: 8px;
  align-items: center;
}
.social-card__top input,
.social-card__field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  outline: none;
  background: #fff;
}
.social-card__top input[type="color"] {
  padding: 2px;
  height: 36px;
  cursor: pointer;
}
.social-card__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.social-card__field > label,
.social-card .media-field > label {
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 800px) {
  .social-card__top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .kv-list-head { display: none; }
  .kv-row,
  .kv-row--friend {
    grid-template-columns: 1fr;
  }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 32, 0.45);
}
.modal-panel {
  position: relative;
  width: min(640px, 92vw);
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.modal-head,
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-foot {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
  gap: 8px;
}
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 18px; }

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* 图文富文本编辑器（独立页面） */
.article-editor-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: calc(100vh - 56px);
  background: #f5f5f5;
}
.article-editor {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: #f5f5f5;
  position: relative;
}
.article-editor__meta {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 8px 14px;
}
.article-editor__meta-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.article-editor__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 2;
}
.ed-btn {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  color: #4e5969;
  font: inherit;
  font-size: 13px;
  display: inline-grid;
  place-items: center;
}
.ed-btn:hover { background: #f2f3f5; color: var(--text); }
.ed-sep {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 4px;
}
.ed-select {
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  padding: 0 6px;
  background: #fff;
  margin: 0 4px;
}
.ed-color {
  position: relative;
  overflow: hidden;
}
.ed-color input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
}
.ed-hilite {
  background: #fff59d;
  padding: 0 3px;
  border-radius: 2px;
  line-height: 1.2;
}
.article-editor__canvas {
  flex: 1;
  overflow: auto;
  background: #fff;
  margin: 16px 20px 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  padding: 36px 48px 28px;
  min-height: 0;
}
.article-editor__title {
  width: 100%;
  border: 0;
  outline: none;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  padding: 0;
  margin: 0 0 12px;
  background: transparent;
}
.article-editor__title::placeholder,
.article-editor__author::placeholder {
  color: #c0c4cc;
  font-weight: 400;
}
.article-editor__author {
  width: 100%;
  border: 0;
  outline: none;
  font-size: 14px;
  color: #86909c;
  padding: 0;
  margin: 0 0 28px;
  background: transparent;
}
.article-editor__body {
  min-height: 280px;
  outline: none;
  font-size: 17px;
  line-height: 1.75;
  color: #1f2329;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.article-editor__body:empty:before {
  content: attr(data-placeholder);
  color: #c0c4cc;
  pointer-events: none;
}
.article-editor__body p { margin: 0 0 0.9em; }
.article-editor__body img {
  max-width: min(100%, 480px);
  width: auto;
  height: auto;
  display: block;
  margin: 12px 0;
  object-fit: contain;
  border-radius: 4px;
}
.article-editor__body blockquote {
  margin: 0.8em 0;
  padding: 0.4em 0 0.4em 1em;
  border-left: 4px solid #07c160;
  color: #4e5969;
  background: #f7f8fa;
}
.article-editor__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 18px;
  background: #fff;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 3;
}
.article-editor__count {
  font-size: 13px;
  color: var(--muted);
}
.article-editor__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.article-preview-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(15, 23, 32, 0.52);
  display: grid;
  place-items: center;
  padding: 16px;
}
.article-preview-overlay__panel {
  width: min(560px, 100%);
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #edf0f3;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}
.article-preview-overlay__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e6eb;
  background: #fff;
  flex-shrink: 0;
}
.article-preview-overlay__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.article-preview-overlay__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.article-preview-overlay__brand strong {
  font-size: 14px;
  color: var(--text);
}
.article-preview-overlay__hint {
  font-size: 12px;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 999px;
  background: #f2f3f5;
}
.article-preview-overlay__scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 16px;
  overscroll-behavior: contain;
}
.article-preview-phone {
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(31, 35, 41, 0.08);
  border: 1px solid #e8eaed;
  overflow: hidden;
}
.article-preview-overlay__foot {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid #e5e6eb;
  flex-shrink: 0;
}
.article-preview {
  padding: 28px 22px 36px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.article-preview__head {
  margin-bottom: 0;
}
.article-preview__title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  color: #1a1a1a;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.article-preview__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  color: #8a919f;
  font-size: 13px;
  line-height: 1.5;
}
.article-preview__author {
  color: #576b95;
  font-weight: 500;
}
.article-preview__dot {
  margin: 0 6px;
  color: #c9cdd4;
}
.article-preview__divider {
  height: 1px;
  background: #f0f1f3;
  margin: 18px 0 20px;
}
.article-preview__body {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.article-preview__body * {
  max-width: 100%;
}
.article-preview__body img {
  height: auto;
  border-radius: 4px;
  display: block;
  margin: 12px 0;
}
.article-preview__body p {
  margin: 0 0 1em;
}
.article-preview__body p:last-child {
  margin-bottom: 0;
}
.article-preview__body blockquote {
  margin: 0.9em 0;
  padding: 0.55em 0 0.55em 0.9em;
  border-left: 3px solid #07c160;
  color: #666;
  background: #f7f8fa;
}
.article-preview__body ul,
.article-preview__body ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}
.article-preview__body a {
  color: #576b95;
  text-decoration: none;
}
.article-preview__body hr {
  border: 0;
  border-top: 1px solid #e5e6eb;
  margin: 1.2em 0;
}
.article-preview__empty {
  color: #c0c4cc;
  text-align: center;
  padding: 32px 0;
}

@media (max-width: 700px) {
  .article-editor__canvas { margin: 10px 10px 0; padding: 20px 16px; }
  .article-editor__title { font-size: 22px; }
  .article-editor__foot { flex-direction: column; align-items: stretch; }
  .article-editor__actions { width: 100%; }
  .article-editor__actions .btn { flex: 1; }
  .article-preview-overlay__scroll { padding: 12px; }
  .article-preview { padding: 22px 16px 28px; }
}

.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(31, 35, 41, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 200;
  box-shadow: var(--shadow);
}
.toast.ok { background: rgba(7, 193, 96, 0.95); }
.toast.err { background: rgba(250, 81, 81, 0.95); }

.welcome {
  background: linear-gradient(120deg, #e8f8ef 0%, #fff 55%);
  border: 1px solid #d4f0e0;
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.welcome h2 { margin: 0 0 6px; font-size: 18px; }
.welcome p { margin: 0; color: #4e5969; font-size: 14px; }

/* 选图上传 */
.media-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.media-row input[type="text"] { flex: 1; }
.media-preview {
  display: block;
  margin-top: 10px;
  max-width: 160px;
  max-height: 100px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fafbfc;
}
.btn-pick-upload { white-space: nowrap; }

.multi-image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  min-height: 0;
}
.multi-image-item {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fafbfc;
}
.multi-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.multi-image-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.multi-image-remove:hover { background: rgba(0, 0, 0, 0.75); }
.btn-pick-multi,
.btn-add-image-url { white-space: nowrap; }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.two { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    min-height: auto;
  }
  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding-bottom: 12px;
  }
  .nav-group { width: 100%; margin: 8px 4px 0; }
  .nav-item { width: auto; }
}
