:root {
  --bg-deep: #070b14;
  --bg-panel: #0d1524;
  --bg-elevated: #121c2e;
  --bg-hover: #182338;
  --line: rgba(94, 234, 212, 0.16);
  --line-strong: rgba(56, 189, 248, 0.35);
  --text: #e8eef9;
  --text-muted: #8b9bb8;
  --accent: #22d3ee;
  --accent-2: #38bdf8;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --success: #34d399;
  --danger: #fb7185;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body, #app {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(34, 211, 238, 0.14), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(56, 189, 248, 0.12), transparent 50%),
    linear-gradient(180deg, #0a101c 0%, var(--bg-deep) 40%, #05080f 100%);
}

a { color: var(--accent); text-decoration: none; }
button, input, textarea, select { font: inherit; }

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  background: rgba(7, 11, 20, 0.72);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.35);
}
.brand small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: 0.2s ease;
  color: var(--text);
  background: var(--bg-elevated);
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.28);
  font-weight: 600;
}
.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
  font-weight: 600;
}
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text-muted);
}
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.field label { font-size: 13px; color: var(--text-muted); }
.input, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(8, 14, 26, 0.85);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus, .textarea:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}
.textarea { min-height: 180px; resize: vertical; line-height: 1.6; }

.card {
  background: linear-gradient(180deg, rgba(18, 28, 46, 0.95), rgba(10, 16, 28, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card {
  width: min(420px, 100%);
  padding: 32px 28px;
}
.auth-card h1 {
  margin: 0 0 8px;
  font-size: 26px;
}
.auth-card p {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 14px;
}
.auth-foot {
  margin-top: 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99;
  padding: 12px 16px;
  border-radius: 12px;
  background: #102033;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  max-width: 360px;
}

.workflow-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  padding: 20px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.step-rail {
  padding: 22px 18px;
  height: fit-content;
  position: sticky;
  top: 80px;
}
.step-rail h2 {
  margin: 0;
  font-size: 22px;
}
.step-rail .desc {
  margin: 8px 0 18px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}
.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.step-list::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, rgba(34,211,238,.5), rgba(34,211,238,.05));
}
.step-item {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 12px 12px 8px;
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 6px;
  color: var(--text-muted);
  transition: 0.2s;
}
.step-item:hover { background: var(--bg-hover); color: var(--text); }
.step-item.active {
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid rgba(34, 211, 238, 0.25);
}
.step-item.locked { opacity: 0.45; cursor: not-allowed; }
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
  background: #0b1220;
  border: 1px solid var(--line);
  z-index: 1;
}
.step-item.active .step-num {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #041018;
  border-color: transparent;
}
.step-item.done .step-num {
  background: rgba(52, 211, 153, 0.2);
  border-color: rgba(52, 211, 153, 0.5);
  color: var(--success);
}
.step-title { font-size: 14px; font-weight: 600; }
.step-icon { font-size: 16px; opacity: 0.9; }

.panel {
  padding: 24px;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.panel-head h1 {
  margin: 0;
  font-size: 24px;
}
.panel-body { flex: 1; }
.panel-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  margin-right: 8px;
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.upload-box {
  border: 1px dashed rgba(34, 211, 238, 0.35);
  border-radius: 14px;
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  background: rgba(34, 211, 238, 0.04);
  cursor: pointer;
  transition: 0.2s;
}
.upload-box:hover {
  border-color: var(--accent);
  color: var(--text);
}
.hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
}
.chip.active {
  color: #06202a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  font-weight: 600;
}
.placeholder-box {
  min-height: 320px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  text-align: center;
  padding: 40px;
}
.placeholder-box strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  margin-bottom: 8px;
}

@media (max-width: 960px) {
  .workflow-layout {
    grid-template-columns: 1fr;
  }
  .step-rail { position: static; }
}
