/* =========================================================
   设计变量与基础样式
   ========================================================= */
:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e6e9f2;
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-soft: #eef2ff;
  --accent: #06b6d4;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 3px 10px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 30px 70px -30px rgba(15, 23, 42, 0.35);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

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

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

button {
  cursor: pointer;
}

img,
svg {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.shell {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

/* =========================================================
   通用组件：按钮 / 品牌 / 语言切换
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease,
    color 0.16s ease, border-color 0.16s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(79, 70, 229, 0.8);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -10px rgba(79, 70, 229, 0.85);
}

.btn-primary:disabled,
.btn.is-loading {
  opacity: 0.68;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.btn-secondary:hover {
  background: #e0e7ff;
}

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

.btn-ghost:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(220, 38, 38, 0.8);
}

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

.btn-sm {
  height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
  height: 46px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  box-shadow: 0 8px 18px -10px rgba(79, 70, 229, 0.9);
}

.brand-mark-sm {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand-text small {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.brand-invert .brand-text strong {
  color: #fff;
}

.brand-invert .brand-text small {
  color: rgba(226, 232, 240, 0.58);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #eef1f7;
}

.lang-btn {
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

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

.lang-btn.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.14);
}

.lang-switch-invert {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
}

.lang-switch-invert .lang-btn {
  color: #cbd5e1;
}

.lang-switch-invert .lang-btn:hover {
  color: #fff;
}

.lang-switch-invert .lang-btn.is-active {
  background: #fff;
  color: #0f172a;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-cat-product {
  background: #eef2ff;
  color: #4338ca;
}

.badge-cat-design {
  background: #fdf2f8;
  color: #be185d;
}

.badge-cat-engineering {
  background: #ecfeff;
  color: #0e7490;
}

.badge-cat-growth {
  background: #f0fdf4;
  color: #15803d;
}

/* =========================================================
   用户端：头部
   ========================================================= */
.site-page {
  background: var(--bg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(247, 248, 252, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

/* =========================================================
   用户端：Hero
   ========================================================= */
.site-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 30px;
  padding-bottom: 8px;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(32px, 5vw, 60px);
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(120% 130% at 88% 0%, #6366f1 0%, #312e81 46%, #0f172a 100%);
  box-shadow: 0 32px 64px -34px rgba(49, 46, 129, 0.7);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.55;
  mask-image: linear-gradient(120deg, rgba(0, 0, 0, 0.9), transparent 75%);
  -webkit-mask-image: linear-gradient(120deg, rgba(0, 0, 0, 0.9), transparent 75%);
}

.hero-orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
}

.hero-orb-a {
  top: -150px;
  right: -90px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.55), transparent 66%);
}

.hero-orb-b {
  right: 150px;
  bottom: -190px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.32), transparent 66%);
}

.hero-content {
  max-width: 760px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #a5b4fc;
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.18);
}

.hero-title {
  margin: 16px 0 14px;
  font-size: clamp(30px, 4.6vw, 50px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.14;
}

.hero-subtitle {
  max-width: 600px;
  margin: 0;
  color: #c7d2fe;
  font-size: 15px;
  line-height: 1.75;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 660px;
  margin-top: 34px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-stat-value {
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero-stat-value-sm {
  padding: 4px 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
}

.hero-stat-label {
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 600;
}

/* =========================================================
   用户端：筛选工具栏
   ========================================================= */
.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.search-field {
  position: relative;
  flex: 1 1 260px;
  min-width: 0;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  color: #94a3b8;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 42px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  font-size: 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.search-input::placeholder {
  color: #94a3b8;
}

.search-input:focus {
  outline: none;
  border-color: #a5b4fc;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

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

.chip {
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.chip:hover {
  background: #e9eef7;
  color: var(--ink);
}

.chip.is-active {
  background: #111827;
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(15, 23, 42, 0.85);
}

/* =========================================================
   用户端：卡片列表
   ========================================================= */
.list-section {
  min-height: 220px;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 4px;
}

.result-count {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  transition: opacity 0.2s ease;
}

.card-grid.is-loading {
  opacity: 0.5;
  pointer-events: none;
}

.item-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.item-card:hover {
  transform: translateY(-3px);
  border-color: #c7d2fe;
  box-shadow: 0 20px 44px -26px rgba(49, 46, 129, 0.45);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-date {
  color: #94a3b8;
  font-size: 12px;
  white-space: nowrap;
}

.card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-summary {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.68;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-action {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.card-action svg {
  transition: transform 0.18s ease;
}

.card-action:hover svg {
  transform: translateX(3px);
}

/* =========================================================
   空状态 / 分页 / 页脚
   ========================================================= */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 48px 24px;
  border: 1px dashed #cbd5e1;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.65);
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 6px;
  border-radius: 20px;
  background: var(--brand-soft);
  color: var(--brand);
}

.empty-state h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.empty-state p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.empty-state .btn {
  margin-top: 12px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.page-btn:hover:not(:disabled) {
  border-color: #c7d2fe;
  background: #f8faff;
  color: var(--brand);
}

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

.page-indicator {
  min-width: 104px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.site-footer {
  margin-top: 56px;
  padding: 28px 0;
  border-top: 1px solid rgba(15, 23, 42, 0.07);
  background: #fff;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
}

.footer-note,
.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

/* =========================================================
   Toast / 弹窗 / 表单
   ========================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 120;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 18px 40px -12px rgba(15, 23, 42, 0.55);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.toast[data-type="error"] {
  background: #b91c1c;
}

.modal {
  width: min(680px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.modal-sm {
  width: min(440px, calc(100vw - 32px));
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal[open] {
  animation: modal-in 0.2s ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: min(88vh, 780px);
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 40px 90px -30px rgba(15, 23, 42, 0.6);
}

.modal-head {
  position: relative;
  padding: 24px 26px 14px;
}

.modal-head h2 {
  margin: 0;
  padding-right: 42px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.modal-head p {
  margin: 4px 0 0;
  padding-right: 42px;
  color: var(--muted);
  font-size: 13px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 6px 26px 24px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 26px;
  border-top: 1px solid #eef2f7;
  background: #fbfcfe;
}

.detail-modal {
  width: min(660px, calc(100vw - 32px));
}

.detail-body {
  padding: 34px 34px 38px;
  overflow-y: auto;
}

.detail-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.detail-title {
  margin: 0 0 10px;
  font-size: clamp(23px, 3vw, 29px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 22px;
  color: #94a3b8;
  font-size: 12.5px;
}

.detail-meta span + span::before {
  content: "·";
  margin-right: 8px;
}

.detail-summary {
  margin: 0;
  color: #334155;
  font-size: 15px;
  line-height: 1.85;
  white-space: pre-line;
}

.detail-loading {
  padding: 46px 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-label {
  color: #334155;
  font-size: 13px;
  font-weight: 650;
}

.field input,
.field textarea,
.field select,
.select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #f8fafc;
  font-size: 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.field input,
.field select,
.select {
  height: 44px;
  padding: 0 13px;
}

.field textarea {
  min-height: 104px;
  padding: 11px 13px;
  line-height: 1.6;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #94a3b8;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.select:focus {
  outline: none;
  border-color: #a5b4fc;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-hint {
  margin: -4px 0 0;
  color: #94a3b8;
  font-size: 12px;
}

.field-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #94a3b8;
  font-size: 12px;
}

.field-error {
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.5;
}

.delete-text {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.7;
}

.delete-text strong {
  color: var(--ink);
}

/* =========================================================
   管理后台：登录页
   ========================================================= */
.admin-page {
  background: #f3f5fa;
}

.login-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: #e2e8f0;
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(79, 70, 229, 0.42), transparent 62%),
    radial-gradient(760px 520px at 102% 104%, rgba(6, 182, 212, 0.24), transparent 62%),
    #0b1220;
}

.login-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding-top: 24px;
  padding-bottom: 20px;
}

.login-main {
  display: grid;
  flex: 1;
  place-items: center;
  padding: 24px 16px 80px;
}

.login-card {
  position: relative;
  width: min(430px, 100%);
  padding: 36px;
  border-radius: 24px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.65);
}

.login-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.login-card h1 {
  margin: 14px 0 6px;
  font-size: 26px;
  letter-spacing: -0.025em;
}

.login-subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form .btn {
  margin-top: 4px;
}

.login-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
}

.login-back:hover {
  color: var(--brand);
}

/* =========================================================
   管理后台：框架与头部
   ========================================================= */
.admin-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #0b1220;
  color: #e2e8f0;
}

.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.admin-chip {
  margin-left: 6px;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  color: #c7d2fe;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.admin-main {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 32px;
  padding-bottom: 48px;
}

.admin-welcome {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.admin-eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.admin-welcome h1 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.025em;
}

.admin-welcome p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.stat-icon-indigo {
  background: #eef2ff;
  color: #4f46e5;
}

.stat-icon-green {
  background: #ecfdf5;
  color: #059669;
}

.stat-icon-amber {
  background: #fffbeb;
  color: #d97706;
}

.stat-icon-cyan {
  background: #ecfeff;
  color: #0891b2;
}

.stat-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat-name {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* =========================================================
   管理后台：列表面板
   ========================================================= */
.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
}

.panel-title h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.panel-title p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.panel-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.search-field-sm {
  width: 250px;
  flex: 0 1 250px;
}

.search-field-sm .search-input {
  height: 38px;
  font-size: 13px;
}

.select-sm {
  width: auto;
  height: 38px;
  padding: 0 12px;
  color: #334155;
  font-size: 13px;
  cursor: pointer;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.data-table th {
  padding: 10px 22px;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 15px 22px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13.5px;
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: #fafbff;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.cell-title {
  max-width: 380px;
  color: #0f172a;
  font-weight: 650;
}

.cell-sub {
  max-width: 380px;
  margin-top: 3px;
  overflow: hidden;
  color: #94a3b8;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cell-date {
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.cell-actions {
  text-align: right;
}

.row-actions {
  display: inline-flex;
  gap: 6px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.icon-btn:hover {
  background: #e0e7ff;
  color: #4338ca;
}

.icon-btn-danger:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-published {
  background: #ecfdf5;
  color: #047857;
}

.status-draft {
  background: #fffbeb;
  color: #b45309;
}

.panel .empty-state {
  padding: 46px 24px;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.panel .pagination {
  margin: 0;
  padding: 16px 22px;
  border-top: 1px solid #f1f5f9;
}

.admin-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 32px;
  color: #94a3b8;
  font-size: 12.5px;
}

.admin-footer a:hover {
  color: var(--brand);
}

/* =========================================================
   404 / 错误页
   ========================================================= */
.simple-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(700px 420px at 10% 0%, rgba(79, 70, 229, 0.25), transparent 60%),
    radial-gradient(600px 400px at 100% 100%, rgba(6, 182, 212, 0.16), transparent 60%),
    #0b1220;
}

.simple-card {
  width: min(440px, 100%);
  padding: 48px 40px;
  border-radius: 24px;
  background: #fff;
  text-align: center;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.6);
}

.simple-code {
  display: block;
  margin-bottom: 6px;
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.1;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.simple-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.simple-card p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 980px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero {
    padding: 36px 28px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .chip {
    flex: none;
  }
}

@media (max-width: 640px) {
  .shell {
    width: calc(100% - 28px);
  }

  .header-inner {
    min-height: 64px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .brand-text small {
    display: none;
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions > .btn span {
    display: none;
  }

  .lang-btn {
    padding: 5px 9px;
    font-size: 11.5px;
  }

  .hero {
    border-radius: 22px;
    padding: 28px 22px;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
    margin-top: 26px;
  }

  .hero-stat:last-child {
    grid-column: span 2;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .card-grid .item-card {
    padding: 20px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .admin-header .header-actions {
    gap: 6px;
  }

  .admin-chip {
    display: none;
  }

  .hide-sm {
    display: none;
  }

  .stat-grid {
    gap: 10px;
  }

  .stat-card {
    padding: 14px;
    gap: 10px;
  }

  .stat-icon {
    width: 38px;
    height: 38px;
  }

  .stat-value {
    font-size: 20px;
  }

  .admin-main {
    padding-top: 22px;
  }

  .admin-welcome {
    align-items: flex-start;
  }

  .admin-welcome .btn {
    width: 100%;
  }

  .panel-head {
    padding: 16px;
  }

  .panel-tools {
    width: 100%;
  }

  .search-field-sm {
    flex: 1 1 100%;
    width: 100%;
  }

  .select-sm {
    flex: 1;
  }

  .data-table th,
  .data-table td {
    padding-right: 16px;
    padding-left: 16px;
  }

  .panel .pagination {
    padding: 14px 16px;
  }

  .page-indicator {
    min-width: 78px;
    font-size: 12px;
  }

  .page-btn {
    padding: 0 10px;
    font-size: 12px;
  }

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

  .login-topbar {
    padding-top: 16px;
    padding-bottom: 8px;
  }

  .login-topbar .brand-text small {
    display: none;
  }

  .login-main {
    padding-bottom: 48px;
  }

  .login-card {
    padding: 28px 22px;
  }

  .modal-head {
    padding: 20px 20px 12px;
  }

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

  .modal-foot {
    padding: 14px 20px;
  }

  .detail-body {
    padding: 26px 20px 30px;
  }

  .simple-card {
    padding: 38px 24px;
  }
}

/* 列表与表格的加载反馈 / 锚点偏移 */
.list-section {
  scroll-margin-top: 92px;
}

.table-wrap.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.table-wrap {
  transition: opacity 0.2s ease;
}

/* 移动端：筛选栏不再纵向拉伸搜索框 */
@media (max-width: 900px) {
  .toolbar .search-field {
    flex: 0 0 auto;
  }

  .toolbar .chips {
    flex: 0 0 auto;
  }
}

/* 移动端：管理表格转为卡片，操作按钮无需横向滚动 */
@media (max-width: 720px) {
  .data-table {
    min-width: 0;
  }

  .data-table thead {
    display: none;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tr {
    padding: 16px;
    border-bottom: 1px solid #eef2f7;
  }

  .data-table tbody tr:last-child {
    border-bottom: 0;
  }

  .data-table td {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    border: 0;
  }

  .data-table td::before {
    content: attr(data-label);
    flex: 0 0 66px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
  }

  .data-table td:first-child {
    display: block;
    padding-bottom: 10px;
  }

  .data-table td:first-child::before {
    display: none;
  }

  .cell-title {
    max-width: none;
    font-size: 15px;
  }

  .cell-sub {
    display: -webkit-box;
    max-width: none;
    overflow: hidden;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .data-table td.cell-actions {
    padding-top: 10px;
  }

  .row-actions {
    gap: 8px;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
  }
}
