:root {
  --bg: #f5f1e8;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(24, 37, 44, 0.12);
  --ink: #15252b;
  --ink-soft: #52636c;
  --accent: #0f8b8d;
  --accent-soft: #bfe9e4;
  --warn: #d97706;
  --danger: #b42318;
  --shadow: 0 18px 60px rgba(21, 37, 43, 0.11);
  --radius: 24px;
  --mono: "SFMono-Regular", "Menlo", "Monaco", monospace;
  --sans: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at top left, rgba(15, 139, 141, 0.22), transparent 34%),
    radial-gradient(circle at bottom right, rgba(217, 119, 6, 0.18), transparent 30%),
    linear-gradient(180deg, #f8f4ec 0%, #ede7dd 100%);
}

body {
  position: relative;
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(42px);
  opacity: 0.34;
}

.ambient-left {
  top: -8rem;
  left: -6rem;
  background: rgba(15, 139, 141, 0.32);
}

.ambient-right {
  right: -7rem;
  bottom: -8rem;
  background: rgba(217, 119, 6, 0.28);
}

.layout,
.login-layout,
.admin-layout {
  position: relative;
  z-index: 1;
}

.layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 56px;
}

.hero,
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}

.hero h1,
.admin-topbar h2,
.login-brand h1,
.side-brand h1 {
  margin: 10px 0 12px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-copy,
.panel-copy,
.login-brand p {
  max-width: 56rem;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.eyebrow {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid rgba(15, 139, 141, 0.24);
  border-radius: 999px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.6);
}

.hero-side,
.side-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.status-pill,
.panel-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  color: var(--ink-soft);
}

.status-pill[data-tone="warn"] .status-dot {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 0 0 6px rgba(217, 119, 6, 0.14);
}

.status-pill[data-tone="danger"] .status-dot {
  background: linear-gradient(180deg, #ef4444 0%, #b42318 100%);
  box-shadow: 0 0 0 6px rgba(180, 35, 24, 0.14);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #14b8a6 0%, #0f8b8d 100%);
  box-shadow: 0 0 0 6px rgba(15, 139, 141, 0.14);
}

.ghost-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

body.page-public .public-entry-links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 30px;
  margin-top: 6px;
  align-items: center;
}

body.page-public .public-entry-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  min-width: 156px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid rgba(21, 37, 43, 0.16);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(21, 37, 43, 0.08);
  cursor: pointer;
  box-sizing: border-box;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body.page-public .public-entry-link:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 139, 141, 0.34);
  box-shadow: 0 14px 30px rgba(21, 37, 43, 0.12);
}

.feedback-line {
  --feedback-accent: #22c55e;
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 80;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(360px, calc(100vw - 36px));
  min-height: 64px;
  padding: 14px 14px 16px 16px;
  border: 1px solid color-mix(in srgb, var(--feedback-accent) 26%, rgba(21, 37, 43, 0.1));
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 18px 42px rgba(21, 37, 43, 0.16);
  backdrop-filter: blur(18px);
  line-height: 1.45;
  overflow: hidden;
}

.feedback-line[hidden] {
  display: none !important;
}

.feedback-line[data-tone="loading"] {
  --feedback-accent: #14b8a6;
}

.feedback-line[data-tone="ok"] {
  --feedback-accent: #22c55e;
}

.feedback-line[data-tone="warn"] {
  --feedback-accent: #f59e0b;
}

.feedback-line[data-tone="danger"] {
  --feedback-accent: #ef4444;
}

.feedback-line::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--feedback-accent);
  transform-origin: left center;
}

.feedback-line[data-progress="true"]::after {
  animation: feedback-progress-decay var(--feedback-duration, 15s) linear forwards;
}

.feedback-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 2px solid color-mix(in srgb, var(--feedback-accent) 84%, white);
  border-radius: 999px;
  color: var(--feedback-accent);
  font-weight: 800;
  font-size: 16px;
}

.feedback-message {
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.feedback-close {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: rgba(82, 99, 108, 0.74);
  background: transparent;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

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

@keyframes feedback-progress-decay {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

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

.metric-card,
.panel,
.login-card,
.side-rail {
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 22px;
}

.metric-label {
  display: block;
  margin-bottom: 16px;
  color: var(--ink-soft);
  font-size: 14px;
}

.metric-value {
  display: block;
  font-size: clamp(2rem, 2vw + 1rem, 3rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.metric-value.compact {
  font-size: 1.25rem;
  line-height: 1.4;
}

.metric-meta {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}

.section-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
}

.sync-overview-grid,
.sync-task-grid,
.sync-settings-grid {
  display: grid;
  gap: 18px;
}

.sync-overview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sync-task-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sync-settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  padding: 24px;
}

.wide-panel {
  grid-column: span 1;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.panel-subcopy {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

.compact-copy {
  margin-top: 12px;
}

.nested-head {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(21, 37, 43, 0.08);
}

.panel-tag.subtle {
  background: rgba(21, 37, 43, 0.04);
}

.sync-overview-card,
.sync-task-card {
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(21, 37, 43, 0.08);
}

.sync-task-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sync-task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sync-task-head h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.sync-task-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

.sync-task-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(21, 37, 43, 0.06);
  color: var(--ink-soft);
}

.sync-task-badge::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(82, 99, 108, 0.72);
  box-shadow: 0 0 0 5px rgba(82, 99, 108, 0.12);
}

.sync-task-badge.success {
  color: var(--accent);
  background: rgba(15, 139, 141, 0.12);
}

.sync-task-badge.success::before {
  background: #0f8b8d;
  box-shadow: 0 0 0 5px rgba(15, 139, 141, 0.14);
}

.sync-task-badge.failure {
  color: var(--danger);
  background: rgba(180, 35, 24, 0.12);
}

.sync-task-badge.failure::before {
  background: #b42318;
  box-shadow: 0 0 0 5px rgba(180, 35, 24, 0.14);
}

.sync-task-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sync-task-metrics div {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(21, 37, 43, 0.05);
}

.sync-task-metrics span {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
  margin-bottom: 6px;
}

.sync-task-metrics strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.5;
}

.compact-field-block span {
  font-size: 13px;
}

.window-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.usage-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.usage-row strong {
  display: block;
  margin-top: 6px;
  font-size: 1.3rem;
}

.usage-bar {
  width: min(100%, 800px);
  height: 12px;
  border-radius: 999px;
  background: rgba(21, 37, 43, 0.08);
  overflow: hidden
}

.usage-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #2dd4bf 0%, #0f8b8d 100%);
  transition: width 0.28s ease, background 0.28s ease;
}

.usage-fill.warn {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.usage-fill[data-tone="ok"] {
  background: linear-gradient(90deg, #34d399 0%, #0f8b8d 100%);
}

.usage-fill[data-tone="warn"] {
  background: linear-gradient(90deg, #fbbf24 0%, #d97706 100%);
}

.usage-fill[data-tone="danger"] {
  background: linear-gradient(90deg, #fb7185 0%, #b42318 100%);
}

.notice {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(21, 37, 43, 0.05);
}

.notice strong {
  display: block;
  margin-bottom: 6px;
}

.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 420px;
  gap: 24px;
  align-items: center;
  padding: 32px;
}

.login-brand {
  padding: 28px;
}

.login-card {
  padding: 28px;
}

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

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

.field span {
  color: var(--ink-soft);
  font-size: 14px;
}

.field-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
}

.field-inline input[type="checkbox"] {
  width: auto;
  margin: 0;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea,
.toolbar-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(21, 37, 43, 0.12);
  border-radius: 16px;
  background: var(--panel-strong);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

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

.single-column-grid {
  grid-template-columns: minmax(0, 1fr);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.button:disabled,
.mini-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.button-icon {
  display: inline-flex;
  width: 18px;
  justify-content: center;
  font-size: 16px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: currentColor;
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.button.primary {
  color: white;
  background: linear-gradient(135deg, #0f8b8d 0%, #125f6d 100%);
}

.button.secondary {
  color: var(--ink);
  background: rgba(21, 37, 43, 0.08);
}

.button.ghost {
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid rgba(21, 37, 43, 0.12);
}

.side-footer-link {
  text-decoration: none;
}

.form-error,
.form-ok {
  margin: 12px 0 0;
  font-size: 14px;
}

.form-error {
  color: var(--danger);
}

.form-ok {
  color: var(--accent);
}

.admin-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  min-height: 100vh;
  padding: 22px;
  align-items: start;
}

.side-rail {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  position: sticky;
  top: 22px;
  max-height: calc(100vh - 44px);
}

.side-brand h1 {
  font-size: 2rem;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-item {
  text-align: left;
  padding: 14px 16px;
  border-radius: 18px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.nav-item.active {
  color: var(--ink);
  background: rgba(21, 37, 43, 0.08);
  font-weight: 700;
}

.admin-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.toolbar {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}

.compact-toolbar {
  justify-content: space-between;
  margin-bottom: 14px;
}

.carousel-actions {
  display: inline-flex;
  gap: 8px;
}

.toolbar.wrap,
.meta-row,
.pager,
.window-switch,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.meta-row,
.pager {
  justify-content: space-between;
  margin: 14px 0 0;
}

.toolbar-input {
  max-width: 340px;
}

.compact-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 14px;
}

.compact-field select {
  padding: 10px 12px;
  border: 1px solid rgba(21, 37, 43, 0.12);
  border-radius: 12px;
  background: var(--panel-strong);
}

.table-wrap {
  overflow: auto;
}

.table-wrap-scroll {
  max-height: min(58vh, 760px);
  overflow-y: auto;
  padding-right: 4px;
}

#codingplan-table-wrap,
#accounts-table-wrap {
  max-height: min(62vh, 820px);
}

.table-wrap-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-wrap-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(21, 37, 43, 0.16);
}

.table-wrap-scroll::-webkit-scrollbar-track {
  background: rgba(21, 37, 43, 0.05);
  border-radius: 999px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(21, 37, 43, 0.08);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: var(--ink-soft);
  font-weight: 600;
}

td code {
  font-family: var(--mono);
}

.log-message-cell {
  max-width: 0;
  white-space: normal;
  word-break: break-word;
}

.inline-input {
  max-width: 110px;
  padding: 10px 12px;
  border-radius: 12px;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 0;
  background: rgba(15, 139, 141, 0.12);
  color: var(--accent);
  cursor: pointer;
  font-weight: 700;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(21, 37, 43, 0.08);
}

.status-chip.danger {
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
}

.window-chip,
.button.mini {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(21, 37, 43, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-soft);
  cursor: pointer;
}

.window-chip.active {
  background: rgba(15, 139, 141, 0.14);
  color: var(--accent);
  border-color: rgba(15, 139, 141, 0.18);
  font-weight: 700;
}

.notice.compact {
  margin-top: 0;
}

.warn-strong {
  border: 1px solid rgba(217, 119, 6, 0.22);
  background: rgba(217, 119, 6, 0.1);
}

.registration-grid {
  margin-bottom: 18px;
}

.registration-panel {
  padding: 24px;
}

.public-view[hidden] {
  display: none !important;
}

.registration-shell {
  padding: 24px;
  margin-bottom: 18px;
}

.user-entry-rail {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
}

.user-entry-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.page-user-entry .user-entry-page-layout {
  width: min(1420px, calc(100vw - 44px));
  margin: 0 auto;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  align-items: start;
}

.page-user-entry .user-entry-rail {
  width: 100%;
  max-width: 280px;
  top: 22px;
  max-height: calc(100vh - 44px);
  min-height: 0;
}

.page-user-entry .user-entry-main {
  min-width: 0;
}

.page-user-entry .registration-tab-panel {
  padding: 24px;
}

.registration-shell-head {
  align-items: flex-start;
}

.registration-shell-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
}

.registration-tab-panel {
  margin-top: 0;
}

.registration-tab-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field-wide {
  grid-column: 1 / -1;
}

.result-box {
  white-space: pre-wrap;
  line-height: 1.7;
}

.nav-link {
  display: block;
  text-decoration: none;
}

.side-nav .nav-link {
  color: var(--ink-soft);
}

.side-nav .nav-link:hover {
  color: var(--ink);
  background: rgba(21, 37, 43, 0.05);
}

.compact-head {
  margin-bottom: 0;
}

.slim-table-wrap {
  max-height: 320px;
}

.temporary-table .selection-col {
  width: 44px;
}

.temporary-table .selection-cell {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  padding-left: 10px;
  padding-right: 8px;
  text-align: center;
}

.temporary-table .selection-cell input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.temporary-code {
  display: inline-block;
  max-width: 100%;
  font-family: var(--mono);
  font-size: 12px;
  word-break: break-all;
}

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

.temporary-locked-row td {
  background: rgba(217, 119, 6, 0.04);
}

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

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(21, 37, 43, 0.08);
  font-size: 13px;
  color: var(--ink-soft);
}

.chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 5px rgba(21, 37, 43, 0.06);
}

.chart-legend-dot.token {
  background: linear-gradient(180deg, #14b8a6 0%, #0f8b8d 100%);
}

.chart-legend-dot.concurrency {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.chart-wrap {
  border-radius: 22px;
  padding: 16px 18px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(247, 246, 242, 0.92) 100%);
  border: 1px solid rgba(21, 37, 43, 0.08);
  overflow: hidden;
}

.chart-wrap[data-chart-density="portrait"] {
  padding: 10px 10px 8px;
}

.chart-wrap[data-chart-density="portrait-split"] {
  padding: 10px 10px 8px;
}

.chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  color: var(--ink-soft);
  font-size: 15px;
}

.chart-caption {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.chart-caption.compact {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
}

.trend-mobile-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.trend-mobile-panel {
  padding: 10px 10px 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(21, 37, 43, 0.08);
  min-width: 0;
  overflow: hidden;
}

.trend-mobile-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 12px;
}

.trend-mobile-panel-head strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.trend-chart {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  min-width: 0;
}

.trend-grid-line {
  stroke: rgba(21, 37, 43, 0.1);
  stroke-width: 1;
}

.trend-grid-line.vertical {
  stroke: rgba(21, 37, 43, 0.08);
}

.trend-tick-line {
  stroke: rgba(21, 37, 43, 0.12);
  stroke-width: 1;
}

.trend-axis-label {
  fill: rgba(82, 99, 108, 0.9);
  font-size: 11px;
}

.chart-wrap[data-chart-density="portrait"] .trend-axis-label,
.chart-wrap[data-chart-density="portrait-split"] .trend-axis-label {
  font-size: 10px;
}

.trend-axis-label.left {
  text-anchor: end;
}

.trend-axis-label.right {
  text-anchor: start;
}

.trend-axis-label.bottom {
  text-anchor: middle;
}

.trend-axis-title {
  fill: rgba(82, 99, 108, 0.9);
  font-size: 12px;
  font-weight: 700;
}

.trend-axis-title.right {
  text-anchor: end;
}

.trend-area {
  stroke: none;
  display: none;
}

.trend-area.token {
  fill: rgba(15, 139, 141, 0.12);
}

.trend-area.concurrency {
  fill: rgba(217, 119, 6, 0.1);
}

.trend-line {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-wrap[data-chart-density="portrait"] .trend-line,
.chart-wrap[data-chart-density="portrait-split"] .trend-line {
  stroke-width: 2.8;
}

.trend-line.token,
.trend-point.token,
.trend-line.token-primary,
.trend-point.token-primary {
  stroke: #3b82f6;
}

.trend-line.token-secondary,
.trend-point.token-secondary {
  stroke: #10b981;
}

.trend-line.concurrency,
.trend-point.concurrency {
  stroke: #14b8a6;
}

.trend-point {
  fill: rgba(255, 255, 255, 0.92);
  stroke-width: 2.5;
}

.trend-point.latest {
  fill: rgba(255, 255, 255, 1);
  stroke-width: 3;
}

.card-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-gutter: stable both-edges;
  padding-bottom: 4px;
}

.compact-carousel {
  margin-top: 12px;
  grid-auto-columns: minmax(188px, 188px);
  gap: 10px;
}

.card-carousel::-webkit-scrollbar {
  height: 10px;
}

.card-carousel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(21, 37, 43, 0.16);
}

.card-carousel::-webkit-scrollbar-track {
  background: rgba(21, 37, 43, 0.05);
  border-radius: 999px;
}

.card-carousel-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  color: var(--ink-soft);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px dashed rgba(21, 37, 43, 0.12);
}

.codingplan-groups {
  display: grid;
  gap: 16px;
  margin-top: 12px;
  width: 100%;
  min-width: 0;
}

#admin-panel-overview > .wide-panel + .wide-panel {
  margin-top: 10px;
}

.codingplan-group-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(21, 37, 43, 0.08);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.codingplan-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.codingplan-group-head h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.policy-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.policy-row,
.key-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.policy-row {
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(21, 37, 43, 0.08);
}

.policy-name {
  font-weight: 700;
}

.policy-row select {
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(21, 37, 43, 0.12);
  background: var(--panel-strong);
  color: var(--ink);
}

.key-toolbar {
  align-items: stretch;
}

.key-form {
  flex: 1;
}

.key-form .toolbar-input {
  flex: 1;
  min-width: 240px;
}

.status-slide-card {
  scroll-snap-align: start;
  min-height: 112px;
  padding: 12px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(245, 244, 239, 0.94) 100%);
  border: 1px solid rgba(21, 37, 43, 0.08);
  box-shadow: 0 10px 22px rgba(21, 37, 43, 0.06);
}

.status-slide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  min-width: 0;
}

.status-slide-head strong {
  font-size: 0.92rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-slide-head .status-chip {
  flex: 0 0 auto;
}

.status-slide-meta {
  color: var(--ink-soft);
  font-size: 11px;
  margin-bottom: 10px;
}

.status-slide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.status-slide-cell {
  padding: 8px;
  border-radius: 10px;
  background: rgba(21, 37, 43, 0.05);
}

.status-slide-cell span {
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
  margin-bottom: 4px;
}

.status-slide-cell strong {
  font-size: 0.92rem;
}

.tag-cloud-filter {
  gap: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(21, 37, 43, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 13px;
}

.filter-chip.active {
  background: rgba(15, 139, 141, 0.14);
  border-color: rgba(15, 139, 141, 0.18);
  color: var(--accent);
  font-weight: 700;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.status-chip.warn {
  background: rgba(217, 119, 6, 0.14);
  color: var(--warn);
}

.status-chip.ok {
  background: rgba(15, 139, 141, 0.14);
  color: var(--accent);
}

@media (max-width: 980px) {

  .metric-grid,
  .panel-grid,
  .login-layout,
  .admin-layout,
  .split-grid,
  .sync-overview-grid,
  .sync-task-grid,
  .sync-settings-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .admin-topbar,
  .toolbar,
  .usage-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero-side,
  .side-footer {
    align-items: flex-start;
  }

  .compact-toolbar,
  .chart-meta {
    justify-content: flex-start;
  }

  .side-rail {
    position: static;
    max-height: none;
  }

  body.page-public .public-entry-links {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .layout,
  .admin-layout,
  .login-layout {
    padding: 16px;
  }

  .panel,
  .metric-card,
  .side-rail,
  .sync-overview-card,
  .sync-task-card {
    padding: 18px;
    border-radius: 20px;
  }

  .hero h1,
  .admin-topbar h2,
  .login-brand h1,
  .side-brand h1 {
    margin: 8px 0 10px;
    line-height: 1.04;
  }

  .chart-wrap {
    padding: 12px 12px 10px;
    border-radius: 18px;
  }

  .chart-empty {
    min-height: 240px;
    font-size: 14px;
  }

  .chart-caption {
    line-height: 1.6;
  }

  .trend-mobile-panel {
    padding: 8px 8px 4px;
  }

  .trend-mobile-panel-head {
    margin-bottom: 6px;
  }

  .trend-mobile-panel-head strong {
    font-size: 16px;
  }

  .sync-task-head,
  .sync-task-metrics,
  .meta-row,
  .pager {
    grid-template-columns: 1fr;
    display: grid;
  }

  .toolbar-input {
    max-width: none;
  }

  .feedback-line {
    left: 14px;
    right: 14px;
    top: 14px;
    width: auto;
    min-width: 0;
    max-width: none;
  }

  .card-carousel {
    grid-auto-columns: minmax(180px, 84vw);
  }

  .codingplan-group-head,
  .policy-row,
  .key-form {
    flex-direction: column;
    align-items: flex-start;
  }

  .policy-row select,
  .key-form .toolbar-input {
    width: 100%;
    min-width: 0;
  }
}

/* 当前三张静态模板的兼容样式 */
.app-shell {
  min-height: 100vh;
  color: #f4f8ff;
  font-family: "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(79, 199, 251, 0.16), transparent 34%),
    radial-gradient(circle at 82% 10%, rgba(104, 224, 184, 0.12), transparent 22%),
    linear-gradient(160deg, #07101c 0%, #0b1524 48%, #0d1a2f 100%);
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
  opacity: 0.28;
}

.app-shell .shell-backdrop,
.app-shell .shell-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.app-shell .shell-backdrop {
  background:
    radial-gradient(circle at 20% 20%, rgba(129, 215, 255, 0.12), transparent 24%),
    radial-gradient(circle at 80% 0%, rgba(242, 200, 111, 0.08), transparent 18%);
}

.app-shell .shell-noise {
  opacity: 0.12;
  background-image:
    linear-gradient(135deg, transparent 0, transparent 48%, rgba(255, 255, 255, 0.16) 49%, transparent 50%),
    linear-gradient(45deg, transparent 0, transparent 48%, rgba(255, 255, 255, 0.12) 49%, transparent 50%);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 82%, transparent);
}

.app-shell .page-frame {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.app-shell .topbar,
.app-shell .section-head,
.app-shell .status-line,
.app-shell .topbar-actions,
.app-shell .action-row,
.app-shell .line-item,
.app-shell .quota-meta,
.app-shell .user-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-shell .topbar {
  margin-bottom: 24px;
}

.app-shell .dashboard-topbar {
  align-items: flex-start;
}

.app-shell .brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.app-shell .brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f4f8ff;
  background: linear-gradient(180deg, rgba(129, 215, 255, 0.2), rgba(129, 215, 255, 0.06));
  border: 1px solid rgba(129, 215, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.app-shell .eyebrow {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8ea2c5;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.app-shell h1,
.app-shell h2,
.app-shell h3,
.app-shell p {
  margin: 0;
}

.app-shell h1 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.app-shell h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.app-shell h3 {
  font-size: 1.1rem;
}

.app-shell .ghost-link,
.app-shell .primary-button,
.app-shell .secondary-button,
.app-shell .mini-button {
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.app-shell .ghost-link,
.app-shell .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 999px;
  color: #f4f8ff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.app-shell .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  color: #04121e;
  background: linear-gradient(180deg, #9ce7ff 0%, #4fc7fb 100%);
  box-shadow: 0 14px 34px rgba(47, 178, 244, 0.28);
}

.app-shell .ghost-link:hover,
.app-shell .secondary-button:hover,
.app-shell .primary-button:hover,
.app-shell .mini-button:hover {
  transform: translateY(-1px);
}

.app-shell .primary-button[disabled],
.app-shell .secondary-button[disabled],
.app-shell .mini-button[disabled] {
  opacity: 0.72;
  cursor: wait;
}

.app-shell .panel-card,
.app-shell .hero-card,
.app-shell .hero-stat {
  border: 1px solid rgba(169, 194, 233, 0.14);
  background: linear-gradient(180deg, rgba(17, 30, 49, 0.9), rgba(10, 19, 32, 0.85));
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.app-shell .hero-card {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px;
  padding: 28px;
  border-radius: 28px;
  margin-bottom: 24px;
  overflow: hidden;
  position: relative;
}

.app-shell .hero-card::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(129, 215, 255, 0.18), transparent 68%);
}

.app-shell .hero-copy,
.app-shell .hero-stack,
.app-shell .quota-grid,
.app-shell .feature-stack,
.app-shell .stack-list,
.app-shell .stack-form,
.app-shell .list-rows,
.app-shell .bullet-stack,
.app-shell .list-meta,
.app-shell .list-progress {
  display: grid;
  gap: 14px;
}

.app-shell .hero-description,
.app-shell .form-hint,
.app-shell .empty-copy,
.app-shell .table-sub,
.app-shell .list-row small,
.app-shell .metric-card span,
.app-shell .hero-stat small,
.app-shell .muted-tag {
  color: #6b7e9f;
}

.app-shell .notice-box,
.app-shell .quota-box,
.app-shell .feature-stack article,
.app-shell .list-row,
.app-shell .log-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.app-shell .notice-title {
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #81d7ff;
}

.app-shell .hero-stat {
  padding: 18px 20px;
}

.app-shell .hero-stat strong,
.app-shell .metric-card strong {
  display: block;
  margin: 10px 0 6px;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.1;
}

.app-shell .panel-label,
.app-shell .line-item span,
.app-shell .field-group span,
.app-shell .search-box span,
.app-shell .hero-stat span {
  display: block;
  font-size: 0.85rem;
  color: #8ea2c5;
}

.app-shell .status-pill,
.app-shell .muted-tag,
.app-shell .table-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  border: 1px solid rgba(169, 194, 233, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #f4f8ff;
}

.app-shell .status-pill.good,
.app-shell .table-badge.good {
  color: #68e0b8;
  border-color: rgba(104, 224, 184, 0.2);
  background: rgba(104, 224, 184, 0.08);
}

.app-shell .status-pill.warn,
.app-shell .table-badge.warn {
  color: #f2c86f;
  border-color: rgba(242, 200, 111, 0.2);
  background: rgba(242, 200, 111, 0.08);
}

.app-shell .status-pill.error,
.app-shell .table-badge.error {
  color: #ff8b96;
  border-color: rgba(255, 139, 150, 0.2);
  background: rgba(255, 139, 150, 0.08);
}

.app-shell .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f2c86f;
  box-shadow: 0 0 0 6px rgba(242, 200, 111, 0.16);
}

.app-shell .status-dot.ok {
  background: #68e0b8;
  box-shadow: 0 0 0 6px rgba(104, 224, 184, 0.16);
}

.app-shell .status-dot.error {
  background: #ff8b96;
  box-shadow: 0 0 0 6px rgba(255, 139, 150, 0.14);
}

.app-shell .card-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}

.app-shell .metrics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.app-shell .split-grid,
.app-shell .dashboard-grid,
.app-shell .stack-form.two-columns,
.app-shell .quota-grid,
.app-shell .login-frame {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-shell .panel-card,
.app-shell .login-hero,
.app-shell .login-panel {
  padding: 22px;
}

.app-shell .login-frame {
  min-height: 100vh;
  display: grid;
  align-items: center;
  gap: 22px;
}

.app-shell .field-group,
.app-shell .search-box {
  display: grid;
  gap: 8px;
}

.app-shell .field-group.wide,
.app-shell .action-row.wide {
  grid-column: 1 / -1;
}

.app-shell input,
.app-shell textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(6, 12, 22, 0.62);
  color: #f4f8ff;
  padding: 13px 14px;
  outline: none;
}

.app-shell input:focus,
.app-shell textarea:focus {
  border-color: rgba(129, 215, 255, 0.4);
  background: rgba(10, 18, 31, 0.8);
}

.app-shell .checkbox-row,
.app-shell .table-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #8ea2c5;
}

.app-shell .checkbox-row input,
.app-shell .table-switch input {
  width: 18px;
  height: 18px;
  accent-color: #2fb2f4;
}

.app-shell .search-box {
  min-width: min(320px, 100%);
}

.app-shell .table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}

.app-shell .data-table {
  width: 100%;
  min-width: 740px;
  border-collapse: collapse;
}

.app-shell .data-table th,
.app-shell .data-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.app-shell .data-table th {
  font-size: 0.82rem;
  color: #8ea2c5;
  font-weight: 600;
}

.app-shell .empty-cell {
  text-align: center;
  color: #6b7e9f;
}

.app-shell .table-id {
  display: grid;
  gap: 4px;
}

.app-shell .progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin: 14px 0 10px;
}

.app-shell .progress-bar i {
  display: block;
  height: 100%;
  width: 12%;
  border-radius: inherit;
  background: linear-gradient(90deg, #68e0b8, #81d7ff 65%, #f2c86f);
}

.app-shell .list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-shell .table-number {
  width: 104px;
  min-width: 104px;
}

.app-shell .mini-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #f4f8ff;
}

.app-shell .footer-strip {
  padding: 0 6px;
  color: #6b7e9f;
}

@media (max-width: 1180px) {

  .app-shell .metrics-grid,
  .app-shell .split-grid,
  .app-shell .dashboard-grid,
  .app-shell .login-frame,
  .app-shell .stack-form.two-columns,
  .app-shell .quota-grid,
  .app-shell .hero-card {
    grid-template-columns: 1fr;
  }

  .app-shell .topbar,
  .app-shell .dashboard-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .app-shell .topbar-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .app-shell .page-frame {
    width: min(100vw - 18px, 100%);
    padding: 18px 0 36px;
  }

  .app-shell .hero-card,
  .app-shell .panel-card,
  .app-shell .login-hero,
  .app-shell .login-panel {
    padding: 18px;
    border-radius: 18px;
  }

  .app-shell .brand {
    align-items: flex-start;
  }

  .app-shell .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .app-shell .hero-stat strong,
  .app-shell .metric-card strong {
    font-size: 1.7rem;
  }

  .app-shell .table-wrap {
    margin-left: -6px;
    margin-right: -6px;
  }

  .app-shell .search-box {
    min-width: 100%;
  }
}
