*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f9fafc;
  --line: #e7e9f0;
  --ink: #101828;
  --muted: #66708a;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef0ff;
  --douyin: #161823;
  --xhs: #ff2442;
  --success: #0f9d76;
  --danger: #d92d20;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.08);
  --radius: 16px;
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
}

/* ---------- 登录页 ---------- */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(1200px 600px at 10% 10%, #e8e9ff 0%, transparent 60%),
    radial-gradient(900px 500px at 90% 90%, #ffe9ef 0%, transparent 55%),
    var(--bg);
}

.login-shell {
  width: min(1000px, 100%);
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  background: var(--surface);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.14);
}

.login-brand {
  position: relative;
  padding: 44px 40px;
  color: #fff;
  background: linear-gradient(150deg, #2f2a84 0%, #4f46e5 48%, #6d5df6 100%);
  overflow: hidden;
}

.login-brand::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -140px;
  bottom: -180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.login-brand::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: 40px;
  top: -120px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  font-size: 16px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.login-brand h1 {
  margin: 40px 0 14px;
  font-size: 32px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.login-brand p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  max-width: 320px;
}

.brand-points {
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.88);
}

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

.brand-points .dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  font-size: 11px;
  flex: none;
  margin-top: 1px;
}

.login-brand .foot {
  position: absolute;
  left: 40px;
  bottom: 30px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.login-form {
  padding: 44px 44px 36px;
}

.login-form h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.login-form .sub {
  margin: 6px 0 24px;
  color: var(--muted);
  font-size: 13.5px;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.role-card {
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 14px 12px 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}

.role-card .role-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  margin-bottom: 10px;
}

.role-card .role-name {
  font-weight: 600;
  font-size: 14px;
}

.role-card .role-desc {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
  margin-top: 3px;
}

.role-card:hover {
  border-color: #c7c9f7;
  background: #fbfbff;
}

.role-card.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.role-card.active .role-icon {
  background: var(--primary);
  color: #fff;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
  color: #344054;
}

.login-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.login-submit {
  width: 100%;
  height: 46px;
  margin-top: 20px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.login-submit:hover {
  background: var(--primary-dark);
}

.login-submit:active {
  transform: translateY(1px);
}

.login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-error {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--danger);
}

.login-hint {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

/* ---------- 主框架 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 64px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 0 20px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}

.topbar-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-user {
  font-size: 13px;
  color: #475467;
  font-weight: 500;
}

.topbar-title {
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: 0.2px;
}

.topbar-sub {
  color: var(--muted);
  font-size: 12px;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 600;
}

.role-pill .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  color: var(--danger);
  border-color: #fbd5d5;
  background: #fff5f5;
}

.app-shell {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 64px);
}

.sidebar {
  width: 228px;
  flex: none;
  padding: 20px 14px;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.sidebar-label {
  padding: 0 12px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #98a2b3;
  text-transform: uppercase;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 4px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #475467;
  cursor: pointer;
  font-weight: 500;
  text-align: left;
  transition: all 0.15s ease;
}

.nav-item svg {
  flex: none;
  opacity: 0.75;
}

.nav-item:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
}

.nav-item.active svg {
  opacity: 1;
}

.sidebar-tip {
  margin: 20px 8px 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}

.content {
  flex: 1;
  min-width: 0;
  padding: 26px 30px 60px;
}

.content-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.page-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.page-head .desc {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- 通用 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-pad {
  padding: 20px 22px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.card-head h2 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
}

.card-head .hint {
  color: var(--muted);
  font-size: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

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

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

.btn.secondary {
  background: var(--surface);
  color: #344054;
  border-color: var(--line);
}

.btn.secondary:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: #cfd4dc;
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}

.btn.ghost:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.btn.douyin {
  background: var(--douyin);
}

.btn.douyin:hover:not(:disabled) {
  background: #000;
}

.btn.xhs {
  background: var(--xhs);
}

.btn.xhs:hover:not(:disabled) {
  background: #e01b37;
}

.btn.small {
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 8px;
}

.btn.success {
  background: var(--success);
}

.btn.success:hover:not(:disabled) {
  background: #0c8a66;
}

.btn.danger {
  background: var(--danger);
}

.btn.danger:hover:not(:disabled) {
  background: #b42318;
}

.btn.danger-ghost {
  background: transparent;
  color: var(--danger);
  border-color: #fbd5d5;
}

.btn.danger-ghost:hover {
  background: #fff5f5;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.badge.pending {
  background: #fff6e5;
  color: #b54708;
}

.badge.douyin {
  background: #f0f1f4;
  color: #161823;
}

.badge.xhs {
  background: #ffecef;
  color: #d21e38;
}

.badge.both {
  background: #e7f8f1;
  color: #087443;
}

.badge.neutral {
  background: var(--surface-2);
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 7px;
  background: #f2f4f7;
  color: #475467;
  font-size: 12px;
  white-space: nowrap;
}

.chip.hash {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.chip button {
  border: none;
  background: transparent;
  padding: 0 0 0 2px;
  color: #98a2b3;
  cursor: pointer;
  line-height: 1;
  font-size: 13px;
}

.chip button:hover {
  color: var(--danger);
}

.muted-empty {
  color: #98a2b3;
  font-size: 12px;
  line-height: 1.7;
}

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

.empty .empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: #b0b7c9;
}

.empty h3 {
  margin: 0 0 4px;
  font-size: 15px;
  color: #475467;
  font-weight: 600;
}

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

/* ---------- 上传 ---------- */
.upload-card {
  margin-bottom: 24px;
}

.upload-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 22px;
  padding: 20px 22px 22px;
}

.dropzone {
  border: 1.5px dashed #cfd4e6;
  border-radius: 12px;
  background: var(--surface-2);
  min-height: 178px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  padding: 16px;
  text-align: center;
  transition: all 0.15s ease;
}

.dropzone:hover,
.dropzone.dragging {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.dropzone .dz-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.dropzone .dz-title {
  font-weight: 600;
  font-size: 13.5px;
}

.dropzone .dz-desc {
  color: var(--muted);
  font-size: 12px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.preview-item {
  position: relative;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 1;
  background: #eef0f4;
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-item .remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(16, 24, 40, 0.65);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #344054;
  margin-bottom: 7px;
}

.form-label .count {
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
}

.textarea {
  width: 100%;
  min-height: 108px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  resize: vertical;
  outline: none;
  line-height: 1.7;
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.textarea:focus,
.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.topic-block {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.topic-block .topic-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.topic-block .input {
  height: 34px;
  background: #fff;
}

.selected-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  min-height: 26px;
}

.selected-topics .placeholder {
  color: #98a2b3;
  font-size: 12px;
}

.topic-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 132px;
  overflow-y: auto;
  padding: 2px;
}

.topic-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: #475467;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.topic-chip:hover {
  border-color: #c7c9f7;
  color: var(--primary-dark);
}

.topic-chip.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.topic-picker .muted-empty {
  color: #98a2b3;
  font-size: 12px;
  padding: 4px 2px;
}

.upload-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

/* ---------- 素材列表 ---------- */
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: 10px;
}

.tab {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12.5px;
  color: #475467;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.14s ease;
}

.tab:hover {
  color: var(--ink);
}

.tab.active {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.tab .tab-count {
  margin-left: 5px;
  color: #98a2b3;
  font-weight: 500;
}

.search-box {
  position: relative;
}

.list-filters {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.date-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.date-filter .input {
  width: 148px;
  height: 36px;
}

.search-box svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #98a2b3;
}

.search-box .input {
  width: 230px;
  height: 36px;
  padding-left: 33px;
}

.material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
  padding: 20px;
}

.material-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.16s ease, transform 0.16s ease;
}

.material-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.thumb-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  height: 118px;
  background: #eef0f4;
  position: relative;
}

.thumb-strip .thumb {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  background: #eef0f4;
}

.thumb-strip .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.thumb-strip .thumb:hover img {
  transform: scale(1.04);
}

.thumb-strip .more {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(16, 24, 40, 0.68);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  z-index: 1;
}

.material-body {
  padding: 13px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.material-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.material-time {
  color: #98a2b3;
  font-size: 11.5px;
}

.copy-text {
  margin: 0;
  font-size: 13px;
  color: #344054;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
}

.topic-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.platform-line {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: #98a2b3;
  font-size: 11.5px;
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}

.platform-line .on {
  color: #475467;
  font-weight: 500;
}

.material-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}

/* ---------- 分发卡片 ---------- */
.distribute-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

.dist-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.dist-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 2px;
  background: #eef0f4;
}

.dist-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #eef0f4;
}

.dist-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dist-image .dl {
  position: absolute;
  right: 6px;
  bottom: 6px;
  height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  background: rgba(16, 24, 40, 0.72);
  color: #fff;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(4px);
  transition: background 0.15s ease;
}

.dist-image .dl:hover {
  background: var(--primary);
}

.dist-body {
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.dist-body .copy-full {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #344054;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 132px;
  overflow-y: auto;
}

.dist-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #98a2b3;
}

.dist-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 16px 16px;
}

.dist-actions .btn.full {
  grid-column: span 2;
}

.mark-state {
  font-size: 11.5px;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 5px;
}

.mark-state.muted {
  color: #98a2b3;
}

/* ---------- 话题库 ---------- */
.topic-page {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start;
}

.topic-list-card .topic-cloud {
  padding: 20px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-list-card .chip {
  padding: 5px 10px;
  font-size: 12.5px;
}

/* ---------- 仪表盘 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.stat-label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}

.stat-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
}

.stat-icon.dark {
  background: #eef0f4;
  color: var(--douyin);
}

.stat-icon.red {
  background: #ffecef;
  color: var(--xhs);
}

.stat-icon.green {
  background: #e7f8f1;
  color: var(--success);
}

.stat-value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-unit {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 4px;
}

.chart-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
}

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

.chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.chart-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.chart-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  display: inline-block;
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-empty {
  padding: 60px 0;
  text-align: center;
  color: #98a2b3;
  font-size: 12.5px;
}

/* ---------- 弹层 / 提示 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(16, 24, 40, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.16s ease;
}

.modal {
  width: min(520px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.22);
  animation: popIn 0.18s ease;
}

.modal.wide {
  width: min(780px, 100%);
}

.modal-head {
  padding: 18px 22px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #98a2b3;
  font-size: 18px;
  cursor: pointer;
}

.modal-close:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.modal-body {
  padding: 20px 22px;
}

.modal-body p {
  margin: 0;
  color: #475467;
  font-size: 13.5px;
  line-height: 1.75;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 22px 20px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.gallery-empty {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  color: #98a2b3;
  font-size: 13px;
  border: 1px dashed #e4e7ec;
  border-radius: 10px;
  background: var(--surface-2);
}

.detail-block {
  margin-bottom: 14px;
}

.detail-block .k {
  font-size: 11.5px;
  color: #98a2b3;
  font-weight: 600;
  letter-spacing: 0.4px;
  margin-bottom: 5px;
}

.detail-block .v {
  font-size: 13px;
  color: #344054;
  white-space: pre-wrap;
  line-height: 1.75;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  z-index: 100;
  background: #101828;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
  max-width: 90vw;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.error {
  background: #b42318;
}

.loading-row {
  padding: 40px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #d7dbe7;
  border-top-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
  vertical-align: -3px;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

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

@media (max-width: 1080px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .topic-page {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-brand {
    display: none;
  }
  .sidebar {
    display: none;
  }
  .content {
    padding: 20px 16px 50px;
  }
  .upload-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .role-grid {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .search-box .input {
    width: 100%;
  }
  .topbar-sub {
    display: none;
  }
}

/* ---------- 登录卡片 ---------- */
.auth-card {
  width: min(380px, 100%);
  background: var(--surface);
  border-radius: 20px;
  padding: 38px 32px 30px;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.14);
}

.auth-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  margin: 0 auto 14px;
  display: block;
}

.auth-title {
  text-align: center;
  font-size: 19px;
  margin: 0 0 10px;
  font-weight: 700;
}

.auth-role {
  display: block;
  width: fit-content;
  margin: 0 auto 22px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 600;
}

.auth-card .login-input {
  margin-bottom: 12px;
}

/* ---------- 账号列表 ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}

.table tr:last-child td {
  border-bottom: none;
}

.table .ops {
  text-align: right;
  white-space: nowrap;
}

/* ---------- 视频管理 ---------- */
.publish-table td {
  vertical-align: middle;
}

.pub-material {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
}

.pub-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-2);
  flex: none;
}

.pub-thumb.pub-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #98a2b3;
  border: 1px dashed #e4e7ec;
  font-weight: 600;
}

.pub-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pub-snippet {
  font-size: 13px;
  color: var(--ink);
}

.pub-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pub-sub .chip {
  font-size: 11px;
}

.pub-link {
  color: var(--primary);
  word-break: break-all;
  font-size: 13px;
}

.pub-link:hover {
  text-decoration: underline;
}

.pub-note {
  display: inline-block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.publish-table td:nth-child(3) {
  max-width: 320px;
}

.modal-tip {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.req {
  color: var(--danger);
}

.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e5484d;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

.modal-foot .left {
  margin-right: auto;
}

.tag-missing {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #fdecec;
  color: #c22f2f;
  font-size: 12px;
}

.person-chip {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.modal-body textarea.input {
  height: auto;
  min-height: 84px;
  padding: 10px 12px;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
}

.btn.danger-ghost {
  background: transparent;
  color: #c22f2f;
  border-color: transparent;
}

.btn.danger-ghost:hover {
  background: #fdecec;
}
