:root {
  --bg: #f5f5f7;
  --bg-warm: #fbfaf8;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --surface-2: #f3f4f6;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --muted-soft: #94a3b8;
  --line: rgba(15, 23, 42, 0.09);
  --line-strong: rgba(15, 23, 42, 0.16);
  --primary: #b42318;
  --primary-dark: #7f1d1d;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --warning: #b45309;
  --success: #15803d;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.07);
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(circle at 20% 8%, rgba(180, 35, 24, 0.12), transparent 26rem),
    radial-gradient(circle at 82% 0%, rgba(37, 99, 235, 0.11), transparent 30rem),
    linear-gradient(180deg, var(--bg-warm) 0%, var(--bg) 48%, #ffffff 100%);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0));
  mask-image: linear-gradient(to bottom, black, transparent 62%);
}

a {
  color: inherit;
}

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

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(24px) saturate(170%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(145deg, #111827, #334155);
  color: #fff;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 24px rgba(15, 23, 42, 0.18);
}

.brand-text {
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.site-nav,
.hero-actions,
.form-actions,
.status-row,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.site-nav a,
.nav-button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease), opacity 180ms var(--ease);
  touch-action: manipulation;
}

.site-nav a,
.nav-button {
  color: var(--text);
  background: transparent;
}

.site-nav form {
  margin: 0;
}

.site-nav a:hover,
.nav-button:hover {
  background: rgba(15, 23, 42, 0.05);
  transform: translateY(-1px);
}

.site-nav a.nav-primary:hover {
  border-color: rgba(180, 35, 24, 0.86);
  background: linear-gradient(180deg, #c9342a, var(--primary));
  color: #fff;
}

.nav-primary,
.button.primary {
  border-color: rgba(180, 35, 24, 0.86);
  background: linear-gradient(180deg, #c9342a, var(--primary));
  color: #fff;
  box-shadow: 0 14px 28px rgba(180, 35, 24, 0.22);
}

.button.secondary {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.button.danger {
  border-color: rgba(180, 35, 24, 0.18);
  background: rgba(180, 35, 24, 0.06);
  color: var(--primary-dark);
  box-shadow: none;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.button:active,
.site-nav a:active,
.nav-button:active {
  transform: translateY(0) scale(0.98);
}

.button:disabled,
.nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
  box-shadow: none;
}

.button.is-loading .button-label::after {
  content: "";
  display: inline-block;
  width: 1.1em;
  text-align: left;
  animation: loadingEllipsis 1.1s steps(4, end) infinite;
}

@keyframes loadingEllipsis {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75%, 100% { content: "..."; }
}

.hero-section,
.content-section,
.workspace-page,
.dashboard-page {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 42px;
  align-items: center;
  min-height: calc(100dvh - 92px);
  padding: 74px 0 86px;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.section-title h2,
.split-section h2,
.workspace-header h1,
.page-heading h1 {
  margin: 12px 0 0;
  color: var(--ink);
  font-weight: 760;
  letter-spacing: -0.055em;
}

.hero-content h1 {
  max-width: 820px;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.94;
}

.hero-lede,
.workspace-header p,
.page-heading p {
  max-width: 720px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.72;
}

.hero-console,
.generator-card,
.table-card,
.auth-card,
.settings-card,
.detail-list,
.code-block,
.stat-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(150%);
}

.hero-console {
  overflow: hidden;
}

.hero-status-card {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  padding: 30px;
}

.status-orb {
  position: absolute;
  top: -72px;
  right: -66px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 35, 24, 0.3), rgba(180, 35, 24, 0.1) 42%, transparent 72%);
  animation: gentlePulse 4.8s var(--ease) infinite;
}

.console-header {
  display: none;
}

.console-header span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}

.console-header span:first-child {
  background: var(--primary);
}

.console-body {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 370px;
  padding: 0;
}

.console-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.console-body strong {
  display: block;
  margin: 10px 0 28px;
  font-size: clamp(56px, 6vw, 82px);
  letter-spacing: -0.06em;
}

.console-body dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.console-body dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.console-body dt,
.console-body dd {
  margin: 0;
}

.console-body dt {
  color: var(--muted);
}

.console-body dd {
  font-weight: 800;
}

.content-section {
  padding: 68px 0;
}

.section-title {
  max-width: 740px;
  margin-bottom: 28px;
}

.section-title h2,
.split-section h2,
.workspace-header h1,
.page-heading h1 {
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: 1.05;
}

.feature-grid,
.process-list,
.metric-grid,
.stat-grid {
  display: grid;
  gap: 16px;
}

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

.feature-grid article,
.process-list li,
.metric-grid article {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.feature-grid article {
  min-height: 220px;
  padding: 24px;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}

.feature-grid article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.feature-grid span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
}

.feature-grid h3 {
  margin: 28px 0 10px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.feature-grid p,
.process-list span,
.field small {
  color: var(--muted);
  line-height: 1.72;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.68fr) minmax(0, 1.32fr);
  gap: 34px;
  align-items: start;
}

.process-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-list li {
  padding: 22px;
}

.process-list strong,
.process-list span {
  display: block;
}

.process-list strong {
  margin-bottom: 8px;
}

.workspace-page {
  padding: 48px 0 72px;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-end;
  margin-bottom: 24px;
}

.status-row span,
.meta-pills span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.generator-layout {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.generator-card {
  padding: 24px;
}

.input-card {
  position: sticky;
  top: 104px;
}

.card-heading {
  margin-bottom: 18px;
}

.card-heading h2 {
  margin: 8px 0 0;
  font-size: 26px;
  letter-spacing: -0.035em;
}

.field,
.stack-form label,
.settings-card label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--text);
  font-weight: 700;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}

textarea {
  min-height: 250px;
  padding: 16px;
  resize: vertical;
  line-height: 1.65;
}

input,
select {
  min-height: 46px;
  padding: 0 14px;
}

input[type="file"] {
  padding: 10px;
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(37, 99, 235, 0.45);
  background: #fff;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.1);
}

textarea:focus-visible,
input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.32);
  outline-offset: 3px;
}

.status-text,
.image-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.status-text.is-busy,
.image-status.is-busy {
  color: var(--accent-dark);
  font-weight: 760;
}

.result-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.loading-indicator {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: var(--radius-pill);
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 850;
}

.loading-indicator::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.68), transparent);
  animation: shimmer 1.4s var(--ease) infinite;
}

.loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: dotPulse 1.2s var(--ease) infinite;
}

.empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 430px;
  padding: 36px;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(248, 250, 252, 0.64));
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  font-size: 22px;
}

.awaiting-card {
  position: relative;
  overflow: hidden;
}

.awaiting-card::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22), rgba(37, 99, 235, 0.08) 45%, transparent 72%);
  animation: gentlePulse 4.6s var(--ease) infinite;
}

.awaiting-card > * {
  position: relative;
}

.dish-summary {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.7));
}

.dish-summary > span,
.image-panel span,
.recipe-head span,
.metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.dish-summary h2 {
  margin: 8px 0 12px;
  font-size: clamp(28px, 4vw, 44px);
}

.metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.metric-grid article {
  min-width: 0;
  padding: 16px;
}

.metric-grid strong {
  display: block;
  margin-top: 8px;
  line-height: 1.55;
  word-break: break-word;
}

.image-panel,
.recipe-output {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.image-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 16px;
}

.image-panel .image-status,
.image-panel .image-preview,
.image-panel .image-prompt {
  grid-column: 1 / -1;
}

.image-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.image-preview img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
}

.image-prompt,
.code-block,
.recipe-output pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.image-prompt {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
}

.recipe-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.recipe-output pre {
  margin: 0;
  padding: 20px;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.85;
}

.auth-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-shell {
  width: min(460px, 100%);
}

.auth-card {
  margin-top: 20px;
  padding: 30px;
}

.auth-card h1 {
  margin: 10px 0 22px;
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.form-error {
  padding: 10px 12px;
  border: 1px solid rgba(159, 47, 34, 0.24);
  border-radius: 10px;
  background: rgba(159, 47, 34, 0.08);
  color: var(--primary-dark);
  font-weight: 750;
}

.stack-form .check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 16px;
  color: var(--text);
  font-weight: 650;
}

.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.form-footnote {
  color: var(--muted);
}

.dashboard-page {
  padding: 32px 0 64px;
}

.account-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.account-hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.account-identity-card,
.account-summary-grid article,
.history-panel,
.history-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(150%);
}

.account-identity-card {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  padding: 28px;
  border-radius: var(--radius-lg);
}

.account-identity-card::after {
  content: "";
  position: absolute;
  right: -72px;
  bottom: -86px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 35, 24, 0.18), rgba(37, 99, 235, 0.08) 48%, transparent 72%);
}

.account-identity-card > * {
  position: relative;
  z-index: 1;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 24px 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 24px;
  background: linear-gradient(145deg, #111827, #334155);
  color: #fff;
  font-size: 30px;
  font-weight: 850;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.account-identity-card h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.account-identity-card p {
  max-width: 560px;
  color: var(--text);
  line-height: 1.72;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.account-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.account-summary-grid article {
  display: grid;
  align-content: space-between;
  min-height: 160px;
  padding: 20px;
  border-radius: 24px;
}

.account-summary-grid span,
.history-meta span:first-child,
.history-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.account-summary-grid strong {
  display: block;
  margin: 12px 0 8px;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.04em;
}

.account-summary-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.history-panel {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.history-toolbar .button {
  flex: 0 0 auto;
}

.history-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.34fr);
  gap: 18px;
  padding: 18px;
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.history-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
}

.history-card.is-error {
  border-color: rgba(180, 35, 24, 0.18);
}

.history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.history-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.history-card-main p {
  margin: 0;
  color: var(--text);
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.history-facts {
  display: grid;
  gap: 10px;
  align-content: start;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.7);
}

.history-facts div {
  display: grid;
  gap: 4px;
}

.history-facts dd {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.account-empty-state {
  margin: 18px;
  min-height: 320px;
}

.page-heading {
  margin-bottom: 20px;
}

.table-card {
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.82);
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.58;
}

.data-table td {
  max-width: 360px;
  overflow-wrap: anywhere;
}

.data-table th {
  color: var(--muted);
  background: rgba(248, 250, 252, 0.86);
  font-size: 13px;
  font-weight: 800;
}

.data-table tbody tr:hover td {
  background: rgba(37, 99, 235, 0.035);
}

.admin-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 24px;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.admin-body {
  background:
    radial-gradient(circle at 14% 8%, rgba(180, 35, 24, 0.13), transparent 28rem),
    radial-gradient(circle at 86% 4%, rgba(37, 99, 235, 0.13), transparent 30rem),
    linear-gradient(180deg, var(--bg) 0%, #ffffff 100%);
}

.admin-sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: calc(100dvh - 48px);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(150%);
}

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

.admin-sidebar nav a {
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
  font-weight: 720;
  transition: background 160ms var(--ease), transform 160ms var(--ease);
}

.admin-sidebar nav a:hover {
  background: rgba(15, 23, 42, 0.05);
  transform: translateX(2px);
}

.admin-sidebar form {
  margin-top: auto;
}

.admin-main {
  min-width: 0;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 20px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(150%);
}

.admin-topbar h1 {
  margin: 8px 0 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.12;
}

.topbar-status,
.settings-strip,
.card-toolbar,
.filter-bar,
.create-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.topbar-status span,
.settings-strip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

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

.admin-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 16px;
}

.stat-grid article {
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
}

.stat-grid span {
  color: var(--muted);
  font-weight: 850;
}

.stat-grid strong {
  display: block;
  margin-top: 10px;
  font-size: 36px;
}

.inline-action {
  margin-bottom: 18px;
}

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

.api-overview-grid {
  grid-template-columns: minmax(320px, 0.82fr) minmax(360px, 1.18fr);
  align-items: stretch;
}

.api-provider-forms {
  grid-template-columns: minmax(360px, 1.08fr) minmax(320px, 0.92fr);
  align-items: start;
}

.api-control-card,
.provider-summary-card,
.provider-table-card,
.api-log-card {
  margin-bottom: 18px;
}

.admin-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.provider-summary-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

.admin-panel h2,
.card-toolbar h2 {
  margin: 0;
  font-size: 20px;
}

.admin-panel h2 {
  margin-bottom: 14px;
}

.filter-bar,
.create-row {
  margin-bottom: 12px;
}

.filter-bar input,
.filter-bar select {
  flex: 1 1 180px;
  width: auto;
  min-width: min(180px, 100%);
  max-width: 100%;
}

.create-row input,
.create-row select {
  width: auto;
  min-width: 180px;
}

.card-toolbar {
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.card-toolbar > div {
  display: grid;
  gap: 4px;
}

.card-toolbar p,
.card-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.card-toolbar a {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.detail-list {
  display: grid;
  grid-template-columns: minmax(96px, 0.34fr) minmax(0, 0.66fr);
  gap: 12px 16px;
  padding: 18px;
  border-radius: 20px;
  box-shadow: none;
}

.provider-summary-card .detail-list {
  margin: 0;
  background: rgba(248, 250, 252, 0.76);
}

.detail-list dt {
  color: var(--muted);
  font-weight: 850;
}

.detail-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-weight: 650;
}

.code-block {
  padding: 18px;
  color: var(--text);
}

.action-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

.action-panel form {
  display: flex;
  gap: 10px;
}

.settings-card {
  display: grid;
  gap: 14px;
  max-width: none;
  padding: 22px;
}

.settings-card h2,
.admin-panel h2 {
  letter-spacing: -0.02em;
}

.settings-card label {
  margin-bottom: 0;
}

.settings-card input,
.settings-card select,
.settings-card textarea {
  margin-top: 2px;
}

.wide-card {
  max-width: 920px;
}

.wide-settings {
  max-width: 760px;
}

.notice {
  margin-bottom: 16px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-weight: 800;
}

.notice.ok {
  border-color: rgba(31, 107, 82, 0.26);
  color: var(--accent-dark);
}

.notice.bad {
  border-color: rgba(159, 47, 34, 0.26);
  color: var(--primary-dark);
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 16px 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.68);
}

.filter-bar input,
.filter-bar select,
.settings-card textarea {
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 10px 12px;
  font: inherit;
}

.inline-actions,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.table-actions .button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.inline-actions form,
.table-actions form {
  margin: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge.ok {
  border-color: rgba(21, 128, 61, 0.16);
  background: #e8f7ee;
  color: #17633a;
}

.status-badge.off {
  border-color: rgba(100, 116, 139, 0.16);
  background: #f1f5f9;
  color: #475569;
}

.status-badge.bad {
  border-color: rgba(180, 35, 24, 0.16);
  background: #fff0f0;
  color: #9d2525;
}

.mono-cell {
  color: #1e293b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  word-break: break-all;
}
  background: #fff8f8;
}

.row-slow td {
  border-bottom-color: #f0c36d;
}

.settings-strip {
  margin-top: 16px;
}

.hidden {
  display: none !important;
}

@keyframes gentlePulse {
  0%, 100% {
    opacity: 0.72;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes dotPulse {
  0%, 100% {
    opacity: 0.72;
    transform: scale(0.86);
    box-shadow: 0 0 0 0 rgba(29, 78, 216, 0.28);
  }
  50% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(29, 78, 216, 0);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 980px) {
  .hero-section,
  .split-section,
  .generator-layout,
  .admin-layout,
  .admin-grid,
  .api-overview-grid,
  .api-provider-forms,
  .account-hero,
  .history-card {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .process-list,
  .metric-grid,
  .stat-grid,
  .admin-stats,
  .account-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-header,
  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .input-card,
  .admin-sidebar {
    position: static;
    height: auto;
  }

  .site-header {
    top: 8px;
  }
}

@media (max-width: 680px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    border-radius: 26px;
    margin-top: 12px;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav a,
  .nav-button,
  .button {
    min-height: 44px;
  }

  .hero-section {
    min-height: auto;
    padding-top: 40px;
    padding-bottom: 56px;
  }

  .hero-content h1 {
    font-size: 44px;
  }

  .feature-grid,
  .process-list,
  .metric-grid,
  .stat-grid,
  .admin-stats,
  .account-summary-grid {
    grid-template-columns: 1fr;
  }

  .hero-status-card,
  .generator-card,
  .auth-card,
  .admin-topbar,
  .admin-sidebar {
    border-radius: 24px;
  }

  .image-panel {
    grid-template-columns: 1fr;
  }

  .data-table {
    min-width: 720px;
  }

  .provider-table-card .data-table,
  .api-log-card .data-table {
    min-width: 860px;
  }

  .table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .settings-card,
  .admin-panel {
    padding: 18px;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .account-page {
    width: min(100% - 24px, 1180px);
  }

  .account-identity-card,
  .history-panel {
    border-radius: 24px;
  }

  .history-list {
    padding: 12px;
  }

  .history-card {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .button:hover,
  .feature-grid article:hover,
  .site-nav a:hover,
  .nav-button:hover,
  .admin-sidebar nav a:hover {
    transform: none;
  }

  .status-orb,
  .awaiting-card::before {
    animation: none;
    transform: none;
  }
}
