/* ==========================================================
   政法公众号工作台 · 样式表
   ========================================================== */

:root {
  --navy: #1b3557;
  --navy-deep: #12253d;
  --navy-soft: #27486f;
  --red: #b3252d;
  --red-soft: #fdf1f0;
  --gold: #c9a45c;

  --text: #1e2a38;
  --text-2: #55637a;
  --text-3: #8a95a8;

  --bg: #f2f4f7;
  --surface: #ffffff;
  --line: #e3e7ee;
  --line-soft: #eef1f6;

  --green: #2e7d55;
  --green-soft: #eaf6ef;
  --amber: #a9700c;
  --amber-soft: #fdf4e3;
  --blue: #215c9e;
  --blue-soft: #eaf2fb;

  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(21, 38, 63, 0.06);
  --shadow: 0 2px 8px rgba(21, 38, 63, 0.07), 0 1px 2px rgba(21, 38, 63, 0.04);
  --shadow-lg: 0 18px 48px rgba(16, 30, 51, 0.16);

  --sidebar-w: 224px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-thumb {
  background: #c8cfdb;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #adb7c7;
}

::-webkit-scrollbar-track {
  background: transparent;
}

.hidden {
  display: none !important;
}

/* ============================ 登录页 ============================ */

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: var(--surface);
}

.auth__brand {
  position: relative;
  padding: 64px 56px;
  color: #fff;
  background: linear-gradient(150deg, #16304e 0%, #1b3557 42%, #223f66 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.auth__brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.5;
  pointer-events: none;
}

.auth__brand::after {
  content: "";
  position: absolute;
  right: -160px;
  bottom: -190px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  border: 1px solid rgba(201, 164, 92, 0.28);
  box-shadow: 0 0 0 60px rgba(201, 164, 92, 0.05), 0 0 0 130px rgba(201, 164, 92, 0.03);
  pointer-events: none;
}

.auth__brand > * {
  position: relative;
  z-index: 1;
}

.auth__seal {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.72);
}

.auth__seal span.dot {
  width: 26px;
  height: 2px;
  background: var(--gold);
  display: inline-block;
}

.auth__title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.35;
}

.auth__title small {
  display: block;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 14px;
}

.auth__features {
  list-style: none;
  display: grid;
  gap: 14px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.78);
}

.auth__features li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.auth__features i {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(201, 164, 92, 0.55);
  color: var(--gold);
  font-style: normal;
  font-size: 11px;
  display: grid;
  place-items: center;
  margin-top: 2px;
}

.auth__panel {
  display: grid;
  place-items: center;
  padding: 40px 32px;
}

.auth__form {
  width: 100%;
  max-width: 340px;
}

.auth__form h2 {
  font-size: 22px;
  font-weight: 650;
  margin-bottom: 6px;
}

.auth__form p.sub {
  color: var(--text-3);
  font-size: 13px;
  margin-bottom: 28px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 500;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--navy-soft);
  box-shadow: 0 0 0 3px rgba(39, 72, 111, 0.1);
}

.textarea {
  resize: vertical;
  min-height: 78px;
  line-height: 1.65;
}

.input::placeholder,
.textarea::placeholder {
  color: #b6bfcd;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 1px 2px rgba(21, 38, 63, 0.18);
}

.btn--primary:hover {
  background: var(--navy-soft);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--text-2);
}

.btn--ghost:hover {
  border-color: #cdd5e0;
  background: #fafbfc;
  color: var(--text);
}

.btn--danger {
  color: var(--red);
  border-color: #f0d3d1;
  background: var(--red-soft);
}

.btn--danger:hover {
  background: #fbe6e4;
}

.btn--block {
  width: 100%;
}

.btn--sm {
  padding: 5px 11px;
  font-size: 12.5px;
  border-radius: 6px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.alert {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  background: var(--red-soft);
  color: #93211f;
  border: 1px solid #f2d3d0;
}

.auth__foot {
  margin-top: 26px;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.7;
}

/* ============================ 应用布局 ============================ */

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: linear-gradient(180deg, #16304e, #12253d);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar__brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar__brand strong {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.04em;
  display: block;
}

.sidebar__brand small {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.42);
  display: block;
  margin-top: 5px;
}

.nav {
  padding: 14px 12px;
  display: grid;
  gap: 3px;
  align-content: start;
  flex: 1;
  overflow-y: auto;
}

.nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13.5px;
  transition: background 0.15s, color 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav__item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav__item.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 550;
  box-shadow: inset 2px 0 0 var(--gold);
}

.nav__item .ico {
  width: 16px;
  height: 16px;
  flex: none;
  opacity: 0.9;
}

.sidebar__foot {
  padding: 14px 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 7px;
}

.sidebar__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(201, 164, 92, 0.2);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  flex: none;
}

.sidebar__user div {
  min-width: 0;
}

.sidebar__user b {
  display: block;
  font-weight: 500;
  font-size: 12.5px;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__user span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

.sidebar__logout {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px;
  border-radius: 5px;
  display: grid;
  place-items: center;
}

.sidebar__logout:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ============================ 主内容区 ============================ */

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 62px;
  flex: none;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h1 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.topbar .crumb {
  font-size: 12.5px;
  color: var(--text-3);
}

.topbar__actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.content {
  padding: 24px 28px 56px;
  flex: 1;
}

.page-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.page-head h2 {
  font-size: 19px;
  font-weight: 650;
}

.page-head p {
  color: var(--text-3);
  font-size: 13px;
  margin-top: 3px;
}

.page-head .spacer {
  margin-left: auto;
}

/* ============================ 卡片 / 网格 ============================ */

.grid {
  display: grid;
  gap: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

@media (max-width: 1000px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--line);
}

.stat--navy::after {
  background: var(--navy-soft);
}

.stat--red::after {
  background: var(--red);
}

.stat--green::after {
  background: var(--green);
}

.stat--gold::after {
  background: var(--gold);
}

.stat__label {
  font-size: 12.5px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

.stat__value {
  font-size: 26px;
  font-weight: 680;
  line-height: 1.25;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.stat__value small {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-3);
  margin-left: 3px;
}

.section {
  margin-bottom: 26px;
}

.section__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.section__head h3 {
  font-size: 14.5px;
  font-weight: 620;
}

.section__head .count {
  font-size: 12px;
  color: var(--text-3);
  background: #eef1f6;
  padding: 1px 8px;
  border-radius: 20px;
}

.section__head .spacer {
  margin-left: auto;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 14px;
}

.topic-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 0.16s, border-color 0.16s, transform 0.16s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.topic-card:hover {
  box-shadow: var(--shadow);
  border-color: #d3dae5;
  transform: translateY(-1px);
}

.topic-card__top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.topic-card__title {
  font-size: 15px;
  font-weight: 620;
  line-height: 1.45;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.topic-card__desc {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}

.progress {
  margin-top: 2px;
}

.progress__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 6px;
}

.progress__meta b {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.progress__track {
  height: 6px;
  background: #eef1f6;
  border-radius: 4px;
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #2f6aa8, #215c9e);
  transition: width 0.35s ease;
}

.progress__bar.is-done {
  background: linear-gradient(90deg, #2e7d55, #23684a);
}

.topic-card__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
  padding-top: 10px;
  border-top: 1px dashed var(--line-soft);
  margin-top: 2px;
}

.topic-card__foot .spacer {
  margin-left: auto;
}

/* ============================ 徽标 ============================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 1px 8px;
  border-radius: 20px;
  white-space: nowrap;
  line-height: 1.8;
}

.badge--active {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge--done {
  background: var(--green-soft);
  color: var(--green);
}

.badge--paused {
  background: #f0f2f5;
  color: var(--text-2);
}

.badge--draft {
  background: #f0f2f5;
  color: var(--text-2);
}

.badge--final {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge--pub {
  background: var(--green-soft);
  color: var(--green);
}

.badge--level {
  background: #f4f6fa;
  color: var(--text-2);
  border: 1px solid var(--line-soft);
}

.tag {
  font-size: 11.5px;
  padding: 1px 8px;
  border-radius: 20px;
  background: #eef2f8;
  color: #3d5a80;
  white-space: nowrap;
}

/* ============================ 列表 ============================ */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.toolbar .search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 340px;
}

.toolbar .search .input {
  padding-left: 32px;
}

.toolbar .search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.toolbar .select {
  width: auto;
  min-width: 130px;
}

.date-range {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 12.5px;
  white-space: nowrap;
}

.date-range .input {
  width: auto;
  min-width: 132px;
}

.toolbar .spacer {
  margin-left: auto;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.chip {
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.14s;
}

.chip:hover {
  border-color: #c8d1de;
  color: var(--text);
}

.chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.13s;
}

.row:last-child {
  border-bottom: none;
}

.row:hover {
  background: #fafbfd;
}

.row__main {
  flex: 1;
  min-width: 0;
}

.row__title {
  font-size: 14px;
  font-weight: 550;
  line-height: 1.5;
  word-break: break-word;
}

.row__title a {
  color: var(--text);
}

.row__title a:hover {
  color: var(--blue);
  text-decoration: none;
}

.row__meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 5px;
}

.row__summary {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 6px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row__note {
  font-size: 12.5px;
  color: var(--text-2);
  background: #fbfaf6;
  border-left: 2px solid var(--gold);
  padding: 6px 10px;
  border-radius: 0 6px 6px 0;
  margin-top: 7px;
  line-height: 1.6;
}

.row__actions {
  display: flex;
  gap: 6px;
  flex: none;
  opacity: 0.35;
  transition: opacity 0.14s;
}

.row:hover .row__actions {
  opacity: 1;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-2);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.14s;
}

.icon-btn:hover {
  background: #f4f6fa;
  color: var(--text);
  border-color: #cdd5e0;
}

.icon-btn--star.on {
  color: var(--gold);
  background: #fdf8ed;
  border-color: #f0e2c4;
}

.icon-btn--danger:hover {
  color: var(--red);
  background: var(--red-soft);
  border-color: #f0d3d1;
}

/* ============================ 空状态 ============================ */

.empty {
  padding: 52px 24px;
  text-align: center;
  color: var(--text-3);
}

.empty__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #f2f4f8;
  display: grid;
  place-items: center;
  color: #b8c2d1;
}

.empty p {
  font-size: 13px;
  margin-bottom: 14px;
}

/* ============================ 弹窗 ============================ */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 30, 48, 0.42);
  backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 100;
  animation: fade 0.14s ease;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: pop 0.16s cubic-bezier(0.2, 0.9, 0.3, 1);
  overflow: hidden;
}

.modal--wide {
  max-width: 560px;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
}

.modal__head {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal__head h3 {
  font-size: 15.5px;
  font-weight: 640;
}

.modal__close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px;
  border-radius: 5px;
  display: grid;
  place-items: center;
}

.modal__close:hover {
  background: #f2f4f8;
  color: var(--text);
}

.modal__body {
  padding: 18px 22px;
  overflow-y: auto;
}

.modal__foot {
  padding: 14px 22px 18px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid var(--line-soft);
  background: #fcfdfe;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ============================ Toast ============================ */

.toasts {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: #1f2d3d;
  color: #fff;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(16, 30, 51, 0.24);
  animation: toastIn 0.2s ease;
  max-width: 90vw;
}

.toast--error {
  background: #9b2226;
}

.toast--success {
  background: #26694a;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ============================ 专题详情 ============================ */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-3);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 12px;
}

.back-link:hover {
  color: var(--text);
}

.detail-head {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.detail-head h2 {
  font-size: 20px;
  font-weight: 660;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-head .desc {
  color: var(--text-2);
  font-size: 13px;
  margin-top: 8px;
  line-height: 1.7;
}

.detail-head__bar {
  margin-top: 16px;
}

.detail-head__ops {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px dashed var(--line-soft);
}

/* ============================ 设置页 ============================ */

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  align-items: start;
}

.card-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-block__head {
  padding: 15px 20px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-block__head h3 {
  font-size: 14.5px;
  font-weight: 620;
}

.card-block__head .spacer {
  margin-left: auto;
}

.card-block__body {
  padding: 18px 20px;
}

.account-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}

.account-row:last-child {
  border-bottom: none;
}

.account-row .name {
  font-weight: 500;
}

.account-row .spacer {
  margin-left: auto;
}

.account-row .ops {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.14s;
}

.account-row:hover .ops {
  opacity: 1;
}

/* ============================ 发稿台账 ============================ */

.stat__sub {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.toolbar__hint {
  font-size: 12px;
  color: var(--text-3);
}

.notice {
  padding: 10px 14px;
  margin-bottom: 14px;
  border: 1px solid #f2dfc0;
  background: var(--amber-soft);
  color: var(--amber);
  border-radius: 8px;
  font-size: 12.5px;
}

.week + .week {
  border-top: 1px solid var(--line);
}

.week__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #fbfcfe;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--text-2);
}

.week__head b {
  font-size: 13px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.week__count {
  font-variant-numeric: tabular-nums;
  color: var(--navy);
  font-weight: 600;
}

.week__head .spacer {
  flex: 1;
}

.week__reads {
  font-size: 11.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  margin-right: 12px;
}

.row__reads {
  flex: none;
  align-self: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  padding-left: 12px;
}

.row__reads small {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text-3);
  margin-left: 2px;
}

.tag--src {
  background: #eef2f8;
  color: #5d708f;
}

.row--ledger {
  padding-left: 14px;
}

.row__idx {
  width: 26px;
  flex: none;
  font-size: 11.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

.dot-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #cbd3e0;
  display: inline-block;
}

.ledger-print-head {
  display: none;
}

.ledger-sign {
  display: flex;
  gap: 28px;
  justify-content: flex-end;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--text-3);
}

/* ============================ 链接识别 ============================ */

.fetch-box {
  border: 1px dashed #c9d6e8;
  background: #f8fbfe;
  border-radius: 9px;
  padding: 11px 12px;
  margin-bottom: 16px;
}

.fetch-box__head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--navy-soft);
  font-weight: 600;
  margin-bottom: 8px;
}

.copy-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.copy-row .input {
  flex: 1;
}

.fetch-hint {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 7px;
  line-height: 1.6;
}

.fetch-hint--ok {
  color: var(--green);
}

.fetch-hint--error {
  color: var(--red);
}

/* ============================ 分享 ============================ */

.modal-lead {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 14px;
}

.modal-hint {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 14px;
  line-height: 1.7;
}

.share-ops {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.share-ops .btn {
  text-decoration: none;
}

/* ---- 订阅源同步 ---- */
.sync-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  margin-bottom: 14px;
  background: var(--blue-soft);
  border: 1px solid #d9e6f6;
  border-radius: var(--radius);
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
}
.sync-strip--empty {
  background: #fbfcfe;
  border-color: var(--line-soft);
  color: var(--text-3);
}
.sync-strip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(46, 125, 85, 0.12);
  flex: 0 0 auto;
}
.sync-strip--empty .sync-strip__dot {
  background: var(--text-3);
  box-shadow: none;
}
.sync-strip .btn {
  flex: 0 0 auto;
}

.feed-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.feed-row .input {
  flex: 1;
  min-width: 0;
}

/* ---- 批量导入 ---- */
.bulk-text {
  min-height: 132px;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 12.5px;
  line-height: 1.7;
}
.bulk-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 300px;
  overflow-y: auto;
}
.bulk-row {
  display: flex;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  align-items: flex-start;
}
.bulk-row:last-child {
  border-bottom: 0;
}
.bulk-row--fail {
  background: var(--red-soft);
}
.bulk-idx {
  flex: 0 0 18px;
  font-size: 11.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  line-height: 1.7;
}
.bulk-main {
  min-width: 0;
  flex: 1;
}
.bulk-title {
  font-size: 13px;
  color: var(--text);
  line-height: 1.55;
  word-break: break-all;
}
.bulk-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--text-3);
}
.bulk-acc {
  color: var(--blue);
  background: var(--blue-soft);
  padding: 0 7px;
  border-radius: 20px;
  line-height: 1.8;
}
.bulk-err {
  color: var(--red);
}
.select--mini {
  width: auto;
  min-width: 120px;
  padding: 2px 8px;
  font-size: 12px;
  height: 26px;
}

/* ---- 公众号后台接入 ---- */
.mp-lead {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  margin: 0 0 10px;
}
.mp-lead strong {
  color: var(--text);
  font-weight: 500;
}
.mp-steps {
  margin: 0 0 12px;
  padding-left: 19px;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.95;
}
.mp-steps li {
  margin-bottom: 1px;
}
.mp-steps code {
  background: var(--line-soft);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.mp-steps kbd {
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 5px;
  font-size: 11px;
  background: #fff;
}
.mp-steps a {
  color: var(--blue);
  text-decoration: none;
}
.mp-steps a:hover {
  text-decoration: underline;
}
.mp-state {
  display: grid;
  gap: 8px;
  font-size: 13px;
}
.mp-state > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.mp-state > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.mp-state span {
  color: var(--text-3);
  font-size: 12.5px;
}
.mp-state b {
  font-weight: 500;
  color: var(--text);
}
.mp-note {
  margin-top: 4px;
  padding: 8px 10px;
  background: #fbfcfe;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  line-height: 1.6;
}

/* ============================ 响应式 ============================ */

@media (max-width: 900px) {
  .auth {
    grid-template-columns: 1fr;
  }

  .auth__brand {
    display: none;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    z-index: 60;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.24);
  }

  .topbar {
    padding: 0 16px;
  }

  .content {
    padding: 18px 16px 48px;
  }

  .menu-toggle {
    display: grid !important;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

.menu-toggle {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  place-items: center;
  cursor: pointer;
  color: var(--text-2);
}

@media print {
  @page {
    margin: 14mm 12mm;
  }

  body {
    background: #fff;
  }

  .sidebar,
  .topbar,
  .row__actions,
  .row__idx,
  .no-print,
  .toolbar {
    display: none !important;
  }

  .main {
    margin: 0;
  }

  .content {
    padding: 0;
  }

  .stats {
    display: none;
  }

  .page-head {
    display: none;
  }

  .ledger-print-head {
    display: block;
    text-align: center;
    border-bottom: 1.5px solid #333;
    padding-bottom: 10px;
    margin-bottom: 16px;
  }

  .ledger-print-head h2 {
    font-size: 17px;
    letter-spacing: 0.08em;
  }

  .ledger-print-head p {
    font-size: 11px;
    color: #555;
    margin-top: 6px;
  }

  .panel {
    border: none;
    box-shadow: none;
  }

  .week {
    break-inside: avoid;
  }

  .week + .week {
    border-top: 1px solid #bbb;
  }

  .week__head {
    background: #f3f3f3;
    border-bottom: 1px solid #ccc;
  }

  .badge {
    background: #fff !important;
    color: #333 !important;
    border: 1px solid #bbb;
  }

  a {
    color: #000;
    text-decoration: none;
  }
}
