.admin-shell {
  min-height: 100vh;
  background: #fff;
  color: #111;
}

.admin-shell .page-shell {
  min-height: 100vh;
  margin-left: 256px;
  background: #fff;
}

.admin-sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: 256px;
  flex-direction: column;
  padding: 24px 16px 16px;
  border-right: 1px solid #e5e7eb;
  background: #fff;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 22px;
}

.admin-brand-icon {
  display: flex;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #7c3aed;
  color: #fff;
}

.admin-brand svg,
.admin-nav-link svg,
.admin-logout svg,
.admin-theme-toggle svg,
.dashboard-create svg,
.dashboard-open svg,
.dashboard-metrics svg,
.dashboard-detail svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-brand-icon svg { width: 21px; height: 21px; }
.admin-brand strong { display: block; font-size: 15px; line-height: 20px; }
.admin-brand small { display: block; margin-top: 2px; color: #71717a; font-size: 12px; }

.admin-sidebar nav {
  display: grid;
  gap: 5px;
}

.admin-nav-link {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
  border-radius: 14px;
  color: #71717a;
  font-size: 16px;
  font-weight: 650;
  transition: background 160ms, color 160ms;
}

.admin-nav-link svg { width: 20px; height: 20px; }
.admin-nav-link:hover { background: #f7f7f8; color: #18181b; }
.admin-nav-link.active { background: #f3f3f4; color: #111; }

.admin-sidebar-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.admin-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px 12px;
}

.admin-account-row p {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  color: #71717a;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-account-row strong { font-weight: 500; }

.admin-theme-toggle {
  display: flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid #e4e4e7;
  border-radius: 11px;
  background: #fff;
  color: #27272a;
  box-shadow: 0 2px 5px rgb(0 0 0 / 8%);
}

.admin-theme-toggle svg { width: 17px; height: 17px; }
.admin-theme-moon { display: none; }

.admin-sidebar-foot form { margin: 0; }

.admin-logout {
  display: flex;
  width: 100%;
  height: 42px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #71717a;
  font-size: 14px;
}

.admin-logout:hover { background: #f7f7f8; color: #18181b; }
.admin-logout svg { width: 17px; height: 17px; }

.dashboard-main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 38px 40px;
}

.dashboard-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.dashboard-page-head p {
  margin: 0;
  color: #71717a;
  font-size: 14px;
}

.dashboard-page-head h1 {
  margin: 5px 0 8px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.025em;
}

.dashboard-page-head span {
  color: #71717a;
  font-size: 14px;
  line-height: 22px;
}

.dashboard-create {
  display: flex;
  height: 42px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 12px;
  background: #171717;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.dashboard-create:hover { background: #292929; }
.dashboard-create svg { width: 17px; height: 17px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.dashboard-card {
  padding: 20px;
  border: 1px solid #e4e4e7;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgb(24 24 27 / 9%);
  transition: transform 160ms, box-shadow 160ms;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgb(24 24 27 / 12%);
}

.dashboard-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-avatar {
  display: flex;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: #f0eaff;
  color: #6d28d9;
  font-size: 17px;
  font-weight: 700;
}

.dashboard-card-title { min-width: 0; flex: 1; }
.dashboard-card-title > div { display: flex; align-items: center; gap: 8px; }
.dashboard-card-title h2 { overflow: hidden; margin: 0; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-card-title p { margin: 5px 0 0; color: #71717a; font-size: 12px; }

.dashboard-status {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f4f4f5;
  color: #71717a;
  font-size: 11px;
}

.dashboard-status.published { background: #dcfce7; color: #15803d; }

.dashboard-open {
  display: flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  color: #71717a;
}

.dashboard-open:hover { background: #f4f4f5; color: #18181b; }
.dashboard-open svg { width: 16px; height: 16px; }

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.dashboard-metrics > div {
  min-height: 96px;
  padding: 16px;
  border-radius: 14px;
}

.dashboard-metrics .metric-violet { background: #f5f2ff; }
.dashboard-metrics .metric-sky { background: #eef8fc; }

.dashboard-metrics p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #71717a;
  font-size: 12px;
}

.dashboard-metrics svg { width: 16px; height: 16px; }
.metric-violet svg { color: #7c3aed; }
.metric-sky svg { color: #0284c7; }

.dashboard-metrics strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  line-height: 1;
  font-weight: 650;
}

.dashboard-detail {
  display: flex;
  width: 100%;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fff;
  color: #18181b;
  font-size: 14px;
  font-weight: 600;
}

.dashboard-detail:hover { background: #f7f7f8; }
.dashboard-detail svg { width: 17px; height: 17px; }

.dashboard-empty {
  margin-top: 32px;
  padding: 48px;
  border: 1px dashed #d4d4d8;
  border-radius: 18px;
  text-align: center;
}

.dashboard-empty h2 { margin: 0; font-size: 16px; }
.dashboard-empty p { margin: 8px 0 0; color: #71717a; font-size: 14px; }

.pages-main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 38px 40px;
}

.pages-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.pages-head p { margin: 0; color: #71717a; font-size: 14px; }
.pages-head h1 { margin: 5px 0 0; font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.025em; }

.pages-create {
  display: flex;
  height: 42px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 12px;
  background: #171717;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.pages-create:hover { background: #292929; }
.pages-create svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.pages-list {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.pages-card {
  display: flex;
  min-height: 92px;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid #e4e4e7;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgb(24 24 27 / 9%);
  transition: transform 160ms, box-shadow 160ms;
  cursor: pointer;
}

.pages-card:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgb(24 24 27 / 12%); }
.pages-card:focus-visible { outline: 3px solid rgb(124 58 237 / 22%); outline-offset: 3px; }

.pages-avatar {
  display: flex;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #f0eaff;
  color: #6d28d9;
  font-size: 17px;
  font-weight: 700;
}

.pages-card-copy { min-width: 0; flex: 1; }
.pages-card-copy > div { display: flex; align-items: center; gap: 9px; }
.pages-card-copy h2 { overflow: hidden; margin: 0; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.pages-card-copy p { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; color: #71717a; font-size: 13px; }
.pages-card-copy i { font-style: normal; }

.pages-status {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f4f4f5;
  color: #71717a;
  font-size: 11px;
}

.pages-status.published { background: #dcfce7; color: #15803d; }

.pages-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.pages-actions form { margin: 0; }
.pages-actions a,
.pages-actions button {
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #71717a;
}

.pages-actions a:hover,
.pages-actions button:hover { background: #f4f4f5; color: #18181b; }
.pages-actions button:hover { color: #dc2626; }
.pages-actions svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.pages-empty {
  margin-top: 32px;
  padding: 48px;
  border: 1px dashed #d4d4d8;
  border-radius: 18px;
  text-align: center;
}

.pages-empty h2 { margin: 0; font-size: 16px; }
.pages-empty p { margin: 8px 0 0; color: #71717a; font-size: 14px; }

.settings-main { max-width: 1400px; margin: 0 auto; padding: 36px 42px; }
.settings-main > header p { margin: 0; color: #71717a; font-size: 14px; }
.settings-main > header h1 { margin: 6px 0 0; font-size: 32px; line-height: 1.15; }
.settings-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.settings-card { min-height: 200px; padding: 20px; border: 1px solid #e4e4e7; border-radius: 20px; background: #fff; box-shadow: 0 10px 28px rgb(24 24 27 / 9%); }
.settings-card h2 { margin: 0 0 14px; font-size: 16px; }
.settings-inline,
.settings-password { display: flex; align-items: flex-start; flex-direction: column; gap: 10px; }
.settings-card input { min-height: 48px; padding: 11px 15px; border: 1px solid #e4e4e7; border-radius: 12px; background: #fff; font-size: 14px; font-weight: 400; }
.settings-card button { min-height: 44px; padding: 0 19px; border: 0; border-radius: 12px; background: #315ef5; color: #fff; font-size: 14px; font-weight: 600; }
.settings-card button:hover { background: #234ee7; }

.short-main { max-width: 1500px; margin: 0 auto; padding: 36px 42px; }
.short-main > header p { margin: 0; color: #71717a; font-size: 14px; }
.short-main > header h1 { margin: 6px 0 0; font-size: 32px; line-height: 1.15; }
.short-main > header > span { display: block; margin-top: 10px; color: #71717a; font-size: 14px; }
.short-create,
.short-list,
.short-stats { margin-top: 24px; padding: 24px; border: 1px solid #e4e4e7; border-radius: 20px; background: #fff; box-shadow: 0 10px 28px rgb(24 24 27 / 8%); }
.short-create h2,
.short-list h2,
.short-stats h2 { margin: 0 0 18px; font-size: 18px; }
.short-list { overflow: visible; }
.short-create form { display: grid; grid-template-columns: minmax(300px, 2fr) minmax(180px, .8fr) minmax(170px, .7fr) auto; gap: 14px; align-items: end; }
.short-create label,
.short-item > label { display: grid; min-width: 0; gap: 8px; color: #52525b; font-size: 13px; font-weight: 600; }
.short-create input,
.short-item input { width: 100%; min-height: 42px; padding: 8px 14px; border: 1px solid #dfe1e6; border-radius: 11px; background: #fff; color: #18181b; font-size: 14px; font-weight: 400; }
.short-create button,
.short-actions button { min-height: 42px; padding: 0 18px; border: 0; border-radius: 11px; background: #315ef5; color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; }
.short-create > p { margin: 12px 0 0; color: #71717a; font-size: 12px; }
.short-list-head,
.short-item { display: grid; width: 100%; grid-template-columns: 140px minmax(160px, 1fr) var(--short-output-width, 230px) 124px 70px 70px 132px; gap: 10px; }
.short-list-head { align-items: center; padding: 0 0 14px; color: #71717a; font-size: 12px; font-weight: 600; }
.short-list-head span:nth-child(n + 5) { text-align: center; }
.short-item { align-items: center; padding: 12px 0; border-top: 1px solid #e4e4e7; }
.short-item > form:first-child { display: none; }
.short-target input { font-size: 13px; }
.short-output,
.short-meta,
.short-count { display: grid; min-width: 0; gap: 14px; }
.short-output > span,
.short-meta > span,
.short-count > span { color: #71717a; font-size: 12px; font-weight: 600; }
.short-output > div { display: flex; min-height: 42px; align-items: center; gap: 8px; padding: 0 7px 0 12px; border: 1px solid #dfe1e6; border-radius: 11px; }
.short-output a { min-width: 0; overflow: hidden; color: #27272a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.short-output button { flex: 0 0 auto; margin-left: auto; padding: 5px 8px; border: 0; border-radius: 7px; background: #eef2ff; color: #315ef5; font-size: 12px; }
.short-meta strong,
.short-count strong { display: flex; min-height: 42px; align-items: center; color: #27272a; font-size: 13px; font-weight: 500; }
.short-count strong { font-size: 16px; font-weight: 400; }
.short-count { text-align: center; }
.short-count strong { justify-content: center; }
.short-actions { display: flex; width: 100%; min-width: 0; align-items: center; justify-content: center; gap: 6px; }
.short-actions > span { width: 100%; flex: 0 0 100%; color: #71717a; font-size: 12px; font-weight: 600; text-align: center; }
.short-actions form { width: auto; min-width: 0; margin: 0; }
.short-actions .short-update { width: auto; min-width: 54px; min-height: 40px; padding: 0 8px; font-size: 13px; }
.short-actions form button { width: auto; min-width: 54px; min-height: 40px; padding: 0 8px; border: 1px solid #fca5a5; background: #fff; color: #dc2626; font-size: 13px; }
.short-empty { padding: 34px; border: 1px dashed #d4d4d8; border-radius: 14px; color: #71717a; text-align: center; }
.short-stats > h2 { margin-bottom: 5px; }
.short-stats > p { margin: 0 0 18px; color: #71717a; font-size: 12px; }
.short-stats-table-wrap { overflow-x: auto; border: 1px solid #e4e4e7; border-radius: 14px; }
.short-stats table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.short-stats th,
.short-stats td { padding: 13px 16px; border-bottom: 1px solid #e4e4e7; text-align: center; }
.short-stats thead th { background: #f4f6fb; color: #52525b; font-size: 13px; font-weight: 650; }
.short-stats tbody th { color: #27272a; font-size: 14px; font-weight: 600; }
.short-stats tbody td { color: #3f3f46; font-size: 14px; }
.short-stats tbody tr:last-child > * { border-bottom: 0; }
.short-chart { overflow-x: auto; padding: 18px 20px 8px; border: 1px solid #e4e4e7; border-radius: 16px; background: #fbfcff; }
.short-chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; min-height: 24px; }
.short-chart-legend > span { display: inline-flex; align-items: center; gap: 7px; color: #3f3f46; font-size: 12px; font-weight: 600; }
.short-chart-legend > span > i { width: 9px; height: 9px; border-radius: 50%; background: var(--series-color); box-shadow: 0 0 8px color-mix(in srgb, var(--series-color) 45%, transparent); }
.short-chart-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.short-chart-panel { min-width: 0; padding: 16px 14px 4px; border: 1px solid #e4e4e7; border-radius: 14px; background: #fff; }
.short-chart-panel h3 { margin: 0 0 4px; color: #27272a; font-size: 15px; }
.short-chart-key { margin-left: auto; color: #71717a !important; font-weight: 500 !important; }
.short-chart-key + .short-chart-key { margin-left: 0; }
.short-chart-key b { width: 24px; height: 0; border-top: 2px solid #64748b; }
.short-chart-key b.is-dashed { border-top-style: dashed; }
.short-chart svg { display: block; width: 100%; min-width: 440px; height: auto; overflow: visible; }
.short-chart-grid { stroke: #e2e8f0; stroke-width: 1; }
.short-chart-x-label,
.short-chart-y-label { fill: #71717a; font-size: 12px; }
.short-chart-x-label { text-anchor: middle; }
.short-chart-y-label { text-anchor: end; }
.short-chart-line { fill: none; stroke: var(--series-color); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.short-chart-line-ip { stroke-width: 2; stroke-dasharray: 7 6; opacity: .78; }
.short-chart-point { fill: #fff; stroke: var(--series-color); stroke-width: 3; }
.short-chart-point-ip { fill: var(--series-color); stroke-width: 1; }
.settings-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.settings-card-head h2 { margin-bottom: 0; }
.settings-push { display: grid; min-height: 0; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; }
.settings-push .settings-card-head { grid-column: 1 / -1; }
.settings-push > label:not(.settings-switch) { display: grid; align-self: end; gap: 7px; margin-top: 22px; color: #27272a; font-size: 13px; font-weight: 500; }
.settings-push > button { align-self: end; margin: 0; }
.settings-push > p { grid-column: 1 / -1; margin: 14px 0 0; color: #71717a; font-size: 12px; }
.settings-switch { display: flex; align-items: center; gap: 10px; color: #18181b; font-size: 12px; font-weight: 500; }
.settings-switch input { position: absolute; opacity: 0; }
.settings-switch span { position: relative; width: 40px; height: 22px; border-radius: 999px; background: #d4d4d8; }
.settings-switch span::after { content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; border-radius: 50%; background: #fff; transition: transform 160ms; }
.settings-switch input:checked + span { background: #7c3aed; }
.settings-switch input:checked + span::after { transform: translateX(18px); }
.settings-switch em { order: -1; font-style: normal; }
.admin-dark .settings-card { border-color: #263149; background: #10182b; }
.admin-dark .settings-card input { border-color: #334155; background: #0f172a; color: #f8fafc; }
.admin-dark .short-create,
.admin-dark .short-list,
.admin-dark .short-stats { border-color: #263149; background: #10182b; }
.admin-dark .short-create input,
.admin-dark .short-item input,
.admin-dark .short-output > div { border-color: #334155; background: #0f172a; color: #f8fafc; }
.admin-dark .short-item { border-color: #263149; }
.admin-dark .short-stats > p { color: #cbd5e1; }
.admin-dark .short-stats-table-wrap { border-color: #334155; }
.admin-dark .short-stats th,
.admin-dark .short-stats td { border-color: #334155; color: #f8fafc; }
.admin-dark .short-stats thead th { background: #142039; color: #bfdbfe; }
.admin-dark .short-chart { border-color: #334155; background: #0c1425; }
.admin-dark .short-chart-panel { border-color: #334155; background: #10182b; }
.admin-dark .short-chart-panel h3 { color: #f8fafc; }
.admin-dark .short-chart-grid { stroke: #263149; }
.admin-dark .short-chart-x-label,
.admin-dark .short-chart-y-label { fill: #cbd5e1; }
.admin-dark .short-chart-legend > span { color: #f8fafc; }
.admin-dark .short-chart-key { color: #cbd5e1 !important; }
.admin-dark .short-chart-point { fill: #10182b; }
.admin-dark .short-output a,
.admin-dark .short-meta strong,
.admin-dark .short-count strong { color: #f8fafc; }
.admin-dark .page-shell .short-output button {
  border: 1px solid rgb(56 189 248 / 28%);
  background: #173553;
  color: #7dd3fc;
}
.admin-dark .page-shell .short-output button:hover {
  background: #1e4a70;
  color: #e0f2fe;
}
.admin-dark .short-actions form button {
  border-color: rgb(248 113 113 / 45%);
  background: #451a24;
  color: #fca5a5;
}
.admin-dark .short-actions form button:hover {
  border-color: #f87171;
  background: #5f1d2c;
  color: #fff;
}

.editor-main {
  height: 100vh;
  max-width: 1440px;
  margin: 0 auto;
  overflow: hidden;
  padding: 32px 36px 0;
}

.editor-top { padding-bottom: 24px; }
.editor-top > a { color: #52525b; font-size: 14px; }
.editor-top > a:hover { color: #18181b; }
.editor-top h1 { margin: 14px 0 0; font-size: 30px; line-height: 1.2; letter-spacing: -.025em; }

.editor-workspace {
  display: grid;
  height: calc(100vh - 125px);
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 24px;
  overflow: hidden;
}

.editor-create-main { max-width: 1080px; }
.editor-create-main .editor-workspace { display: block; height: auto; overflow: visible; }
.editor-create-main .editor-scroll { overflow: visible; padding-right: 0; }
.editor-create-card { padding: 28px; }

.editor-scroll {
  display: grid;
  align-content: start;
  gap: 22px;
  min-width: 0;
  overflow-y: auto;
  padding: 0 8px 32px 0;
  scrollbar-color: #a1a1aa transparent;
}

.editor-card,
.editor-preview {
  border: 1px solid #e4e4e7;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgb(24 24 27 / 6%);
}

.editor-card { padding: 24px; }
.editor-card h2 { margin: 0; font-size: 17px; }
.editor-card-intro,
.editor-card-head p { margin: 6px 0 20px; color: #71717a; font-size: 13px; }

.editor-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 12px;
}

.editor-form-grid label { display: grid; align-content: start; gap: 8px; color: #27272a; font-size: 14px; font-weight: 600; }
.editor-form-grid .full { grid-column: 1 / -1; }
.editor-form-grid input,
.editor-form-grid textarea,
.editor-form-grid select {
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fff;
  font-weight: 400;
}

.editor-form-grid textarea { height: 46px; min-height: 46px; resize: vertical; }
.editor-form-grid label > small { color: #71717a; font-size: 11px; font-weight: 400; line-height: 17px; }

.editor-upload { display: grid; align-content: start; gap: 8px; color: #27272a; font-size: 14px; font-weight: 600; }
.editor-upload-row { display: flex; min-height: 72px; align-items: center; gap: 14px; }
.editor-upload-frame { position: relative; display: flex; width: 72px; height: 72px; flex: 0 0 auto; align-items: center; justify-content: center; overflow: hidden; border: 1px dashed #d4d4d8; border-radius: 14px; background: #f7f7f8; color: #71717a; }
.editor-upload-frame.has-image { border-style: solid; background: #fff; }
.editor-upload-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.editor-upload-frame img[hidden] { display: none; }
.editor-upload-frame.has-image .editor-upload-placeholder { display: none; }
.editor-upload-placeholder { display: flex; }
.editor-upload-placeholder svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.editor-file-button { display: flex !important; min-height: 34px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid #e4e4e7; border-radius: 9px; background: #fff; color: #18181b !important; font-size: 12px !important; font-weight: 400 !important; cursor: pointer; }
.editor-file-button:hover { background: #f7f7f8; }
.editor-file-button input { position: absolute; width: 1px !important; height: 1px !important; min-height: 0 !important; overflow: hidden; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; }
.editor-image-clear { position: absolute; z-index: 2; top: 3px; right: 3px; display: flex; width: 18px; height: 18px; align-items: center; justify-content: center; padding: 0 0 2px; border: 0; border-radius: 0; background: transparent; color: #fff; font-size: 19px; font-weight: 300; line-height: 1; text-shadow: 0 1px 2px rgb(0 0 0 / 65%); }
.editor-image-clear:hover { background: transparent; color: #fff; opacity: .72; }
.editor-image-clear[hidden] { display: none; }

.editor-publish { display: flex !important; grid-template-columns: auto 1fr; align-items: center !important; justify-content: flex-start; }
.editor-publish input { width: 17px; min-height: 17px; padding: 0; }
.editor-save button,
.editor-add-link {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  background: #171717;
  color: #fff;
  font-weight: 600;
}

.editor-save { text-align: right; }
.editor-save button:hover,
.editor-add-link:hover { background: #292929; }

.editor-main.is-auto-saving .editor-publish,
.editor-main.is-auto-saving .editor-save { display: none !important; }

.editor-auto-save-status {
  min-height: 18px;
  margin: -12px 0 16px;
  color: #059669;
  font-size: 12px;
  text-align: right;
}

.editor-auto-save-status.error { color: #dc2626; }

.editor-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.editor-card-head p { margin-bottom: 0; }
.editor-empty { color: #71717a; text-align: center; }

.editor-links-card { padding: 20px; }
.editor-links-card .editor-card-head p { margin-top: 4px; }
.editor-links-card .editor-add-link { width: 100%; min-height: 44px; margin-top: 12px; border-radius: 12px; font-size: 13px; }
.editor-links-card .editor-add-link span { margin-right: 6px; font-size: 18px; font-weight: 300; line-height: 1; }
.editor-links-card .link-list { gap: 9px; margin-top: 14px; }
.editor-links-card .link-editor { margin: 0; padding: 0 14px; border: 1px solid #e4e4e7; border-radius: 14px; background: #fff; }
.link-editor-row { display: flex; min-height: 68px; align-items: center; gap: 11px; cursor: pointer; }
.editor-links-card .link-editor.dragging { opacity: .45; }
.link-drag-handle { display: flex; width: 20px !important; min-width: 20px !important; height: 30px; align-items: center; justify-content: center; padding: 0 !important; border: 0 !important; background: transparent !important; color: #8a8a8a !important; cursor: grab; }
.link-drag-handle svg { width: 18px; height: 24px; fill: currentColor; }
.link-drag-handle:active { cursor: grabbing; }
.editor-links-card .link-icon { display: flex; width: 42px; height: 42px; flex: 0 0 auto; align-items: center; justify-content: center; overflow: hidden; border-radius: 11px; background: #f0eaff; color: #6d28d9; font-size: 18px; }
.editor-links-card .link-icon img { width: 100%; height: 100%; object-fit: cover; }
.link-editor-copy { min-width: 0; flex: 1; }
.editor-links-card .link-editor strong { display: block; overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.editor-links-card .link-editor small { display: block; max-width: 460px; overflow: hidden; margin-top: 2px; color: #71717a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.editor-links-card .link-editor .actions { gap: 8px; }
.editor-links-card .link-editor .actions button { display: flex; min-width: 30px; height: 30px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #737373; }
.editor-links-card .link-editor .actions svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.editor-links-card .link-editor .actions button:hover { background: #f4f4f5; color: #18181b; }
.editor-links-card .link-editor .actions .danger-link { color: #737373; }
.editor-links-card .link-editor .actions .danger-link:hover { color: #dc2626; }
.editor-links-card .link-editor .actions form { margin: 0; }
.editor-links-card .form-grid.compact { border: 1px solid #e4e4e7; background: #f7f7f8; }

.editor-links-card > .collapsible.open,
.link-editor > .collapsible.open {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgb(15 23 42 / 38%);
  backdrop-filter: blur(5px);
}

.link-modal-form { width: min(680px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border: 1px solid #e4e4e7; border-radius: 24px; background: #fff; box-shadow: 0 26px 70px rgb(15 23 42 / 28%); }
.link-modal-form > header { display: flex; align-items: flex-start; gap: 16px; padding: 28px 30px 18px; }
.link-modal-form > header > div { min-width: 0; flex: 1; }
.link-modal-form h3 { margin: 0; font-size: 21px; }
.link-modal-form header p { margin: 6px 0 0; color: #71717a; font-size: 13px; }
.link-modal-form header button { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: #71717a; font-size: 24px; }
.link-modal-form header button:hover { background: #f4f4f5; }
.link-modal-body { display: grid; gap: 16px; padding: 0 30px 8px; }
.link-primary-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.link-modal-body label { display: grid; gap: 7px; color: #27272a; font-size: 13px; }
.link-modal-body label[hidden] { display: none; }
.link-field-label { display: none; }
.link-modal-body input,
.link-modal-body select { min-height: 42px; padding: 8px 14px; border: 1px solid #e4e4e7; border-radius: 14px; background: #fff; font-size: 14px; font-weight: 400; }
.link-web-field { grid-column: 1 / -1; }
.link-web-field .link-field-label { display: block; }
.link-qr-field { padding: 18px 16px; border: 1px solid #e4e4e7; border-radius: 16px; }
.link-qr-field[hidden] { display: none; }
.link-qr-field h4 { margin: 0 0 12px; font-size: 13px; font-weight: 500; }
.link-image-error { margin: 10px 0 0; color: #dc2626; font-size: 12px; }
.link-icon-field p { margin: 0 0 8px; color: #71717a; font-size: 11px; }
.link-image-upload { display: flex; align-items: center; gap: 14px; }
.link-image-frame { position: relative; display: flex; width: 70px; height: 70px; flex: 0 0 auto; align-items: center; justify-content: center; overflow: hidden; border: 1px dashed #d4d4d8; border-radius: 14px; background: #f7f7f8; color: #71717a; }
.link-icon-upload .link-image-frame { width: 30px; height: 30px; border-radius: 7px; }
.link-icon-upload .link-image-frame svg { width: 18px; height: 18px; }
.link-image-frame > span { display: flex; }
.link-image-frame svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.link-image-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.link-image-frame img[hidden], .link-image-frame.has-image > span { display: none; }
.link-image-button { display: flex !important; min-height: 28px; align-items: center; justify-content: center; grid-template-columns: none !important; padding: 0 6px; border: 1px solid #e4e4e7; border-radius: 8px; background: #fff; color: #18181b !important; font-size: 11px; cursor: pointer; }
.link-image-button svg { width: 14px; height: 14px; margin-right: 4px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.link-image-button b { font-weight: 400; }
.link-image-button input { position: absolute; width: 1px !important; height: 1px !important; min-height: 0 !important; overflow: hidden; padding: 0 !important; opacity: 0; pointer-events: none; }
.link-image-clear { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: #71717a; font-size: 24px; font-weight: 300; }
.link-image-clear:hover { background: #f4f4f5; color: #dc2626; }
.link-modal-form > footer { display: flex; justify-content: flex-end; gap: 12px; padding: 14px 30px 28px; }
.link-modal-form > footer button { min-height: 44px; padding: 0 22px; border: 1px solid #e4e4e7; border-radius: 12px; background: #fff; font-size: 13px; }
.link-modal-form > footer button[type="submit"] { border-color: #171717; background: #171717; color: #fff; }

@media (max-width: 700px) {
  .link-modal-form > header { padding: 24px 22px 18px; }
  .link-modal-body { padding: 0 22px 8px; }
  .link-primary-fields { grid-template-columns: 1fr; }
  .link-field-label { display: block; }
  .link-modal-form > footer { padding: 16px 22px 24px; }
}

.editor-preview {
  min-width: 0;
  height: max-content;
  max-height: calc(100vh - 125px);
  overflow-y: auto;
  padding: 20px;
  scrollbar-color: #a1a1aa transparent;
}

.editor-preview > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.editor-preview > header h2 { margin: 0; font-size: 17px; }
.editor-preview > header h2 a { display: inline-flex; margin-left: 5px; color: #71717a; vertical-align: -2px; }
.editor-preview > header h2 a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.editor-preview > header p { margin: 5px 0 0; color: #71717a; font-size: 12px; }
.editor-preview > header > span { display: flex; align-items: center; gap: 6px; color: #059669; font-size: 12px; }
.editor-preview > header i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.editor-device { padding: 12px; border: 1px solid #e4e4e7; border-radius: 28px; background: #f4f4f5; }
.editor-preview .phone {
  position: relative;
  isolation: isolate;
  min-height: 650px;
  padding: 52px calc(10% + 30px) 36px;
  border: 0;
  border-radius: 20px;
  box-shadow: none;
}

.editor-preview .phone::before {
  position: absolute;
  z-index: 0;
  inset: 14px calc(10% + 4px);
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 24px;
  background: rgb(255 255 255 / 42%);
  box-shadow: 0 16px 38px rgb(0 0 0 / 18%);
  backdrop-filter: blur(22px);
  content: "";
}

.editor-preview .phone > * { position: relative; z-index: 1; }
.editor-preview .phone.theme-minimal-white::before { background: rgb(255 255 255 / 86%); }
.editor-preview .phone.theme-dark-tech::before { background: rgb(2 6 23 / 72%); }
.editor-preview .phone.theme-black-gold::before { background: rgb(0 0 0 / 58%); }
.editor-preview .mini-avatar { width: 80px; height: 80px; }
.editor-preview .phone h2 { font-size: 22px; font-weight: 700; }
.editor-preview .phone > p[hidden] + div { margin-top: 24px; }
.editor-preview .mini-link { min-height: 48px; border-radius: 15px; background: rgb(255 255 255 / 52%); box-shadow: 0 3px 10px rgb(0 0 0 / 8%); }
.editor-preview .mini-link > span { min-width: 0; flex: 1; font-size: 14px; font-weight: 600; }
.external-link-icon { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .62; }
.public-link .arrow { display: inline-flex; align-items: center; justify-content: center; }
.public-link .arrow .external-link-icon { width: 20px; height: 20px; }

.admin-dark .editor-card,
.admin-dark .editor-preview { border-color: #263149; background: #10182b; color: #f8fafc; }
.admin-dark .editor-form-grid label { color: #e2e8f0; }
.admin-dark .editor-upload { color: #e2e8f0; }
.admin-dark .editor-form-grid input,
.admin-dark .editor-form-grid textarea,
.admin-dark .editor-form-grid select { border-color: #334155; background: #0f172a; color: #f8fafc; }
.admin-dark .editor-device { border-color: #334155; background: #172033; }
.admin-dark .editor-upload-frame { border-color: #475569; background: #172033; color: #94a3b8; }
.admin-dark .editor-file-button { border-color: #334155; background: #0f172a; color: #f8fafc !important; }
.admin-dark .editor-file-button:hover { background: #172033; }
.admin-dark .editor-image-clear { color: #fff; }
.admin-dark .editor-image-clear:hover { background: transparent; color: #fff; }
.admin-dark .editor-links-card .link-editor { background: #10182b; }
.admin-dark .editor-links-card .link-editor .actions button { border-color: #334155; background: #0f172a; color: #cbd5e1; }
.admin-dark .editor-links-card .form-grid.compact { border-color: #334155; background: #172033; }

.dialog-open { overflow: hidden; }
.dashboard-dialog[hidden],
.dashboard-view-panel[hidden] { display: none; }

.dashboard-dialog {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgb(15 23 42 / 36%);
  backdrop-filter: blur(5px);
}

.dashboard-dialog-card {
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid #e4e4e7;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 28px 80px rgb(15 23 42 / 28%);
}

.dashboard-dialog-card > header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 26px;
  border-bottom: 1px solid #e4e4e7;
}

.dashboard-dialog-icon {
  display: flex;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #f0eaff;
  color: #6d28d9;
}

.dashboard-dialog-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-dialog-card header > div { min-width: 0; flex: 1; }
.dashboard-dialog-card h2 { overflow: hidden; margin: 0; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-dialog-card header p { margin: 6px 0 0; color: #71717a; font-size: 13px; }

.dashboard-dialog-close {
  display: flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #71717a;
}

.dashboard-dialog-close:hover { background: #f4f4f5; color: #18181b; }
.dashboard-dialog-close svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.dashboard-dialog-body {
  max-height: calc(100vh - 166px);
  overflow: auto;
  padding: 24px 26px 26px;
}

.dashboard-view-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #f4f4f5;
}

.dashboard-view-tabs button {
  display: flex;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #71717a;
  font-size: 14px;
  font-weight: 600;
}

.dashboard-view-tabs button.active { background: #fff; color: #18181b; box-shadow: 0 2px 6px rgb(0 0 0 / 10%); }
.dashboard-view-tabs svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.dashboard-view-panel { margin-top: 20px; }
.dashboard-table-wrap { overflow: hidden; border: 1px solid #e4e4e7; border-radius: 14px; }
.dashboard-table-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dashboard-table-wrap th { padding: 13px 18px; background: #f7f7f8; color: #71717a; font-weight: 500; text-align: left; }
.dashboard-table-wrap th:nth-child(n+2),
.dashboard-table-wrap td:nth-child(n+2) { text-align: right; }
.dashboard-table-wrap td { padding: 13px 18px; border-top: 1px solid #e4e4e7; }
.dashboard-table-wrap td:nth-child(n+2) { font-weight: 650; }

.dashboard-chart {
  height: 330px;
  padding: 18px;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
}

.dashboard-chart-legend { display: flex; justify-content: flex-end; gap: 18px; color: #71717a; font-size: 12px; }
.dashboard-chart-legend span { display: flex; align-items: center; gap: 6px; }
.dashboard-chart-legend i { width: 9px; height: 9px; border-radius: 50%; }
.legend-total { background: #7c3aed; }
.legend-unique { background: #0284c7; }

.dashboard-chart-grid {
  height: 255px;
  margin-top: 16px;
}

.dashboard-line-chart { display: block; width: 100%; height: 100%; overflow: visible; }
.dashboard-line-chart .chart-grid-lines { fill: none; stroke: #e4e4e7; stroke-width: 1; }
.dashboard-line-chart :is(.chart-total-line, .chart-unique-line) { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-line-chart .chart-total-line { stroke: #7c3aed; }
.dashboard-line-chart .chart-unique-line { stroke: #0284c7; }
.dashboard-line-chart .chart-total-point { fill: #7c3aed; }
.dashboard-line-chart .chart-unique-point { fill: #0284c7; }
.dashboard-line-chart .chart-date-labels { fill: #71717a; font-size: 11px; }
.dashboard-line-chart .chart-axis-labels { fill: #71717a; font-size: 11px; }

.admin-dark { background: #070b18; color: #f8fafc; }
.admin-dark .admin-sidebar,
.admin-dark .page-shell { background: #0b1020; }
.admin-dark .admin-sidebar { border-color: #263149; }
.admin-dark .admin-nav-link.active,
.admin-dark .admin-nav-link:hover,
.admin-dark .admin-logout:hover { background: #171f33; color: #f8fafc; }
.admin-dark .admin-sidebar-foot { border-color: #263149; }
.admin-dark .admin-theme-toggle,
.admin-dark .dashboard-card { border-color: #263149; background: #10182b; color: #f8fafc; }
.admin-dark .admin-theme-sun { display: none; }
.admin-dark .admin-theme-moon { display: block; }
.admin-dark .dashboard-create { background: #f8fafc; color: #111827; }
.admin-dark .dashboard-open { border-color: #334155; color: #e2e8f0; }
.admin-dark .dashboard-detail { border-color: #334155; background: #10182b; color: #e2e8f0; }
.admin-dark .dashboard-open:hover,
.admin-dark .dashboard-detail:hover { background: #172033; }
.admin-dark .dashboard-metrics .metric-violet { background: rgb(124 58 237 / 12%); }
.admin-dark .dashboard-metrics .metric-sky { background: rgb(2 132 199 / 12%); }
.admin-dark .pages-card { border-color: #263149; background: #10182b; color: #f8fafc; }
.admin-dark .pages-create { background: #f8fafc; color: #111827; }
.admin-dark .pages-actions a,
.admin-dark .pages-actions button { color: #94a3b8; }
.admin-dark .pages-actions a:hover,
.admin-dark .pages-actions button:hover { background: #172033; color: #f8fafc; }
.admin-dark .pages-actions button:hover { color: #f87171; }
.admin-dark .dashboard-dialog-card { border-color: #334155; background: #10182b; color: #f8fafc; }
.admin-dark .dashboard-dialog-card > header,
.admin-dark .dashboard-table-wrap td { border-color: #334155; }
.admin-dark .dashboard-view-tabs { background: #172033; }
.admin-dark .dashboard-view-tabs button.active { background: #263149; color: #f8fafc; }
.admin-dark .dashboard-table-wrap,
.admin-dark .dashboard-chart { border-color: #334155; }
.admin-dark .dashboard-line-chart .chart-grid-lines { stroke: #334155; }
.admin-dark .dashboard-table-wrap th { background: #172033; }
.admin-dark .dashboard-dialog-close:hover { background: #172033; color: #f8fafc; }

/* 深色模式：提高文字对比度 */
.admin-dark .admin-sidebar :is(strong, small, span, p),
.admin-dark .page-shell :is(h1, h2, h3, h4, p, label, strong, small, span, em, a, button):not(.phone *) {
  color: #f8fafc;
}
.admin-dark .admin-account-row p,
.admin-dark .admin-logout,
.admin-dark .dashboard-page-head > div > span,
.admin-dark .dashboard-card-title p,
.admin-dark .dashboard-metrics p,
.admin-dark .pages-head p,
.admin-dark .pages-card-copy p,
.admin-dark .settings-main > header p,
.admin-dark .settings-push > p,
.admin-dark .short-create > p,
.admin-dark .editor-card-intro,
.admin-dark .editor-card-head p,
.admin-dark .editor-form-grid label > small,
.admin-dark .editor-preview > header p {
  color: #cbd5e1;
}

/* 深色模式：带底色的小组件使用独立的高对比配色 */
.admin-dark .page-shell :is(.dashboard-avatar, .pages-avatar) {
  background: #282451;
  color: #c4b5fd;
  box-shadow: inset 0 0 0 1px rgb(167 139 250 / 10%);
}
.admin-dark .page-shell :is(.dashboard-status, .pages-status) {
  background: #263149;
  color: #cbd5e1;
}
.admin-dark .page-shell :is(.dashboard-status, .pages-status).published {
  background: #103a35;
  color: #6ee7b7;
  box-shadow: inset 0 0 0 1px rgb(52 211 153 / 10%);
}
.admin-dark .page-shell .dashboard-metrics p {
  color: #dbe4f0;
}
.admin-dark .page-shell .dashboard-card-title p,
.admin-dark .page-shell .pages-card-copy p {
  color: #cbd5e1;
}

/* 深色模式：创建主页紫蓝渐变按钮 */
.admin-dark :is(.dashboard-create, .pages-create) {
  border: 1px solid rgb(167 139 250 / 45%);
  background: linear-gradient(110deg, #7c3aed, #2563eb);
  color: #fff;
  box-shadow: 0 10px 28px rgb(59 130 246 / 22%), inset 0 1px rgb(255 255 255 / 18%);
  transition: transform 160ms, filter 160ms, box-shadow 160ms;
}
.admin-dark :is(.dashboard-create, .pages-create):hover {
  background: linear-gradient(110deg, #8b5cf6, #3b82f6);
  box-shadow: 0 13px 34px rgb(59 130 246 / 32%), inset 0 1px rgb(255 255 255 / 22%);
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* 深色模式：当前左侧菜单高亮特效 */
.admin-dark .admin-nav-link.active {
  position: relative;
  overflow: hidden;
  background: linear-gradient(110deg, rgb(91 33 182 / 52%), rgb(13 43 92 / 72%), rgb(30 64 175 / 48%));
  background-size: 220% 100%;
  color: #fff;
  box-shadow: inset 0 0 22px rgb(59 130 246 / 12%), 0 8px 24px rgb(37 99 235 / 12%);
  animation: admin-nav-active-flow 5s ease-in-out infinite alternate;
}
.admin-dark .admin-nav-link.active::before {
  position: absolute;
  inset: 6px auto 6px 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(#c084fc, #60a5fa);
  box-shadow: 0 0 12px #8b5cf6, 0 0 20px rgb(59 130 246 / 65%);
  content: "";
}
.admin-dark .admin-nav-link.active svg {
  filter: drop-shadow(0 0 6px rgb(147 197 253 / 45%));
}

@keyframes admin-nav-active-flow {
  to { background-position: 100% 0; }
}

/* 深色模式卡片流动渐变描边 */
.admin-dark :is(
  .dashboard-card,
  .pages-card,
  .settings-card,
  .short-create,
  .short-list,
  .short-stats,
  .editor-card,
  .editor-preview,
  .dashboard-dialog-card,
  .confirm-dialog-card
) {
  position: relative;
}
.admin-dark :is(
  .dashboard-card,
  .pages-card,
  .settings-card,
  .short-create,
  .short-list,
  .short-stats,
  .editor-card,
  .editor-preview,
  .dashboard-dialog-card,
  .confirm-dialog-card
)::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: -1px;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #0ea5e9, #2563eb, #06b6d4, #67e8f9, #22d3ee);
  background-size: 300% 100%;
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: admin-card-border-flow 4s linear infinite;
}

@keyframes admin-card-border-flow {
  to { background-position: 300% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-dark .admin-nav-link.active,
  .admin-dark :is(
    .dashboard-card,
    .pages-card,
    .settings-card,
    .short-create,
    .short-list,
    .short-stats,
    .editor-card,
    .editor-preview,
    .dashboard-dialog-card,
    .confirm-dialog-card
  )::before { animation: none; }
}

@media (max-width: 900px) {
  .admin-sidebar { position: static; width: 100%; min-height: auto; padding: 12px 16px; border-right: 0; border-bottom: 1px solid #e5e7eb; }
  .admin-brand { padding-bottom: 12px; }
  .admin-sidebar nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .admin-nav-link { justify-content: center; padding: 0 8px; font-size: 14px; }
  .admin-sidebar-foot { display: none; }
  .admin-shell .page-shell { margin-left: 0; }
  .dashboard-main { padding: 28px 20px; }
  .pages-main { padding: 28px 20px; }
  .editor-main { height: auto; min-height: 100vh; overflow: visible; padding: 28px 20px; }
  .editor-workspace { height: auto; grid-template-columns: 1fr; overflow: visible; }
  .editor-scroll { overflow: visible; padding-right: 0; }
  .editor-preview { max-height: none; overflow: visible; }
  .settings-main { padding: 28px 20px; }
  .settings-layout { grid-template-columns: 1fr; }
  .short-main { padding: 28px 20px; }
  .short-create form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .short-create-target { grid-column: 1 / -1; }
  .short-create form > button { width: 100%; }
  .short-list-head,
  .short-item { min-width: 980px; }
  .short-list { overflow-x: auto; overflow-y: hidden; }
  .short-chart-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .dashboard-page-head { align-items: flex-start; flex-direction: column; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-create { width: 100%; justify-content: center; }
  .pages-head { align-items: flex-start; flex-direction: column; }
  .pages-create { width: 100%; justify-content: center; }
}

@media (max-width: 520px) {
  .admin-brand { display: none; }
  .admin-nav-link { min-height: 44px; font-size: 13px; }
  .admin-nav-link svg { display: none; }
  .dashboard-main { padding: 24px 14px; }
  .pages-main { padding: 24px 14px; }
  .editor-main { padding: 24px 14px; }
  .dashboard-page-head h1 { font-size: 27px; }
  .dashboard-metrics { grid-template-columns: 1fr; }
  .pages-card { align-items: flex-start; flex-wrap: wrap; padding: 16px; }
  .pages-actions { width: 100%; justify-content: flex-end; padding-left: 66px; }
  .editor-form-grid { grid-template-columns: 1fr; }
  .editor-form-grid .full { grid-column: auto; }
  .editor-card { padding: 18px; }
  .editor-card-head { align-items: stretch; flex-direction: column; }
  .editor-add-link { width: 100%; }
  .settings-main { padding: 24px 14px; }
  .short-main { padding: 24px 14px; }
  .short-create,
  .short-list,
  .short-stats { padding: 18px; }
  .short-create form { grid-template-columns: 1fr; }
  .short-create-target { grid-column: auto; }
  .settings-inline,
  .settings-password { grid-template-columns: 1fr; }
  .settings-push { grid-template-columns: 1fr; }
  .settings-push > button { justify-self: start; margin-top: 12px; }
  .dashboard-dialog { padding: 12px; }
  .dashboard-dialog-card { max-height: calc(100vh - 24px); border-radius: 20px; }
  .dashboard-dialog-card > header { padding: 18px; }
  .dashboard-dialog-card h2 { font-size: 17px; }
  .dashboard-dialog-body { max-height: calc(100vh - 130px); padding: 18px; }
  .dashboard-table-wrap th,
  .dashboard-table-wrap td { padding: 12px; }
}

.confirm-dialog[hidden] { display: none; }
.confirm-dialog { position: fixed; z-index: 200; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgb(15 23 42 / 40%); backdrop-filter: blur(6px); }
.confirm-dialog-card { width: min(450px, 100%); padding: 28px; border: 1px solid #e4e4e7; border-radius: 24px; background: #fff; box-shadow: 0 28px 80px rgb(15 23 42 / 28%); }
.confirm-dialog-card > header { display: flex; align-items: center; gap: 16px; }
.confirm-dialog-icon { display: flex; width: 48px; height: 48px; flex: 0 0 auto; align-items: center; justify-content: center; border: 1px solid #fecdd3; border-radius: 18px; background: #fff1f2; color: #e11d48; }
.confirm-dialog-icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.confirm-dialog-card h2 { margin: 0; color: #0f172a; font-size: 22px; }
.confirm-dialog-message { margin: 20px 0 24px; padding: 17px 18px; border: 1px solid #e2e8f0; border-radius: 16px; background: #f8fafc; color: #475569; font-size: 15px; }
.confirm-dialog-message strong { color: #0f172a; font-weight: 600; }
.confirm-dialog-card > footer { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.confirm-dialog-card > footer button { display: flex; min-height: 46px; align-items: center; justify-content: center; gap: 8px; border: 1px solid #cbd5e1; border-radius: 14px; background: #fff; color: #334155; font-size: 15px; font-weight: 500; }
.confirm-dialog-card > footer button[data-confirm-submit] { border-color: transparent; background: linear-gradient(110deg,#e11d48,#ef4444); color: #fff; box-shadow: 0 10px 22px rgb(225 29 72 / 18%); }
.confirm-dialog-card > footer svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.confirm-dialog-card > footer button:hover { filter: brightness(.98); }

@media (max-width: 520px) {
  .confirm-dialog-card { padding: 22px; border-radius: 20px; }
  .confirm-dialog-card > footer { grid-template-columns: 1fr; }
}

/* Public profile parity with the original centered glass layout. */
.public-page { padding: 38px 21px; align-items: center; justify-content: center; }
.profile-card { min-height: 580px; padding: 34px 28px 28px; border-radius: 28px; background: rgb(255 255 255 / 42%); backdrop-filter: blur(22px); }
.public-avatar { width: 88px; height: 88px; }
.profile-card h1 { font-size: 24px; }
.description { margin: 8px 0 0; line-height: 1.6; }
.public-links { gap: 14px; }
.public-link { min-height: 62px; padding: 10px 14px; background: rgb(255 255 255 / 55%); }
.public-link strong { font-weight: 700; }
.public-icon { width: 40px; height: 40px; }

@media (max-width: 600px) {
  .public-page { padding: 12px 17px; }
  .profile-card { min-height: calc(100vh - 24px); padding: 28px 20px; }
}
