:root {
  --bg: #f4f7fb;
  --bg-soft: #edf3fb;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --surface-muted: #f8fbff;
  --text: #142033;
  --text-soft: #5d6b80;
  --border: rgba(139, 157, 185, 0.24);
  --border-strong: rgba(79, 103, 140, 0.22);
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: rgba(15, 118, 110, 0.1);
  --accent-soft-strong: rgba(15, 118, 110, 0.16);
  --danger: #b42318;
  --danger-soft: #fff2f0;
  --warning: #b54708;
  --warning-soft: #fff7ed;
  --shadow: 0 24px 60px rgba(18, 32, 51, 0.08);
  --shadow-soft: 0 12px 32px rgba(18, 32, 51, 0.06);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 34%),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at top, rgba(0, 0, 0, 0.7), transparent 75%);
  opacity: 0.55;
}

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

button {
  appearance: none;
}

input,
select,
button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.section-anchor {
  scroll-margin-top: 6rem;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(248, 251, 255, 0.78);
  border-bottom: 1px solid rgba(139, 157, 185, 0.16);
}

.site-nav__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.9rem 1.4rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.site-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
}

.site-nav__mark {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #0f766e, #0ea5a4);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.22);
}

.site-nav__brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.site-nav__brand-copy strong {
  font-size: 0.98rem;
  line-height: 1.1;
}

.site-nav__brand-copy small {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.site-nav__links {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.site-nav__link,
.site-nav__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.site-nav__link {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--accent-strong);
  background: rgba(15, 118, 110, 0.08);
  outline: none;
}

.site-nav__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.site-nav__user {
  display: inline-flex;
  align-items: center;
  padding: 0.52rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(139, 157, 185, 0.16);
  color: var(--text-soft);
  font-size: 0.82rem;
  white-space: nowrap;
}

.site-nav__form {
  margin: 0;
}

.site-nav__action {
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent), #0d9488);
  color: #fff;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 14px 24px rgba(15, 118, 110, 0.16);
}

.site-nav__action:hover,
.site-nav__action:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.site-nav__action--ghost {
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent-strong);
  border-color: rgba(15, 118, 110, 0.16);
  box-shadow: none;
}

.main-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.75rem 1.4rem 3rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.95fr);
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.hero__content,
.hero__aside {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(139, 157, 185, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero__content {
  padding: 2rem;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.14), transparent 28%),
    radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.12), transparent 26%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.98));
}

.hero__aside {
  background: linear-gradient(180deg, rgba(21, 94, 89, 0.98), rgba(15, 118, 110, 0.96));
  color: rgba(255, 255, 255, 0.94);
}

.hero__eyebrow,
.status-panel__eyebrow {
  margin: 0 0 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.hero__title {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(2.05rem, 4.6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero__text {
  margin: 1rem 0 0;
  max-width: 58ch;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.75;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.4rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(15, 118, 110, 0.12);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.hero-panel {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 1.7rem;
}

.hero-panel__title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.hero-steps {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.8rem;
  line-height: 1.65;
}

.card {
  margin-bottom: 1.5rem;
  background: var(--surface);
  border: 1px solid rgba(139, 157, 185, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.45rem 1.55rem 1rem;
}

.card__title {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.2;
}

.card__meta {
  margin: 0.45rem 0 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.65;
}

.card__meta code {
  padding: 0.12rem 0.42rem;
  background: rgba(15, 118, 110, 0.08);
  border-radius: 0.4rem;
  color: var(--accent-strong);
}

.card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.card__badge--soft {
  background: rgba(59, 130, 246, 0.08);
  color: #1d4ed8;
}

.card__body {
  padding: 0 1.55rem 1.55rem;
}

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

.field,
.checkbox-field,
.actions,
.compare-blocks,
.field--full {
  min-width: 0;
}

.field--full,
.checkbox-field,
.compare-blocks,
.actions {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.field input[type="text"],
.field select {
  width: 100%;
  min-height: 3rem;
  padding: 0.74rem 0.95rem;
  border: 1px solid rgba(139, 157, 185, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field input[type="text"]::placeholder {
  color: rgba(93, 107, 128, 0.76);
}

.field input[type="text"]:focus,
.field select:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
  background: #fff;
}

.field-note,
.field-hint,
.actions__hint,
.history-empty {
  margin: 0.45rem 0 0;
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.65;
}

.file-field input[type="file"] {
  width: 100%;
  padding: 0.75rem 0;
  color: var(--text-soft);
}

.file-field input[type="file"]::file-selector-button {
  margin-right: 0.8rem;
  padding: 0.68rem 0.95rem;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 0.85rem;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent-strong);
  font-weight: 700;
  cursor: pointer;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: rgba(15, 118, 110, 0.05);
  border: 1px solid rgba(15, 118, 110, 0.1);
}

.checkbox-field input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.checkbox-field label {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.compare-blocks {
  display: grid;
  gap: 1rem;
}

.compare-blocks[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compare-blocks[data-count="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compare-blocks[data-count="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compare-blocks[data-count="5"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.store-block {
  padding: 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(139, 157, 185, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.9));
  box-shadow: var(--shadow-soft);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.store-block:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.18);
}

.store-block.is-main {
  border-color: rgba(15, 118, 110, 0.4);
  box-shadow: 0 18px 36px rgba(15, 118, 110, 0.12);
}

.store-block__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
}

.store-block__eyebrow {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.store-block__title {
  margin: 0.3rem 0 0;
  font-size: 1.02rem;
}

.store-block__count {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.68rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.store-block__hint,
.store-block__files {
  margin: 0.8rem 0 0;
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.6;
}

.store-block__files {
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(139, 157, 185, 0.22);
  word-break: break-all;
}

.actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.2rem;
}

.btn,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.78rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #0d9488);
  box-shadow: 0 18px 30px rgba(15, 118, 110, 0.2);
}

.btn:hover,
.btn:focus-visible,
.btn-secondary:hover,
.btn-secondary:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  border: 1px solid rgba(139, 157, 185, 0.22);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
}

.btn .spinner {
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.72s linear infinite;
}

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

.status-panel {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(139, 157, 185, 0.18);
  background: rgba(248, 251, 255, 0.88);
}

.status-panel--idle {
  border-color: rgba(139, 157, 185, 0.18);
}

.status-panel--loading {
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.96));
  border-color: rgba(15, 118, 110, 0.18);
}

.status-panel--success {
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.1), rgba(255, 255, 255, 0.96));
  border-color: rgba(15, 118, 110, 0.24);
}

.status-panel--error {
  background: var(--danger-soft);
  border-color: rgba(180, 35, 24, 0.18);
}

.status-panel--info {
  background: var(--warning-soft);
  border-color: rgba(181, 71, 8, 0.18);
}

.status-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.status-panel__title {
  margin: 0;
  font-size: 1.05rem;
}

.status-panel__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(139, 157, 185, 0.18);
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-panel__text {
  margin: 0.85rem 0 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.status-panel__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.history-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.history-toolbar__search {
  flex: 1 1 320px;
}

.history-toolbar__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.history-empty {
  margin-top: 1rem;
}

.history-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.history-list__item {
  margin: 0;
}

.history-card {
  display: block;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(139, 157, 185, 0.18);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.history-card:hover,
.history-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.22);
  box-shadow: 0 18px 34px rgba(18, 32, 51, 0.08);
  outline: none;
}

.history-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.history-card__title {
  display: block;
  font-size: 1rem;
  line-height: 1.45;
}

.history-card__meta {
  margin: 0.35rem 0 0;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.history-card__arrow {
  flex-shrink: 0;
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 700;
}

.history-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.history-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.history-tag--main {
  background: rgba(29, 78, 216, 0.1);
  color: #1d4ed8;
}

.site-footer {
  padding: 0 1.4rem 2.4rem;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.84rem;
}

@media (max-width: 1040px) {
  .site-nav__inner {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .site-nav__links,
  .site-nav__right {
    justify-content: flex-start;
  }

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

@media (max-width: 820px) {
  .main-wrap {
    padding-inline: 1rem;
  }

  .card__head,
  .card__body,
  .hero__content,
  .hero-panel {
    padding-inline: 1.2rem;
  }

  .form-grid,
  .compare-blocks {
    grid-template-columns: 1fr;
  }

  .status-panel__header,
  .history-card__head,
  .actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .site-nav__inner,
  .main-wrap,
  .site-footer {
    padding-inline: 0.9rem;
  }

  .hero__title {
    max-width: none;
  }

  .hero__chips,
  .status-panel__actions,
  .history-toolbar__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .btn-secondary,
  .site-nav__action {
    width: 100%;
  }

  .site-nav__right {
    width: 100%;
  }

  .site-nav__user {
    white-space: normal;
  }
}

auth-shell,
.auth-shell {
  max-width: 1180px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 2rem 1.4rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 460px);
  gap: 1.4rem;
  align-items: center;
}

.auth-page {
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.16), transparent 32%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.12), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

.auth-hero,
.auth-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(139, 157, 185, 0.18);
  box-shadow: var(--shadow);
}

.auth-hero {
  padding: 2.2rem;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.98));
}

.auth-hero__eyebrow,
.auth-card__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.auth-hero__title {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.auth-hero__text,
.auth-card__text,
.auth-card__hint {
  color: var(--text-soft);
  line-height: 1.7;
}

.auth-hero__text {
  max-width: 52ch;
  margin: 1rem 0 0;
}

.auth-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.4rem;
}

.auth-card-wrap {
  display: flex;
  justify-content: flex-end;
}

.auth-card {
  width: 100%;
  padding: 1.8rem;
  background: rgba(255, 255, 255, 0.96);
}

.auth-card__title {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
}

.auth-card__text {
  margin: 0.7rem 0 1.2rem;
}

.auth-card .field + .field {
  margin-top: 1rem;
}

.auth-card__submit {
  width: 100%;
  margin-top: 1.35rem;
}

.auth-card__hint {
  margin: 1rem 0 0;
  font-size: 0.84rem;
}

.auth-alert {
  margin-bottom: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  border: 1px solid rgba(180, 35, 24, 0.16);
  color: var(--danger);
  font-size: 0.9rem;
  line-height: 1.6;
}

@media (max-width: 920px) {
  .auth-shell {
    grid-template-columns: 1fr;
    padding-top: 1.4rem;
    padding-bottom: 1.8rem;
  }

  .auth-card-wrap {
    justify-content: stretch;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    padding-inline: 1rem;
  }

  .auth-hero,
  .auth-card {
    padding: 1.3rem;
  }

  .auth-hero__title {
    max-width: none;
  }
}
