:root {
  color-scheme: dark;
  --bg: #0a111d;
  --panel: rgba(15, 24, 38, 0.78);
  --panel-strong: rgba(16, 27, 44, 0.92);
  --field: rgba(8, 15, 27, 0.76);
  --text: #f2f7fb;
  --muted: #98a9b8;
  --line: rgba(170, 197, 218, 0.18);
  --line-strong: rgba(116, 203, 229, 0.34);
  --cyan: #67e8f9;
  --blue: #60a5fa;
  --violet: #a78bfa;
  --green: #34d399;
  --danger: #fb7185;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background:
    radial-gradient(circle at 20% 4%, rgba(103, 232, 249, 0.16), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(167, 139, 250, 0.13), transparent 28%),
    linear-gradient(135deg, #0a111d 0%, #101827 46%, #0b1422 100%);
  color: var(--text);
  overflow-x: hidden;
}

.ambient-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(170, 197, 218, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(170, 197, 218, 0.10) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 88%);
}

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

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(390px, 520px) minmax(520px, 1fr);
  gap: 24px;
  width: min(1540px, calc(100% - 40px));
  margin: 20px auto;
  align-items: start;
}

.control-pane, .result-pane { display: grid; gap: 16px; }

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  padding: 8px 4px 0;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1, h2 { margin: 0; line-height: 1.1; letter-spacing: 0; }
h1 {
  font-size: clamp(34px, 4.8vw, 58px);
  background: linear-gradient(135deg, #ffffff, #b9eff8 58%, #c9bbff);
  -webkit-background-clip: text;
  color: transparent;
}
h2 { font-size: 30px; }
.subtitle { max-width: 520px; margin: 10px 0 0; color: var(--muted); line-height: 1.65; }

.signal-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.signal-row span {
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: #b7d7e1;
  font-size: 11px;
  font-weight: 850;
}

.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.075), transparent 30%), var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
}

.form-panel { display: grid; gap: 16px; padding: 18px; }
.section-title { display: flex; align-items: center; gap: 10px; color: #e4f5fb; }
.section-title span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(103,232,249,.30);
  border-radius: 8px;
  background: rgba(103,232,249,.12);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.field { display: grid; gap: 7px; }
label { color: #d4e5ed; font-size: 14px; font-weight: 800; }
.toggle-field {
  align-content: center;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
}

.toggle-field input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  outline: none;
}
input::placeholder, textarea::placeholder { color: rgba(152,169,184,.72); }
input, select { height: 46px; padding: 0 12px; }
select option { background: #0b1422; color: var(--text); }
textarea { min-height: 160px; resize: vertical; padding: 12px; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: rgba(103,232,249,.64); box-shadow: 0 0 0 4px rgba(103,232,249,.10); }

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

.image-size-settings {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(170,197,218,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}

.image-size-grid {
  align-items: end;
}

.image-size-hint {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.image-size-settings input:disabled,
.image-size-settings select:disabled {
  opacity: .62;
}

.api-key-field {
  grid-column: 1 / -1;
}

.api-key-field input {
  font-family: Consolas, "SFMono-Regular", monospace;
}

.upload-box {
  min-height: 120px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(103,232,249,.10), transparent 40%), rgba(255,255,255,.035);
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
}
.upload-box input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(103,232,249,.24), rgba(167,139,250,.18));
  color: var(--cyan);
  font-size: 25px;
}
.upload-box small { color: var(--muted); }
.preview-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.thumb { aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: rgba(8,15,27,.76); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 2px; }
button {
  height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 900;
}
button:disabled { cursor: not-allowed; opacity: .72; }
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 150px;
  background: linear-gradient(135deg, #67e8f9, #60a5fa 58%, #a78bfa);
  color: #061321;
}
.secondary { border: 1px solid var(--line); background: rgba(255,255,255,.045); color: #d4e5ed; }

.prompt-library {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}

.prompt-library-head,
.prompt-library-row,
.prompt-library-actions {
  display: flex;
  gap: 10px;
}

.prompt-library-head {
  align-items: center;
  justify-content: space-between;
}

.prompt-library-head strong {
  font-size: 14px;
}

.prompt-library-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.prompt-library-row {
  align-items: stretch;
}

.prompt-library-row input,
.prompt-library-row select {
  min-width: 0;
  flex: 1 1 0;
}

.prompt-library-editor {
  display: grid;
  gap: 10px;
}

.prompt-library-editor textarea {
  min-height: 96px;
  resize: vertical;
}

.prompt-library-actions {
  flex-wrap: wrap;
}

.prompt-library-actions button {
  flex: 1 1 130px;
  min-height: 42px;
  height: auto;
  padding: 10px 12px;
}

.button-spinner, .loader-ring {
  display: none;
  border-radius: 999px;
  border: 2px solid rgba(6,19,33,.22);
  border-top-color: #061321;
  animation: spin .85s linear infinite;
}
.button-spinner { width: 16px; height: 16px; }
.is-generating .button-spinner { display: inline-block; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 98px;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.045);
  color: #d4e5ed;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}
.status-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--green); box-shadow: 0 0 12px rgba(52,211,153,.72); }
.status.busy { color: var(--cyan); border-color: rgba(103,232,249,.36); background: rgba(103,232,249,.08); }
.status.error { color: var(--danger); border-color: rgba(251,113,133,.34); background: rgba(60,11,24,.38); }

.result-panel {
  min-height: calc(100vh - 40px);
  padding: 20px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 16px;
  background: radial-gradient(circle at 74% 0%, rgba(103,232,249,.10), transparent 30%), var(--panel-strong);
}
.result-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.result-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.result-head-actions .secondary {
  min-width: 128px;
}
#taskId { color: var(--muted); font-size: 12px; word-break: break-all; text-align: right; max-width: 280px; }
.progress-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(103,232,249,.24);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(103,232,249,.12), rgba(167,139,250,.08)), rgba(8,15,27,.66);
}
.progress-card.hidden { display: none; }
.loader-ring { display: block; width: 34px; height: 34px; flex: 0 0 auto; border-color: rgba(103,232,249,.18); border-top-color: var(--cyan); }
.progress-card strong { display: block; margin-bottom: 4px; color: #effbff; }
.progress-card span { color: var(--muted); line-height: 1.5; }

.result-frame {
  position: relative;
  min-height: 470px;
  border: 1px solid rgba(170,197,218,.16);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(rgba(170,197,218,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(170,197,218,.035) 1px, transparent 1px),
    rgba(8,15,27,.38);
  background-size: 30px 30px;
}
.frame-corner { position: absolute; width: 22px; height: 22px; border-color: rgba(103,232,249,.78); pointer-events: none; }
.top-left { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.top-right { top: -1px; right: -1px; border-top: 2px solid; border-right: 2px solid; }
.bottom-left { bottom: -1px; left: -1px; border-bottom: 2px solid; border-left: 2px solid; }
.bottom-right { right: -1px; bottom: -1px; border-right: 2px solid; border-bottom: 2px solid; }

.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; align-content: start; }
.result-card { border: 1px solid rgba(170,197,218,.24); border-radius: 8px; overflow: hidden; background: rgba(8,15,27,.78); }
.result-card img { width: 100%; display: block; aspect-ratio: 1; object-fit: contain; background: #08101d; }
.result-card a { display: flex; justify-content: space-between; align-items: center; padding: 12px; color: var(--cyan); font-weight: 900; text-decoration: none; background: rgba(11,21,35,.94); }
.result-card a::after { content: "打开"; color: var(--muted); font-size: 12px; font-weight: 800; }
.empty {
  min-height: 430px;
  border: 1px dashed rgba(170,197,218,.24);
  border-radius: 8px;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
  padding: 30px;
  background: radial-gradient(circle, rgba(103,232,249,.07), transparent 44%), rgba(8,15,27,.34);
}
.empty strong { color: var(--text); font-size: 22px; }
.raw-box { border-top: 1px solid var(--line); padding-top: 12px; }
.raw-box summary { cursor: pointer; color: #bdd2dc; font-weight: 850; }
pre { max-height: 260px; overflow: auto; padding: 12px; border: 1px solid rgba(170,197,218,.16); border-radius: 8px; background: #050b14; color: #c8f7ea; white-space: pre-wrap; word-break: break-word; }

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

@media (max-width: 1020px) {
  .app-shell { grid-template-columns: 1fr; width: min(100% - 24px, 840px); margin: 12px auto; }
  .result-panel { min-height: 600px; }
}
@media (max-width: 600px) {
  .hero, .result-head { align-items: stretch; flex-direction: column; }
  .signal-row, .settings-grid { grid-template-columns: 1fr; }
  .actions button { width: 100%; }
  .prompt-library-row { flex-direction: column; }
}

.product-home {
  min-height: 100vh;
  display: block;
  background:
    radial-gradient(circle at 15% 8%, rgba(103, 232, 249, 0.15), transparent 32%),
    radial-gradient(circle at 84% 16%, rgba(52, 211, 153, 0.12), transparent 28%),
    linear-gradient(135deg, #0a111d 0%, #111827 50%, #07131d 100%);
}

.home-shell {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 44px;
}

.home-nav {
  height: 62px;
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(320px, 1fr) auto;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(15, 24, 38, 0.72);
  backdrop-filter: blur(16px);
}

.app-shell > .home-nav {
  grid-column: 1 / -1;
}

.brand-link, .main-nav-links a, .nav-actions a, .home-button, .feature-card {
  color: inherit;
  text-decoration: none;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #061321;
  font-weight: 950;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.nav-actions[data-account-bar]:not(.is-ready) > a {
  display: none;
}

.main-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  min-width: 0;
}

.main-nav-links a,
.nav-actions a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 8px;
  color: #cfe2eb;
  font-weight: 850;
  font-size: 14px;
}

.main-nav-links a {
  color: #d9e8f1;
  white-space: nowrap;
}

.main-nav-links a.active {
  color: var(--cyan);
}

.nav-actions .nav-primary {
  background: rgba(103, 232, 249, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(103, 232, 249, 0.28);
}

.product-hero {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1fr);
  gap: 36px;
  align-items: center;
  padding: 50px 0 32px;
}

.hero-copy h1 {
  max-width: 780px;
  font-size: clamp(44px, 7vw, 86px);
}

.hero-copy .subtitle {
  max-width: 680px;
  font-size: 17px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.home-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 950;
}

.hero-preview {
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.08), transparent 34%), rgba(15,24,38,.78);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.preview-topbar {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 15, 27, 0.58);
}

.preview-topbar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(207, 226, 235, 0.45);
}

.preview-topbar strong {
  margin-left: auto;
  color: var(--cyan);
  font-size: 13px;
}

.preview-body {
  display: grid;
  grid-template-columns: 0.74fr 1fr;
  gap: 18px;
  padding: 18px;
}

.preview-panel {
  min-height: 330px;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(8,15,27,.62);
  border: 1px solid rgba(170,197,218,.14);
}

.preview-panel i {
  height: 42px;
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(170,197,218,.12);
}

.preview-panel button {
  margin-top: 6px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #061321;
}

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

.preview-gallery figure {
  margin: 0;
  min-height: 154px;
  border: 1px solid rgba(170,197,218,.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(103,232,249,.18), transparent 42%),
    linear-gradient(160deg, rgba(52,211,153,.12), rgba(167,139,250,.08)),
    rgba(8,15,27,.72);
}

.home-section {
  padding: 30px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 44px);
}

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

.feature-card {
  min-height: 236px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15,24,38,.72);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(103,232,249,.44);
  background: rgba(19,31,49,.9);
}

.feature-card.active-tool {
  background: linear-gradient(135deg, rgba(103,232,249,.14), rgba(52,211,153,.08)), rgba(15,24,38,.78);
  border-color: rgba(103,232,249,.42);
}

.feature-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(103,232,249,.28);
  color: var(--cyan);
  font-weight: 950;
  font-size: 12px;
}

.feature-card h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.feature-card strong {
  margin-top: auto;
  color: var(--green);
}

.workflow-section {
  padding-bottom: 20px;
}

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

.workflow-grid div {
  min-height: 160px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8,15,27,.54);
}

.workflow-grid span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(52,211,153,.13);
  color: var(--green);
  font-weight: 950;
}

.workflow-grid strong {
  display: block;
  margin-top: 14px;
  font-size: 18px;
}

.workflow-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.56;
}

@media (max-width: 1040px) {
  .product-hero { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .home-shell { width: min(100% - 24px, 680px); }
  .home-nav { height: auto; grid-template-columns: 1fr; align-items: stretch; padding: 12px; }
  .main-nav-links,
  .nav-actions { flex-wrap: wrap; justify-content: flex-start; }
  .main-nav-links a,
  .nav-actions a { flex: 1 1 auto; }
  .product-hero { min-height: auto; padding-top: 34px; }
  .preview-body { grid-template-columns: 1fr; }
  .feature-grid, .workflow-grid { grid-template-columns: 1fr; }
}

.batch-page {
  min-height: 100vh;
  display: block;
}

.batch-shell {
  position: relative;
  z-index: 1;
  width: min(1500px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 36px;
}

.batch-hero {
  min-height: 210px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  padding: 38px 4px 24px;
}

.batch-hero h1 {
  font-size: clamp(42px, 6vw, 72px);
}

.queue-summary {
  width: 132px;
  min-height: 104px;
  display: grid;
  place-content: center;
  gap: 4px;
  text-align: center;
  border: 1px solid rgba(103,232,249,.32);
  border-radius: 8px;
  background: rgba(103,232,249,.08);
}

.queue-summary span {
  font-size: 44px;
  font-weight: 950;
  color: var(--cyan);
  line-height: 1;
}

.queue-summary small {
  color: var(--muted);
  font-weight: 850;
}

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

.batch-control {
  display: grid;
  gap: 16px;
  padding: 18px;
  position: sticky;
  top: 16px;
}

.batch-upload {
  min-height: 132px;
}

.batch-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.batch-actions button {
  flex: 1 1 150px;
}

.batch-progress {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(170,197,218,.16);
  border-radius: 8px;
  background: rgba(8,15,27,.42);
}

.progress-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.progress-meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transition: width .25s ease;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.batch-queue-panel {
  min-height: 680px;
  padding: 18px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
}

#queueState {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
}

.queue-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.compact-empty {
  min-height: 420px;
}

.queue-item {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) 118px;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(170,197,218,.16);
  border-radius: 8px;
  background: rgba(8,15,27,.58);
}

.queue-item.running {
  border-color: rgba(103,232,249,.46);
  background: rgba(103,232,249,.08);
}

.queue-item.done {
  border-color: rgba(52,211,153,.38);
}

.queue-item.failed {
  border-color: rgba(251,113,133,.38);
}

.queue-thumb,
.queue-result {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: #08101d;
  border: 1px solid rgba(170,197,218,.16);
}

.queue-thumb img,
.queue-result img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.queue-info {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.queue-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.queue-title strong {
  min-width: 0;
  line-height: 1.35;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.queue-title strong:not(.queue-file-name) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-title span {
  flex: 0 0 auto;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.queue-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.queue-info a {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 1040px) {
  .batch-layout { grid-template-columns: 1fr; }
  .batch-control { position: static; }
}

@media (max-width: 680px) {
  .batch-shell { width: min(100% - 24px, 680px); }
  .batch-hero { align-items: stretch; flex-direction: column; }
  .queue-summary { width: 100%; min-height: 86px; }
  .queue-item { grid-template-columns: 76px minmax(0, 1fr); }
  .queue-result { grid-column: 1 / -1; max-width: 180px; }
}

.carousel-layout {
  grid-template-columns: minmax(430px, 560px) minmax(0, 1fr);
}

.carousel-scenes {
  display: grid;
  gap: 10px;
}

.carousel-scene-adder {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(103,232,249,.2);
  border-radius: 8px;
  background: rgba(103,232,249,.055);
}

.carousel-scene-adder textarea {
  min-height: 86px;
  resize: vertical;
}

.carousel-scene-adder button {
  min-height: 42px;
  height: auto;
}

.carousel-scene {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(170,197,218,.16);
  border-radius: 8px;
  background: rgba(8,15,27,.46);
}

.workflow-scene-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.workflow-scene-head-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.workflow-scene-body {
  display: grid;
  gap: 10px;
}

.workflow-scene.is-collapsed .workflow-scene-body {
  display: none;
}

.workflow-scene.is-collapsed {
  padding-bottom: 12px;
}

.scene-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  color: #ecf7fb;
  font-weight: 900;
}

.scene-toggle > input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  accent-color: var(--green);
}

.carousel-scene textarea {
  min-height: 92px;
  resize: vertical;
}

.scene-remove {
  min-height: 38px;
  height: auto;
  justify-self: start;
  padding: 8px 12px;
}

.scene-collapse {
  min-height: 38px;
  height: auto;
  padding: 8px 12px;
}

.carousel-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.result-pagination {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(170,197,218,.16);
  border-radius: 8px;
  background: rgba(8,15,27,.58);
  color: #cbd5e1;
  font-size: 13px;
}

.result-pagination .secondary {
  min-width: 76px;
  padding: 8px 10px;
}

.result-collapsed-summary {
  grid-column: 1 / -1;
  min-height: 120px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 18px;
  border: 1px dashed rgba(170,197,218,.22);
  border-radius: 8px;
  background: rgba(8,15,27,.48);
  color: #cbd5e1;
  text-align: center;
}

.result-collapsed-summary strong {
  color: #ecf7fb;
  font-size: 16px;
}

.result-collapsed-summary span {
  color: var(--muted);
  font-size: 13px;
}

.workflow-run-list {
  display: grid;
  gap: 12px;
}

.workflow-run-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(170,197,218,.16);
  border-radius: 8px;
  background: rgba(8,15,27,.58);
}

.workflow-run-item > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.workflow-run-item p {
  margin: 0;
  color: #94a3b8;
  font-size: 13px;
}

.workflow-run-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  gap: 8px;
  max-width: 520px;
}

.workflow-run-thumbs a {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(15, 23, 42, .72);
}

.workflow-run-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-result-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(170,197,218,.16);
  border-radius: 8px;
  background: rgba(8,15,27,.58);
}

.carousel-result-card.running {
  border-color: rgba(103,232,249,.46);
  background: rgba(103,232,249,.08);
}

.carousel-result-card.done {
  border-color: rgba(52,211,153,.38);
}

.carousel-result-card.failed {
  border-color: rgba(251,113,133,.38);
}

.carousel-result-image {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(170,197,218,.16);
  border-radius: 8px;
  background: #08101d;
  color: var(--muted);
  font-weight: 900;
}

.carousel-result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-result-meta {
  display: grid;
  gap: 6px;
}

.carousel-result-meta strong {
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.carousel-result-meta small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.carousel-result-meta p {
  min-height: 38px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.carousel-result-meta a {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

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

.carousel-result-actions .secondary {
  height: 36px;
  padding: 0 12px;
}

.workflow-shell {
  width: min(1680px, calc(100% - 40px));
}

.workflow-hero {
  min-height: 190px;
}

.workflow-board {
  display: grid;
  grid-template-columns: minmax(420px, 560px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.workflow-control {
  display: grid;
  gap: 16px;
  padding: 18px;
  position: sticky;
  top: 16px;
}

.workflow-output {
  display: grid;
  gap: 18px;
}

.workflow-stage-panel {
  min-height: 520px;
  padding: 18px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
}

.workflow-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
}

.workflow-beautify-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(170,197,218,.16);
  border-radius: 8px;
  background: rgba(8,15,27,.58);
}

.workflow-beautify-card.running {
  border-color: rgba(103,232,249,.46);
  background: rgba(103,232,249,.08);
}

.workflow-beautify-card.done {
  border-color: rgba(52,211,153,.38);
}

.workflow-beautify-card.failed {
  border-color: rgba(251,113,133,.38);
}

.workflow-beautify-card.selected {
  box-shadow: 0 0 0 2px rgba(52,211,153,.48);
}

.workflow-big-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(170,197,218,.16);
  border-radius: 8px;
  background: #08101d;
}

.workflow-big-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.workflow-card-meta {
  display: grid;
  gap: 8px;
}

.workflow-card-meta > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.workflow-card-meta strong {
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.workflow-card-meta span {
  flex: 0 0 auto;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.workflow-card-meta p {
  min-height: 38px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.workflow-card-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.workflow-card-actions a {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.single-action-row {
  grid-template-columns: 1fr;
}

.single-action-row > button {
  width: 100%;
}

.workflow-action-field {
  padding: 12px;
  border: 1px solid rgba(103,232,249,.18);
  border-radius: 8px;
  background: rgba(103,232,249,.05);
}

.workflow-redframe-action {
  margin-top: -4px;
}

.workflow-redframe-action > button {
  min-height: 48px;
  font-size: 15px;
  font-weight: 900;
}

.mini-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ecf7fb;
  font-size: 13px;
  font-weight: 900;
}

.mini-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
}

.workflow-scenes {
  display: grid;
  gap: 10px;
}

.workflow-scene-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(103,232,249,.18);
  border-radius: 8px;
  background: rgba(103,232,249,.05);
}

.scene-toggle .workflow-scene-title {
  width: min(100%, 240px);
  min-width: 0;
  height: 40px;
  flex: 0 1 240px;
  padding: 0 12px;
  border: 1px solid rgba(170,197,218,.16);
  border-radius: 8px;
  background: rgba(8,15,27,.68);
  color: #ecf7fb;
  font-weight: 800;
}

.scene-toggle .workflow-scene-title::placeholder {
  color: rgba(170,197,218,.68);
}

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

@media (max-width: 1240px) {
  .workflow-board { grid-template-columns: 1fr; }
  .workflow-control { position: static; }
  .workflow-carousel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .workflow-shell { width: min(100% - 24px, 680px); }
  .workflow-gallery,
  .workflow-carousel-grid { grid-template-columns: 1fr; }
  .workflow-scene-head { align-items: stretch; flex-direction: column; }
  .scene-toggle .workflow-scene-title { width: 100%; flex-basis: 100%; }
  .workflow-scene-head-actions { justify-content: flex-end; }
}

.aplus-layout {
  grid-template-columns: minmax(440px, 580px) minmax(0, 1fr);
}

.aplus-product-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.aplus-product-card strong {
  color: #f8fbff;
  font-size: 18px;
}

.aplus-product-card span,
.aplus-product-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.aplus-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aplus-tags b {
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(103, 232, 249, 0.09);
  color: var(--cyan);
  font-size: 12px;
}

.aplus-result-grid details {
  display: grid;
  gap: 8px;
}

.aplus-result-grid summary {
  cursor: pointer;
  color: #d4e5ed;
  font-size: 13px;
  font-weight: 900;
}

.aplus-result-grid textarea {
  min-height: 130px;
  font-size: 12px;
}

.aplus-copy-block {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 8px;
  background: rgba(103, 232, 249, 0.065);
}

.aplus-copy-block b {
  color: #f8fbff;
  font-size: 14px;
}

.aplus-copy-block span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}

.aplus-copy-block ul {
  margin: 0;
  padding-left: 18px;
  color: #b9c8d4;
  font-size: 12px;
  line-height: 1.45;
}

.aplus-thumb {
  position: relative;
}

.thumb-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  border: 0;
  background: rgba(251, 113, 133, 0.92);
  color: #fff;
  font-size: 12px;
}

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

@media (max-width: 680px) {
  .carousel-result-grid { grid-template-columns: 1fr; }
}

.nav-actions button,
.nav-actions strong,
.nav-actions span {
  color: var(--text);
}

.nav-actions button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 7px 10px;
  cursor: pointer;
}

.auth-page,
.admin-page {
  min-height: 100vh;
}

.auth-shell,
.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.auth-panel {
  max-width: 520px;
  margin: 40px auto;
}

.auth-panel h1,
.auth-panel h2 {
  margin: 8px 0 18px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
}

.auth-form input {
  width: 100%;
}

.auth-message {
  min-height: 24px;
  color: #f97373;
}

.admin-panel {
  margin-top: 18px;
}

.admin-console-page .console-main {
  width: 100%;
}

.admin-filter-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-user-table select {
  min-height: 36px;
  margin: 2px 0;
  padding: 0 8px;
  color: #111827;
  background: #fff;
}

.admin-actions {
  white-space: nowrap;
}

.admin-actions button,
.admin-filter-row input,
.admin-filter-row select {
  border: 1px solid #dbe4ef;
}

.admin-actions button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  color: #1746c6;
  background: #eef4ff;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--border);
  padding: 12px;
  text-align: left;
}

.admin-table button {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  cursor: pointer;
}

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

.login-v2-page {
  min-height: 100vh;
  color: #0f172a;
  background:
    linear-gradient(rgba(32, 91, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 91, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 76% 32%, rgba(37, 99, 235, 0.12), transparent 28%),
    #fbfdff;
  background-size: 28px 28px, 28px 28px, auto, auto;
}

.login-v2-nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 5vw, 64px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
}

.login-v2-brand,
.login-v2-link,
.login-v2-actions a {
  color: #0f172a;
  text-decoration: none;
}

.login-v2-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.login-v2-logo {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #155dfc, #14b8a6);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.login-v2-link {
  padding: 10px 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: #fff;
}

.login-v2-shell {
  position: relative;
  width: min(1280px, calc(100% - 40px));
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  align-items: center;
  gap: clamp(32px, 7vw, 120px);
  padding: clamp(42px, 8vh, 86px) 0;
}

.login-v2-copy {
  max-width: 650px;
}

.login-v2-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  color: #1d4ed8;
  background: rgba(239, 246, 255, 0.9);
  font-weight: 700;
}

.login-v2-badge span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12);
}

.login-v2-copy h1 {
  margin: 30px 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.03;
  letter-spacing: 0;
  color: #0b1b3f;
}

.login-v2-copy p {
  margin: 0;
  max-width: 560px;
  color: #475569;
  font-size: 20px;
  line-height: 1.8;
}

.login-v2-actions {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.login-v2-actions a {
  padding: 14px 22px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.login-v2-actions a:first-child {
  color: #fff;
  background: linear-gradient(135deg, #155dfc, #2563eb);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.25);
}

.login-v2-stats {
  display: flex;
  gap: 32px;
  margin-top: 42px;
  flex-wrap: wrap;
}

.login-v2-stats div {
  display: grid;
  gap: 5px;
}

.login-v2-stats strong {
  font-size: 24px;
  color: #0f172a;
}

.login-v2-stats span {
  color: #64748b;
}

.login-v2-card {
  position: relative;
  z-index: 1;
  padding: 28px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(18px);
}

.login-v2-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 5px;
  border-radius: 14px;
  background: #f1f5f9;
  margin-bottom: 22px;
}

.login-v2-tabs button {
  border: 0;
  border-radius: 11px;
  padding: 12px;
  color: #475569;
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.login-v2-tabs button.active {
  color: #0f172a;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.login-v2-form {
  display: grid;
  gap: 16px;
}

.login-v2-form.hidden {
  display: none;
}

.login-v2-form label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 700;
}

.login-v2-form input {
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  padding: 14px 15px;
  color: #0f172a;
  background: #fff;
  outline: none;
}

.login-v2-form input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.login-v2-submit {
  margin-top: 6px;
  border: 0;
  border-radius: 13px;
  padding: 15px;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, #155dfc, #2563eb);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.24);
}

.login-v2-message {
  min-height: 24px;
  margin: 14px 0 0;
  color: #dc2626;
}

.login-v2-tags {
  position: absolute;
  right: 410px;
  top: 22%;
  width: 330px;
  min-height: 250px;
  pointer-events: none;
}

.login-v2-tags span {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 98px;
  padding: 15px 24px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
}

.login-v2-tags span:nth-child(1) { top: 0; left: 44px; background: linear-gradient(135deg, #2563eb, #06b6d4); }
.login-v2-tags span:nth-child(2) { top: 72px; left: 120px; background: linear-gradient(135deg, #ef4444, #f97316); }
.login-v2-tags span:nth-child(3) { top: 138px; left: 18px; background: linear-gradient(135deg, #10b981, #22c55e); }
.login-v2-tags span:nth-child(4) { top: 164px; left: 154px; background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.login-v2-tags span:nth-child(5) { top: 92px; left: 0; min-width: 64px; padding: 11px 16px; background: linear-gradient(135deg, #38bdf8, #0ea5e9); }

@media (max-width: 980px) {
  .login-v2-shell {
    grid-template-columns: 1fr;
  }
  .login-v2-tags {
    display: none;
  }
  .login-v2-copy h1 {
    font-size: 42px;
  }
}

@media (max-width: 560px) {
  .login-v2-nav {
    padding: 0 16px;
  }
  .login-v2-shell {
    width: min(100% - 24px, 520px);
    padding-top: 28px;
  }
  .login-v2-copy p {
    font-size: 16px;
  }
  .login-v2-card {
    padding: 20px;
    border-radius: 18px;
  }
}

.login-v2-tabs:has(button:nth-child(3)) {
  grid-template-columns: 1fr 1fr 1fr;
}

.login-v2-code-row {
  display: grid;
  grid-template-columns: 1fr 128px;
  gap: 10px;
  align-items: end;
}

.login-v2-code-row button {
  height: 49px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  color: #155dfc;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.login-v2-code-row button:disabled {
  color: #94a3b8;
  cursor: not-allowed;
  background: #f8fafc;
}

@media (max-width: 560px) {
  .login-v2-tabs:has(button:nth-child(3)) {
    grid-template-columns: 1fr;
  }
  .login-v2-code-row {
    grid-template-columns: 1fr;
  }
}

.console-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  color: #152033;
  background: #f5f7fb;
}

.console-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  padding: 22px 16px;
  border-right: 1px solid #e4e9f2;
  background: #ffffff;
}

.console-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: #152033;
  text-decoration: none;
}

.console-brand span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  background: #185cff;
}

.console-menu {
  display: grid;
  align-content: start;
  gap: 4px;
}

.console-menu a {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: #5d6b82;
  text-decoration: none;
  font-weight: 800;
}

.console-menu a:hover,
.console-menu a.active {
  color: #1746c6;
  background: #eef4ff;
}

.console-main {
  width: min(1440px, 100%);
  display: grid;
  gap: 18px;
  padding: 22px;
}

.console-topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.console-main-nav {
  flex: 1 1 auto;
  gap: 18px;
  justify-content: center;
}

.console-topbar p,
.console-section-head p,
.panel-title p {
  margin: 0 0 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.console-topbar h1,
.console-section-head h2,
.panel-title h2 {
  margin: 0;
  color: #111827;
  font-size: 26px;
  line-height: 1.15;
}

.console-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  background: #fff;
}

.console-account div {
  display: grid;
  gap: 2px;
  text-align: right;
}

.console-account strong {
  color: #111827;
}

.console-account span {
  color: #64748b;
  font-size: 12px;
}

.console-account b {
  min-width: 88px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #0f5132;
  background: #dcfce7;
  text-align: center;
}

.console-account button {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #e1e8f2;
  color: #475569;
  background: #fff;
}

.console-section,
.console-panel,
.metric-card {
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.console-section,
.console-panel {
  padding: 18px;
}

.console-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.console-section-head a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 8px;
  color: #fff;
  background: #185cff;
  text-decoration: none;
  font-weight: 900;
}

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

.notice-grid article,
.tool-grid a,
.activity-list div,
.order-list div {
  border: 1px solid #e8edf5;
  border-radius: 8px;
  background: #f8fafc;
}

.notice-grid article {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.notice-grid span,
.activity-list span,
.order-list small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.notice-grid strong,
.tool-grid strong,
.activity-list strong,
.order-list strong {
  color: #111827;
}

.notice-grid p,
.muted-panel p,
.activity-list p,
.tool-grid span {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

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

.metric-card {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.metric-card span,
.metric-card small {
  color: #64748b;
  font-weight: 800;
}

.metric-card strong {
  color: #111827;
  font-size: 28px;
}

.console-grid {
  display: grid;
  gap: 14px;
}

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

.panel-title {
  margin-bottom: 14px;
}

.profile-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.profile-list div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f7;
}

.profile-list div:last-child {
  border-bottom: 0;
}

.profile-list dt {
  color: #64748b;
  font-weight: 800;
}

.profile-list dd {
  margin: 0;
  color: #111827;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.recharge-box {
  display: grid;
  gap: 12px;
}

.recharge-box label {
  display: grid;
  gap: 7px;
  color: #334155;
}

.recharge-box input {
  border-color: #dbe3ef;
  color: #111827;
  background: #fff;
}

.recharge-box span {
  min-height: 22px;
  color: #1746c6;
  font-weight: 800;
}

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

.tool-grid a {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 14px;
  color: inherit;
  text-decoration: none;
}

.tool-grid a:hover {
  border-color: #b8ccff;
  background: #f3f7ff;
}

.model-table-wrap {
  overflow-x: auto;
}

.console-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.console-table th,
.console-table td {
  padding: 12px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  color: #334155;
}

.console-table th {
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
}

.console-table td strong,
.console-table td small {
  display: block;
}

.console-table td small {
  margin-top: 3px;
  color: #64748b;
}

.state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #0f5132;
  background: #dcfce7;
  font-weight: 900;
}

.activity-list,
.order-list {
  display: grid;
  gap: 10px;
}

.activity-list div,
.order-list div {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.activity-list b {
  justify-self: start;
}

.negative { color: #dc2626 !important; font-weight: 900; }
.positive { color: #059669 !important; font-weight: 900; }

.console-empty {
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  background: #f8fafc;
  text-align: center;
}

.muted-panel {
  min-height: 160px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .console-page {
    grid-template-columns: 1fr;
  }
  .console-sidebar {
    position: static;
    height: auto;
  }
  .console-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .metric-grid,
  .notice-grid,
  .tool-grid,
  .two-cols,
  .three-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .console-main {
    padding: 14px;
  }
  .console-topbar,
  .console-account {
    align-items: stretch;
    flex-direction: column;
  }
  .console-account div {
    text-align: left;
  }
  .console-menu,
  .metric-grid,
  .notice-grid,
  .tool-grid,
  .two-cols,
  .three-cols {
    grid-template-columns: 1fr;
  }
}

.api-console-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  color: #111827;
  background: #f6f7fb;
}

.api-console-page * {
  letter-spacing: 0;
}

.api-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 14px;
  padding: 24px 16px 14px;
  border-right: 1px solid #e6eaf2;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.api-brand,
.api-nav a,
.api-model-foot a,
.api-top-actions a {
  color: inherit;
  text-decoration: none;
}

.api-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}

.api-brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-weight: 950;
  background: #111827;
}

.api-brand strong,
.api-brand small {
  display: block;
}

.api-brand strong {
  font-size: 18px;
}

.api-brand small {
  margin-top: 2px;
  color: #9aa4b2;
  font-size: 12px;
}

.api-nav {
  display: grid;
  align-content: start;
  gap: 6px;
}

.api-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #566176;
  font-weight: 850;
}

.api-nav a:hover,
.api-nav a.active {
  color: #155dfc;
  border-color: #e2e8f7;
  background: #f7faff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.api-nav span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #7b8798;
  background: #f0f3f8;
  font-size: 12px;
  font-weight: 950;
}

.api-nav a.active span {
  color: #155dfc;
  background: #eaf1ff;
}

.api-nav-group {
  align-self: end;
  margin: 8px 12px 0;
  padding-top: 14px;
  border-top: 1px solid #e9edf5;
  color: #a3acba;
  font-size: 11px;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.api-nav-secondary {
  align-self: start;
}

.api-sidebar-foot {
  display: grid;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid #e9edf5;
}

.api-user-chip {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 48px;
}

.api-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #155dfc;
  background: #eaf1ff;
  font-weight: 950;
}

.api-user-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.api-user-meta strong,
.api-user-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-user-meta strong {
  font-size: 13px;
}

.api-user-meta span {
  color: #6b7280;
  font-size: 12px;
}

.api-user-chip button,
.api-lang,
.api-top-actions button,
.api-amount-row button {
  border: 1px solid #dfe6f1;
  border-radius: 8px;
  color: #4b5563;
  background: #fff;
  box-shadow: none;
}

.api-user-chip button {
  height: 32px;
  padding: 0 9px;
  font-size: 12px;
}

.api-lang {
  width: 100%;
  height: 38px;
  text-align: left;
}

.api-main {
  width: min(1420px, 100%);
  display: block;
  padding: 44px clamp(22px, 4vw, 54px);
}

.api-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
  text-align: center;
}

.api-topbar > div:first-child {
  flex: 1;
}

.api-topbar .console-main-nav {
  flex: 0 1 620px;
}

.api-topbar p,
.api-section-head p,
.api-placeholder p {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.api-topbar h1 {
  margin: 0;
  color: #06152f;
  font-size: 34px;
  line-height: 1.2;
}

.api-topbar span {
  display: block;
  margin-top: 14px;
  color: #7b8494;
  font-size: 16px;
  font-weight: 650;
}

.api-top-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.api-top-actions a,
.api-top-actions button {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.api-top-actions a {
  color: #fff;
  background: #155dfc;
}

.api-view {
  display: none;
}

.api-view.active {
  display: block;
}

.api-panel,
.api-model-card {
  border: 1px solid #e4e9f1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.api-panel {
  padding: 20px;
}

.api-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.api-section-head h2,
.api-placeholder h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
}

.api-model-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  gap: 18px;
}

.api-model-card {
  min-height: 340px;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 16px;
  padding: 20px;
}

.api-model-card-head {
  display: grid;
  gap: 10px;
}

.api-model-card h2 {
  margin: 0;
  color: #0f172a;
  font-size: 19px;
  line-height: 1.25;
}

.api-model-card-head span {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  color: #079349;
  background: #eafff1;
  font-size: 12px;
  font-weight: 900;
}

.api-model-card-head i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
}

.api-model-price {
  min-height: 66px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid #e2ecfb;
  border-radius: 8px;
  background: #f4f9ff;
}

.api-model-price span {
  color: #155dfc;
  font-size: 12px;
  font-weight: 900;
}

.api-model-price strong {
  color: #155dfc;
  font-size: 22px;
  line-height: 1;
}

.api-model-price small {
  margin-left: 2px;
  font-size: 12px;
}

.api-model-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.api-model-badges span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #bdf3d2;
  border-radius: 7px;
  color: #079349;
  background: #f4fff8;
  font-size: 12px;
  font-weight: 850;
}

.api-model-note {
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 12px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #f8fafc;
}

.api-model-note strong {
  color: #334155;
  font-size: 12px;
}

.api-model-note p {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: 13px;
}

.api-model-note a {
  color: #155dfc;
  font-size: 12px;
  font-weight: 900;
}

.api-model-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.api-model-foot div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.api-model-foot b {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid #d7e5ff;
  border-radius: 6px;
  color: #155dfc;
  background: #fff;
  font-size: 11px;
}

.api-model-foot a {
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.api-profile-layout,
.api-recharge-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 16px;
}

.api-profile-list div {
  grid-template-columns: 110px minmax(0, 1fr);
}

.api-balance-card {
  display: grid;
  align-content: center;
  gap: 12px;
}

.api-balance-card span {
  color: #64748b;
  font-weight: 900;
}

.api-balance-card strong {
  color: #155dfc;
  font-size: 34px;
}

.api-balance-card p,
.api-placeholder span {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

.api-metric-grid {
  margin-bottom: 16px;
}

.api-activity-list,
.api-order-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.api-activity-list div,
.api-order-list div {
  background: #fff;
}

.api-recharge-box input {
  color: #111827;
  background: #fff;
}

.api-key-layout {
  display: grid;
  grid-template-columns: minmax(320px, .82fr) minmax(0, 1.18fr);
  gap: 16px;
}

.api-key-form {
  display: grid;
  gap: 12px;
}

.api-key-form label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 850;
}

.api-key-form input {
  color: #111827;
  border-color: #dbe3ef;
  background: #fff;
}

.api-key-form span {
  min-height: 22px;
  color: #155dfc;
  font-weight: 850;
}

.api-key-secret {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.api-key-secret strong {
  color: #1d4ed8;
}

.api-key-secret code {
  display: block;
  overflow-x: auto;
  padding: 12px;
  border: 1px solid #d7e5ff;
  border-radius: 8px;
  color: #0f172a;
  background: #fff;
  font-family: Consolas, "SFMono-Regular", monospace;
  white-space: nowrap;
}

.api-key-secret button,
.api-key-item button {
  height: 36px;
  border: 1px solid #d7e5ff;
  border-radius: 8px;
  color: #155dfc;
  background: #fff;
}

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

.api-key-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  background: #f8fafc;
}

.api-key-item div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.api-key-item strong,
.api-key-item code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-key-item code {
  color: #64748b;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
}

.api-key-item small {
  color: #64748b;
  font-size: 12px;
}

.api-amount-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.api-amount-row button {
  height: 42px;
  padding: 0 8px;
}

.api-amount-row button.active,
.api-amount-row button:hover {
  color: #155dfc;
  border-color: #b8ccff;
  background: #f0f6ff;
}

.api-table {
  background: #fff;
}

.api-tool-grid,
.api-help-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

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

.api-placeholder {
  min-height: 220px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.api-empty {
  background: #fff;
}

@media (max-width: 1280px) {
  .api-model-grid {
    grid-template-columns: repeat(3, minmax(230px, 1fr));
  }
  .api-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .api-console-page {
    grid-template-columns: 1fr;
  }
  .api-sidebar {
    position: static;
    height: auto;
    grid-template-rows: auto auto auto auto auto;
  }
  .api-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .api-main {
    padding: 24px 16px;
  }
  .api-topbar {
    text-align: left;
  }
  .api-model-grid,
  .api-profile-layout,
  .api-recharge-layout,
  .api-key-layout,
  .api-help-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .api-nav,
  .api-model-grid,
  .api-profile-layout,
  .api-recharge-layout,
  .api-key-layout,
  .api-activity-list,
  .api-order-list,
  .api-tool-grid,
  .api-help-grid,
  .api-amount-row {
    grid-template-columns: 1fr;
  }
  .api-topbar,
  .api-top-actions {
    flex-direction: column;
  }
  .api-top-actions,
  .api-top-actions a,
  .api-top-actions button {
    width: 100%;
  }
  .api-profile-list div {
    grid-template-columns: 1fr;
  }
}

.platform-home-page {
  min-height: 100vh;
  color: #0f172a;
  background:
    linear-gradient(rgba(37, 99, 235, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.035) 1px, transparent 1px),
    #f8fbff;
  background-size: 32px 32px;
}

.platform-home-nav {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(18px, 5vw, 64px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.platform-home-brand,
.platform-home-nav a,
.platform-home-actions a,
.platform-feature-grid a {
  color: inherit;
  text-decoration: none;
}

.platform-home-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.platform-home-brand span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #111827;
  font-weight: 950;
}

.platform-home-nav nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.platform-home-nav nav a,
.platform-home-login {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 8px;
  color: #475569;
  font-weight: 850;
}

.platform-home-login {
  color: #155dfc;
  border: 1px solid #d7e5ff;
  background: #fff;
}

.platform-home-main {
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(34px, 7vh, 84px) 0 54px;
}

.platform-home-hero {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.platform-home-copy p {
  margin: 0 0 14px;
  color: #155dfc;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.platform-home-copy h1 {
  margin: 0;
  color: #08152e;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.04;
}

.platform-home-copy > span {
  display: block;
  max-width: 660px;
  margin-top: 20px;
  color: #526174;
  font-size: 18px;
  line-height: 1.85;
}

.platform-home-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.platform-home-actions a {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  background: #fff;
  font-weight: 950;
}

.platform-home-actions .primary {
  color: #fff;
  border-color: #155dfc;
  background: #155dfc;
}

.platform-home-preview {
  min-height: 430px;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.13);
}

.preview-sidebar {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 22px 14px;
  border-right: 1px solid #e8edf5;
  background: #fbfcff;
}

.preview-sidebar b {
  margin-bottom: 16px;
  font-size: 18px;
}

.preview-sidebar span {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 8px;
  color: #64748b;
  font-weight: 850;
}

.preview-sidebar .active {
  color: #155dfc;
  background: #edf4ff;
}

.preview-panel-main {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 26px;
  background: #f8fafc;
}

.preview-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-panel-head strong {
  font-size: 24px;
}

.preview-panel-head em {
  padding: 7px 12px;
  border-radius: 999px;
  color: #079349;
  background: #eafff1;
  font-style: normal;
  font-weight: 900;
}

.preview-models {
  display: grid;
  gap: 14px;
}

.preview-models article {
  display: grid;
  gap: 9px;
  padding: 18px;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
  background: #fff;
}

.preview-models b {
  font-size: 18px;
}

.preview-models span {
  width: fit-content;
  padding: 9px 13px;
  border-radius: 8px;
  color: #155dfc;
  background: #f1f7ff;
  font-weight: 950;
}

.preview-models small {
  color: #64748b;
  font-weight: 800;
}

.platform-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.platform-feature-grid a {
  min-height: 150px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.platform-feature-grid strong {
  font-size: 19px;
}

.platform-feature-grid span {
  color: #64748b;
  line-height: 1.7;
}

@media (max-width: 980px) {
  .platform-home-nav {
    height: auto;
    align-items: stretch;
    flex-direction: column;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .platform-home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .platform-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .platform-home-preview {
    grid-template-columns: 1fr;
  }
  .preview-sidebar {
    border-right: 0;
    border-bottom: 1px solid #e8edf5;
  }
  .platform-feature-grid {
    grid-template-columns: 1fr;
  }
}

.gpt-lab-page {
  min-height: 100vh;
  color: #edf7fb;
  background:
    radial-gradient(circle at 12% 12%, rgba(34, 197, 94, 0.15), transparent 26%),
    radial-gradient(circle at 86% 8%, rgba(14, 165, 233, 0.16), transparent 29%),
    linear-gradient(135deg, #08111c 0%, #101826 48%, #07141a 100%);
}

.gpt-lab-shell {
  position: relative;
  z-index: 1;
  width: min(1540px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 34px;
}

.gpt-lab-topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px;
  border: 1px solid rgba(170, 197, 218, 0.18);
  border-radius: 8px;
  background: rgba(8, 15, 27, 0.72);
  backdrop-filter: blur(16px);
}

.gpt-lab-brand,
.gpt-lab-topbar a,
.gpt-lab-result-card a {
  color: inherit;
  text-decoration: none;
}

.gpt-lab-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.gpt-lab-brand span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #061321;
  background: linear-gradient(135deg, #22c55e, #38bdf8);
  font-weight: 950;
}

.gpt-lab-topbar nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.gpt-lab-topbar nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #cfe2eb;
  font-size: 14px;
  font-weight: 850;
}

.gpt-lab-topbar nav a.active,
.gpt-lab-topbar nav a:hover {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.24);
  background: rgba(34, 197, 94, 0.08);
}

.gpt-lab-hero {
  min-height: 210px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 22px;
  padding: 42px 4px 24px;
}

.gpt-lab-hero p {
  margin: 0 0 8px;
  color: #86efac;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.gpt-lab-hero h1 {
  max-width: 760px;
  color: #f8fbff;
  font-size: clamp(38px, 5.6vw, 72px);
  line-height: 1.05;
}

.gpt-lab-hero span {
  display: block;
  margin-top: 12px;
  color: #9fb0c0;
  line-height: 1.65;
}

.gpt-lab-status {
  min-width: 118px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid rgba(170, 197, 218, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-weight: 900;
  white-space: nowrap;
}

.gpt-lab-status i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.8);
}

.gpt-lab-status.busy {
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.08);
}

.gpt-lab-status.busy i {
  background: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.8);
}

.gpt-lab-status.error {
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.34);
  background: rgba(60, 11, 24, 0.38);
}

.gpt-lab-status.error i {
  background: #fb7185;
  box-shadow: 0 0 14px rgba(251, 113, 133, 0.72);
}

.gpt-lab-grid {
  display: grid;
  grid-template-columns: minmax(380px, 0.88fr) minmax(520px, 1.12fr);
  gap: 18px;
  align-items: start;
}

.gpt-lab-panel {
  border: 1px solid rgba(170, 197, 218, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 32%),
    rgba(12, 22, 36, 0.82);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.gpt-lab-form,
.gpt-lab-output {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.gpt-lab-output {
  position: sticky;
  top: 18px;
  min-height: calc(100vh - 36px);
  grid-template-rows: auto auto minmax(280px, 1fr) auto auto auto;
}

.gpt-lab-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gpt-lab-section-head > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(134, 239, 172, 0.28);
  border-radius: 8px;
  color: #86efac;
  background: rgba(34, 197, 94, 0.1);
  font-size: 12px;
  font-weight: 950;
}

.gpt-lab-section-head strong,
.gpt-lab-section-head small {
  display: block;
}

.gpt-lab-section-head small {
  margin-top: 2px;
  color: #91a3b2;
  font-size: 12px;
  font-weight: 750;
}

.gpt-lab-field {
  display: grid;
  gap: 7px;
}

.gpt-lab-field > span {
  color: #d9e8f1;
  font-size: 14px;
  font-weight: 850;
}

.gpt-lab-field input,
.gpt-lab-field select,
.gpt-lab-field textarea,
.gpt-lab-task-tools input {
  border: 1px solid rgba(170, 197, 218, 0.18);
  border-radius: 8px;
  color: #f2f7fb;
  background: rgba(5, 11, 20, 0.68);
}

.gpt-lab-field input,
.gpt-lab-field select,
.gpt-lab-task-tools input {
  height: 46px;
  padding: 0 12px;
}

.gpt-lab-field textarea {
  min-height: 110px;
  padding: 12px;
  resize: vertical;
  line-height: 1.62;
}

.gpt-lab-field input::placeholder,
.gpt-lab-field textarea::placeholder,
.gpt-lab-task-tools input::placeholder {
  color: rgba(159, 176, 192, 0.72);
}

.gpt-lab-field input:focus,
.gpt-lab-field select:focus,
.gpt-lab-field textarea:focus,
.gpt-lab-task-tools input:focus {
  border-color: rgba(134, 239, 172, 0.58);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.11);
}

.gpt-lab-two,
.gpt-lab-three {
  display: grid;
  gap: 12px;
}

.gpt-lab-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gpt-lab-three {
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
}

.gpt-lab-quick-sizes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gpt-lab-quick-sizes button,
.gpt-lab-reference-head button,
.gpt-lab-task-tools button {
  height: 34px;
  border: 1px solid rgba(170, 197, 218, 0.18);
  border-radius: 8px;
  color: #cfe2eb;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
  font-size: 12px;
  font-weight: 850;
}

.gpt-lab-quick-sizes button {
  padding: 0 10px;
}

.gpt-lab-quick-sizes button.active,
.gpt-lab-quick-sizes button:hover {
  color: #061321;
  border-color: #86efac;
  background: #86efac;
}

.gpt-lab-upload {
  min-height: 112px;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 18px;
  border: 1px dashed rgba(134, 239, 172, 0.34);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), transparent 42%), rgba(255, 255, 255, 0.035);
  text-align: center;
  cursor: pointer;
}

.gpt-lab-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.gpt-lab-upload b {
  color: #f5fbff;
  font-size: 18px;
}

.gpt-lab-upload small {
  color: #91a3b2;
}

.gpt-lab-reference-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gpt-lab-reference-head strong {
  color: #d9e8f1;
}

.gpt-lab-reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}

.gpt-lab-reference-empty {
  grid-column: 1 / -1;
  min-height: 62px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(170, 197, 218, 0.2);
  border-radius: 8px;
  color: #91a3b2;
  background: rgba(5, 11, 20, 0.36);
}

.gpt-lab-reference-card {
  display: grid;
  grid-template-rows: 118px auto auto;
  overflow: hidden;
  border: 1px solid rgba(170, 197, 218, 0.2);
  border-radius: 8px;
  background: rgba(5, 11, 20, 0.62);
}

.gpt-lab-reference-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050b14;
}

.gpt-lab-reference-card div {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 9px;
}

.gpt-lab-reference-card strong,
.gpt-lab-reference-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gpt-lab-reference-card strong {
  font-size: 12px;
}

.gpt-lab-reference-card span {
  color: #91a3b2;
  font-size: 12px;
}

.gpt-lab-reference-card button {
  height: 34px;
  border: 0;
  border-top: 1px solid rgba(170, 197, 218, 0.16);
  border-radius: 0;
  color: #fb7185;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
  font-size: 12px;
}

.gpt-lab-actions,
.gpt-lab-task-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.gpt-lab-actions button {
  min-width: 138px;
}

.gpt-lab-actions .primary {
  color: #061321;
  background: linear-gradient(135deg, #86efac, #38bdf8);
}

.gpt-lab-task-tools {
  align-items: stretch;
}

.gpt-lab-task-tools input {
  min-width: 220px;
  flex: 1 1 260px;
}

.gpt-lab-task-tools button {
  min-width: 104px;
}

.gpt-lab-progress {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.08);
  color: #cfe2eb;
  font-weight: 850;
}

.gpt-lab-progress div {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 2px solid rgba(56, 189, 248, 0.2);
  border-top-color: #7dd3fc;
  border-radius: 999px;
  animation: spin .85s linear infinite;
}

.gpt-lab-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-content: start;
  min-height: 280px;
}

.gpt-lab-empty {
  grid-column: 1 / -1;
  min-height: 280px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 26px;
  border: 1px dashed rgba(170, 197, 218, 0.24);
  border-radius: 8px;
  color: #91a3b2;
  background:
    linear-gradient(rgba(170, 197, 218, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(170, 197, 218, 0.035) 1px, transparent 1px),
    rgba(5, 11, 20, 0.36);
  background-size: 28px 28px;
  text-align: center;
}

.gpt-lab-empty strong {
  color: #f5fbff;
  font-size: 22px;
}

.gpt-lab-empty.error span {
  color: #fecdd3;
}

.gpt-lab-result-card {
  overflow: hidden;
  border: 1px solid rgba(170, 197, 218, 0.2);
  border-radius: 8px;
  background: rgba(5, 11, 20, 0.72);
}

.gpt-lab-result-card img {
  width: 100%;
  display: block;
  aspect-ratio: 1;
  object-fit: contain;
  background: #050b14;
}

.gpt-lab-result-card a {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #86efac;
  font-weight: 900;
  background: rgba(8, 15, 27, 0.92);
}

.gpt-lab-raw {
  border-top: 1px solid rgba(170, 197, 218, 0.14);
  padding-top: 10px;
}

.gpt-lab-raw summary {
  cursor: pointer;
  color: #d9e8f1;
  font-weight: 900;
}

.gpt-lab-raw pre {
  max-height: 240px;
  margin-bottom: 0;
}

@media (max-width: 1120px) {
  .gpt-lab-grid {
    grid-template-columns: 1fr;
  }
  .gpt-lab-output {
    position: static;
    min-height: 620px;
  }
}

@media (max-width: 680px) {
  .gpt-lab-shell {
    width: min(100% - 24px, 680px);
  }
  .gpt-lab-topbar,
  .gpt-lab-hero,
  .gpt-lab-reference-head {
    align-items: stretch;
    flex-direction: column;
  }
  .gpt-lab-topbar nav {
    justify-content: flex-start;
  }
  .gpt-lab-two,
  .gpt-lab-three {
    grid-template-columns: 1fr;
  }
  .gpt-lab-actions button,
  .gpt-lab-reference-head button,
  .gpt-lab-task-tools button {
    width: 100%;
  }
}
