:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #111827;
  --muted: #667085;
  --line: #d9e1ea;
  --brand: #111827;
  --accent: #0f766e;
  --accent-soft: #ccfbf1;
  --danger: #b42318;
  --danger-soft: #fee4e2;
  --ok: #067647;
  --ok-soft: #dcfae6;
  --warn: #b54708;
  --warn-soft: #fef0c7;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
  --nav-bg: rgba(255, 255, 255, 0.92);
  --nav-link: #344054;
  --brand-mark: #111827;
  --brand-mark-accent: rgba(20, 184, 166, 0.38);
  --field-bg: #ffffff;
  --table-head: #f8fafc;
  --row-hover: #fbfdff;
}

html[data-theme="runway"] {
  --bg: #0e0f13;
  --surface: #171a21;
  --surface-soft: #20242d;
  --text: #f6f7fb;
  --muted: #aab2c0;
  --line: #303644;
  --brand: #f6f7fb;
  --accent: #67e8f9;
  --accent-soft: rgba(103, 232, 249, 0.16);
  --danger: #f97066;
  --danger-soft: rgba(249, 112, 102, 0.16);
  --ok: #86efac;
  --ok-soft: rgba(134, 239, 172, 0.16);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.16);
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  --nav-bg: rgba(14, 15, 19, 0.9);
  --nav-link: #d5dae4;
  --brand-mark: #67e8f9;
  --brand-mark-accent: rgba(244, 114, 182, 0.42);
  --field-bg: #11141a;
  --table-head: #20242d;
  --row-hover: #1d2129;
}

html[data-theme="atelier"] {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-soft: #fdf2f8;
  --text: #171318;
  --muted: #6b6470;
  --line: #e3dfe8;
  --brand: #171318;
  --accent: #be185d;
  --accent-soft: #fce7f3;
  --danger: #b42318;
  --danger-soft: #fee4e2;
  --ok: #047857;
  --ok-soft: #d1fae5;
  --warn: #a16207;
  --warn-soft: #fef3c7;
  --shadow: 0 14px 34px rgba(61, 45, 62, 0.08);
  --nav-bg: rgba(255, 255, 255, 0.92);
  --nav-link: #4d4652;
  --brand-mark: #171318;
  --brand-mark-accent: rgba(190, 24, 93, 0.36);
  --field-bg: #ffffff;
  --table-head: #fcf7fb;
  --row-hover: #fffafd;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.5;
  transition: background 0.2s ease, color 0.2s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  border-bottom: 1px solid rgba(217, 225, 234, 0.9);
  color: var(--text);
  backdrop-filter: blur(14px);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--text);
}

.brand::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand-mark);
  box-shadow: inset 0 -8px 0 var(--brand-mark-accent);
  flex: 0 0 auto;
}

.brand span {
  color: var(--accent);
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-left: 6px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--nav-link);
  font-size: 14px;
  font-weight: 700;
}

.nav a:hover {
  background: var(--surface-soft);
  color: var(--text);
  text-decoration: none;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-left: 8px;
  color: var(--nav-link);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  vertical-align: middle;
}

.theme-switch span {
  color: var(--muted);
}

.theme-switch select {
  width: auto;
  min-height: 34px;
  border-radius: 8px;
  padding: 5px 30px 5px 10px;
  background: var(--field-bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

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

.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.span-3 {
  grid-column: span 3;
}

.span-4 {
  grid-column: span 4;
}

.span-6 {
  grid-column: span 6;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

h1,
h2 {
  color: var(--text);
  letter-spacing: 0;
}

h1 {
  margin: 0 0 16px;
  font-size: 28px;
  line-height: 1.18;
  font-weight: 800;
}

h2 {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 800;
}

p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

label {
  display: block;
  margin: 14px 0 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.auth-submit {
  margin-top: 22px;
  margin-bottom: 0;
}

.auth-btn {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #fff;
  cursor: pointer;

  background: linear-gradient(135deg, #111827 0%, #1f2937 45%, #374151 100%);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.22);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.28);
  background: linear-gradient(135deg, #030712 0%, #111827 45%, #1f2937 100%);
}

.auth-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.22);
}

.auth-btn:focus {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(17, 24, 39, 0.12),
    0 10px 24px rgba(17, 24, 39, 0.22);
}

.auth-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #1f2937, #000000);
  color: #f8e7b0;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.auth-btn:hover {
  background: linear-gradient(135deg, #000000, #374151);
  transform: translateY(-1px);
}

.input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--field-bg);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

textarea {
  min-height: 112px;
  resize: vertical;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn:hover {
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.14);
  text-decoration: none;
  transform: translateY(-1px);
}

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

.btn.secondary {
  background: var(--field-bg);
  color: var(--brand);
  border-color: var(--line);
}

.btn.secondary:hover {
  border-color: #b7c3d0;
  background: var(--surface-soft);
}

.btn.danger {
  background: var(--danger);
  border-color: var(--danger);
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.flash {
  margin: 0 0 16px;
  padding: 13px 14px;
  border: 1px solid #abefc6;
  border-radius: 8px;
  background: var(--ok-soft);
  color: var(--ok);
  font-weight: 700;
}

.flash.error {
  border-color: #fecdca;
  background: var(--danger-soft);
  color: var(--danger);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2f6;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status.completed,
.status.succeeded {
  background: var(--ok-soft);
  color: var(--ok);
}

.status.failed {
  background: var(--danger-soft);
  color: var(--danger);
}

.status.processing,
.status.in_queue,
.status.starting,
.status.submitted {
  background: var(--warn-soft);
  color: var(--warn);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table th,
.table td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 13px 10px;
  vertical-align: middle;
}

.table th {
  color: var(--muted);
  background: var(--table-head);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.table tr:hover td {
  background: var(--row-hover);
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.thumb {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.thumb img,
.thumb video {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
  background: var(--surface-soft);
}

.thumb a {
  display: block;
  padding: 11px 12px;
  font-weight: 800;
}

.hidden {
  display: none !important;
}

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

.help {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

html[data-theme="runway"] .nav,
html[data-theme="runway"] .card,
html[data-theme="runway"] .thumb,
html[data-theme="runway"] .ai-loading-box {
  box-shadow: var(--shadow);
}

html[data-theme="runway"] .btn {
  color: #0e0f13;
  border-color: var(--accent);
  background: var(--accent);
}

html[data-theme="runway"] .btn.secondary {
  color: var(--text);
  border-color: var(--line);
  background: var(--field-bg);
}

html[data-theme="runway"] .muted,
html[data-theme="runway"] p {
  color: var(--muted);
}

html[data-theme="runway"] .table th {
  color: #c5ccd8;
}

html[data-theme="atelier"] .brand {
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: 16px;
}

html[data-theme="atelier"] .btn {
  border-color: var(--accent);
  background: var(--accent);
}

html[data-theme="atelier"] .btn.secondary {
  color: var(--text);
}

.card [style*="background:#fff"],
.card [style*="background: #fff"],
.card [style*="background:#fff;"],
.card [style*="background: #fff;"] {
  background: var(--surface) !important;
  border-color: var(--line) !important;
}

.card [style*="border:1px solid var(--line)"],
.card [style*="border:1px dashed var(--line)"] {
  border-color: var(--line) !important;
}

.card [style*="border-radius:12px"] {
  border-radius: 8px !important;
}

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

.ai-loading-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(8px);
}

.ai-loading-box {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(360px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px !important;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  text-align: center;
}

.ai-loading-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.ai-loading-text {
  color: var(--muted);
  font-size: 14px;
}

.ai-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-top-color: var(--accent) !important;
  border-radius: 999px;
  animation: generationSpin 0.8s linear infinite;
}

@media (max-width: 920px) {
  .wrap {
    width: min(100% - 24px, 1180px);
    padding: 18px 0;
  }

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

  .span-3,
  .span-4,
  .span-6,
  .span-8,
  .span-12 {
    grid-column: span 6;
  }

  .card {
    padding: 18px;
  }

  h1 {
    font-size: 24px;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .nav .wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav a {
    margin: 4px 6px 0 0;
    padding: 0 8px;
  }

  .theme-switch {
    width: 100%;
    margin: 8px 0 0;
    justify-content: space-between;
  }

  .theme-switch select {
    flex: 0 0 160px;
  }

  .grid,
  .tool-fields {
    display: block;
  }

  .card {
    margin-bottom: 14px;
  }

  .btn {
    width: 100%;
    margin-bottom: 8px;
  }

  .btn.secondary {
    width: 100%;
  }

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

  .thumb img,
  .thumb video {
    height: auto;
    max-height: 70vh;
    object-fit: contain;
  }
}

#job-create-form {
  position: relative;
}

.job-new-layout {
  align-items: start;
  gap: 22px;
}

.job-new-left,
.job-new-right {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.07);
}

.job-new-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.job-new-head h1 {
  margin-bottom: 6px;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: 0;
}

.job-new-head p {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  line-height: 1.7;
}

.job-new-head + h1,
.job-new-head + h1 + .help {
  display: none;
}

.credits-badge {
  min-width: 100px;
  padding: 13px 16px;
  border: 1px solid rgba(20, 184, 166, 0.26);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(20, 184, 166, 0.1), #fff);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  text-align: right;
}

.credits-badge span,
.credits-badge strong {
  display: block;
}

.credits-badge span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.credits-badge strong {
  color: #0f766e;
  font-size: 28px;
  line-height: 1.15;
}

.visually-hidden-control {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.mode-summary-card {
  display: grid;
  gap: 5px;
  margin: 4px 0 18px;
  padding: 16px 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff, #f8fafc);
}

.mode-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.mode-summary-card strong {
  color: #0f172a;
  font-size: 18px;
}

.mode-summary-card small {
  color: var(--muted);
  line-height: 1.55;
}

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

.tool-card {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 18px;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.04);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.tool-card:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.38);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.tool-card.is-selected {
  border-color: rgba(15, 118, 110, 0.62);
  background: linear-gradient(145deg, rgba(15, 118, 110, 0.08), #ffffff 58%);
  box-shadow: 0 18px 36px rgba(15, 118, 110, 0.1);
}

.tool-card.is-selected::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #0f766e;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.tool-card strong {
  padding-right: 18px;
  font-size: 16px;
}

.tool-card small {
  color: var(--muted);
  line-height: 1.5;
}

.tool-card-tag {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

.tool-card.is-selected .tool-card-tag {
  background: rgba(15, 118, 110, 0.1);
  color: #0f766e;
}

#model_upload_wrap,
#garment_upload_wrap {
  position: relative;
  min-height: 172px;
  padding: 18px;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent 52%),
    var(--surface);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

#model_upload_wrap:hover,
#garment_upload_wrap:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.11);
}

#model_upload_wrap::before,
#garment_upload_wrap::before {
  content: "";
  display: block;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 42%, #ffffff)),
    radial-gradient(circle at 65% 35%, #fff 0 10%, transparent 11%);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--accent) 22%, transparent);
}

#model_upload_wrap label,
#garment_upload_wrap label {
  margin-top: 0;
  font-size: 15px;
}

#model_image_input,
#garment_image_input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#model_upload_wrap > .muted,
#garment_upload_wrap > .muted,
.upload-helper {
  display: none !important;
}

.upload-dropzone {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 170px;
  margin-top: 12px;
  padding: 18px;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 44%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  color: var(--text);
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.upload-dropzone:hover,
.upload-dropzone:focus-visible,
.upload-dropzone.is-dragover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  box-shadow: 0 16px 32px color-mix(in srgb, var(--accent) 16%, transparent);
  outline: none;
}

.upload-drop-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--accent) 24%, transparent);
}

.upload-dropzone strong {
  font-size: 15px;
}

.upload-dropzone span,
.upload-dropzone small {
  color: var(--muted);
}

.upload-dropzone em {
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
}

.job-create-modern .upload-dropzone {
  position: relative;
  align-content: start;
  justify-items: stretch;
  gap: 14px;
  min-height: 236px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
}

.job-create-modern .upload-dropzone.has-file {
  border-color: rgba(22, 163, 74, 0.34);
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.05), #fff 42%);
}

.job-create-modern .upload-dropzone.has-file::after {
  content: "✓";
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.upload-drop-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 128px;
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}

.upload-empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 18px;
  background: #f8fafc;
  color: #0f766e;
}

.upload-empty-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.upload-drop-thumb img {
  width: 100%;
  height: 148px;
  object-fit: contain;
  display: block;
}

.upload-drop-copy {
  display: grid;
  gap: 6px;
  text-align: left;
}

.upload-drop-copy strong {
  color: #0f172a;
  font-size: 16px;
}

.upload-drop-copy span,
.upload-drop-copy small {
  color: var(--muted);
  line-height: 1.55;
}

.upload-drop-copy em {
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
  font-size: 13px;
}

.upload-file-meta {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.upload-file-meta b {
  min-width: 0;
  max-width: 70%;
  padding: 8px 10px;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-remove {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  display: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.upload-dropzone.has-file .upload-remove {
  display: grid;
  place-items: center;
}

#model_preview_box,
#garment_preview_box {
  min-height: 260px !important;
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line)) !important;
  border-radius: 8px !important;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%),
    var(--surface) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--surface) 72%, transparent);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#model_preview_box:hover,
#garment_preview_box:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

#model_preview_box img,
#garment_preview_box img {
  border-radius: 8px;
  filter: drop-shadow(0 14px 24px rgba(15, 23, 42, 0.12));
  transition: transform 0.22s ease;
}

#model_preview_box:hover img,
#garment_preview_box:hover img {
  transform: scale(1.015);
}

#submit_job_btn {
  min-height: 48px;
  min-width: 168px;
  border: 0;
  background: linear-gradient(135deg, #111827 0%, var(--accent) 56%, #22d3ee 100%);
  color: #fff;
  box-shadow: 0 16px 30px color-mix(in srgb, var(--accent) 25%, transparent);
}

#submit_job_btn:hover {
  box-shadow: 0 20px 38px color-mix(in srgb, var(--accent) 30%, transparent);
}

.job-create-modern #panel-basic,
.job-create-modern #panel-pro,
.job-create-modern #panel-industrial_tryon {
  margin-top: 22px !important;
}

.job-create-modern #panel-basic > .grid,
.job-create-modern #panel-pro > .grid,
.job-create-modern #panel-industrial_tryon > .grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
  align-items: start;
  margin-top: 16px !important;
}

.job-create-modern #panel-basic > .grid > .span-4,
.job-create-modern #panel-pro > .grid > .span-4,
.job-create-modern #panel-industrial_tryon > .grid > .span-4 {
  grid-column: auto;
}

.job-create-modern #panel-basic > .help:last-child,
.job-create-modern #panel-pro > .help:last-child,
.job-create-modern #panel-industrial_tryon > .help:last-child {
  display: none;
}

.job-create-modern #panel-industrial_tryon > .help:first-child {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(15, 118, 110, 0.07), #fff);
  color: var(--muted);
  line-height: 1.65;
}

.job-create-modern #panel-industrial_tryon > .help:first-child b {
  color: #0f172a;
  font-size: 16px;
}

.job-create-modern .industrial-prompt-card {
  min-height: 200px;
  margin-bottom: 18px;
  padding: 15px 15px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(204, 251, 241, 0.35),
    rgba(255, 255, 255, 0.98)
  );
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.04);
}

.job-create-modern .industrial-prompt-card:focus {
  border-color: rgba(15, 118, 110, 0.4);
  background: linear-gradient(
    145deg,
    rgba(204, 251, 241, 0.55),
    rgba(255, 255, 255, 1)
  );
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.09);
}

.job-create-modern label {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.job-create-modern textarea.input,
.job-create-modern input.input {
  border-radius: 14px;
  border-color: rgba(148, 163, 184, 0.4);
  background: #fff;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.segment-option {
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  background: #fff;
  color: #334155;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.segment-option:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.segment-option.is-selected {
  border-color: rgba(15, 118, 110, 0.58);
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
}

.segment-option:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.segment-option span,
.segment-option small {
  display: block;
}

.segment-option span {
  font-weight: 900;
}

.segment-option small {
  margin-top: 3px;
  color: inherit;
  font-size: 11px;
  opacity: 0.78;
}

.advanced-settings {
  grid-column: 1 / -1;
  margin: 4px 0 2px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: #f8fafc;
}

.advanced-settings summary {
  color: #0f172a;
  font-weight: 900;
  cursor: pointer;
}

.advanced-settings p {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.advanced-json-field {
  margin-top: 14px;
}

.advanced-json-field textarea {
  min-height: 84px;
}

.job-submit-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(15, 118, 110, 0.07), #fff);
}

.job-cost-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  color: #0f172a;
}

.job-cost-panel span {
  font-weight: 900;
}

.job-cost-panel span:first-child {
  color: #0f766e;
}

.job-cost-panel small {
  flex-basis: 100%;
  color: var(--muted);
}

.job-submit-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
}

.job-create-modern #submit_job_btn {
  min-width: 230px;
  min-height: 56px;
  padding: 0 24px;
  border-radius: 16px;
  background: #0f172a;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.job-create-modern #submit_job_btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #0b1220;
}

.job-create-modern #submit_job_btn:disabled {
  cursor: not-allowed;
  opacity: 1;
  background: #e5e7eb;
  color: #94a3b8;
  box-shadow: none;
}

.preflight-card h2 {
  margin-bottom: 6px;
  color: #0f172a;
}

.preflight-card > p {
  color: var(--muted);
  line-height: 1.65;
}

.preflight-note,
.preflight-status {
  margin-top: 16px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #f8fafc;
  color: var(--muted);
  line-height: 1.65;
}

.preflight-status {
  border: 1px solid rgba(148, 163, 184, 0.28);
  font-weight: 900;
}

.preflight-status.is-ready {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(22, 163, 74, 0.08);
  color: #15803d;
}

.video-preview-stack {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.video-preview-stack b {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
}

.video-preview-box {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}

.video-preview-box img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
}

#submit_job_btn.is-loading {
  gap: 10px;
  opacity: 0.92;
}

.btn-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  border-radius: 999px;
  animation: generationSpin 0.8s linear infinite;
}

.generation-open {
  overflow: hidden;
}

.generation-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 32%),
    radial-gradient(circle at 80% 80%, rgba(34, 211, 238, 0.18), transparent 34%),
    rgba(8, 12, 20, 0.68);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.generation-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.generation-glow {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 34%, transparent);
  filter: blur(18px);
  opacity: 0.35;
  animation: generationFloat 7s ease-in-out infinite;
  will-change: transform, opacity;
}

.generation-glow-a {
  top: 10%;
  left: 12%;
}

.generation-glow-b {
  right: 10%;
  bottom: 12%;
  animation-delay: -2.8s;
}

.generation-panel {
  position: relative;
  width: min(780px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.76)),
    var(--surface);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.3);
  color: #111827;
}

.generation-overlay.is-complete .generation-panel,
.generation-overlay.is-failed .generation-panel {
  overflow: auto;
}

html[data-theme="runway"] .generation-panel {
  background: linear-gradient(145deg, rgba(23, 26, 33, 0.94), rgba(17, 20, 26, 0.84));
  color: var(--text);
}

.generation-head {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 20px;
  align-items: center;
}

.generation-ring {
  position: relative;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: conic-gradient(from 20deg, var(--accent), #22d3ee, #a78bfa, var(--accent));
  animation: generationSpin 1.2s linear infinite;
}

.generation-ring::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 999px;
  background: var(--surface);
}

.generation-ring span {
  position: absolute;
  inset: 26px;
  z-index: 1;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 55%, transparent);
  animation: generationPulse 1.4s ease-in-out infinite;
}

.generation-ring.is-success,
.generation-ring.is-failed {
  animation: none;
}

.generation-ring.is-success span {
  background: var(--ok);
}

.generation-ring.is-success {
  background: var(--ok);
  box-shadow: 0 16px 34px rgba(22, 163, 74, 0.18);
}

.generation-ring.is-success::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: 43%;
  top: 32%;
  width: 18%;
  height: 34%;
  border: solid #fff;
  border-width: 0 5px 5px 0;
  transform: rotate(45deg);
}

.generation-ring.is-success span {
  display: none;
}

.generation-ring.is-failed span {
  background: var(--danger);
}

.generation-kicker {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.generation-title {
  margin: 0 0 6px;
  font-size: 26px;
}

.generation-status {
  margin: 0;
  color: #475467;
}

html[data-theme="runway"] .generation-status {
  color: var(--muted);
}

.generation-meter {
  margin-top: 24px;
}

.generation-meter-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 900;
}

.generation-percent {
  color: var(--accent);
}

.generation-elapsed {
  color: #667085;
}

html[data-theme="runway"] .generation-elapsed {
  color: var(--muted);
}

.generation-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.1);
}

.generation-bar span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #22d3ee, #a78bfa);
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 34%, transparent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s ease;
}

.generation-timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.generation-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(102, 112, 133, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  color: #667085;
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

html[data-theme="runway"] .generation-step {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.generation-step-mark {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.generation-step.is-active {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 54%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, rgba(255, 255, 255, 0.62));
  color: var(--accent);
}

.generation-step.is-active .generation-step-mark {
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 13%, transparent);
  animation: generationPulse 1.2s ease-in-out infinite;
}

.generation-step.is-done {
  color: var(--ok);
}

.generation-step.is-done .generation-step-mark {
  border-color: var(--ok);
  background: var(--ok);
}

.generation-step.is-done .generation-step-mark::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.generation-result {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.generation-result[hidden] {
  display: none;
}

.generation-result.is-success {
  border-color: color-mix(in srgb, var(--ok) 44%, var(--line));
}

.generation-result.is-failed {
  border-color: color-mix(in srgb, var(--danger) 44%, var(--line));
}

.generation-result-media {
  min-height: 180px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-soft);
}

.generation-result-media img {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: contain;
  display: block;
}

.generation-result h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.generation-result p {
  color: #475467;
}

html[data-theme="runway"] .generation-result p {
  color: var(--muted);
}

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

.generation-overlay.is-complete .generation-meter {
  display: none;
}

.generation-overlay.is-complete .generation-ring {
  animation: none;
}

.generation-overlay.is-complete .generation-panel::before {
  display: none;
}

.generation-overlay.is-complete .generation-result-media {
  min-height: 0;
}

.generation-overlay.is-complete .generation-result-media img {
  max-height: 42vh;
  object-fit: contain;
}

.generation-light-action {
  background: #f8fafc;
}

.generation-fail-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 42px;
  font-weight: 900;
}

.dashboard-list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
}

#dashboard-batch-form > .dashboard-list-tools:first-of-type {
  display: inline-flex;
  margin: 0 12px 14px 0;
}

#dashboard-batch-form > .dashboard-list-tools:nth-of-type(2) {
  display: inline-flex;
  margin: 0 0 14px;
}

.dashboard-filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-stat-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 16px;
}

.dashboard-stat-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.dashboard-stat-card h2 {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-stat-card p {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  line-height: 1.2;
}

.card > .grid[style*="margin:16px 0"] {
  display: none;
}

.dashboard-per-page {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  white-space: nowrap;
}

.dashboard-per-page select {
  width: auto;
  min-width: 104px;
  min-height: 38px;
}

#dashboard_batch_download_btn {
  min-height: 38px;
}

.upload-card-enhanced {
  overflow: hidden;
}

.upload-helper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.upload-helper strong,
.upload-helper span {
  display: block;
}

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

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

.upload-actions .btn {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

#model_preview_box.has-preview,
#garment_preview_box.has-preview {
  border-style: solid !important;
}

.job-cost-panel {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin: 16px 0 8px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.job-cost-panel span {
  display: block;
}

#panel-basic > .help:last-child,
#panel-pro > .help:last-child,
#panel-industrial_tryon > .help:last-child {
  display: none;
}

.job-cost-panel .is-ready {
  color: var(--ok);
}

.job-cost-panel .is-waiting {
  color: var(--warn);
}

.btn.is-disabled-soft {
  opacity: 0.58;
}

.result-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.result-actions .flash {
  width: 100%;
  margin-bottom: 4px;
}

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

.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px 12px;
  text-align: center;
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.select-current-page {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  white-space: nowrap;
}

.dashboard-job-check,
#select_current_page {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.dashboard-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

#dashboard-batch-form {
  position: relative;
}

#dashboard-batch-form.is-loading {
  opacity: 0.68;
  pointer-events: none;
}

#dashboard-batch-form.is-loading::after {
  content: "正在加载任务列表...";
  position: absolute;
  inset: 44px 0 auto 0;
  margin: auto;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 900;
  z-index: 2;
}

.dashboard-page-jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.dashboard-page-jump input {
  width: 82px;
  min-height: 38px;
  padding: 7px 9px;
  text-align: center;
}

.dashboard-page-status {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.btn.is-disabled {
  pointer-events: none;
  opacity: 0.48;
}

#dashboard-batch-form {
  margin-top: 18px;
}

#dashboard-batch-form > .dashboard-list-tools:first-of-type,
#dashboard-batch-form > .dashboard-list-tools:nth-of-type(2) {
  padding: 0;
  border: 0;
  background: transparent;
}

#dashboard-batch-form > .dashboard-list-tools:nth-of-type(2) {
  justify-content: flex-start;
}

#dashboard-batch-form .table {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 16px;
  background: var(--surface);
}

#dashboard-batch-form .table th {
  padding-top: 14px;
  padding-bottom: 14px;
  color: color-mix(in srgb, var(--text) 62%, var(--muted));
  letter-spacing: 0;
}

#dashboard-batch-form .table td {
  vertical-align: middle;
}

#dashboard-batch-form .table td:last-child {
  white-space: nowrap;
}

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 190px;
}

#dashboard-batch-form .table td:last-child .dashboard-action-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: green;
  font-weight: 800;
  font: inherit;
  line-height: 1.2;
  cursor: pointer;
}

.dashboard-action-link:hover {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.dashboard-action-link.is-disabled {
  cursor: not-allowed;
  color: var(--muted);
  opacity: 0.56;
}

.dashboard-download-link {
  margin-left: 0;
}

.dashboard-delete-dialog[hidden] {
  display: none;
}

.dashboard-delete-dialog {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.dashboard-delete-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(8px);
}

.dashboard-delete-card {
  position: relative;
  width: min(440px, 100%);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 96%, #ffffff);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.dashboard-delete-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 999px;
  color: #b42318;
  background: #fef3f2;
  font-weight: 950;
}

.dashboard-delete-kicker {
  margin: 0 0 4px;
  color: #b42318;
  font-size: 13px;
  font-weight: 900;
}

.dashboard-delete-copy h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.dashboard-delete-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.dashboard-delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.dashboard-delete-actions .btn {
  min-width: 108px;
}

body.has-dashboard-dialog {
  overflow: hidden;
}

@media (max-width: 720px) {
  #dashboard-batch-form {
    padding: 12px;
    border-radius: 16px;
  }

  #dashboard-batch-form .table td:last-child {
    white-space: normal;
  }

  .dashboard-delete-actions {
    flex-direction: column-reverse;
  }

  .dashboard-delete-actions .btn,
  .dashboard-delete-actions .btn.secondary {
    width: 100%;
    margin-bottom: 0;
  }
}

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

@keyframes generationPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.86);
    opacity: 0.62;
  }
}

@keyframes generationFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.34;
  }
  50% {
    transform: translate3d(24px, -18px, 0) scale(1.06);
    opacity: 0.48;
  }
}

@media (max-width: 760px) {
  .generation-overlay {
    padding: 14px;
  }

  .generation-panel {
    padding: 20px;
  }

  .generation-head {
    grid-template-columns: 64px 1fr;
    gap: 14px;
  }

  .generation-ring {
    width: 62px;
    height: 62px;
  }

  .generation-ring span {
    inset: 21px;
  }

  .generation-title {
    font-size: 21px;
  }

  .generation-timeline,
  .generation-result {
    grid-template-columns: 1fr;
  }

  .generation-actions .btn,
  .generation-actions .btn.secondary {
    width: auto;
    margin-bottom: 0;
  }

  .job-new-head {
    flex-direction: column;
  }

  .credits-badge {
    width: 100%;
    text-align: left;
  }

  .dashboard-list-tools {
    align-items: stretch;
    flex-direction: column;
  }

  #dashboard-batch-form > .dashboard-list-tools:first-of-type,
  #dashboard-batch-form > .dashboard-list-tools:nth-of-type(2) {
    display: flex;
    width: 100%;
    margin: 0 0 10px;
  }

  .dashboard-filter-group,
  .upload-helper,
  .job-cost-panel,
  .credits-head,
  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-stat-summary {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-per-page {
    justify-content: space-between;
    width: 100%;
  }

  .dashboard-per-page select {
    flex: 0 0 120px;
  }

  .dashboard-pagination .btn,
  .dashboard-pagination .btn.secondary {
    width: auto;
    margin-bottom: 0;
  }

  .dashboard-page-jump {
    width: 100%;
    justify-content: center;
  }

  .upload-actions,
  .result-actions {
    width: 100%;
  }

  .upload-actions .btn,
  .result-actions .btn,
  .result-actions .btn.secondary {
    width: 100%;
  }
}

#model_upload_wrap.upload-drop-wrap,
#garment_upload_wrap.upload-drop-wrap {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#model_upload_wrap.upload-drop-wrap:hover,
#garment_upload_wrap.upload-drop-wrap:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

#model_upload_wrap.upload-drop-wrap::before,
#garment_upload_wrap.upload-drop-wrap::before,
#model_upload_wrap.upload-drop-wrap > label,
#garment_upload_wrap.upload-drop-wrap > label {
  display: none;
}

#model_upload_wrap.upload-drop-wrap .upload-dropzone,
#garment_upload_wrap.upload-drop-wrap .upload-dropzone {
  min-height: 188px;
  margin-top: 0;
  padding: 22px 18px;
  border: 1px dashed color-mix(in srgb, var(--accent) 46%, var(--line));
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

#model_upload_wrap.upload-drop-wrap .upload-dropzone:hover,
#model_upload_wrap.upload-drop-wrap .upload-dropzone:focus-visible,
#model_upload_wrap.upload-drop-wrap .upload-dropzone.is-dragover,
#garment_upload_wrap.upload-drop-wrap .upload-dropzone:hover,
#garment_upload_wrap.upload-drop-wrap .upload-dropzone:focus-visible,
#garment_upload_wrap.upload-drop-wrap .upload-dropzone.is-dragover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  box-shadow: 0 14px 28px color-mix(in srgb, var(--accent) 14%, transparent);
}

#model_upload_wrap.upload-drop-wrap .upload-drop-icon,
#garment_upload_wrap.upload-drop-wrap .upload-drop-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent);
  box-shadow: none;
}

#model_upload_wrap.upload-drop-wrap .upload-dropzone.has-file .upload-drop-icon,
#garment_upload_wrap.upload-drop-wrap .upload-dropzone.has-file .upload-drop-icon {
  width: min(100%, 260px);
  height: auto;
  min-height: 34px;
  padding: 8px 12px;
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#model_upload_wrap.upload-drop-wrap .upload-dropzone strong,
#garment_upload_wrap.upload-drop-wrap .upload-dropzone strong {
  font-size: 16px;
}

#model_upload_wrap.upload-drop-wrap .upload-dropzone span,
#garment_upload_wrap.upload-drop-wrap .upload-dropzone span {
  max-width: 280px;
  font-size: 13px;
  line-height: 1.5;
}

#model_upload_wrap.upload-drop-wrap .upload-dropzone em,
#garment_upload_wrap.upload-drop-wrap .upload-dropzone em {
  padding: 7px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  font-size: 13px;
}

.generation-overlay {
  background:
    radial-gradient(circle at 50% 24%, rgba(20, 184, 166, 0.18), transparent 34%),
    radial-gradient(circle at 78% 76%, rgba(124, 58, 237, 0.12), transparent 32%),
    #f8fafc;
}

.generation-overlay.is-visible::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(34, 211, 238, 0.14), transparent 36%);
  animation: aiWaitBreath 4.8s ease-in-out infinite;
  pointer-events: none;
}

.generation-panel {
  width: min(520px, 92vw);
  max-height: calc(100vh - 32px);
  padding: 34px 30px;
  border: 0;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  text-align: center;
  overflow: hidden;
  animation: aiWaitFloat 4.2s ease-in-out infinite;
}

.generation-overlay.is-complete .generation-panel,
.generation-overlay.is-failed .generation-panel {
  overflow: auto;
}

.generation-panel::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 0;
  height: 110px;
  background: linear-gradient(180deg, transparent, rgba(34, 211, 238, 0.18), transparent);
  opacity: 0.72;
  transform: translateY(-110%);
  animation: aiScanLine 2.8s ease-in-out infinite;
  pointer-events: none;
}

.generation-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.generation-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.generation-title {
  margin: 0;
  font-size: 25px;
}

.generation-subtitle,
.generation-status {
  margin: 6px 0 0;
  color: var(--muted);
}

.generation-status {
  font-weight: 800;
}

.generation-ring {
  width: 118px;
  height: 118px;
  background: conic-gradient(from 0deg, var(--accent), #22d3ee, #8b5cf6, var(--accent));
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.26);
  animation: generationSpin 1.4s linear infinite;
}

.generation-ring::after {
  inset: 12px;
  background: #fff;
}

.generation-ring span {
  inset: 44px;
}

.generation-meter {
  margin-top: 22px;
}

.generation-meter-top {
  justify-content: center;
  gap: 18px;
}

.generation-percent {
  font-size: 22px;
}

.generation-bar {
  height: 10px;
  background: #e8eef5;
}

.generation-bar span {
  background: linear-gradient(90deg, var(--accent), #22d3ee, #8b5cf6, var(--accent));
  background-size: 220% 100%;
  animation: aiProgressFlow 1.8s linear infinite;
}

.generation-long-wait {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 14px;
  background: rgba(15, 118, 110, 0.06);
  color: #0f766e;
  font-size: 13px;
  line-height: 1.5;
}

.generation-long-wait[hidden] {
  display: none;
}

.generation-long-wait .btn {
  min-height: 34px;
  padding: 7px 12px;
  white-space: nowrap;
}

.generation-timeline {
  display: none !important;
}

.generation-result {
  grid-template-columns: 1fr;
  margin-top: 22px;
  background: transparent;
  border: 0;
  padding: 0;
}

.generation-actions {
  justify-content: center;
}

@keyframes aiWaitBreath {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes aiWaitFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes aiScanLine {
  0% { transform: translateY(-120%); opacity: 0; }
  20% { opacity: 0.8; }
  70% { opacity: 0.8; }
  100% { transform: translateY(520%); opacity: 0; }
}

@keyframes aiProgressFlow {
  to { background-position: 220% 0; }
}

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

  .generation-panel {
    width: 92vw;
    padding: 28px 18px;
  }

  .generation-ring {
    width: 104px;
    height: 104px;
  }

  .generation-title {
    font-size: 22px;
  }

  .generation-actions {
    flex-direction: column;
  }

  .generation-actions .btn,
  .generation-actions .btn.secondary {
    width: 100%;
  }
}

.ai-task-hero,
.ai-batch-hero,
.ai-result-card,
.ai-input-card,
.ai-batch-list {
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
}

.ai-task-hero,
.ai-batch-hero {
  padding: 24px;
  margin-bottom: 18px;
}

.ai-task-hero-main {
  display: flex;
  gap: 18px;
  align-items: center;
}

.ai-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.ai-task-hero h1,
.ai-batch-hero h1 {
  margin: 4px 0 6px;
  font-size: 26px;
}

.ai-task-hero p,
.ai-batch-hero p {
  margin: 0;
  color: var(--muted);
}

.ai-orbit {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  position: relative;
}

.ai-orbit::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-top-color: var(--accent);
  animation: aiDetailSpin 1.1s linear infinite;
}

.ai-orbit.is-still::before {
  animation: none;
  border-color: var(--ok);
}

.ai-orbit span {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: var(--accent);
}

.ai-task-meta,
.ai-actions,
.ai-task-foot,
.ai-progress-head,
.ai-batch-status,
.ai-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-task-meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.ai-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ai-status-badge.is-active,
.ai-status-badge.is-processing {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface));
  color: var(--accent);
}

.ai-status-badge.is-success {
  border-color: color-mix(in srgb, var(--ok) 28%, var(--line));
  background: var(--ok-soft);
  color: var(--ok);
}

.ai-status-badge.is-failed {
  border-color: color-mix(in srgb, var(--danger) 24%, var(--line));
  background: var(--danger-soft);
  color: var(--danger);
}

.ai-status-badge.is-partial {
  border-color: color-mix(in srgb, var(--warn) 28%, var(--line));
  background: var(--warn-soft);
  color: var(--warn);
}

.ai-progress-wrap {
  margin-top: 22px;
}

.ai-progress-head {
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.ai-progress-head strong {
  color: var(--text);
}

.ai-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-soft) 82%, var(--line));
}

.ai-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #38bdf8));
  transition: width 0.45s ease;
}

.ai-task-foot {
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.ai-job-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.ai-result-card,
.ai-input-card,
.ai-batch-list {
  padding: 22px;
}

.ai-result-gallery {
  display: grid;
  gap: 18px;
}

.ai-result-figure {
  margin: 0;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-soft);
  text-align: center;
}

.ai-result-figure img,
.ai-result-figure video {
  display: block;
  width: 100%;
  max-height: 720px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.1);
}

.ai-result-figure figcaption {
  margin-top: 12px;
}

.ai-actions {
  margin-top: 18px;
}

.ai-fail-box,
.ai-soft-alert {
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--danger-soft);
  color: var(--danger);
}

.ai-soft-alert {
  background: var(--warn-soft);
  color: var(--warn);
}

.ai-wait-placeholder {
  padding: 28px;
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
}

.ai-skeleton {
  height: 180px;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--surface-soft), color-mix(in srgb, var(--surface) 74%, var(--line)), var(--surface-soft));
  background-size: 220% 100%;
  animation: aiShimmer 1.8s ease-in-out infinite;
}

.ai-input-preview {
  margin-top: 14px;
}

.ai-input-preview img {
  display: block;
  width: 100%;
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.ai-admin-details {
  margin: 0 0 16px;
  color: var(--muted);
}

.ai-admin-details pre,
.ai-error-detail pre {
  overflow: auto;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-soft);
  white-space: pre-wrap;
}

.admin-shell .card {
  overflow: hidden;
}

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

.admin-head h1 {
  margin-bottom: 6px;
}

.admin-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.admin-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.admin-nav a:hover {
  color: var(--text);
  background: var(--row-hover);
}

.admin-nav a.active {
  color: #fff;
  background: var(--text);
}

.admin-metrics {
  gap: 12px;
}

.admin-stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.admin-stat span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.admin-stat b {
  display: block;
  font-size: 28px;
  line-height: 1.1;
}

.admin-filter,
.admin-inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-filter {
  margin: 12px 0 16px;
}

.admin-filter .input {
  max-width: 220px;
}

.admin-inline-form .input {
  width: 120px;
}

.admin-inline-form .input[name="note"] {
  width: 180px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-thumb {
  width: 72px;
  max-height: 96px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-log-snippet {
  display: block;
  max-width: 520px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
  font-size: 12px;
}

.ai-batch-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
}

.ai-batch-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ai-batch-metrics span {
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.ai-batch-metrics b {
  display: block;
  font-size: 22px;
}

.ai-batch-metrics em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.ai-section-head {
  justify-content: space-between;
  margin-bottom: 14px;
}

.ai-batch-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 110px 150px;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.ai-batch-index {
  color: var(--muted);
  font-weight: 900;
}

.ai-batch-info p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.ai-batch-preview img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  margin-bottom: 8px;
}

.ai-thumb-placeholder {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
}

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

@keyframes aiShimmer {
  to { background-position: -220% 0; }
}

@media (max-width: 820px) {
  .ai-task-hero-main,
  .ai-job-layout,
  .ai-batch-hero {
    grid-template-columns: 1fr;
  }

  .ai-job-layout {
    display: block;
  }

  .ai-input-card {
    margin-top: 18px;
  }

  .ai-batch-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-batch-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .ai-actions .btn,
  .ai-actions .btn.secondary {
    width: 100%;
    text-align: center;
  }
}

.job-create-modern #model_upload_wrap.upload-drop-wrap .upload-dropzone,
.job-create-modern #garment_upload_wrap.upload-drop-wrap .upload-dropzone {
  min-height: 236px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
}

.job-create-modern #model_upload_wrap.upload-drop-wrap .upload-dropzone.has-file,
.job-create-modern #garment_upload_wrap.upload-drop-wrap .upload-dropzone.has-file {
  border-color: rgba(22, 163, 74, 0.34);
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.05), #fff 42%);
}

@media (max-width: 900px) {
  .job-new-layout {
    display: block;
  }

  .job-submit-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .job-submit-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .job-submit-actions .btn,
  .job-submit-actions .btn.secondary,
  .job-create-modern #submit_job_btn {
    width: 100%;
  }

  .segmented-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .upload-file-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .upload-file-meta b {
    max-width: 100%;
  }
}

.generation-overlay.is-complete .generation-meter {
  display: none;
}

.generation-overlay.is-complete .generation-ring {
  animation: none;
  background: var(--ok);
  box-shadow: 0 16px 34px rgba(22, 163, 74, 0.18);
}

.generation-overlay.is-complete .generation-ring::before {
  content: "";
  position: absolute;
  left: 39px;
  top: 34px;
  width: 34px;
  height: 58px;
  border: solid #fff;
  border-width: 0 8px 8px 0;
  border-radius: 4px;
  transform: rotate(45deg);
  z-index: 2;
}

.generation-overlay.is-complete .generation-ring span {
  display: none;
}

.generation-overlay.is-complete .generation-panel::before {
  display: none;
}

.generation-overlay.is-complete .generation-result-media {
  min-height: 0;
}

.generation-overlay.is-complete .generation-result-media img {
  max-height: 42vh;
  object-fit: contain;
}

.generation-light-action {
  background: #f8fafc;
  color: #334155;
}

@media (max-width: 760px) {
  .generation-long-wait {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }

  .generation-long-wait .btn {
    width: 100%;
  }

  .generation-overlay.is-complete .generation-result-media img {
    max-height: 42vh;
  }

  .generation-overlay.is-complete .generation-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .generation-overlay.is-complete .generation-actions .btn,
  .generation-overlay.is-complete .generation-actions .btn.secondary {
    width: 100%;
    margin-bottom: 0;
  }
}

.model-swap-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.model-swap-hero h1 {
  margin: 4px 0 8px;
  font-size: 30px;
}

.model-swap-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.model-swap-credit {
  min-width: 150px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-soft);
  text-align: right;
}

.model-swap-credit span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.model-swap-credit strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.model-swap-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
}

.model-swap-card {
  min-width: 0;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.model-swap-card h2 {
  margin-top: 0;
}

.model-swap-form label {
  display: block;
  margin-top: 12px;
}

.model-swap-form .input,
.model-swap-form select,
.model-swap-form textarea {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 760px) {
  .model-swap-hero {
    display: block;
  }

  .model-swap-credit {
    margin-top: 16px;
    text-align: left;
  }

  .model-swap-layout {
    grid-template-columns: 1fr;
  }
}

.recharge-package-grid {
  margin: 14px 0 18px;
}

.recharge-package {
  display: block;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
}

.recharge-package input {
  margin-right: 8px;
}

.recharge-package strong,
.recharge-package em,
.recharge-package span,
.recharge-package small {
  display: block;
  margin-top: 6px;
}

.recharge-package em {
  font-style: normal;
  font-size: 24px;
  font-weight: 900;
}

.recharge-package small {
  color: var(--muted);
}

/* Async list pagination */
.async-table { margin-top: 12px; }
.async-filter-bar { display:flex; gap:10px; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; margin:12px 0; }
.async-filter-bar .dashboard-filter-group { display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.async-filter-bar .dashboard-per-page { display:flex; flex-direction:column; gap:6px; min-width:140px; font-size:13px; color:var(--muted); }
.async-filter-bar input[type="search"] { min-width:220px; }

.dashboard-toolbar-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-left: auto;
}

.async-filter-bar > [data-async-refresh],
.async-filter-bar > button[data-async-refresh] {
  align-self: flex-end;
}

@media (max-width: 768px) {
  .dashboard-toolbar-actions {
    width: 100%;
    margin-left: 0;
  }
  .dashboard-toolbar-actions .btn {
    width: 100%;
  }
}
.async-table-meta { min-height:22px; margin:6px 0; color:var(--muted); font-size:13px; }
.async-table-meta [data-async-error] { color:#b42318; }
.async-table.is-loading .table-wrap { opacity:.68; }
.async-pagination { gap:10px; flex-wrap:wrap; }
.async-pagination button:disabled { opacity:.45; cursor:not-allowed; }
.async-pagination .dashboard-per-page { display:flex; align-items:center; gap:6px; }

/* Kie-style batch generation form */
.ai-batch-create .upload-card.mini {
  min-height: 112px;
  padding: 14px;
}
.batch-studio-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.batch-studio-slot {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.batch-studio-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.batch-studio-preview {
  min-height: 118px;
  margin: 10px 0 12px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  text-align: center;
}
.batch-studio-preview.is-large {
  min-height: 220px;
}
.batch-studio-preview img {
  width: 100%;
  height: 118px;
  object-fit: contain;
  display: block;
  background: #fff;
}
.batch-studio-preview.is-large img {
  height: 220px;
}
.batch-studio-preview small {
  display: block;
  width: 100%;
  padding: 6px 8px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.field-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.field-row .input {
  flex: 1 1 auto;
}
.ai-batch-thumb img,
.ai-batch-preview img {
  border-radius: 12px;
}
.ai-batch-thumb img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  display: block;
  margin-bottom: 8px;
}
@media (max-width: 920px) {
  .batch-studio-slots {
    grid-template-columns: 1fr;
  }
}

/* SaaS-style refreshed Kie batch page */
.ai-batch-pro {
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(247,249,252,0.98) 100%);
}
.ai-batch-pro-head h1 {
  margin-bottom: 8px;
}
.batch-studio-panel,
.batch-studio-sidebar-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,0.94);
  padding: 20px;
}
.batch-studio-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.batch-studio-panel-head h2,
.batch-studio-sidebar-card h2 {
  margin-bottom: 6px;
}
.batch-studio-counter {
  min-width: 88px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  text-align: center;
}
.batch-studio-counter b {
  display: block;
  font-size: 24px;
  line-height: 1;
}
.batch-studio-counter span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.batch-studio-multi-uploader {
  min-height: 132px;
  margin-bottom: 14px;
}
.batch-studio-empty-state {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 150px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--surface-soft);
  text-align: center;
  padding: 20px;
}
.batch-studio-model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.batch-studio-model-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}
.batch-studio-model-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.batch-studio-model-card-head span {
  max-width: 62%;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.batch-studio-static-field {
  display: flex;
  align-items: center;
  min-height: 44px;
  background: var(--surface-soft);
}
.batch-studio-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}
.batch-studio-summary div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
  padding: 12px 14px;
}
.batch-studio-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.batch-studio-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}
@media (max-width: 920px) {
  .batch-studio-model-grid {
    grid-template-columns: 1fr;
  }
  .batch-studio-panel-head {
    flex-direction: column;
  }
  .batch-studio-counter {
    min-width: 0;
  }
}



.ai-batch-create.ai-batch-pro {
  --batch-ink: #09090b;
  --batch-muted: #71717a;
  --batch-line: #e4e4e7;
  --batch-soft: #f7f7f8;
  --batch-focus: rgba(9,9,11,.08);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--batch-line);
  background:
    radial-gradient(circle at 12% -8%, rgba(24,24,27,.08), transparent 34%),
    radial-gradient(circle at 88% 0%, rgba(113,113,122,.10), transparent 28%),
    linear-gradient(180deg, #fff 0%, #fafafa 58%, #f4f4f5 100%);
  box-shadow: 0 28px 80px rgba(9,9,11,.08);
}

.ai-batch-create.ai-batch-pro::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(9,9,11,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(9,9,11,.035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 48%);
}

.ai-batch-pro > * {
  position: relative;
  z-index: 1;
}

.ai-batch-pro .ai-batch-pro-head {
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(228,228,231,.72);
  margin-bottom: 20px;
}

.ai-batch-pro .ai-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--batch-line);
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: var(--batch-ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  box-shadow: 0 1px 0 rgba(9,9,11,.04);
}

.ai-batch-pro .ai-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #18181b;
  box-shadow: 0 0 0 4px rgba(24,24,27,.08);
}

.ai-batch-pro .ai-batch-pro-head h1 {
  margin-top: 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: .98;
  letter-spacing: -.045em;
  color: var(--batch-ink);
}

.ai-batch-pro .ai-batch-pro-head p {
  max-width: 760px;
  margin-top: 12px;
  color: var(--batch-muted);
  font-size: 15px;
  line-height: 1.7;
}

.ai-batch-pro .ai-batch-pro-head .btn.secondary {
  border-color: #d4d4d8;
  background: rgba(255,255,255,.82);
  color: #18181b;
  box-shadow: 0 12px 32px rgba(9,9,11,.06);
}

.ai-batch-pro .grid {
  align-items: start;
}

.ai-batch-pro .batch-studio-panel,
.ai-batch-pro .batch-studio-sidebar-card {
  border: 1px solid rgba(212,212,216,.86);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.88));
  border-radius: 24px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 20px 60px rgba(9,9,11,.07);
}

.ai-batch-pro .batch-studio-sidebar-card {
  position: sticky;
  top: 18px;
}

.ai-batch-pro .batch-studio-panel-head {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(228,228,231,.76);
  margin-bottom: 16px;
}

.ai-batch-pro h2 {
  color: var(--batch-ink);
  font-size: 18px;
  letter-spacing: -.02em;
}

.ai-batch-pro .muted,
.ai-batch-pro .help {
  color: var(--batch-muted);
}

.ai-batch-pro label {
  display: block;
  margin-top: 14px;
  margin-bottom: 7px;
  color: #27272a;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: -.01em;
}

.ai-batch-pro .input,
.ai-batch-pro select.input,
.ai-batch-pro textarea.input {
  min-height: 44px;
  border: 1px solid #d4d4d8;
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  color: #18181b;
  box-shadow: inset 0 1px 2px rgba(9,9,11,.035);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
}

.ai-batch-pro textarea.input {
  resize: vertical;
  line-height: 1.55;
}

.ai-batch-pro .input:focus,
.ai-batch-pro select.input:focus,
.ai-batch-pro textarea.input:focus {
  outline: none;
  border-color: #18181b;
  background: #fff;
  box-shadow: 0 0 0 5px var(--batch-focus), inset 0 1px 2px rgba(9,9,11,.04);
}

.ai-batch-pro .upload-card,
.ai-batch-pro .upload-card-enhanced,
.ai-batch-pro .batch-studio-multi-uploader {
  border: 1px dashed #c9c9cf;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(244,244,245,.72)),
    repeating-linear-gradient(-45deg, transparent 0 12px, rgba(9,9,11,.018) 12px 24px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.ai-batch-pro .upload-card:hover,
.ai-batch-pro .upload-card-enhanced:hover,
.ai-batch-pro .batch-studio-multi-uploader:hover {
  transform: translateY(-1px);
  border-color: #18181b;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(250,250,250,.92)),
    repeating-linear-gradient(-45deg, transparent 0 12px, rgba(9,9,11,.025) 12px 24px);
  box-shadow: 0 18px 46px rgba(9,9,11,.09);
}

.ai-batch-pro .upload-card-body strong {
  color: #18181b;
  font-size: 15px;
}

.ai-batch-pro .upload-card-body small {
  color: var(--batch-muted);
}

.ai-batch-pro .batch-studio-counter {
  border-color: #d4d4d8;
  background: #18181b;
  color: #fff;
  box-shadow: 0 14px 36px rgba(24,24,27,.18);
}

.ai-batch-pro .batch-studio-counter b {
  color: #fff;
}

.ai-batch-pro .batch-studio-counter span {
  color: rgba(255,255,255,.62);
}

.ai-batch-pro .batch-studio-empty-state {
  min-height: 170px;
  border-color: #d4d4d8;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(244,244,245,.84)),
    radial-gradient(circle at center, rgba(9,9,11,.05), transparent 42%);
  color: var(--batch-muted);
}

.ai-batch-pro .batch-studio-empty-state strong {
  color: #18181b;
}

.ai-batch-pro .batch-studio-model-grid {
  gap: 16px;
}

.ai-batch-pro .batch-studio-model-card {
  border: 1px solid #dfdfe3;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #fafafa);
  box-shadow: 0 16px 42px rgba(9,9,11,.065);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ai-batch-pro .batch-studio-model-card:hover {
  transform: translateY(-2px);
  border-color: #c9c9cf;
  box-shadow: 0 22px 56px rgba(9,9,11,.09);
}

.ai-batch-pro .batch-studio-model-card-head b {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #18181b;
  color: #fff;
  font-size: 12px;
  letter-spacing: -.01em;
}

.ai-batch-pro .batch-studio-model-card-head span {
  color: #71717a;
}

.ai-batch-pro .batch-studio-preview {
  border-color: #e4e4e7;
  border-radius: 18px;
  background:
    linear-gradient(45deg, rgba(244,244,245,.92) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(244,244,245,.92) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(244,244,245,.92) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(244,244,245,.92) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}

.ai-batch-pro .batch-studio-preview img {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(9,9,11,.04);
}

.ai-batch-pro .batch-studio-preview small {
  border-top-color: #e4e4e7;
  background: rgba(255,255,255,.92);
  color: #71717a;
}

.ai-batch-pro .field-row {
  gap: 10px;
}

.ai-batch-pro .field-row .btn.secondary {
  min-height: 44px;
  border: 1px solid #18181b;
  background: #18181b;
  color: #fff;
  box-shadow: 0 12px 26px rgba(24,24,27,.18);
}

.ai-batch-pro .field-row .btn.secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(24,24,27,.24);
}

.ai-batch-pro .batch-studio-static-field {
  border-style: solid;
  background: #f4f4f5;
  color: #27272a;
}

.ai-batch-pro .batch-studio-summary {
  margin-top: 16px;
}

.ai-batch-pro .batch-studio-summary div {
  border-color: #d4d4d8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(9,9,11,.045);
}

.ai-batch-pro .batch-studio-summary span {
  color: #71717a;
}

.ai-batch-pro .batch-studio-summary strong {
  color: #18181b;
  letter-spacing: -.02em;
}

.ai-batch-pro .ai-soft-alert {
  border: 1px solid #e4e4e7;
  border-radius: 16px;
  background: #f4f4f5 !important;
  color: #3f3f46 !important;
}

.ai-batch-pro #batch_studio_submit_btn {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border: 1px solid #09090b;
  border-radius: 16px;
  background: #09090b;
  color: #fff;
  font-weight: 850;
  letter-spacing: -.01em;
  box-shadow: 0 18px 44px rgba(9,9,11,.24);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.ai-batch-pro #batch_studio_submit_btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 60px rgba(9,9,11,.28);
}

.ai-batch-pro #batch_studio_submit_btn:disabled {
  opacity: .62;
  cursor: wait;
  transform: none;
}

@media (max-width: 920px) {
  .ai-batch-pro .batch-studio-sidebar-card {
    position: relative;
    top: auto;
  }
  .ai-batch-pro .ai-batch-pro-head {
    gap: 16px;
  }
}

/* Batch page visual unification with the current basic try-on page */
.ai-batch-create.ai-batch-pro {
  --batch-ink: var(--text);
  --batch-muted: var(--muted);
  --batch-line: var(--line);
  --batch-soft: var(--surface-soft);
  --batch-focus: color-mix(in srgb, var(--accent) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 34%),
    radial-gradient(circle at 88% 4%, rgba(34, 211, 238, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.98), color-mix(in srgb, var(--surface-soft) 44%, #ffffff));
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.07);
}

.ai-batch-create.ai-batch-pro::before {
  background-image:
    linear-gradient(color-mix(in srgb, var(--accent) 4%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 4%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.34), transparent 45%);
}

.ai-batch-pro .ai-batch-pro-head {
  padding-bottom: 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  margin-bottom: 20px;
}

.ai-batch-pro .ai-kicker {
  height: auto;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 72%, #ffffff);
  color: var(--accent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  box-shadow: none;
}

.ai-batch-pro .ai-kicker::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

.ai-batch-pro .ai-batch-pro-head h1 {
  margin-top: 12px;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #0f172a;
}

.ai-batch-pro .ai-batch-pro-head p {
  max-width: 760px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.ai-batch-pro .ai-batch-pro-head .btn.secondary {
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  background: #fff;
  color: var(--accent);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--accent) 8%, transparent);
}

.ai-batch-pro .batch-studio-panel,
.ai-batch-pro .batch-studio-sidebar-card {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 20px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.07);
}

.ai-batch-pro .batch-studio-panel-head {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
}

.ai-batch-pro h2 {
  color: #0f172a;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.ai-batch-pro label {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.ai-batch-pro .input,
.ai-batch-pro select.input,
.ai-batch-pro textarea.input {
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.ai-batch-pro .input:focus,
.ai-batch-pro select.input:focus,
.ai-batch-pro textarea.input:focus {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 11%, transparent);
}

.ai-batch-pro .upload-card,
.ai-batch-pro .upload-card-enhanced,
.ai-batch-pro .batch-studio-multi-uploader {
  border: 1.5px dashed color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 52%),
    var(--surface);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--surface) 72%, transparent);
}

.ai-batch-pro .upload-card:hover,
.ai-batch-pro .upload-card-enhanced:hover,
.ai-batch-pro .batch-studio-multi-uploader:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  box-shadow: 0 16px 32px color-mix(in srgb, var(--accent) 16%, transparent);
}

.ai-batch-pro .upload-card-body strong {
  color: #0f172a;
}

.ai-batch-pro .upload-card-body small {
  color: var(--muted);
}

.ai-batch-pro .batch-studio-counter {
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  background: linear-gradient(145deg, rgba(20,184,166,.10), #fff);
  color: var(--accent);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.ai-batch-pro .batch-studio-counter b {
  color: var(--accent);
}

.ai-batch-pro .batch-studio-counter span {
  color: var(--muted);
}

.ai-batch-pro .batch-studio-empty-state {
  border: 1.5px dashed color-mix(in srgb, var(--accent) 36%, var(--line));
  border-radius: 18px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%),
    var(--surface);
  color: var(--muted);
}

.ai-batch-pro .batch-studio-empty-state strong {
  color: #0f172a;
}

.ai-batch-pro .batch-studio-model-card {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.045);
}

.ai-batch-pro .batch-studio-model-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.ai-batch-pro .batch-studio-model-card-head b {
  background: color-mix(in srgb, var(--accent-soft) 72%, #fff);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.ai-batch-pro .batch-studio-model-card-head span {
  color: var(--muted);
}

.ai-batch-pro .batch-studio-preview {
  border: 1px dashed color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 14px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent 60%),
    var(--surface-soft);
}

.ai-batch-pro .batch-studio-preview img {
  background: #fff;
  filter: drop-shadow(0 14px 24px rgba(15, 23, 42, 0.10));
}

.ai-batch-pro .batch-studio-preview small {
  border-top-color: var(--line);
  background: #fff;
  color: var(--muted);
}

.ai-batch-pro .field-row .btn.secondary {
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: none;
}

.ai-batch-pro .field-row .btn.secondary:hover {
  background: color-mix(in srgb, var(--accent) 14%, #fff);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--accent) 14%, transparent);
}

.ai-batch-pro .batch-studio-static-field {
  background: var(--surface-soft);
  color: var(--text);
}

.ai-batch-pro .batch-studio-summary div {
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff, var(--surface-soft));
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.ai-batch-pro .batch-studio-summary span {
  color: var(--muted);
}

.ai-batch-pro .batch-studio-summary strong {
  color: #0f172a;
}

.ai-batch-pro .ai-soft-alert {
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--accent-soft) 76%, #fff) !important;
  color: color-mix(in srgb, var(--accent) 72%, #111827) !important;
}

.ai-batch-pro #batch_studio_submit_btn {
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #111827 0%, var(--accent) 56%, #22d3ee 100%);
  color: #fff;
  box-shadow: 0 16px 30px color-mix(in srgb, var(--accent) 25%, transparent);
}

.ai-batch-pro #batch_studio_submit_btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 20px 38px color-mix(in srgb, var(--accent) 30%, transparent);
}

.ai-batch-pro #batch_studio_submit_btn:disabled {
  opacity: .68;
  cursor: wait;
  transform: none;
}

.ai-batch-pro .batch-studio-sidebar-card {
  top: 18px;
}

/* Batch upload final polish: align with basic try-on visual system */
.ai-batch-pro {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.ai-batch-pro::before {
  content: "";
  position: absolute;
  inset: -120px -80px auto auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(20, 184, 166, .18), rgba(20, 184, 166, 0) 68%);
  pointer-events: none;
  z-index: -1;
}
.ai-batch-pro .upload-card,
.ai-batch-pro .btn,
.ai-batch-pro .batch-studio-remove,
.ai-batch-pro .batch-studio-select {
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.ai-batch-pro .upload-card:hover,
.ai-batch-pro .batch-studio-model-card:hover {
  transform: translateY(-2px);
}
.ai-batch-pro .upload-card:active,
.ai-batch-pro .btn:active,
.ai-batch-pro .batch-studio-remove:active {
  transform: translateY(0) scale(.99);
}
.ai-batch-pro .upload-card.upload-card-enhanced {
  border: 1.5px dashed rgba(20, 184, 166, .46);
  background:
    linear-gradient(180deg, rgba(240, 253, 250, .9), rgba(255,255,255,.96)),
    radial-gradient(circle at top right, rgba(45, 212, 191, .16), transparent 42%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}
.ai-batch-pro .upload-card.upload-card-enhanced:hover {
  border-color: rgba(13, 148, 136, .82);
  box-shadow: 0 18px 44px rgba(20, 184, 166, .13);
}
.ai-batch-pro .upload-card.upload-card-enhanced::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #14b8a6;
  opacity: 0;
  transform: scale(.4);
  animation: batchPointerPulse 1.8s ease-in-out infinite;
}
.ai-batch-pro .upload-card.upload-card-enhanced:hover::after {
  opacity: .9;
}
@keyframes batchPointerPulse {
  0%, 100% { transform: scale(.55); box-shadow: 0 0 0 0 rgba(20,184,166,.32); }
  50% { transform: scale(1); box-shadow: 0 0 0 8px rgba(20,184,166,0); }
}
.ai-batch-pro .batch-studio-panel,
.ai-batch-pro .batch-studio-sidebar-card {
  border-color: rgba(15, 23, 42, .08);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .06);
}
.ai-batch-pro .batch-studio-sidebar-card {
  position: sticky;
  top: 18px;
}
.ai-batch-pro .batch-studio-model-grid {
  gap: 16px;
}
.ai-batch-pro .batch-studio-model-card {
  border: 1px solid rgba(15, 23, 42, .08);
  background: linear-gradient(180deg, #fff, rgba(248, 250, 252, .92));
  box-shadow: 0 12px 30px rgba(15, 23, 42, .055);
}
.ai-batch-pro .batch-studio-model-card-head {
  margin-bottom: 8px;
}
.ai-batch-pro .batch-studio-model-card-head b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ai-batch-pro .batch-studio-model-card-head b::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, .12);
}
.ai-batch-pro .batch-studio-remove {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, .08);
  background: rgba(255,255,255,.88);
  color: #64748b;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}
.ai-batch-pro .batch-studio-remove:hover {
  color: #b42318;
  border-color: rgba(180, 35, 24, .22);
  background: rgba(254, 242, 242, .98);
  box-shadow: 0 8px 20px rgba(180, 35, 24, .08);
}
.ai-batch-pro .batch-studio-preview {
  min-height: 108px;
  border-color: rgba(20, 184, 166, .22);
  background: #f8fafc;
}
.ai-batch-pro .batch-studio-preview img {
  height: 108px;
  background: #fff;
}
.ai-batch-pro .batch-studio-preview.is-large {
  min-height: 210px;
}
.ai-batch-pro .batch-studio-preview.is-large img {
  height: 210px;
}
.ai-batch-pro .batch-studio-preview small {
  font-size: 12px;
  letter-spacing: .01em;
  color: #64748b;
  background: rgba(255,255,255,.92);
}
.ai-batch-pro .batch-studio-prompt {
  min-height: 62px;
  height: 66px;
  resize: vertical;
  line-height: 1.5;
  border-radius: 14px;
}
.ai-batch-pro .batch-studio-select {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, .10);
  background-color: #fff;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%),
    linear-gradient(180deg, #fff, #f8fafc);
  background-position:
    calc(100% - 18px) 52%,
    calc(100% - 13px) 52%,
    0 0;
  background-size: 5px 5px, 5px 5px, 100% 100%;
  background-repeat: no-repeat;
  padding-right: 38px;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}
.ai-batch-pro .batch-studio-select:hover {
  border-color: rgba(20, 184, 166, .48);
  box-shadow: 0 12px 26px rgba(20, 184, 166, .08);
}
.ai-batch-pro .batch-studio-select:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, .13);
}
.ai-batch-pro .batch-studio-summary {
  grid-template-columns: 1fr 1fr;
}
.ai-batch-pro .field-row .btn.secondary {
  border-radius: 14px;
  font-weight: 800;
}
@media (max-width: 920px) {
  .ai-batch-pro .batch-studio-sidebar-card {
    position: static;
  }
}

/* Batch upload card refinement: match basic try-on upload block */
.ai-batch-pro .batch-studio-upload-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 330px;
  padding: 20px;
  border: 1.5px dashed rgba(20, 148, 150, .58) !important;
  border-radius: 24px;
  background: #ffffff !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .06);
  position: relative;
  overflow: hidden;
}
.ai-batch-pro .batch-studio-sidebar-card .batch-studio-upload-card {
  min-height: 300px;
}
.ai-batch-pro .batch-studio-upload-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 12%, rgba(20,184,166,.10), transparent 30%);
  pointer-events: none;
}
.ai-batch-pro .batch-studio-upload-card::after {
  display: none;
}
.ai-batch-pro .batch-studio-upload-card:hover {
  border-color: rgba(13, 148, 136, .92) !important;
  background: #ffffff !important;
  box-shadow: 0 22px 54px rgba(20, 184, 166, .14);
}
.ai-batch-pro .batch-studio-upload-art {
  height: 160px;
  border-radius: 20px;
  background: #f5f7f9;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}
.ai-batch-pro .batch-studio-upload-icon {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  border: 1px solid rgba(20, 148, 150, .22);
  background: rgba(255,255,255,.76);
  color: #0f8f87;
  display: grid;
  place-items: center;
  font-size: 34px;
  line-height: 1;
  box-shadow: 0 16px 30px rgba(15, 23, 42, .06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.ai-batch-pro .batch-studio-upload-card:hover .batch-studio-upload-icon {
  transform: translateY(-2px) scale(1.03);
  border-color: rgba(20, 148, 150, .42);
  box-shadow: 0 18px 36px rgba(20, 184, 166, .12);
}
.ai-batch-pro .batch-studio-upload-copy {
  display: block;
  position: relative;
  z-index: 1;
  text-align: left;
}
.ai-batch-pro .batch-studio-upload-copy strong {
  display: block;
  font-size: 20px;
  line-height: 1.25;
  color: #111827;
  margin-bottom: 10px;
  font-weight: 900;
}
.ai-batch-pro .batch-studio-upload-copy small {
  display: block;
  color: #667085;
  font-size: 15px;
  margin-bottom: 12px;
}
.ai-batch-pro .batch-studio-upload-copy span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 15px;
  border-radius: 12px;
  background: rgba(20, 184, 166, .12);
  color: #0f766e;
  font-weight: 900;
  font-size: 15px;
  margin-bottom: 12px;
}
.ai-batch-pro .batch-studio-upload-copy em {
  display: block;
  color: #667085;
  font-style: normal;
  font-size: 15px;
}
.ai-batch-pro .batch-studio-prompt {
  min-height: 88px;
  height: 88px;
  overflow: hidden;
  resize: none;
  line-height: 1.55;
  border-radius: 14px;
}
.batch-studio-toast {
  position: fixed;
  left: 50%;
  top: 24px;
  z-index: 9999;
  transform: translate(-50%, -12px) scale(.98);
  opacity: 0;
  pointer-events: none;
  min-width: min(420px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(20, 184, 166, .26);
  background: rgba(255, 255, 255, .96);
  color: #0f172a;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .16);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  backdrop-filter: blur(14px);
  transition: opacity .2s ease, transform .2s ease;
}
.batch-studio-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
@media (max-width: 920px) {
  .ai-batch-pro .batch-studio-upload-card,
  .ai-batch-pro .batch-studio-sidebar-card .batch-studio-upload-card {
    min-height: 280px;
  }
  .ai-batch-pro .batch-studio-upload-art {
    height: 138px;
  }
}

/* Batch page compact upload polish from user marked screenshot */
.ai-batch-pro .batch-studio-panel,
.ai-batch-pro .batch-studio-sidebar-card {
  padding: 16px !important;
  border-radius: 20px !important;
}
.ai-batch-pro .batch-studio-panel-head {
  margin-bottom: 10px !important;
  padding-bottom: 6px;
}
.ai-batch-pro .batch-studio-panel-head h2,
.ai-batch-pro .batch-studio-sidebar-card h2 {
  font-size: 18px !important;
  margin-bottom: 4px !important;
}
.ai-batch-pro .batch-studio-panel-head .muted,
.ai-batch-pro .batch-studio-sidebar-card .muted {
  font-size: 13px;
  line-height: 1.55;
}
.ai-batch-pro .batch-studio-counter {
  padding: 8px 12px !important;
  border-radius: 14px !important;
}
.ai-batch-pro .batch-studio-counter b {
  font-size: 20px !important;
}
.ai-batch-pro .batch-studio-upload-card input[type="file"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.ai-batch-pro .batch-studio-upload-card {
  min-height: 250px !important;
  padding: 16px 18px 18px !important;
  border-radius: 22px !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .045) !important;
}
.ai-batch-pro .batch-studio-sidebar-card .batch-studio-upload-card {
  min-height: 238px !important;
}
.ai-batch-pro .batch-studio-upload-art {
  height: 116px !important;
  margin-bottom: 14px !important;
  border-radius: 18px !important;
  align-items: center !important;
  justify-items: center !important;
  place-items: center !important;
}
.ai-batch-pro .batch-studio-upload-icon {
  width: 62px !important;
  height: 62px !important;
  border-radius: 22px !important;
  font-size: 30px !important;
  transform: translateY(2px);
}
.ai-batch-pro .batch-studio-upload-card:hover .batch-studio-upload-icon {
  transform: translateY(-1px) scale(1.03) !important;
}
.ai-batch-pro .batch-studio-upload-copy strong {
  font-size: 18px !important;
  margin-bottom: 7px !important;
}
.ai-batch-pro .batch-studio-upload-copy small {
  font-size: 14px !important;
  margin-bottom: 10px !important;
}
.ai-batch-pro .batch-studio-upload-copy span {
  min-height: 34px !important;
  padding: 7px 13px !important;
  border-radius: 11px !important;
  font-size: 14px !important;
  margin-bottom: 10px !important;
}
.ai-batch-pro .batch-studio-upload-copy em {
  font-size: 14px !important;
}
.ai-batch-pro .batch-studio-empty-state {
  min-height: 108px !important;
  border-radius: 16px !important;
  padding: 16px !important;
}
.ai-batch-pro .batch-studio-model-grid {
  gap: 12px !important;
}
.ai-batch-pro .batch-studio-model-card {
  padding: 12px !important;
  border-radius: 16px !important;
}
.ai-batch-pro .batch-studio-preview {
  min-height: 118px !important;
  border-radius: 14px !important;
}
.ai-batch-pro .batch-studio-preview.is-large {
  min-height: 132px !important;
}
.ai-batch-pro .batch-studio-preview img {
  height: 118px !important;
}
.ai-batch-pro .batch-studio-preview.is-large img {
  height: 132px !important;
}
.ai-batch-pro .batch-studio-prompt {
  min-height: 98px !important;
  height: auto !important;
  overflow: hidden !important;
  scrollbar-width: none;
}
.ai-batch-pro .batch-studio-prompt::-webkit-scrollbar {
  display: none;
}
@media (max-width: 920px) {
  .ai-batch-pro .batch-studio-upload-card,
  .ai-batch-pro .batch-studio-sidebar-card .batch-studio-upload-card {
    min-height: 236px !important;
  }
  .ai-batch-pro .batch-studio-upload-art {
    height: 104px !important;
  }
}

/* Simple CSS-only visual polish for auth right panel */
.auth-simple-visual {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  border-color: rgba(20, 184, 166, 0.18);
  background:
    radial-gradient(circle at 82% 18%, rgba(45, 212, 191, 0.24), transparent 31%),
    radial-gradient(circle at 18% 86%, rgba(59, 130, 246, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(240,253,250,0.86) 48%, rgba(239,246,255,0.9) 100%);
  box-shadow:
    0 22px 60px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}
.auth-simple-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 118, 110, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.065) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.72), transparent 90%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.72), transparent 90%);
  pointer-events: none;
}
.auth-simple-visual::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  right: -78px;
  bottom: -88px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.22);
  filter: blur(30px);
  pointer-events: none;
}
.auth-simple-visual-inner {
  position: relative;
  z-index: 1;
  max-width: 540px;
  padding: 8px 0 0 2px;
}
.auth-simple-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  background: rgba(15, 118, 110, 0.09);
  color: #0f766e;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.02em;
}
.auth-simple-visual h2 {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}
.auth-simple-visual h1 {
  margin: 0;
  color: #07111f;
  font-size: clamp(36px, 4vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.045em;
  font-weight: 950;
  text-shadow: 0 1px 0 rgba(255,255,255,0.85);
}
.auth-simple-visual p {
  margin: 20px 0 0;
  max-width: 430px;
  color: #64748b;
  font-size: 16px;
  line-height: 1.8;
}
@media (max-width: 900px) {
  .auth-simple-visual {
    min-height: 260px;
  }
  .auth-simple-visual h1 {
    font-size: 36px;
  }
}

/* Auth right panel CSS clock + date */
.auth-clock-card {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 34px;
  padding: 16px 18px;
  min-width: 330px;
  border-radius: 22px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  background: rgba(255, 255, 255, 0.66);
  box-shadow:
    0 18px 46px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.auth-clock-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(20,184,166,.12), transparent 45%, rgba(59,130,246,.1));
  pointer-events: none;
}
.auth-clock-face {
  --hour: 0deg;
  --minute: 0deg;
  --second: 0deg;
  position: relative;
  z-index: 1;
  flex: 0 0 74px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.94) 0 51%, transparent 52%),
    conic-gradient(from 0deg, rgba(15,118,110,.14), rgba(20,184,166,.35), rgba(59,130,246,.14), rgba(15,118,110,.14));
  border: 1px solid rgba(15, 118, 110, 0.2);
  box-shadow:
    0 12px 26px rgba(15, 118, 110, 0.13),
    inset 0 0 0 7px rgba(240,253,250,.84);
}
.auth-clock-face b {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #0f766e;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(20,184,166,.14);
}
.auth-clock-mark {
  position: absolute;
  display: block;
  background: rgba(15, 23, 42, 0.42);
  border-radius: 999px;
}
.auth-clock-mark.m12,
.auth-clock-mark.m6 {
  left: 50%;
  width: 2px;
  height: 7px;
  transform: translateX(-50%);
}
.auth-clock-mark.m12 { top: 9px; }
.auth-clock-mark.m6 { bottom: 9px; }
.auth-clock-mark.m3,
.auth-clock-mark.m9 {
  top: 50%;
  width: 7px;
  height: 2px;
  transform: translateY(-50%);
}
.auth-clock-mark.m3 { right: 9px; }
.auth-clock-mark.m9 { left: 9px; }
.auth-clock-hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  display: block;
  border-radius: 999px;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(var(--minute));
}
.auth-clock-hand.hour {
  width: 4px;
  height: 20px;
  background: #0f172a;
  transform: translateX(-50%) rotate(var(--hour));
}
.auth-clock-hand.minute {
  width: 3px;
  height: 27px;
  background: #0f766e;
  transform: translateX(-50%) rotate(var(--minute));
}
.auth-clock-hand.second {
  width: 2px;
  height: 29px;
  background: #14b8a6;
  transform: translateX(-50%) rotate(var(--second));
  box-shadow: 0 0 10px rgba(20,184,166,.32);
}
.auth-clock-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.auth-clock-label {
  color: #0f766e;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
}
.auth-clock-copy strong {
  margin-top: 4px;
  color: #07111f;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}
.auth-clock-copy em {
  margin-top: 8px;
  color: #64748b;
  font-size: 14px;
  font-style: normal;
  font-weight: 650;
}
@media (max-width: 900px) {
  .auth-clock-card {
    width: 100%;
    min-width: 0;
    margin-top: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .auth-clock-hand.second {
    transition: none;
  }
}

/* Clean left-side auth form polish, matching the right visual panel */
.auth-split-layout {
  align-items: stretch;
}
.auth-left-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.14);
  background:
    radial-gradient(circle at 18% 18%, rgba(45, 212, 191, 0.14), transparent 32%),
    radial-gradient(circle at 88% 92%, rgba(59, 130, 246, 0.08), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(248,250,252,0.94));
  box-shadow:
    0 24px 70px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.9);
}
.auth-left-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 118, 110, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(135deg, rgba(0,0,0,0.5), transparent 72%);
  pointer-events: none;
}
.auth-left-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  right: -70px;
  top: -60px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.16);
  filter: blur(30px);
  pointer-events: none;
}
.auth-form-shell {
  position: relative;
  z-index: 1;
  max-width: 620px;
}
.auth-left-panel h1 {
  margin: 10px 0 8px;
  color: #07111f;
  font-size: clamp(34px, 3.2vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 950;
}
.auth-form-subtitle {
  margin: 0 0 26px;
  max-width: 420px;
  color: #64748b;
  font-size: 15px;
  line-height: 1.8;
}
.auth-polished-form label {
  display: block;
  margin: 18px 0 8px;
  color: #0f172a;
  font-weight: 800;
}
.auth-polished-form .input {
  min-height: 56px;
  border-radius: 15px;
  border-color: rgba(15, 118, 110, 0.16);
  background: rgba(255,255,255,0.84);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.88),
    0 10px 24px rgba(15, 23, 42, 0.035);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.auth-polished-form .input:hover {
  border-color: rgba(20, 184, 166, 0.32);
  background: rgba(255,255,255,0.96);
}
.auth-polished-form .input:focus {
  border-color: rgba(20, 184, 166, 0.65);
  box-shadow:
    0 0 0 4px rgba(20, 184, 166, 0.12),
    0 14px 32px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}
.auth-submit-row {
  margin-top: 24px;
}
.auth-left-panel .auth-btn {
  width: 100%;
  min-height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f172a 0%, #111827 48%, #0f766e 135%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}
.auth-left-panel .auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.22);
}
.auth-switch-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: #64748b;
  font-size: 15px;
}
.auth-switch-line::before,
.auth-switch-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 118, 110, 0.18));
}
.auth-switch-line::after {
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.18), transparent);
}
.auth-switch-line a {
  color: #0f766e;
  font-weight: 900;
  text-decoration: none;
}
.auth-switch-line a:hover {
  text-decoration: underline;
}
@media (max-width: 920px) {
  .auth-left-panel h1 {
    font-size: 34px;
  }
  .auth-switch-line {
    justify-content: center;
  }
}

/* Compact auth layout: keep the original proportions, only retain a light visual polish */
.auth-split-layout {
  align-items: start;
}
.auth-left-panel {
  min-height: auto;
  padding: 22px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 92% 8%, rgba(45, 212, 191, 0.08), transparent 26%),
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.9);
}
.auth-left-panel::before {
  opacity: .35;
  background-size: 28px 28px;
}
.auth-left-glow {
  width: 110px;
  height: 110px;
  right: -42px;
  top: -42px;
  filter: blur(22px);
  opacity: .7;
}
.auth-form-shell {
  max-width: 420px;
}
.auth-left-panel .auth-simple-badge {
  margin-bottom: 8px;
  padding: 5px 10px;
  font-size: 12px;
}
.auth-left-panel h1 {
  margin: 6px 0 6px;
  font-size: 28px;
  line-height: 1.16;
  letter-spacing: -0.03em;
  font-weight: 900;
}
.auth-form-subtitle {
  margin: 0 0 16px;
  max-width: 360px;
  font-size: 13px;
  line-height: 1.6;
}
.auth-polished-form label {
  margin: 12px 0 6px;
  font-size: 13px;
}
.auth-polished-form .input {
  min-height: 44px;
  border-radius: 10px;
  padding: 9px 12px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 4px 12px rgba(15, 23, 42, 0.025);
}
.auth-polished-form .input:focus {
  transform: none;
  box-shadow:
    0 0 0 3px rgba(20,184,166,.10),
    0 8px 18px rgba(15,23,42,.045);
}
.auth-submit-row {
  margin-top: 16px;
}
.auth-left-panel .auth-btn {
  min-height: 46px;
  height: 46px;
  border-radius: 11px;
  font-size: 15px;
  letter-spacing: 5px;
  box-shadow: 0 10px 24px rgba(15,23,42,.14);
}
.auth-left-panel .auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15,23,42,.16);
}
.auth-switch-line {
  margin-top: 14px;
  font-size: 13px;
}
@media (max-width: 920px) {
  .auth-left-panel {
    padding: 20px;
  }
  .auth-left-panel h1 {
    font-size: 26px;
  }
}

/* Recharge order admin layout */
.admin-recharge-table-wrap {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.admin-recharge-table {
  min-width: 1080px;
}

.admin-recharge-table th {
  white-space: nowrap;
  font-size: 13px;
  color: var(--muted);
}

.admin-recharge-row td {
  vertical-align: top;
  padding: 16px 14px;
}

.admin-recharge-row:hover td {
  background: var(--row-hover);
}

.admin-recharge-main-cell {
  min-width: 220px;
}

.admin-recharge-user-cell {
  min-width: 190px;
}

.admin-recharge-proof-cell {
  min-width: 220px;
}

.admin-recharge-time-cell {
  min-width: 170px;
}

.admin-recharge-action-cell {
  min-width: 240px;
}

.admin-order-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.admin-order-title code {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 12px;
}

.admin-order-sub,
.admin-order-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}

.admin-order-money {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
}

.admin-order-money b {
  color: var(--text);
  font-size: 22px;
  letter-spacing: -0.02em;
}

.admin-order-money span {
  color: var(--muted);
  font-size: 13px;
}

.admin-order-user {
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  word-break: break-word;
}

.admin-proof-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.admin-proof-link:hover {
  border-color: rgba(15, 118, 110, 0.32);
  background: var(--accent-soft);
}

.admin-proof-thumb {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.admin-proof-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-proof-empty {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-recharge-action-form {
  display: grid;
  gap: 10px;
}

.admin-recharge-action-form textarea.input {
  width: 100%;
  min-height: 58px;
  resize: vertical;
}

.admin-recharge-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-recharge-actions .btn {
  min-height: 34px;
  padding: 8px 12px;
}

@media (max-width: 900px) {
  .admin-recharge-table {
    min-width: 980px;
  }
}

/* Admin settings clean layout */
.admin-settings-page {
  overflow: hidden;
}
.admin-settings-hero {
  padding: 4px 0 10px;
}
.admin-settings-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(20, 184, 166, .1);
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}
.admin-settings-grid {
  display: grid;
  grid-template-columns: minmax(280px, .75fr) minmax(420px, 1.25fr);
  gap: 16px;
  margin-top: 16px;
}
.admin-settings-card {
  position: relative;
  padding: 20px;
  border: 1px solid rgba(15, 118, 110, .12);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 8%, rgba(45, 212, 191, .12), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(240,253,250,.72));
  box-shadow: 0 16px 50px rgba(15, 23, 42, .06);
}
.admin-settings-card-compact {
  align-self: start;
}
.admin-settings-wide {
  grid-column: 1 / -1;
}
.admin-settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.admin-settings-card h2 {
  margin: 4px 0 6px;
  font-size: 20px;
  letter-spacing: -.02em;
}
.admin-settings-tag {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 118, 110, .08);
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}
.status-pill {
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(100, 116, 139, .1);
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.status-pill.ok {
  background: rgba(20, 184, 166, .12);
  color: #0f766e;
}
.admin-settings-form {
  display: grid;
  gap: 14px;
}
.admin-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, .12);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
}
.admin-switch-row span {
  display: grid;
  gap: 4px;
}
.admin-switch-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.55;
}
.admin-switch-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #0f766e;
  flex: 0 0 auto;
}
.admin-settings-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.admin-qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.admin-qr-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, .12);
  border-radius: 18px;
  background: rgba(255,255,255,.76);
}
.admin-qr-box p {
  margin: 4px 0 0;
}
.admin-qr-box img,
.admin-qr-empty {
  width: 150px;
  height: 150px;
  border-radius: 16px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #f8fafc;
}
.admin-qr-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}
.admin-file-line input {
  width: 100%;
  font-size: 13px;
}
.admin-config-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.admin-config-item {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border-radius: 15px;
  border: 1px solid rgba(15, 118, 110, .1);
  background: rgba(255,255,255,.74);
}
.admin-config-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.admin-config-item b {
  color: var(--text);
  font-size: 14px;
  word-break: break-word;
}
@media (max-width: 980px) {
  .admin-settings-grid,
  .admin-settings-two,
  .admin-qr-grid,
  .admin-config-list {
    grid-template-columns: 1fr;
  }
}
