: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 1px 2px rgba(15, 23, 42, 0.04), 0 8px 20px rgba(15, 23, 42, 0.035);
  --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;
}

* {
  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;
}

.nav-shell {
  position: relative;
}

.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 .brand {
  margin-left: 0;
  padding: 0;
  color: var(--text);
  font-size: 15px;
  text-decoration: none;
}

.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;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-menu {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.nav-center {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.nav-menu-check,
.nav-menu-toggle {
  display: none;
}

.nav-account {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-account::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  height: 12px;
}

.nav-account-trigger::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.nav-account-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 40;
  display: grid;
  min-width: 168px;
  padding: 8px;
  border: 1px solid rgba(217, 225, 234, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.nav-account-menu::before {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 100%;
  width: 12px;
  height: 12px;
  border-top: 1px solid rgba(217, 225, 234, 0.92);
  border-left: 1px solid rgba(217, 225, 234, 0.92);
  background: rgba(255, 255, 255, 0.98);
  transform: translateY(6px) rotate(45deg);
}

.nav-account:hover .nav-account-menu,
.nav-account:focus-within .nav-account-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav .nav-account-menu a {
  min-height: 38px;
  margin: 0;
  justify-content: flex-start;
  padding: 0 12px;
  border-radius: 10px;
  white-space: nowrap;
}

.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);
}

.btn.btn-new-generation {
  min-height: 46px;
  padding: 11px 22px;
  border: 1px solid rgba(16, 148, 127, 0.72);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 42%),
    linear-gradient(135deg, #10a88d 0%, #07856f 100%);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 8px 18px rgba(5, 112, 94, 0.22);
}

.btn.btn-new-generation:hover {
  border-color: rgba(6, 128, 108, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 42%),
    linear-gradient(135deg, #12b99c 0%, #067963 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 10px 24px rgba(5, 112, 94, 0.28);
}

.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,
.status.success {
  background: var(--ok-soft);
  color: var(--ok);
}

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

.status.processing,
.status.running,
.status.in_queue,
.status.queued,
.status.pending,
.status.starting,
.status.submitted,
.status.draft {
  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);
}

.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: 5px 0;
  color: var(--muted);
  font-size: 12px;
  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: center;
  }

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

  .nav-menu-toggle {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
  }

  .nav-menu-toggle span {
    width: 17px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
  }

  .nav-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
  }

  .nav-menu-check:checked ~ .nav-menu {
    display: flex;
  }

  .nav-center,
  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
  }

  .nav-center a,
  .nav-links a {
    margin-left: 0;
  }

  .nav-account-menu {
    left: 0;
    right: auto;
  }

  .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-layout > .span-8 {
  grid-column: span 8;
}

.job-new-layout > .span-4 {
  grid-column: span 4;
}

.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;
}

.job-upload-grid {
  align-items: stretch;
  gap: 16px;
  margin-top: 14px;
}

.job-upload-shell {
  height: 100%;
}

#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: 248px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  overflow: hidden;
}

.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: 136px;
  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: 156px;
  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;
  justify-content: space-between;
  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;
}

.asset-library-trigger {
  width: fit-content;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 8%, #fff);
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.asset-library-trigger:hover,
.asset-library-trigger:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, #fff);
  outline: none;
}

.upload-dropzone.has-asset {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, #fff), #fff 48%);
}

.asset-library-modal[hidden] {
  display: none;
}

.asset-library-modal {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.asset-library-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(8px);
}

.asset-library-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.asset-library-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.asset-library-header h2 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 20px;
}

.asset-library-header p,
.asset-library-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.asset-library-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.asset-library-body {
  max-height: calc(min(720px, 100vh - 40px) - 96px);
  overflow: auto;
  padding: 18px 22px 22px;
}

.asset-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 12px;
}

.asset-library-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.asset-library-item:hover,
.asset-library-item:focus-within {
  border-color: var(--accent);
  box-shadow: 0 14px 26px color-mix(in srgb, var(--accent) 16%, transparent);
  outline: none;
  transform: translateY(-1px);
}

.asset-library-item.is-favorite {
  border-color: color-mix(in srgb, var(--warn) 58%, var(--line));
  box-shadow: 0 12px 24px color-mix(in srgb, var(--warn) 16%, transparent);
}

.asset-library-item.is-dragging {
  opacity: 0.55;
  transform: scale(0.98);
}

.asset-library-select {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.asset-library-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.asset-library-favorite {
  position: absolute;
  z-index: 2;
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  top: 8px;
  right: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  color: #b45309;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.asset-library-item.is-favorite .asset-library-favorite {
  background: #fffbeb;
  border-color: #fbbf24;
}

.asset-library-item:hover .asset-library-favorite,
.asset-library-item:focus-within .asset-library-favorite {
  opacity: 1;
  transform: translateY(0);
}

.asset-library-message {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
}

.asset-library-message.is-error {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
  background: color-mix(in srgb, var(--danger) 8%, #fff);
  color: var(--danger);
}

.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;
}

.job-mode-panel {
  margin-top: 16px;
}

.job-param-grid {
  margin-top: 8px;
}

.job-prompt-large {
  min-height: 130px;
  padding: 12px;
}

.job-advanced-json {
  min-height: 80px;
  padding: 12px;
}

.job-seed-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.job-seed-input {
  flex: 1 1 auto;
  min-width: 0;
}

.job-seed-button {
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 12px;
  white-space: nowrap;
}

#model_preview_box,
#garment_preview_box {
  min-height: 260px;
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%),
    var(--surface);
  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);
}

.preflight-preview-group {
  margin-top: 18px;
}

.preflight-preview-group:first-of-type {
  margin-top: 14px;
}

.preflight-preview-box {
  display: flex;
  height: 260px;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  overflow: hidden;
  border: 1px dashed var(--line);
  background: #fff;
}

.preflight-preview-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preflight-preview-info {
  min-height: 20px;
  margin-top: 6px;
}

.preflight-help {
  margin-top: 20px;
}

#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: 18px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(15, 118, 110, 0.08), transparent 52%),
    #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.job-submit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.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-panel .job-cost-panel {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f172a;
  font-weight: 800;
}

.job-submit-panel .job-cost-panel span {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: #f8fafc;
}

.job-submit-panel .job-cost-panel span:first-child {
  border-color: rgba(15, 118, 110, 0.2);
  background: rgba(15, 118, 110, 0.07);
  color: #0f766e;
}

.job-submit-panel .job-cost-panel small {
  grid-column: 1 / -1;
  min-height: 20px;
  color: #64748b;
  line-height: 1.55;
}

.job-submit-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  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 {
  position: sticky;
  top: 16px;
}

.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;
}

.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;
}

.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;
}

.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;
}

.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;
}

.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-shell {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.dashboard-hero h1 {
  margin: 0 0 8px;
  color: #111827;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.08;
  letter-spacing: 0;
}

.dashboard-hero p {
  margin: 0;
  color: #64748b;
  font-size: 16px;
  line-height: 1.65;
}

.dashboard-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

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

.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: 18px;
  margin: 0 0 26px;
}

.dashboard-stat-card {
  display: flex;
  min-width: 0;
  min-height: 122px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 24px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.06);
}

.dashboard-stat-card h2 {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 14px;
  font-weight: 900;
}

.dashboard-stat-card p {
  display: grid;
  gap: 4px;
  margin: 0;
  color: #111827;
  line-height: 1.1;
}

.dashboard-stat-card b {
  font-size: 30px;
  letter-spacing: 0;
}

.dashboard-stat-card span {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.stat-icon {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 16px;
  background: #eef4ff;
}

.stat-icon::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #2563eb;
}

.stat-success {
  background: #ecfdf3;
}

.stat-success::before {
  width: 13px;
  height: 26px;
  border: solid #079455;
  border-width: 0 4px 4px 0;
  border-radius: 0;
  background: transparent;
  transform: rotate(45deg) translate(-2px, -2px);
}

.stat-failed {
  background: #fef3f2;
}

.stat-failed::before {
  width: 28px;
  height: 5px;
  border-radius: 999px;
  background: #dc2626;
  box-shadow: 0 0 0 0 #dc2626;
  transform: none;
}

.stat-failed::after {
  content: none;
}

.stat-credit {
  background: #fff4e5;
}

.stat-credit::before {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: conic-gradient(#f97316 0 72%, #fed7aa 72% 100%);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.75);
  transform: none;
}

/* legacy dashboard card fallback */
.dashboard-stat-card {
  min-width: 0;
}

.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: 10px;
}

.dashboard-table-card,
#dashboard-batch-form .table-wrap {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.07);
}

#dashboard-batch-form .table {
  background: transparent;
}

#dashboard-batch-form .table th,
#dashboard-batch-form .table td {
  padding: 16px 18px;
}

#dashboard-batch-form .table th {
  color: #667085;
  letter-spacing: 0;
  background: #f8fafc;
  text-transform: none;
}

#dashboard-batch-form .table td {
  vertical-align: middle;
  background: #ffffff;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

#dashboard-batch-form .table tbody tr:hover td {
  background: #f8fbff;
}

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

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

#dashboard-batch-form .table td:last-child .dashboard-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  color: #2563eb;
  font-weight: 900;
  font: inherit;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

.dashboard-action-link:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  text-decoration: none;
}

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

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

.dashboard-action-danger {
  color: #b42318 !important;
  border-color: #fecaca !important;
  background: #fff7f7 !important;
}

.dashboard-action-danger:hover {
  border-color: #fca5a5 !important;
  background: #fef2f2 !important;
  color: #991b1b !important;
}

.dashboard-preview-thumb {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border: 4px solid #eef2ff;
  border-radius: 14px;
  background: linear-gradient(135deg, #dbeafe, #f5f3ff);
}

.dashboard-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-preview-thumb.is-empty span {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.88);
}

.dashboard-job-title {
  display: grid;
  gap: 4px;
  min-width: 160px;
}

.dashboard-job-title strong {
  color: #111827;
  font-size: 15px;
}

.dashboard-job-title span {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}

.dashboard-client-task-id {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 24px;
  min-width: 106px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 3px 10px;
  border: 1px solid rgba(20, 184, 166, 0.26);
  border-radius: 999px;
  background: rgba(240, 253, 250, 0.94);
  color: #0f766e;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.dashboard-client-task-id:hover {
  border-color: rgba(20, 184, 166, 0.62);
  background: rgba(204, 251, 241, 0.92);
  color: #0f766e;
}

.dashboard-client-task-id.is-copied {
  border-color: rgba(22, 163, 74, 0.36);
  background: rgba(220, 252, 231, 0.96);
  color: #047857;
}

.dashboard-client-task-id.is-copy-failed {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(254, 242, 242, 0.96);
  color: #b91c1c;
}

.dashboard-client-task-id.is-disabled,
.dashboard-client-task-id:disabled {
  border-color: #e5e7eb;
  background: #f8fafc;
  color: #94a3b8;
  cursor: default;
}

.account-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  min-width: 0;
}

.account-side,
.account-main,
.account-entry-card,
.account-form-card,
.account-support-card,
.account-faq {
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.06);
}

.account-side {
  position: sticky;
  top: 18px;
  padding: 20px;
}

.account-side h1,
.account-head h1 {
  margin: 0 0 8px;
  color: #111827;
}

.account-side p,
.account-head p {
  margin: 0;
  color: #64748b;
  line-height: 1.65;
}

.account-side nav {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.account-side nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #475569;
  font-weight: 900;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.account-side nav a:hover,
.account-side nav a.is-active {
  background: #eef2ff;
  color: #2563eb;
}

.account-main {
  min-width: 0;
  max-width: 100%;
  padding: clamp(18px, 3vw, 26px);
}

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

.account-head > div:first-child {
  min-width: 0;
}

.account-head .btn,
.account-head-actions {
  flex: 0 0 auto;
}

.account-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.account-entry-grid,
.account-info-grid,
.account-form-grid {
  display: grid;
  gap: 14px;
}

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

.account-entry-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 126px;
  padding: 20px;
  color: #111827;
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.account-entry-card:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
  transform: translateY(-1px);
}

.account-entry-meta {
  width: fit-content;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
}

.account-entry-card strong {
  font-size: 18px;
  line-height: 1.35;
}

.account-entry-card span:not(.account-entry-meta),
.account-info-item span,
.account-faq li {
  color: #64748b;
  line-height: 1.65;
}

.account-info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.account-info-item {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.account-info-item strong {
  color: #111827;
  overflow-wrap: anywhere;
}

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

.account-form-card,
.account-support-card,
.account-faq {
  padding: 18px;
}

.account-form-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.account-form-card h2,
.account-support-card h2,
.account-faq h2 {
  margin: 0;
}

.account-form-card label {
  display: grid;
  gap: 7px;
  margin: 0;
  font-weight: 800;
  color: #334155;
}

.account-form-note {
  margin: 0;
  color: #64748b;
  line-height: 1.65;
}

.account-table code,
.account-sql {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.account-table {
  min-width: 760px;
}

.account-table th,
.account-table td {
  vertical-align: top;
}

.account-table td {
  overflow-wrap: anywhere;
}

.account-credit-plus {
  color: #079455;
}

.account-credit-minus {
  color: #dc2626;
}

.account-support-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: center;
}

.account-support-card p {
  line-height: 1.7;
}

.account-support-missing {
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412;
}

.account-support-qr {
  display: grid;
  min-height: 180px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
}

.account-support-qr span {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.account-support-qr small {
  color: #94a3b8;
  font-size: 12px;
}

.account-support-qr img {
  max-width: 100%;
  border-radius: 14px;
}

.account-empty-state {
  display: grid;
  justify-items: start;
  gap: 12px;
}

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

.account-faq {
  margin-top: 16px;
}

.account-faq ul {
  margin-bottom: 0;
}

@media (max-width: 820px) {
  .account-shell {
    grid-template-columns: 1fr;
  }

  .account-side {
    position: static;
  }

  .account-side nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-head {
    align-items: stretch;
    flex-direction: column;
  }

  .account-head .btn,
  .account-head-actions,
  .account-head-actions .btn {
    width: 100%;
  }

  .account-head-actions {
    align-items: stretch;
    justify-content: stretch;
  }

  .account-entry-grid,
  .account-info-grid,
  .account-form-grid,
  .account-support-card {
    grid-template-columns: 1fr;
  }

  .account-main {
    padding: 16px;
  }

  .account-table {
    min-width: 680px;
  }
}

@media (max-width: 640px) {
  .account-shell {
    gap: 14px;
  }

  .account-side,
  .account-main,
  .account-entry-card,
  .account-form-card,
  .account-support-card,
  .account-faq {
    border-radius: 14px;
  }

  .account-side {
    padding: 16px;
  }

  .account-side nav {
    grid-template-columns: 1fr;
  }

  .account-entry-card,
  .account-form-card,
  .account-support-card,
  .account-faq {
    padding: 16px;
  }

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

  .account-support-qr {
    min-height: 150px;
  }
}

.account-home-modern {
  position: relative;
  display: grid;
  gap: 22px;
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 34px);
  overflow: hidden;
  isolation: isolate;
}

.account-home-modern::before,
.account-home-modern::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
  filter: blur(6px);
}

.account-home-modern::before {
  width: 260px;
  height: 260px;
  top: -90px;
  right: 5%;
}

.account-home-modern::after {
  width: 170px;
  height: 170px;
  top: 80px;
  right: 15%;
  background: rgba(15, 155, 142, 0.08);
}

.account-home-hero {
  display: grid;
  gap: 10px;
  padding: 8px 2px 22px;
}

.account-home-hero h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
}

.account-home-hero p {
  max-width: 760px;
  margin: 0;
  color: #64748b;
  font-size: 16px;
  line-height: 1.7;
}

.account-overview-card,
.account-feature-card,
.account-data-panel {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.account-overview-card {
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) minmax(460px, 1.7fr) auto;
  gap: clamp(16px, 2.4vw, 30px);
  align-items: center;
  padding: clamp(18px, 2.5vw, 30px);
}

.account-profile-block {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
}

.account-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, #e6fffb, #f8fafc);
  color: #0f9b8e;
  font-size: 34px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.16);
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-profile-copy {
  min-width: 0;
}

.account-profile-copy h2 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.account-profile-copy p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #64748b;
  font-size: 16px;
  flex-wrap: wrap;
}

.account-copy-id {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid rgba(15, 155, 142, 0.28);
  border-radius: 10px;
  background: #f0fdfa;
  color: #0f766e;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.account-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  min-width: 0;
}

.account-summary-item {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 8px 22px;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
}

.account-summary-item span {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.account-summary-item strong {
  color: #0f172a;
  font-size: 20px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  white-space: nowrap;
}

.account-summary-credits strong,
.account-summary-item strong.is-active {
  color: #0f9b8e;
}

.account-summary-item strong.is-disabled {
  color: #dc2626;
}

.account-overview-actions {
  display: flex;
  justify-content: flex-end;
}

.account-home-modern .account-outline-btn.btn.secondary {
  min-width: 150px;
  border-color: rgba(15, 155, 142, 0.46);
  color: #0f766e;
  background: #ffffff;
}

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

.account-feature-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 104px;
  padding: 18px;
  color: #0f172a;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.account-feature-card:hover {
  border-color: rgba(15, 155, 142, 0.36);
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.account-feature-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 14px;
  background: #ecfdf5;
  color: #0f9b8e;
  font-size: 21px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.12);
}

.account-feature-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.account-feature-body strong {
  font-size: 19px;
  line-height: 1.25;
}

.account-feature-body small {
  color: #64748b;
  font-size: 15px;
  line-height: 1.6;
}

.account-feature-arrow {
  color: #64748b;
  font-size: 28px;
  line-height: 1;
}

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

.account-data-panel {
  min-width: 0;
  padding: 24px;
}

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

.account-panel-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 19px;
}

.account-panel-head a {
  color: #0f9b8e;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

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

.account-home-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}

.account-home-credit-table {
  min-width: 0;
}

.account-home-table th,
.account-home-table td {
  padding: 12px 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  text-align: left;
  vertical-align: middle;
}

.account-home-table th {
  color: #475569;
  font-size: 13px;
  font-weight: 900;
}

.account-home-table td {
  color: #0f172a;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.account-home-table code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.account-order-table {
  min-width: 0;
}

.account-mini-empty {
  display: grid;
  min-height: 150px;
  place-items: center;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 800;
}

@media (max-width: 1120px) {
  .account-overview-card {
    grid-template-columns: 1fr;
  }

  .account-summary-item:first-child {
    border-left: 0;
  }

  .account-overview-actions {
    justify-content: flex-start;
  }

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

  .account-data-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .account-home-modern {
    gap: 16px;
    padding: 18px 14px;
  }

  .account-home-hero {
    padding-bottom: 12px;
  }

  .account-home-hero p {
    font-size: 15px;
  }

  .account-overview-card,
  .account-feature-card,
  .account-data-panel {
    border-radius: 16px;
  }

  .account-overview-card {
    padding: 18px;
  }

  .account-profile-block {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-avatar {
    width: 76px;
    height: 76px;
    font-size: 28px;
  }

  .account-profile-copy h2 {
    font-size: 24px;
  }

  .account-summary-grid,
  .account-feature-grid {
    grid-template-columns: 1fr;
  }

  .account-summary-item {
    padding: 14px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    border-left: 0;
  }

  .account-outline-btn,
  .account-overview-actions {
    width: 100%;
  }

  .account-feature-card {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    min-height: 116px;
    padding: 18px;
  }

  .account-feature-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    font-size: 20px;
  }

  .account-feature-body strong {
    font-size: 19px;
  }

  .account-data-panel {
    padding: 18px;
  }

  .account-home-table,
  .account-home-credit-table,
  .account-order-table {
    min-width: 640px;
  }
}

.account-orders-page {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.account-orders-hero {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 150px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 58%, #effcf9 100%);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.account-orders-hero::before,
.account-orders-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
}

.account-orders-hero::before {
  width: 240px;
  height: 240px;
  top: -110px;
  right: 8%;
}

.account-orders-hero::after {
  width: 150px;
  height: 150px;
  top: 34px;
  right: 18%;
  background: rgba(15, 155, 142, 0.08);
}

.account-orders-hero h1,
.account-orders-hero p {
  position: relative;
  z-index: 1;
}

.account-orders-hero h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1.08;
  letter-spacing: 0;
}

.account-orders-hero p {
  max-width: 760px;
  margin: 0;
  color: #64748b;
  font-size: 18px;
  line-height: 1.7;
}

.account-order-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.account-order-stat-card,
.account-order-table-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.account-order-stat-card {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 136px;
  padding: 24px;
}

.account-order-stat-card p {
  margin: 0 0 8px;
  color: #64748b;
  font-weight: 900;
}

.account-order-stat-card strong {
  color: #0f172a;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1;
}

.account-order-stat-card em {
  margin-left: 10px;
  color: #64748b;
  font-style: normal;
  font-weight: 900;
}

.account-order-stat-icon {
  display: grid;
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 18px;
  background: #ecfdf5;
  color: #0f9b8e;
  font-size: 26px;
  font-weight: 900;
}

.account-order-stat-card.is-warm .account-order-stat-icon {
  background: #fff7ed;
  color: #f97316;
}

.account-order-table-card {
  min-width: 0;
  padding: 24px;
}

.account-order-filter {
  display: grid;
  grid-template-columns: 240px minmax(260px, 1fr) auto auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 22px;
}

.account-order-filter label {
  display: grid;
  gap: 7px;
  margin: 0;
  color: #475569;
  font-weight: 900;
}

.account-order-filter .input {
  min-height: 48px;
  border-radius: 12px;
}

.account-order-filter .btn {
  min-height: 48px;
  border-radius: 12px;
  white-space: nowrap;
}

.account-order-search {
  justify-self: end;
  width: min(100%, 520px);
}

.account-order-table-wrap {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: #ffffff;
  overflow-x: auto;
}

.account-modern-order-table {
  min-width: 980px;
  border-collapse: collapse;
}

.account-modern-order-table th,
.account-modern-order-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  vertical-align: middle;
}

.account-modern-order-table thead th {
  background: #f8fafc;
  color: #475569;
  font-size: 14px;
  font-weight: 900;
}

.account-modern-order-table tbody tr:hover {
  background: #fbfefd;
}

.account-modern-order-table tbody tr:last-child td {
  border-bottom: 0;
}

.account-modern-order-table code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.account-order-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.account-order-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.account-order-badge.succeeded {
  background: #dcfce7;
  color: #079455;
}

.account-order-badge.processing {
  background: #fff7ed;
  color: #f97316;
}

.account-order-badge.failed {
  background: #eff6ff;
  color: #2563eb;
}

.account-order-action {
  color: #0f9b8e;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.account-order-action:hover {
  text-decoration: underline;
}

.account-order-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  color: #64748b;
  font-weight: 800;
}

@media (max-width: 1120px) {
  .account-order-stats {
    grid-template-columns: 1fr;
  }

  .account-order-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-order-search {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .account-orders-page {
    gap: 14px;
  }

  .account-orders-hero,
  .account-order-stat-card,
  .account-order-table-card {
    border-radius: 16px;
  }

  .account-orders-hero {
    min-height: 130px;
    padding: 22px 18px;
  }

  .account-orders-hero p {
    font-size: 15px;
  }

  .account-order-stat-card {
    min-height: 116px;
    padding: 18px;
  }

  .account-order-stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 15px;
    font-size: 21px;
  }

  .account-order-table-card {
    padding: 16px;
  }

  .account-order-filter {
    grid-template-columns: 1fr;
  }

  .account-order-filter .btn,
  .account-order-reset {
    width: 100%;
  }
}

.account-credits-page {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.account-credits-hero {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 150px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 62%, #effcf9 100%);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.account-credits-hero::before {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  right: 5%;
  bottom: -150px;
  border: 10px solid rgba(20, 184, 166, 0.08);
  border-radius: 50%;
}

.account-credits-hero h1,
.account-credits-hero p {
  position: relative;
  z-index: 1;
}

.account-credits-hero h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1.08;
  letter-spacing: 0;
}

.account-credits-hero p {
  max-width: 760px;
  margin: 0;
  color: #64748b;
  font-size: 18px;
  line-height: 1.7;
}

.account-credit-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.account-credit-stat-card,
.account-credit-table-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.account-credit-stat-card {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 136px;
  padding: 24px;
}

.account-credit-stat-card p {
  margin: 0 0 8px;
  color: #64748b;
  font-weight: 900;
}

.account-credit-stat-card strong {
  color: #0f172a;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1;
}

.account-credit-stat-card strong.is-primary {
  color: #0f9b8e;
}

.account-credit-stat-icon {
  display: grid;
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 18px;
  background: #ecfdf5;
  color: #0f9b8e;
  font-size: 26px;
  font-weight: 900;
}

.account-credit-stat-icon.is-blue {
  background: #eef2ff;
  color: #2563eb;
}

.account-credit-stat-icon.is-warm {
  background: #fff7ed;
  color: #f97316;
}

.account-credit-table-card {
  min-width: 0;
  padding: 24px;
}

.account-credit-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(170px, .8fr) minmax(170px, .8fr) auto auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 22px;
}

.account-credit-filter label {
  display: grid;
  gap: 7px;
  margin: 0;
  color: #475569;
  font-weight: 900;
}

.account-credit-filter .input,
.account-credit-filter .btn,
.account-credit-reset {
  min-height: 48px;
  border-radius: 12px;
}

.account-credit-table-wrap {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: #ffffff;
  overflow-x: auto;
}

.account-modern-credit-table {
  min-width: 860px;
  border-collapse: collapse;
}

.account-modern-credit-table th,
.account-modern-credit-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  vertical-align: middle;
}

.account-modern-credit-table thead th {
  background: #f8fafc;
  color: #475569;
  font-size: 14px;
  font-weight: 900;
}

.account-modern-credit-table tbody tr:hover {
  background: #fbfefd;
}

.account-modern-credit-table tbody tr:last-child td {
  border-bottom: 0;
}

.account-credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.account-credit-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.account-credit-badge.positive {
  background: #dcfce7;
  color: #079455;
}

.account-credit-badge.negative {
  background: #fee2e2;
  color: #dc2626;
}

.account-credit-badge.admin {
  background: #eff6ff;
  color: #2563eb;
}

.account-credit-badge.neutral {
  background: #f1f5f9;
  color: #64748b;
}

.account-credit-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  color: #64748b;
  font-weight: 800;
  flex-wrap: wrap;
}

.account-credit-page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.account-credit-page-actions .btn.is-disabled {
  pointer-events: none;
  opacity: .48;
}

.account-credit-page-actions form {
  margin: 0;
}

.account-credit-page-actions .input {
  min-height: 42px;
  border-radius: 12px;
}

@media (max-width: 1120px) {
  .account-credit-stats {
    grid-template-columns: 1fr;
  }

  .account-credit-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .account-credits-page {
    gap: 14px;
  }

  .account-credits-hero,
  .account-credit-stat-card,
  .account-credit-table-card {
    border-radius: 16px;
  }

  .account-credits-hero {
    min-height: 130px;
    padding: 22px 18px;
  }

  .account-credits-hero p {
    font-size: 15px;
  }

  .account-credit-stat-card {
    min-height: 116px;
    padding: 18px;
  }

  .account-credit-stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 15px;
    font-size: 21px;
  }

  .account-credit-table-card {
    padding: 16px;
  }

  .account-credit-filter {
    grid-template-columns: 1fr;
  }

  .account-credit-filter .btn,
  .account-credit-reset,
  .account-credit-page-actions,
  .account-credit-page-actions .btn,
  .account-credit-page-actions form,
  .account-credit-page-actions .input {
    width: 100%;
  }
}

.account-settings-page {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.account-settings-hero {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 150px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 60%, #effcf9 100%);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.account-settings-hero::before,
.account-settings-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.1);
}

.account-settings-hero::before {
  width: 220px;
  height: 220px;
  top: -120px;
  right: 7%;
}

.account-settings-hero::after {
  width: 140px;
  height: 140px;
  top: 44px;
  right: 18%;
  background: rgba(15, 155, 142, 0.08);
}

.account-settings-hero h1,
.account-settings-hero p {
  position: relative;
  z-index: 1;
}

.account-settings-hero h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1.08;
  letter-spacing: 0;
}

.account-settings-hero p {
  max-width: 760px;
  margin: 0;
  color: #64748b;
  font-size: 18px;
  line-height: 1.7;
}

.account-settings-info-card,
.account-settings-form-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.account-settings-info-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.account-settings-info-item {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 22px 24px;
  border-right: 1px solid rgba(148, 163, 184, 0.18);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.account-settings-info-item:nth-child(3n) {
  border-right: 0;
}

.account-settings-info-item:nth-last-child(-n+3) {
  border-bottom: 0;
}

.account-settings-info-item span {
  color: #64748b;
  font-size: 14px;
  font-weight: 900;
}

.account-settings-info-item strong {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

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

.account-settings-form-card {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 24px;
}

.account-settings-form-card h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 24px;
}

.account-settings-form-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.65;
}

.account-settings-form-card label {
  display: grid;
  gap: 8px;
  margin: 0;
  color: #475569;
  font-weight: 900;
}

.account-settings-form-card .input {
  min-height: 48px;
  border-radius: 12px;
}

.account-settings-form-card .btn {
  min-height: 48px;
  border-radius: 12px;
  width: fit-content;
  min-width: 132px;
}

@media (max-width: 900px) {
  .account-settings-info-card,
  .account-settings-form-grid {
    grid-template-columns: 1fr;
  }

  .account-settings-info-item,
  .account-settings-info-item:nth-child(3n),
  .account-settings-info-item:nth-last-child(-n+3) {
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  }

  .account-settings-info-item:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  .account-settings-page {
    gap: 14px;
  }

  .account-settings-hero,
  .account-settings-info-card,
  .account-settings-form-card {
    border-radius: 16px;
  }

  .account-settings-hero {
    min-height: 130px;
    padding: 22px 18px;
  }

  .account-settings-hero p {
    font-size: 15px;
  }

  .account-settings-info-item,
  .account-settings-form-card {
    padding: 18px;
  }

  .account-settings-form-card .btn {
    width: 100%;
  }
}

.account-support-page {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.account-support-hero {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 150px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 60%, #effcf9 100%);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.account-support-hero::before,
.account-support-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.1);
}

.account-support-hero::before {
  width: 230px;
  height: 230px;
  top: -120px;
  right: 7%;
}

.account-support-hero::after {
  width: 145px;
  height: 145px;
  top: 42px;
  right: 18%;
  background: rgba(15, 155, 142, 0.08);
}

.account-support-hero h1,
.account-support-hero p {
  position: relative;
  z-index: 1;
}

.account-support-hero h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1.08;
  letter-spacing: 0;
}

.account-support-hero p {
  max-width: 760px;
  margin: 0;
  color: #64748b;
  font-size: 18px;
  line-height: 1.7;
}

.account-support-modern-card,
.account-support-faq-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.account-support-modern-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: stretch;
  padding: 24px;
}

.account-support-copy {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

.account-support-kicker {
  width: fit-content;
  max-width: 100%;
  padding: 5px 11px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #0f9b8e;
  font-size: 13px;
  font-weight: 900;
}

.account-support-copy h2 {
  margin: 0;
  color: #0f172a;
  font-size: 28px;
  line-height: 1.2;
}

.account-support-line {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  max-width: 680px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: #f8fafc;
}

.account-support-line span {
  color: #64748b;
  font-weight: 900;
}

.account-support-line strong {
  color: #0f172a;
  overflow-wrap: anywhere;
}

.account-support-note {
  max-width: 760px;
  margin: 0;
  color: #64748b;
  line-height: 1.75;
}

.account-support-qr-panel {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 240px;
  padding: 18px;
  border: 1px dashed rgba(15, 155, 142, 0.35);
  border-radius: 18px;
  background: linear-gradient(145deg, #f0fdfa, #ffffff);
  color: #0f766e;
  text-align: center;
  font-weight: 900;
}

.account-support-qr-panel img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 16px;
}

.account-support-qr-empty {
  display: grid;
  gap: 8px;
  color: #0f766e;
}

.account-support-qr-empty small {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.account-support-faq-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.account-support-faq-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 130px;
  padding: 18px;
}

.account-support-faq-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
}

.account-support-faq-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.65;
}

@media (max-width: 1120px) {
  .account-support-modern-card {
    grid-template-columns: 1fr;
  }

  .account-support-faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .account-support-page {
    gap: 14px;
  }

  .account-support-hero,
  .account-support-modern-card,
  .account-support-faq-card {
    border-radius: 16px;
  }

  .account-support-hero {
    min-height: 130px;
    padding: 22px 18px;
  }

  .account-support-hero p {
    font-size: 15px;
  }

  .account-support-modern-card,
  .account-support-faq-card {
    padding: 18px;
  }

  .account-support-line,
  .account-support-faq-grid {
    grid-template-columns: 1fr;
  }

  .account-support-qr-panel {
    min-height: 190px;
  }
}

.dashboard-download-quota {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-type-cell {
  min-width: 92px;
  white-space: nowrap;
}

.dashboard-cost-cell,
.dashboard-download-cell {
  white-space: nowrap;
}

.dashboard-download-quota.is-empty {
  background: #f1f5f9;
  color: #64748b;
}

.dashboard-duration-cell {
  white-space: nowrap;
}

.dashboard-duration-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  padding: 5px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 12%, #ffffff);
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dashboard-duration-badge.is-fastest {
  color: #24AA1D;
}

.dashboard-duration-badge.is-fast {
  color: #42DD3F;
}

.dashboard-duration-badge.is-normal {
  color: #119AAA;
}

.dashboard-duration-badge.is-slow {
  color: #F69833;
}

.dashboard-duration-badge.is-very-slow {
  color: #E61610;
}

.dashboard-duration-badge.is-unknown {
  background: #f8fafc;
  color: #94a3b8;
}

.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: 1100px) {
  .dashboard-stat-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .dashboard-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-hero-actions,
  .dashboard-hero-actions .btn {
    width: 100%;
  }

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

  .async-filter-bar {
    padding: 16px;
  }

  .async-filter-bar .dashboard-search-filter,
  .async-filter-bar input[type="search"] {
    min-width: 0;
    width: 100%;
  }

  #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;
  }

  .asset-library-modal {
    padding: 12px;
    place-items: end center;
  }

  .asset-library-panel {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 18px 18px 0 0;
  }

  .asset-library-header {
    padding: 16px;
  }

  .asset-library-body {
    max-height: calc(100vh - 124px);
    padding: 14px 16px 18px;
  }

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

  .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-download-card,
.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-show-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 20px;
}

.ai-show-top-grid .ai-task-hero {
  height: 100%;
  margin-bottom: 0;
}

.ai-show-top-grid-processing {
  grid-template-columns: 1fr;
}

.ai-show-top-grid-processing .ai-task-hero {
  overflow: hidden;
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-soft) 80%, transparent)),
    radial-gradient(circle at 90% 0%, color-mix(in srgb, var(--accent-soft) 64%, transparent), transparent 42%);
}

.ai-download-card {
  display: flex;
  min-height: 138px;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-soft) 82%, transparent)),
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--accent-soft) 70%, transparent), transparent 54%);
}

.ai-download-card-head {
  display: grid;
  gap: 4px;
  text-align: center;
}

.ai-download-card-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ai-download-card-head strong {
  color: var(--text);
  font-size: 18px;
}

.ai-download-remaining-count {
  color: var(--danger);
  font-size: 18px;
}

.ai-download-card p {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.ai-download-card-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2px;
}

.ai-download-card-actions .btn {
  min-width: 140px;
  border-radius: 999px;
}

.ai-download-card-actions .btn:first-child::before {
  content: "↓";
  margin-right: 6px;
  font-weight: 900;
}

.ai-download-limit-dialog[hidden] {
  display: none;
}

.ai-download-limit-dialog {
  position: fixed;
  z-index: 1300;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.ai-download-limit-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px);
}

.ai-download-limit-card {
  position: relative;
  width: min(420px, 100%);
  padding: 24px;
  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);
  text-align: center;
}

.ai-download-limit-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--warn-soft) 82%, #fff);
  color: var(--warn);
  font-size: 24px;
  font-weight: 900;
}

.ai-download-limit-card h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 22px;
}

.ai-download-limit-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

body.has-download-limit-dialog {
  overflow: hidden;
}

.ai-processing-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 56px rgba(15, 23, 42, 0.07);
}

.ai-processing-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.ai-processing-kicker {
  width: fit-content;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-soft) 52%, #fff);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.ai-processing-head h2 {
  margin: 10px 0 6px;
  color: var(--text);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
}

.ai-processing-head p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

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

.ai-processing-summary > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.ai-processing-summary span,
.ai-processing-summary strong {
  display: block;
}

.ai-processing-summary span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ai-processing-summary strong {
  color: #475569;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.ai-processing-progress {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.ai-processing-track {
  max-width: none;
}

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

.ai-processing-step {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.ai-processing-step b,
.ai-processing-step span {
  display: block;
}

.ai-processing-step b {
  margin-bottom: 5px;
  color: var(--text);
  font-size: 14px;
}

.ai-processing-step span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.ai-processing-step.is-active {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 55%, #fff);
}

.ai-processing-step.is-done {
  border-color: color-mix(in srgb, var(--ok) 26%, var(--line));
  background: color-mix(in srgb, var(--ok-soft) 68%, #fff);
}

.ai-processing-actions {
  display: none;
}

.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: block;
}

.ai-job-layout > .ai-result-card {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

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

.ai-show-result-card {
  padding: 26px;
  margin-top: 0;
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.ai-show-result-card.is-preview-focused {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-soft) 42%, transparent), var(--shadow);
}

.ai-show-result-card > h2 {
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 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-show-result-card .ai-result-figure {
  padding: clamp(16px, 3vw, 30px);
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--surface-soft) 70%, #fff), #fff 22%, #fff 78%, color-mix(in srgb, var(--surface-soft) 70%, #fff));
}

.ai-show-result-card .ai-result-figure img,
.ai-show-result-card .ai-result-figure video {
  width: auto;
  max-width: 100%;
  max-height: min(78vh, 860px);
  margin: 0 auto;
  border-radius: 10px;
}

.ai-show-result-card .ai-result-figure figcaption {
  display: none;
}

.ai-asset-reminder {
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid color-mix(in srgb, var(--warn) 36%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--warn-soft) 88%, var(--surface));
  color: color-mix(in srgb, var(--warn) 72%, var(--text));
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}

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

.ai-show-secondary-actions {
  margin-bottom: 18px;
}

.ai-show-result-card > .ai-actions {
  padding-top: 2px;
}

.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-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

.ai-admin-copy-row {
  margin: 0;
}

.ai-admin-request-row {
  margin: 0 0 12px;
}

.ai-admin-debug-table-wrap {
  max-width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.ai-admin-debug-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ai-admin-debug-table th,
.ai-admin-debug-table td {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.ai-admin-debug-label {
  width: 160px;
  color: var(--muted);
}

.ai-admin-debug-value,
.ai-admin-break {
  word-break: break-word;
}

.ai-admin-download-table {
  font-size: 13px;
}

.ai-admin-download-table th,
.ai-admin-download-table td {
  padding: 8px 10px;
}

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

.ai-admin-detail-block {
  margin-top: 12px;
}

.ai-admin-pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-admin-pre-scroll {
  max-height: 520px;
  overflow: auto;
}

.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-show-top-grid,
  .ai-task-hero-main,
  .ai-job-layout,
  .ai-batch-hero {
    grid-template-columns: 1fr;
  }

  .ai-show-top-grid {
    display: grid;
  }

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

  .ai-processing-panel {
    grid-template-columns: 1fr;
  }

  .ai-processing-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-processing-summary,
  .ai-processing-steps {
    grid-template-columns: 1fr;
  }

  .ai-processing-head .btn {
    width: 100%;
  }

  .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,
  .ai-download-card-actions .btn {
    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: 248px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.job-create-modern #model_upload_wrap.job-upload-shell-model.upload-drop-wrap .upload-dropzone {
  border-color: rgba(15, 118, 110, 0.28);
}

.job-create-modern #garment_upload_wrap.job-upload-shell-garment.upload-drop-wrap .upload-dropzone {
  border-color: rgba(37, 99, 235, 0.26);
}

.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: 920px) {
  .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%;
  }
}
@media (max-width: 640px) {
  .job-new-layout {
    display: grid;
    grid-template-columns: 1fr;
  }

  .job-new-layout > .span-8,
  .job-new-layout > .span-4 {
    grid-column: 1 / -1;
  }

  .job-upload-grid,
  .job-param-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .job-seed-row,
  .job-submit-row,
  .job-submit-panel,
  .job-submit-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .job-create-modern #model_upload_wrap.upload-drop-wrap .upload-dropzone,
  .job-create-modern #garment_upload_wrap.upload-drop-wrap .upload-dropzone {
    min-height: 210px;
    padding: 14px;
  }

  .job-create-modern .upload-drop-thumb {
    min-height: 112px;
  }

  .job-create-modern .upload-drop-thumb img {
    height: 128px;
  }

  .job-submit-panel {
    padding: 14px;
  }

  .job-submit-panel .job-cost-panel {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .preflight-card {
    position: static;
  }

  .preflight-preview-box {
    height: auto;
    aspect-ratio: 4 / 3;
    min-height: 190px;
  }

  #model_preview_box.preflight-preview-box,
  #garment_preview_box.preflight-preview-box {
    min-height: 190px;
  }
}

.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: 14px;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 18px 0 22px;
  padding: 20px 24px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.05);
}
.async-filter-bar .dashboard-filter-group { display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; }
.async-filter-bar .dashboard-per-page { display:flex; flex-direction:column; gap:6px; min-width:150px; font-size:13px; color:var(--muted); font-weight:800; }
.async-filter-bar .dashboard-search-filter {
  min-width: 280px;
}
.async-filter-bar input[type="search"] { min-width:260px; }
.async-filter-bar .input {
  min-height: 44px;
  border-radius: 14px;
  background: #f8fafc;
}

.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:1px; margin:1px 0; color:var(--muted); font-size:1px; }
.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;
  }
}

/* Mobile responsive override layer. Desktop rules above 1024px remain unchanged. */
@media (max-width: 768px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    font-size: 15px;
  }

  .wrap {
    width: min(100% - 20px, 1180px);
    padding: 12px 0;
  }

  .nav .wrap {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .nav .brand {
    min-height: 40px;
    line-height: 1.2;
    white-space: normal;
  }

  .nav .wrap > .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow: visible;
    padding-bottom: 3px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav .wrap > .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    margin: 0;
    padding: 0 10px;
    white-space: nowrap;
  }

  h1 {
    font-size: clamp(24px, 8vw, 34px);
    line-height: 1.12;
    letter-spacing: 0;
  }

  h2 {
    font-size: clamp(19px, 6vw, 24px);
    letter-spacing: 0;
  }

  p,
  .muted,
  .help {
    line-height: 1.6;
  }

  .grid,
  .job-new-layout,
  .ai-show-top-grid,
  .ai-job-layout,
  .auth-split-layout,
  .admin-metrics,
  .admin-settings-grid,
  .admin-settings-two,
  .admin-qr-grid,
  .admin-config-list,
  .recharge-package-grid {
    grid-template-columns: 1fr !important;
  }

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

  .card,
  .job-new-left,
  .job-new-right,
  .ai-result-card,
  .ai-download-card,
  .ai-task-hero,
  .batch-studio-panel,
  .batch-studio-sidebar-card,
  .admin-settings-card {
    padding: 16px;
    border-radius: 16px;
  }

  .btn,
  button,
  .input,
  select,
  textarea {
    min-height: 44px;
  }

  input,
  select,
  textarea {
    max-width: 100%;
    font-size: 16px;
  }

  textarea.input,
  textarea {
    min-height: 96px;
  }

  .field-row,
  .ai-actions,
  .result-actions,
  .dashboard-hero-actions,
  .dashboard-toolbar-actions,
  .dashboard-actions,
  .generation-actions,
  .admin-head,
  .admin-filter,
  .admin-inline-form,
  .admin-recharge-actions,
  .admin-settings-card-head,
  .admin-switch-row {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .ai-actions .btn,
  .ai-actions .btn.secondary,
  .result-actions .btn,
  .result-actions .btn.secondary,
  .dashboard-hero-actions .btn,
  .dashboard-toolbar-actions .btn,
  .generation-actions .btn,
  .admin-recharge-actions .btn {
    width: 100%;
    margin-bottom: 0;
  }

  .table-wrap,
  .dashboard-table-card,
  #dashboard-batch-form .table-wrap,
  .admin-recharge-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table,
  #dashboard-batch-form .table,
  .admin-recharge-table {
    min-width: 760px;
    display: table;
    white-space: normal;
  }

  .table th,
  .table td,
  #dashboard-batch-form .table th,
  #dashboard-batch-form .table td {
    padding: 12px 14px;
  }

  .dashboard-hero,
  .dashboard-list-tools,
  .dashboard-filter-group,
  .async-filter-bar .dashboard-filter-group,
  .batch-studio-panel-head,
  .job-new-head,
  .credits-head {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-stat-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .dashboard-stat-card {
    min-height: 118px;
    padding: 14px;
  }

  .dashboard-actions {
    min-width: 0;
    flex-direction: row;
    flex-wrap: wrap;
    white-space: normal;
  }

  #dashboard-batch-form .table td:last-child .dashboard-action-link {
    min-height: 38px;
    padding: 7px 10px;
  }

  .dashboard-pagination,
  .async-pagination {
    justify-content: stretch;
  }

  .dashboard-pagination .btn,
  .dashboard-pagination .btn.secondary,
  .async-pagination .btn,
  .async-pagination .btn.secondary {
    flex: 1 1 calc(50% - 8px);
    width: auto;
  }

  .dashboard-page-jump,
  .dashboard-per-page {
    width: 100%;
  }

  .dashboard-page-jump input,
  .dashboard-per-page select,
  .async-filter-bar .dashboard-search-filter,
  .async-filter-bar .dashboard-per-page {
    width: 100%;
  }

  .tool-card-grid,
  .job-create-modern #panel-basic > .grid,
  .job-create-modern #panel-pro > .grid,
  .job-create-modern #panel-industrial_tryon > .grid {
    grid-template-columns: 1fr !important;
  }

  .upload-dropzone,
  .ai-batch-pro .batch-studio-upload-card,
  .batch-studio-upload-card {
    min-height: 170px;
  }

  .asset-library-modal,
  .generation-overlay,
  .dashboard-delete-dialog,
  .ai-download-limit-dialog {
    padding: 12px;
  }

  .asset-library-panel,
  .generation-panel,
  .dashboard-delete-card,
  .ai-download-limit-card {
    width: min(100%, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    overflow: auto;
  }

  .asset-library-header {
    align-items: flex-start;
    gap: 12px;
  }

  .asset-library-body {
    max-height: calc(100dvh - 150px);
    padding: 14px;
  }

  .asset-library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .asset-library-favorite {
    opacity: 1;
    transform: none;
  }

  .ai-task-hero-main,
  .ai-progress-head,
  .ai-download-card-head,
  .ai-download-card-actions,
  .ai-processing-steps,
  .generation-head,
  .generation-timeline,
  .generation-result {
    grid-template-columns: 1fr;
  }

  .ai-task-meta,
  .ai-task-foot,
  .ai-download-card-head,
  .ai-download-card-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .ai-result-gallery,
  .ai-show-result-card .ai-result-gallery {
    grid-template-columns: 1fr;
  }

  .ai-show-result-card .ai-result-figure {
    width: 100%;
    max-width: 100%;
  }

  .ai-show-result-card .ai-result-figure img,
  .ai-show-result-card .ai-result-figure video,
  .thumb img,
  .thumb video {
    width: 100%;
    max-height: 72dvh;
    object-fit: contain;
  }

  .ai-asset-reminder {
    padding: 12px;
    line-height: 1.6;
    word-break: break-word;
  }

  .ai-admin-details pre,
  .ai-error-detail pre,
  pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
  }

  .ai-batch-hero,
  .ai-batch-status,
  .ai-batch-item,
  .batch-studio-summary,
  .batch-studio-panel-head,
  .batch-studio-model-card-head {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .ai-batch-thumb,
  .batch-studio-preview,
  .batch-studio-preview.is-large {
    width: 100%;
  }

  .batch-studio-model-grid,
  .ai-batch-pro .batch-studio-model-grid {
    grid-template-columns: 1fr;
  }

  .auth-simple-visual,
  .auth-left-panel {
    min-height: auto;
  }

  .auth-clock-card {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .admin-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .admin-qr-box img,
  .admin-qr-empty {
    width: min(150px, 100%);
  }
}

@media (max-width: 480px) {
  .wrap {
    width: min(100% - 16px, 1180px);
  }

  .card,
  .job-new-left,
  .job-new-right,
  .ai-result-card,
  .ai-download-card,
  .ai-task-hero,
  .batch-studio-panel,
  .batch-studio-sidebar-card,
  .admin-settings-card {
    padding: 14px;
    border-radius: 14px;
  }

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

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

  .tool-card,
  .upload-dropzone,
  .batch-studio-model-card,
  .recharge-package,
  .dashboard-stat-card {
    border-radius: 14px;
  }

  .dashboard-preview-thumb {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .dashboard-actions {
    gap: 6px;
  }

  #dashboard-batch-form .table td:last-child .dashboard-action-link {
    padding: 7px 9px;
    font-size: 14px;
  }

  .generation-panel,
  .dashboard-delete-card,
  .ai-download-limit-card {
    padding: 18px;
  }

  .generation-head {
    gap: 10px;
  }

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

  .ai-orbit {
    width: 58px;
    height: 58px;
  }

  .ai-task-meta span,
  .status-badge,
  .ai-status-badge {
    max-width: 100%;
    white-space: normal;
  }

  .admin-switch-row {
    padding: 12px;
  }
}

@media (max-width: 390px) {
  body {
    font-size: 14px;
  }

  .wrap {
    width: min(100% - 12px, 1180px);
  }

  .nav a {
    min-height: 38px;
    padding: 0 8px;
  }

  .btn,
  button,
  .input,
  select,
  textarea {
    min-height: 42px;
  }

  .asset-library-grid {
    gap: 8px;
  }

  .asset-library-favorite {
    width: 28px;
    height: 28px;
    top: 6px;
    right: 6px;
  }

  .table,
  #dashboard-batch-form .table,
  .admin-recharge-table {
    min-width: 700px;
  }

  .dashboard-pagination .btn,
  .dashboard-pagination .btn.secondary,
  .async-pagination .btn,
  .async-pagination .btn.secondary {
    flex-basis: 100%;
  }
}

/* --------------------------------------------------------------------------
   Dashboard visual refresh — modern SaaS UI layer
   Scope: /dashboard only. index.php markup remains unchanged.
   -------------------------------------------------------------------------- */
.dashboard-modern {
  --dash-radius-sm: 10px;
  --dash-radius: 12px;
  --dash-radius-lg: 18px;
  --dash-radius-xl: 24px;
  --dash-space-1: 6px;
  --dash-space-2: 10px;
  --dash-space-3: 14px;
  --dash-space-4: 18px;
  --dash-space-5: 24px;
  --dash-space-6: 30px;

  --dash-surface: rgba(255, 255, 255, 0.92);
  --dash-surface-solid: #ffffff;
  --dash-surface-muted: #f8fafc;
  --dash-border: rgba(226, 232, 240, 0.92);
  --dash-border-strong: rgba(203, 213, 225, 0.78);
  --dash-heading: #0f172a;
  --dash-muted: #64748b;
  --dash-row-hover: #f8fafc;
  --dash-table-head: #f9fafb;
  --dash-green: #059669;
  --dash-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.035), 0 6px 14px rgba(15, 23, 42, 0.025);
  --dash-shadow-md: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 24px rgba(15, 23, 42, 0.035);
  --dash-shadow-lg: 0 1px 2px rgba(15, 23, 42, 0.045), 0 12px 28px rgba(15, 23, 42, 0.04);
  --dash-focus: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
  --dash-hero-bg:
    radial-gradient(circle at 14% 10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 32%),
    linear-gradient(135deg, #ffffff, #f8fafc 88%);
  position: relative;
  gap: 0;
}

/* Keep only the default visual language. The HTML can remain unchanged. */
.theme-switch {
  display: none !important;
}

.dashboard-modern .dashboard-shell {
  position: relative;
  isolation: isolate;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-modern .dashboard-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -30px -18px auto;
  height: 260px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 28%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 36%),
    radial-gradient(circle at 82% 20%, rgba(37, 99, 235, 0.12), transparent 34%);
  opacity: 0.55;
  filter: blur(12px);
  pointer-events: none;
}

.dashboard-modern .dashboard-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--dash-space-5);
  overflow: hidden;
  margin: 0 0 var(--dash-space-5);
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-xl);
  background: var(--dash-hero-bg);
  box-shadow: var(--dash-shadow-sm);
}

.dashboard-modern .dashboard-hero::after {
  content: "";
  position: absolute;
  top: -72px;
  right: -64px;
  width: 190px;
  height: 190px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  opacity: 0.45;
  pointer-events: none;
}

.dashboard-modern .dashboard-hero h1 {
  margin: 0 0 var(--dash-space-1);
  color: var(--dash-heading);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.dashboard-modern .dashboard-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--dash-muted);
  font-size: 15px;
  line-height: 1.75;
}

.dashboard-modern .dashboard-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--dash-space-2);
}

.dashboard-modern .btn,
.dashboard-modern button,
.dashboard-modern .dashboard-action-link,
.dashboard-modern .dashboard-preview-thumb,
.dashboard-modern .dashboard-stat-card {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
}

.dashboard-modern .btn {
  min-height: 42px;
  border-radius: var(--dash-radius);
  box-shadow: none;
}

.dashboard-modern .btn:hover:not(:disabled),
.dashboard-modern .dashboard-action-link:hover:not(:disabled) {
  transform: translateY(-1px);
}

.dashboard-modern .btn:focus-visible,
.dashboard-modern .dashboard-action-link:focus-visible,
.dashboard-modern .dashboard-preview-thumb:focus-visible,
.dashboard-modern .input:focus-visible {
  outline: none;
  box-shadow: var(--dash-focus);
}

.dashboard-modern .dashboard-stat-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 var(--dash-space-5);
}

.dashboard-modern .dashboard-stat-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--dash-space-4);
  min-height: 132px;
  overflow: hidden;
  padding: 22px 24px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--dash-radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.72)),
    #ffffff;
  box-shadow: var(--dash-shadow-sm);
  cursor: default;
  transform: none !important;
  transition: none;
}

.dashboard-modern .dashboard-stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--stat-main, var(--accent)) 0 3px, transparent 3px),
    radial-gradient(circle at 94% 12%, color-mix(in srgb, var(--stat-main, var(--accent)) 11%, transparent), transparent 65%);
  opacity: 1;
  pointer-events: none;
}

.dashboard-modern .dashboard-stat-card > div,
.dashboard-modern .dashboard-stat-card .stat-icon {
  position: relative;
  z-index: 1;
}

.dashboard-modern .dashboard-stat-card h2 {
  margin: 0 0 10px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.dashboard-modern .dashboard-stat-card p {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--dash-heading);
  line-height: 1;
}
.dashboard-modern .dashboard-stat-card p span {
  color: var(--stat-main);
  font-weight: 800;
  opacity: 0.6;
}

.dashboard-modern .dashboard-stat-card b {
  color: var(--dash-heading);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0;
}

.dashboard-modern .dashboard-stat-card span {
  color: #667085;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.dashboard-modern .stat-icon {
  --stat-main: #2563eb;
  --stat-soft: rgba(37, 99, 235, 0.12);
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--stat-main) 24%, transparent);
  border-radius: 18px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.78), transparent 28%),
    color-mix(in srgb, var(--stat-main) 10%, #ffffff);
  color: var(--stat-main);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--stat-main) 16%, transparent);
}

.dashboard-modern .stat-success {
  --stat-main: #059669;
  --stat-soft: rgba(5, 150, 105, 0.12);
}

.dashboard-modern .stat-failed {
  --stat-main: #dc2626;
  --stat-soft: rgba(220, 38, 38, 0.11);
}

.dashboard-modern .stat-credit {
  --stat-main: #f59e0b;
  --stat-soft: rgba(245, 158, 11, 0.14);
}

.dashboard-modern .dashboard-stat-card:has(.stat-total) { --stat-main: #2563eb; }
.dashboard-modern .dashboard-stat-card:has(.stat-success) { --stat-main: #059669; }
.dashboard-modern .dashboard-stat-card:has(.stat-failed) { --stat-main: #dc2626; }
.dashboard-modern .dashboard-stat-card:has(.stat-credit) { --stat-main: #f59e0b; }

.dashboard-modern .stat-icon::before,
.dashboard-modern .stat-icon::after {
  content: "";
  position: absolute;
  display: block;
}

.dashboard-modern .stat-total::before {
  width: 25px;
  height: 30px;
  border-radius: 8px;
  background: currentColor;
  box-shadow: 9px 8px 0 -4px color-mix(in srgb, currentColor 55%, transparent);
}

.dashboard-modern .stat-total::after {
  width: 13px;
  height: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, #ffffff 92%, currentColor);
  box-shadow: 0 7px 0 color-mix(in srgb, #ffffff 92%, currentColor), 0 14px 0 color-mix(in srgb, #ffffff 78%, currentColor);
  transform: translateX(-2px);
}

.dashboard-modern .stat-success::before {
  width: 15px;
  height: 27px;
  border: solid currentColor;
  border-width: 0 4px 4px 0;
  border-radius: 0 0 4px 0;
  background: transparent;
  transform: rotate(45deg) translate(-2px, -3px);
}

.dashboard-modern .stat-success::after {
  inset: 12px;
  border: 2px solid currentColor;
  border-radius: 999px;
  opacity: 0.16;
}

.dashboard-modern .stat-failed::before,
.dashboard-modern .stat-failed::after {
  width: 30px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: none;
}

.dashboard-modern .stat-failed::before {
  transform: rotate(45deg);
}

.dashboard-modern .stat-failed::after {
  transform: rotate(-45deg);
}

.dashboard-modern .stat-credit::before {
  width: 29px;
  height: 29px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,0.72) 0 12%, transparent 13%),
    currentColor;
  box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 16%, transparent);
}

.dashboard-modern .stat-credit::after {
  bottom: 13px;
  width: 34px;
  height: 10px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 999px 999px;
  opacity: 0.34;
}

.dashboard-modern .async-table {
  margin-top: 0;
}

.dashboard-modern .async-filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 16px;
  margin: 0 0 var(--dash-space-5);
  padding: 18px 20px;
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--dash-shadow-sm);
  backdrop-filter: blur(10px);
}

.dashboard-modern .async-filter-bar .dashboard-filter-group {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) repeat(2, minmax(160px, 0.72fr));
  gap: 14px;
  align-items: end;
  min-width: 0;
}

.dashboard-modern .async-filter-bar .dashboard-per-page {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0;
  color: var(--dash-muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  white-space: normal;
}

.dashboard-modern .async-filter-bar .dashboard-search-filter::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 999px;
  opacity: 0.5;
  pointer-events: none;
}

.dashboard-modern .async-filter-bar .dashboard-search-filter::before {
  content: "";
  position: absolute;
  left: 27px;
  bottom: 12px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.5;
  transform: rotate(45deg);
  pointer-events: none;
}

.dashboard-modern .async-filter-bar .input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--dash-border-strong);
  border-radius: var(--dash-radius);
  background: #ffffff;
  color: var(--text);
  box-shadow: none;
  font-size: 14px;
}

.dashboard-modern .async-filter-bar input[type="search"] {
  min-width: 0;
  padding-left: 40px;
}

.dashboard-modern .async-filter-bar .input:hover {
  border-color: color-mix(in srgb, var(--accent) 22%, var(--dash-border-strong));
  background: #ffffff;
}

.dashboard-modern .async-filter-bar .input:focus {
  border-color: var(--accent);
  background: var(--dash-surface-solid);
  box-shadow: var(--dash-focus);
}

.dashboard-modern .dashboard-toolbar-actions {
  display: flex;
  align-items: flex-end;
  gap: var(--dash-space-2);
  margin-left: 0;
}

.dashboard-modern .async-filter-bar > button[data-async-refresh],
.dashboard-modern #dashboard_batch_download_btn {
  min-height: 44px;
  padding-inline: 16px;
  border-radius: var(--dash-radius);
}

.dashboard-modern #dashboard_batch_download_btn:not(:disabled) {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--dash-surface-solid));
  font-weight: 900;
}

.dashboard-modern #dashboard_batch_download_btn:not(:disabled):hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, var(--dash-surface-solid));
}

.dashboard-modern .async-table-meta {
  display:none;
  min-height: 1px;
  margin: -30px 0 10px;
  color: var(--dash-muted);
  font-size: 1px;
}

.dashboard-modern .async-table-meta [data-async-loading]:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dashboard-modern .async-table-meta [data-async-loading]:not([hidden])::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: generationSpin 0.8s linear infinite;
}

.dashboard-modern .dashboard-table-card,
.dashboard-modern #dashboard-batch-form .table-wrap {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035), 0 10px 24px rgba(15, 23, 42, 0.03);
}

.dashboard-modern #dashboard-batch-form .table {
  width: 100%;
  min-width: 960px;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
}

.dashboard-modern #dashboard-batch-form .table th,
.dashboard-modern #dashboard-batch-form .table td {
  padding: 12px 16px;
  border-bottom: 1px solid #edf2f7;
}

.dashboard-modern #dashboard-batch-form .table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #fbfcfe, #f8fafc);
  color: #667085;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: inset 0 -1px 0 #e5e7eb;
}

.dashboard-modern #dashboard-batch-form .table th:first-child {
  border-top-left-radius: var(--dash-radius-xl);
}

.dashboard-modern #dashboard-batch-form .table th:last-child {
  border-top-right-radius: var(--dash-radius-xl);
}

.dashboard-modern #dashboard-batch-form .table td {
  background: #ffffff;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.45;
  vertical-align: middle;
}

.dashboard-modern #dashboard-batch-form .table tbody tr {
  transition: background 0.14s ease;
}

.dashboard-modern #dashboard-batch-form .table tbody tr:last-child td {
  border-bottom: 0;
}

.dashboard-modern #dashboard-batch-form .table tbody tr:hover td {
  background: #f9fafb;
}

.dashboard-modern .dashboard-job-check,
.dashboard-modern #select_current_page {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  accent-color: var(--accent);
  cursor: pointer;
}

.dashboard-modern input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.dashboard-modern .dashboard-preview-thumb {
  position: relative;
  width: 56px;
  height: 56px;
  border: 1px solid #e5e7eb;
  border-radius: 15px;
  background: #f8fafc;
  box-shadow: none;
}

.dashboard-modern .dashboard-preview-thumb:hover {
  transform: none;
  border-color: #d0d5dd;
  box-shadow: none;
}

.dashboard-modern .dashboard-preview-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-modern .dashboard-preview-thumb.is-empty span,
.dashboard-modern .dashboard-preview-thumb.is-video span {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 18%, var(--dash-surface-solid));
}

.dashboard-modern .dashboard-preview-thumb.is-video span {
  clip-path: polygon(28% 18%, 28% 82%, 84% 50%);
  border-radius: 4px;
  background: var(--accent);
}

.dashboard-modern .dashboard-job-title {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.dashboard-modern .dashboard-job-title strong {
  color: #111827;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.dashboard-modern .dashboard-job-title span {
  width: fit-content;
  padding: 3px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f9fafb;
  color: #667085;
  font-size: 12px;
  font-weight: 850;
}

.dashboard-modern .dashboard-client-task-id {
  max-width: 100%;
  min-width: 106px;
  padding: 3px 10px;
  border-color: color-mix(in srgb, var(--accent) 24%, #e5e7eb);
  background: color-mix(in srgb, var(--accent) 9%, #ffffff);
  color: #0f766e;
  font-size: 12px;
  font-weight: 850;
}

.dashboard-modern .dashboard-client-task-id:hover {
  border-color: color-mix(in srgb, var(--accent) 56%, #e5e7eb);
  background: color-mix(in srgb, var(--accent) 15%, #ffffff);
}

.dashboard-modern .dashboard-client-task-id.is-copied {
  border-color: rgba(22, 163, 74, 0.34);
  background: rgba(220, 252, 231, 0.96);
  color: #047857;
}

.dashboard-modern .dashboard-client-task-id.is-copy-failed {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(254, 242, 242, 0.96);
  color: #b91c1c;
}

.dashboard-modern .dashboard-client-task-id.is-disabled,
.dashboard-modern .dashboard-client-task-id:disabled {
  border-color: #e5e7eb;
  background: #f8fafc;
  color: #94a3b8;
}

.dashboard-modern .status {
  min-height: 30px;
  min-width: 68px;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.dashboard-modern .status::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.72;
}

.dashboard-modern .status.completed,
.dashboard-modern .status.succeeded,
.dashboard-modern .status.success {
  border-color: color-mix(in srgb, var(--ok) 24%, transparent);
  background: color-mix(in srgb, var(--ok) 9%, #fff);
}

.dashboard-modern .status.failed {
  border-color: color-mix(in srgb, var(--danger) 24%, transparent);
  background: color-mix(in srgb, var(--danger) 8%, #fff);
}

.dashboard-modern .status.processing,
.dashboard-modern .status.running,
.dashboard-modern .status.in_queue,
.dashboard-modern .status.queued,
.dashboard-modern .status.pending,
.dashboard-modern .status.starting,
.dashboard-modern .status.submitted,
.dashboard-modern .status.draft {
  border-color: color-mix(in srgb, var(--warn) 24%, transparent);
  background: color-mix(in srgb, var(--warn) 10%, #fff);
}

.dashboard-modern .dashboard-cost-cell {
  color: var(--dash-heading);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.dashboard-modern .dashboard-download-quota {
  min-height: 31px;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, #4f46e5 18%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, #4f46e5 9%, var(--dash-surface-solid));
  color: #4f46e5;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-modern .dashboard-download-quota.is-empty {
  border-color: var(--dash-border);
  background: var(--dash-surface-muted);
  color: var(--dash-muted);
}

.dashboard-modern .dashboard-duration-badge {
  min-height: 31px;
  min-width: 68px;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  background: color-mix(in srgb, currentColor 11%, var(--dash-surface-solid));
  font-size: 12px;
  font-weight: 900;
}

.dashboard-modern .dashboard-duration-badge.is-unknown {
  border-color: var(--dash-border);
  background: var(--dash-surface-muted);
  color: var(--dash-muted);
}

.dashboard-modern .dashboard-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 210px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.dashboard-modern #dashboard-batch-form .table td:last-child .dashboard-action-link {
  min-height: 32px;
  min-width: 48px;
  padding: 7px 10px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  box-shadow: none;
}

.dashboard-modern #dashboard-batch-form .table td:last-child .dashboard-action-link:hover:not(:disabled) {
  border-color: color-mix(in srgb, #2563eb 30%, #d8e0eb);
  background: color-mix(in srgb, #2563eb 7%, #ffffff);
  color: #1d4ed8;
  transform: none;
}

.dashboard-modern #dashboard-batch-form .table td:last-child .dashboard-download-link {
  border-color: color-mix(in srgb, var(--dash-green) 30%, #d8e0eb);
  background: color-mix(in srgb, var(--dash-green) 7%, #ffffff);
  color: var(--dash-green);
}

.dashboard-modern #dashboard-batch-form .table td:last-child .dashboard-download-link:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--dash-green) 42%, #d8e0eb);
  background: color-mix(in srgb, var(--dash-green) 12%, #ffffff);
  color: #047857;
}

.dashboard-modern .dashboard-action-danger {
  border-color: color-mix(in srgb, var(--danger) 24%, transparent) !important;
  background: color-mix(in srgb, var(--danger) 7%, var(--dash-surface-solid)) !important;
  color: var(--danger) !important;
}

.dashboard-modern .dashboard-action-danger:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--danger) 42%, transparent) !important;
  background: color-mix(in srgb, var(--danger) 12%, var(--dash-surface-solid)) !important;
  transform: none;
}

.dashboard-modern .dashboard-action-link.is-disabled,
.dashboard-modern .dashboard-action-link:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  transform: none !important;
}

.dashboard-modern .dashboard-pagination,
.dashboard-modern .async-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--dash-space-2);
  margin-top: var(--dash-space-5);
  padding: 14px;
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--dash-shadow-sm);
  backdrop-filter: blur(10px);
  margin-top: 5px;
}

.dashboard-modern .async-pagination .btn,
.dashboard-modern .async-pagination .btn.secondary {
  min-width: 94px;
  min-height: 40px;
  margin: 0;
  border-radius: var(--dash-radius);
}

.dashboard-modern .async-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  transform: none;
}

.dashboard-modern .dashboard-page-status {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, var(--dash-surface-solid));
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.dashboard-modern .dashboard-page-jump,
.dashboard-modern .async-pagination .dashboard-per-page {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  margin: 0;
  color: var(--dash-muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-modern .dashboard-page-jump input,
.dashboard-modern .async-pagination .dashboard-per-page select {
  width: 82px;
  min-height: 40px;
  border-radius: var(--dash-radius);
  background: var(--dash-surface-solid);
  text-align: center;
}

.dashboard-modern .async-pagination .dashboard-per-page select {
  width: 104px;
  text-align: left;
}

@media (max-width: 1180px) {
  .dashboard-modern .dashboard-stat-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-modern .async-filter-bar {
    grid-template-columns: 1fr;
  }

  .dashboard-modern .dashboard-toolbar-actions,
  .dashboard-modern .async-filter-bar > button[data-async-refresh] {
    width: 100%;
  }

  .dashboard-modern .dashboard-toolbar-actions .btn,
  .dashboard-modern .async-filter-bar > button[data-async-refresh] {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .dashboard-modern .dashboard-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-modern .dashboard-hero-actions,
  .dashboard-modern .dashboard-hero-actions .btn {
    width: 100%;
  }

  .dashboard-modern .async-filter-bar .dashboard-filter-group {
    grid-template-columns: 1fr;
  }

  .dashboard-modern .dashboard-table-card,
  .dashboard-modern #dashboard-batch-form .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dashboard-modern #dashboard-batch-form .table {
    min-width: 920px;
  }

  .dashboard-modern .dashboard-pagination,
  .dashboard-modern .async-pagination {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .dashboard-modern .async-pagination .btn,
  .dashboard-modern .async-pagination .btn.secondary {
    flex: 1 1 calc(50% - 8px);
    width: auto;
  }

  .dashboard-modern .dashboard-page-status,
  .dashboard-modern .dashboard-page-jump,
  .dashboard-modern .async-pagination .dashboard-per-page {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .dashboard-modern {
    overflow-x: clip;
  }

  .dashboard-modern .dashboard-shell::before {
    inset-inline: -8px;
  }

  .dashboard-modern .dashboard-hero {
    padding: 18px;
    border-radius: 20px;
  }

  .dashboard-modern .dashboard-stat-summary {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .dashboard-modern .dashboard-stat-card {
    min-height: 112px;
    padding: 16px;
    border-radius: 18px;
  }

  .dashboard-modern .stat-icon {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    border-radius: 17px;
  }

  .dashboard-modern .async-filter-bar,
  .dashboard-modern .dashboard-pagination,
  .dashboard-modern .async-pagination {
    padding: 14px;
    border-radius: 16px;
  }

  .dashboard-modern .async-filter-bar {
    gap: 12px;
  }

  .dashboard-modern .async-filter-bar .dashboard-filter-group {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
  }

  .dashboard-modern .async-filter-bar .dashboard-per-page,
  .dashboard-modern .async-filter-bar .input,
  .dashboard-modern .dashboard-toolbar-actions,
  .dashboard-modern .dashboard-toolbar-actions .btn,
  .dashboard-modern .async-filter-bar > button[data-async-refresh] {
    width: 100%;
  }

  .dashboard-modern .dashboard-table-card,
  .dashboard-modern #dashboard-batch-form .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    -webkit-overflow-scrolling: touch;
  }

  .dashboard-modern #dashboard-batch-form .table {
    min-width: 880px;
  }

  .dashboard-modern .dashboard-actions {
    min-width: 0;
    flex-wrap: wrap;
    white-space: normal;
  }

  .dashboard-modern #dashboard-batch-form .table td:last-child .dashboard-action-link {
    min-height: 36px;
    padding: 8px 10px;
  }

  .dashboard-modern .async-pagination .btn,
  .dashboard-modern .async-pagination .btn.secondary {
    flex-basis: 100%;
    width: 100%;
  }

  .dashboard-modern .dashboard-page-jump,
  .dashboard-modern .async-pagination .dashboard-per-page {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .dashboard-modern .dashboard-page-jump input,
  .dashboard-modern .async-pagination .dashboard-per-page select {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-modern *,
  .dashboard-modern *::before,
  .dashboard-modern *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
