:root {
  color-scheme: dark;
  font-family: "Aptos Display", "Microsoft YaHei UI", "PingFang SC", "Segoe UI", sans-serif;
  --bg: #0d1110;
  --panel: rgba(20, 27, 24, 0.78);
  --panel-strong: rgba(25, 34, 29, 0.92);
  --line: rgba(205, 255, 224, 0.14);
  --text: #f3f8ef;
  --muted: #a7b8aa;
  --green: #a7ff83;
  --lime: #d7ff3f;
  --amber: #ffcf5a;
  --rose: #ff8a8a;
  --blue: #9ed7ff;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 14% 8%, rgba(167, 255, 131, 0.22), transparent 30%),
    radial-gradient(circle at 88% 4%, rgba(158, 215, 255, 0.18), transparent 28%),
    linear-gradient(135deg, #0d1110 0%, #111813 42%, #07100d 100%);
  color: var(--text);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 82%);
}

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

button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green), var(--lime));
  color: #11170f;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(167, 255, 131, 0.18);
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 5, 0.42);
  color: var(--text);
  padding: 12px 13px;
}

textarea {
  resize: vertical;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(167, 255, 131, 0.62);
  box-shadow: 0 0 0 4px rgba(167, 255, 131, 0.1);
}

label {
  display: grid;
  gap: 8px;
  color: #eaf5e7;
  font-size: 13px;
  font-weight: 850;
}

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

h1 {
  font-size: clamp(24px, 3vw, 38px);
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 18px;
}

p {
  color: var(--muted);
  line-height: 1.58;
}

.is-hidden {
  display: none !important;
}

.login-view {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}

.login-card,
.panel,
.topbar,
.hero {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-card {
  display: grid;
  gap: 18px;
  width: min(460px, 100%);
  padding: 34px;
  border-radius: 28px;
}

.brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: #e9ffd6;
  color: #10170d;
  font-weight: 1000;
  letter-spacing: -0.08em;
}

.brand-mark.small {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.eyebrow {
  color: var(--green);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.muted,
.hint {
  color: var(--muted);
}

.hint[data-type="ok"] {
  color: var(--green);
}

.hint[data-type="warn"],
.error {
  color: var(--amber);
}

.app {
  display: grid;
  gap: 18px;
  min-height: 100vh;
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 24px;
}

.topbar > div,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ghost-button,
.danger-button,
.mini-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.danger-button {
  border-color: rgba(255, 138, 138, 0.34);
  color: #ffd1d1;
}

.badge,
.status-dot {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.badge.ok,
.status-dot.ok {
  border-color: rgba(167, 255, 131, 0.36);
  background: rgba(167, 255, 131, 0.11);
  color: var(--green);
}

.badge.warn,
.status-dot.warn {
  border-color: rgba(255, 207, 90, 0.36);
  background: rgba(255, 207, 90, 0.12);
  color: var(--amber);
}

.status-dot.optional {
  border-color: rgba(158, 215, 255, 0.34);
  background: rgba(158, 215, 255, 0.11);
  color: var(--blue);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  gap: 20px;
  padding: clamp(18px, 3vw, 26px);
  border-radius: 30px;
  overflow: hidden;
}

.hero h2 {
  margin: 6px 0 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.quick-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  align-content: center;
}

.quick-steps div {
  display: grid;
  gap: 8px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  padding: 14px;
}

.quick-steps strong {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: var(--green);
  color: #0f170d;
}

.quick-steps span {
  color: #f8fff2;
  font-weight: 900;
}

.layout {
  display: grid;
  grid-template-columns: minmax(300px, 370px) minmax(0, 1fr) minmax(230px, 280px);
  gap: 18px;
  align-items: start;
}

.panel {
  border-radius: 26px;
  padding: 18px;
}

.creator,
.history-panel {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 18px;
}

.workspace {
  display: grid;
  gap: 18px;
}

.section-title {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.section-title.with-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.source-preview {
  display: grid;
  min-height: 128px;
  place-items: center;
  border: 1px dashed rgba(205, 255, 224, 0.26);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.source-preview img {
  width: 100%;
  max-height: 190px;
  object-fit: contain;
}

.source-preview .mini-button {
  position: absolute;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.service-card {
  display: grid;
  gap: 8px;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
}

.service-card span {
  color: var(--amber);
  font-size: 11px;
  font-weight: 950;
}

.service-card.is-ready span {
  color: var(--green);
}

.service-card strong {
  color: #ffffff;
}

.service-card p {
  font-size: 12px;
}

.asset-strip {
  display: flex;
  gap: 12px;
  min-height: 72px;
  margin-bottom: 14px;
  overflow-x: auto;
}

.asset-card {
  display: grid;
  grid-template-columns: 74px minmax(120px, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 230px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  padding: 8px;
  color: var(--text);
  text-decoration: none;
}

.asset-card img {
  width: 74px;
  height: 74px;
  border-radius: 14px;
  object-fit: cover;
}

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

.pipeline {
  display: grid;
  gap: 12px;
}

.stage-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 260px;
  gap: 14px;
  align-items: center;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.025);
  padding: 16px;
}

.stage-card h3 {
  margin: 0 0 6px;
}

.stage-head {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.stage-head strong {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  background: rgba(167, 255, 131, 0.13);
  color: var(--green);
  font-size: 20px;
}

.stage-note {
  min-height: 0;
  color: #dfeadd;
  font-size: 13px;
}

.stage-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: auto;
}

.job-list {
  display: grid;
  gap: 10px;
}

.job-item {
  display: grid;
  gap: 6px;
  min-height: auto;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 13px;
  text-align: left;
}

.job-item.is-active {
  border-color: rgba(167, 255, 131, 0.46);
  background: rgba(167, 255, 131, 0.1);
}

.job-item span {
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  display: grid;
  min-height: 120px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

.starter-card {
  display: grid;
  gap: 8px;
  min-height: 180px;
  align-content: center;
  border: 1px dashed var(--line);
  border-radius: 20px;
  padding: 24px;
}

.starter-card strong {
  font-size: 24px;
}

.status-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

.status-panel summary::-webkit-details-marker {
  display: none;
}

.status-panel summary span {
  display: grid;
  gap: 4px;
}

.status-panel summary em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.roadmap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.roadmap div {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
}

.roadmap span {
  color: var(--muted);
  line-height: 1.5;
}

.site-footer {
  padding: 12px 0 4px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .creator,
  .history-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .app {
    padding: 12px;
  }

  .topbar,
  .hero,
  .topbar > div,
  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .service-grid,
  .pipeline,
  .roadmap,
  .two,
  .quick-steps,
  .stage-card {
    grid-template-columns: 1fr;
  }
}
