:root {
  --bg: #070b18;
  --sidebar: rgba(15, 23, 42, 0.72);
  --panel: rgba(20, 23, 42, 0.82);
  --panel-2: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(96, 165, 250, 0.55);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --amber: #f59e0b;
  --green: #34d399;
  --danger: #fb7185;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    linear-gradient(125deg, rgba(37, 99, 235, 0.16), transparent 28%),
    linear-gradient(230deg, rgba(147, 51, 234, 0.18), transparent 34%),
    var(--bg);
  font-family: "PingFang SC", "Microsoft YaHei", "PingFang TC", system-ui, sans-serif;
}

body {
  min-height: 100vh;
  overflow: hidden;
}

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

button {
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  height: 100vh;
  background: rgba(2, 6, 23, 0.5);
}

.sidebar {
  display: flex;
  min-height: 0;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--sidebar);
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.brand-mark img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 13px;
}

.brand strong {
  font-size: 16px;
  letter-spacing: 0;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.side-nav {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 10px 16px;
}

.nav-title {
  display: block;
  padding: 8px 12px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nav-divider {
  height: 1px;
  margin: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
}

.menu-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

a.menu-item:not(.active):not(.disabled) {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.04));
  border-color: rgba(96, 165, 250, 0.12);
}

a.menu-item:not(.active):not(.disabled)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.45);
  opacity: 0;
  transition: opacity 0.18s ease;
}

a.menu-item:not(.active):not(.disabled):hover {
  color: #eff6ff;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.18), rgba(139, 92, 246, 0.12));
  border-color: rgba(96, 165, 250, 0.38);
  box-shadow: inset 0 0 18px rgba(59, 130, 246, 0.08), 0 8px 22px rgba(15, 23, 42, 0.18);
  transform: translateX(2px);
}

a.menu-item:not(.active):not(.disabled):hover::before {
  opacity: 1;
}

.menu-item.active {
  color: white;
  border-color: rgba(125, 211, 252, 0.48);
  background:
    radial-gradient(circle at 16px 50%, rgba(125, 211, 252, 0.36), transparent 26px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.95), rgba(124, 58, 237, 0.9));
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.08), 0 12px 30px rgba(59, 130, 246, 0.28);
}

.menu-item.active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: #67e8f9;
  box-shadow: 0 0 14px rgba(103, 232, 249, 0.8);
}

.menu-item.disabled {
  color: rgba(148, 163, 184, 0.42);
  background: rgba(148, 163, 184, 0.035);
  border-color: rgba(148, 163, 184, 0.05);
  filter: saturate(0.35);
}

.menu-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(96, 165, 250, 0.12);
  color: currentColor;
  font-size: 14px;
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.08);
}

.menu-item.active .menu-icon {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 14px rgba(103, 232, 249, 0.32);
}

.menu-item.disabled .menu-icon {
  background: rgba(148, 163, 184, 0.06);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.04);
}

.menu-item em {
  margin-left: auto;
  border-radius: 999px;
  padding: 2px 7px;
  background: linear-gradient(90deg, #3b82f6, #9333ea);
  color: white;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.sidebar-bottom {
  position: relative;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.account-popover {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(100% - 8px);
  z-index: 5;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 14px;
  background: rgba(10, 16, 32, 0.96);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.48), inset 0 0 22px rgba(59, 130, 246, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
  transform-origin: bottom center;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.account-popover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 12px;
}

.sidebar-bottom:hover .account-popover,
.sidebar-bottom:focus-within .account-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.guide-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 13px;
  padding: 0 12px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.18), rgba(6, 182, 212, 0.14));
  color: #93c5fd;
  font-size: 13px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.guide-link > span,
.change-password-link > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  font-size: 16px;
  line-height: 1;
}

.guide-link:hover {
  border-color: rgba(96, 165, 250, 0.38);
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.26), rgba(6, 182, 212, 0.2));
}

.account-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.account-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(96, 165, 250, 0.25);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #d946ef);
}

.account-card strong,
.account-card span {
  display: block;
}

.account-card strong {
  font-size: 13px;
}

.account-card span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.main-shell {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.top-actions {
  position: absolute;
  top: 22px;
  right: 28px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-actions button,
.top-actions .admin-button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.top-actions button:hover,
.top-actions .admin-button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.top-actions .notice-button {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(239, 68, 68, 0.28));
  border-color: rgba(251, 191, 36, 0.35);
}

.top-actions .notice-button:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.5), rgba(239, 68, 68, 0.4));
  border-color: rgba(251, 191, 36, 0.55);
}

.top-actions .login-button {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.45), rgba(139, 92, 246, 0.38));
  border-color: rgba(96, 165, 250, 0.4);
}

.top-actions .login-button:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.6), rgba(139, 92, 246, 0.5));
  border-color: rgba(96, 165, 250, 0.6);
}

.top-actions .admin-button {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.45), rgba(5, 150, 105, 0.38));
  border-color: rgba(52, 211, 153, 0.4);
  text-decoration: none;
}

.top-actions .admin-button:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.6), rgba(5, 150, 105, 0.5));
  border-color: rgba(52, 211, 153, 0.6);
}

.workspace {
  height: 100vh;
  overflow: auto;
  padding: 8px 28px 42px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 36px auto 0;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: var(--muted);
}

.site-footer a:focus-visible {
  border-radius: 4px;
  outline: 2px solid rgba(96, 165, 250, 0.65);
  outline-offset: 3px;
}

.hero {
  display: block;
  margin: 0 auto 24px;
  max-width: 960px;
  text-align: center;
  padding: 32px 0 8px;
}

.hero-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
}

.hero-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 14px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #60a5fa, #a78bfa, #e879f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 0.5px;
}

.creator-panel,
.results-panel {
  position: relative;
  width: min(100%, 1180px);
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(130deg, rgba(30, 41, 79, 0.82), rgba(22, 18, 39, 0.86) 55%, rgba(17, 24, 39, 0.92)),
    var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(24px);
}

.creator-panel {
  padding: 32px 38px 28px;
}

.suite-init-retry {
  width: 100%;
  margin-bottom: 14px;
  border: 1px solid rgba(248, 113, 113, 0.5);
  border-radius: 10px;
  padding: 11px 14px;
  background: rgba(127, 29, 29, 0.22);
  color: #fecaca;
  font-size: 13px;
  font-weight: 700;
}

.suite-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, 1180px);
  margin: 0 auto 16px;
  border: 1px solid rgba(96, 165, 250, 0.32);
  border-radius: 18px;
  padding: 20px 22px;
  background: linear-gradient(125deg, rgba(30, 41, 79, 0.72), rgba(15, 23, 42, 0.9));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.suite-intro > div:first-child {
  min-width: 0;
}

.suite-intro-kicker {
  color: #60a5fa;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.suite-intro h2 {
  margin: 5px 0 4px;
  color: #f8fafc;
  font-size: 34px;
}

.suite-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.floating-guide {
  position: absolute;
  top: 34px;
  left: 50%;
  min-height: 30px;
  transform: translateX(-50%);
  border: 1px solid rgba(168, 85, 247, 0.34);
  border-radius: 12px;
  padding: 0 14px;
  background: rgba(126, 34, 206, 0.25);
  color: #d8b4fe;
  font-size: 12px;
  font-weight: 750;
}

.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 6px;
}

.panel-title h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.panel-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.credit-pill {
  position: relative;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 4px 10px;
  min-width: 156px;
  height: 66px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.09);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}

.credit-pill:hover {
  border-color: rgba(168, 85, 247, 0.55);
  background: rgba(255, 255, 255, 0.13);
}

.credit-pill span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}

.credit-pill strong {
  color: #38bdf8;
  font-size: 20px;
  line-height: 1;
}

.credit-pill::after {
  content: "+ 充值";
  justify-self: end;
  border-radius: 9px;
  padding: 7px 11px;
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
  color: white;
  font-size: 12px;
  font-weight: 600;
}

/* Recharge modal */
.recharge-modal[hidden] { display: none; }

.recharge-modal {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.recharge-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 20, 0.76);
  backdrop-filter: blur(8px);
}

.recharge-dialog {
  position: relative;
  width: min(1120px, 96vw);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(145deg, #15182a 0%, #0c1224 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.46);
  color: #eef2ff;
}

.recharge-header,
.recharge-header > div,
.recharge-footer,
.recharge-footer > div {
  display: flex;
  align-items: center;
}

.recharge-header { justify-content: space-between; gap: 20px; }
.recharge-header > div { gap: 12px; }
.recharge-header h2 { margin: 0 0 3px; font-size: 22px; }
.recharge-header p { margin: 0; color: #7f8ba8; font-size: 13px; }
.recharge-gift { color: #2dd4bf; font-size: 25px; }
.recharge-close { border: 0; background: transparent; color: #94a3b8; font-size: 28px; cursor: pointer; }
.recharge-current { margin-top: -24px; padding-right: 45px; color: #7f8ba8; font-size: 12px; text-align: right; }
.recharge-current strong { margin-left: 8px; color: #38bdf8; }

.recharge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.recharge-plan {
  position: relative;
  display: flex;
  min-height: 302px;
  flex-direction: column;
  align-items: center;
  border: 1px solid #36405a;
  border-radius: 16px;
  padding: 26px 18px 18px;
  background: rgba(31, 38, 59, 0.8);
  color: #cbd5e1;
  font: inherit;
  cursor: pointer;
}

.recharge-plan:hover,
.recharge-plan.is-selected { border-color: #a855f7; transform: translateY(-2px); }
.recharge-plan.is-selected { box-shadow: 0 0 0 1px #a855f7, 0 14px 35px rgba(126, 34, 206, 0.18); }
.recharge-plan.is-featured { background: linear-gradient(180deg, rgba(88, 28, 135, 0.26), rgba(17, 24, 39, 0.92)); }
.recharge-plan.is-vip { border-color: #9a5b12; background: linear-gradient(100deg, rgba(120, 76, 16, 0.66), rgba(31, 38, 59, 0.88) 55%); }
.recharge-plan > em { position: absolute; top: -12px; border-radius: 999px; padding: 5px 15px; background: #a855f7; color: white; font-size: 12px; font-style: normal; }
.recharge-plan.is-vip > em { background: #f59e0b; }
.recharge-plan-level { color: #a7b0c4; font-size: 13px; }
.recharge-plan-level i { margin-right: 7px; color: #60a5fa; font-style: normal; }
.is-vip .recharge-plan-level,
.is-vip .recharge-plan-level i { color: #fbbf24; }
.recharge-credits { margin-top: 14px; background: linear-gradient(90deg, #38bdf8, #8b5cf6); background-clip: text; color: transparent; font-size: 29px; line-height: 1; }
.recharge-plan > small { margin-top: 5px; color: #8490a7; }
.recharge-bonus { min-height: 22px; margin-top: 10px; color: #2dd4bf; font-size: 13px; font-weight: 700; }
.recharge-bonus.is-empty { visibility: hidden; }
.recharge-unit { width: 100%; margin-top: 5px; border-top: 1px solid #374151; padding-top: 10px; color: #71809b; font-size: 12px; }
.recharge-plan del { min-height: 19px; margin-top: 4px; color: #667085; font-size: 12px; }
.recharge-plan del.is-empty { visibility: hidden; }
.recharge-price { color: white; font-size: 20px; }
.recharge-plan ul { width: 100%; margin: 12px 0 0; padding: 0; list-style: none; text-align: left; }
.recharge-plan li { margin-top: 5px; color: #96a2b8; font-size: 12px; }
.recharge-plan.is-selected li { color: #c4b5fd; }
.recharge-plan.is-vip li { color: #fbbf24; }

.recharge-footer { justify-content: space-between; gap: 20px; margin-top: 20px; border-top: 1px solid #293149; padding-top: 18px; }
.recharge-footer > div { gap: 10px; color: #7f8ba8; font-size: 13px; }
.recharge-footer strong { color: white; font-size: 17px; }
.recharge-footer button { border: 0; border-radius: 11px; padding: 12px 24px; background: linear-gradient(90deg, #8b5cf6, #ec4899); color: white; font-weight: 750; cursor: pointer; }
.recharge-notice { margin: 12px 0 0; color: #fbbf24; font-size: 13px; text-align: right; }
.recharge-loading { grid-column: 1 / -1; text-align: center; color: #7f8ba8; padding: 40px 0; font-size: 14px; }

/* Recharge pay view (QR code) */
.recharge-pay-view { margin-top: 18px; text-align: center; }
.recharge-pay-info { display: flex; justify-content: center; gap: 40px; margin-bottom: 24px; color: #94a3b8; font-size: 14px; }
.recharge-pay-info strong { margin-left: 8px; color: #38bdf8; font-size: 18px; }
.recharge-qr-section { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.recharge-qr-title { color: #cbd5e1; font-size: 15px; font-weight: 600; }
.recharge-qr-wrapper { display: inline-block; padding: 16px; background: #fff; border-radius: 16px; line-height: 0; }
.recharge-qr-wrapper img, .recharge-qr-wrapper canvas { border-radius: 8px; }
.recharge-qr-timer { color: #94a3b8; font-size: 13px; }
.recharge-qr-timer strong { color: #38bdf8; margin-left: 4px; }
.recharge-qr-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 6px; animation: rchPulse 1.2s infinite; }
.recharge-qr-dot.expired { background: #ef4444; animation: none; }
@keyframes rchPulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.recharge-qr-status { color: #fbbf24; font-size: 13px; min-height: 20px; }
.recharge-pay-actions { margin-top: 24px; }
.recharge-btn-back { border: 1px solid #4b5563; border-radius: 10px; padding: 10px 28px; background: transparent; color: #94a3b8; font-size: 14px; cursor: pointer; transition: all .2s; }
.recharge-btn-back:hover { border-color: #8b5cf6; color: #c4b5fd; }

/* Recharge success view */
.recharge-success-view { margin-top: 30px; text-align: center; }
.recharge-success-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #22c55e, #10b981); color: #fff; font-size: 32px; font-weight: 700; margin-bottom: 16px; }
.recharge-success-title { color: #eef2ff; font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.recharge-success-detail { display: flex; justify-content: center; gap: 36px; color: #94a3b8; font-size: 14px; margin-bottom: 28px; }
.recharge-success-detail strong { margin-left: 6px; color: #38bdf8; font-size: 18px; }
.recharge-btn-success { border: 0; border-radius: 11px; padding: 12px 48px; background: linear-gradient(90deg, #8b5cf6, #ec4899); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; }

@media (max-width: 980px) {
  .recharge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recharge-current { margin-top: 8px; padding-right: 0; text-align: left; }
}

@media (max-width: 560px) {
  .recharge-modal { padding: 10px; }
  .recharge-dialog { padding: 18px 14px; }
  .recharge-grid { grid-template-columns: 1fr; }
  .recharge-footer { align-items: stretch; flex-direction: column; }
  .recharge-footer button { width: 100%; }
}

.step-block {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.compact-step {
  grid-template-columns: auto 1fr;
  align-items: center;
}

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

.mode-card {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-content: start;
  column-gap: 10px;
  min-height: 76px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  text-align: left;
}

.mode-card.active {
  border-color: var(--line-strong);
  background: rgba(37, 99, 235, 0.16);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.32) inset;
  color: white;
}

.mode-card span {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  grid-row: 1 / span 3;
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #60a5fa;
  font-size: 13px;
}

.mode-card strong,
.mode-card small,
.mode-card b {
  display: block;
}

.mode-card strong {
  font-size: 13px;
}

.mode-card small {
  margin-top: 4px;
  color: #718096;
  font-size: 12px;
}

.mode-card b {
  margin-top: 6px;
  color: #60a5fa;
  font-size: 12px;
}

.mode-card.active::after {
  position: absolute;
  top: 22px;
  right: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 16px #60a5fa;
  content: "";
}

.mode-card[data-quality="pro"].active {
  border-color: rgba(245, 158, 11, 0.92);
  background:
    radial-gradient(circle at right top, rgba(245, 158, 11, 0.12), transparent 34%),
    rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.32) inset;
}

.mode-card[data-quality="pro"].active::after {
  background: #facc15;
  box-shadow: 0 0 16px #facc15;
}

.mode-card[data-quality="pro"].active b,
.mode-card[data-quality="pro"].active span {
  color: #facc15;
}

.model-select-line {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.model-select-line select {
  flex: 1;
  height: 40px;
  box-sizing: border-box;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239ca3af' d='M1.4 0L6 4.6 10.6 0 12 1.4l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.model-select-line select:focus {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(255, 255, 255, 0.06);
}

.model-label {
  font-size: 13px;
  color: #9aa0a6;
  white-space: nowrap;
  font-weight: 600;
}

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

.model-option {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.04);
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.model-option:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.model-option.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.25));
  border-color: rgba(139, 92, 246, 0.5);
  color: #e0e7ff;
  font-weight: 600;
}

.content-tabs {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 4px;
  background: rgba(15, 23, 42, 0.64);
}

.content-option {
  min-height: 32px;
  border-radius: 9px;
  padding: 0 18px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
}

.content-option.active {
  color: white;
  background: linear-gradient(90deg, #2563eb, #9333ea);
  box-shadow: 0 8px 22px rgba(59, 130, 246, 0.28);
}

.pro-console {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  border: 1px solid rgba(245, 158, 11, 0.72);
  border-radius: 16px;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.14), transparent 20%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.76));
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.26);
}

.pro-console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.32);
  padding-bottom: 14px;
}

.pro-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(245, 158, 11, 0.48);
  border-radius: 7px;
  padding: 7px 13px;
  background: rgba(245, 158, 11, 0.12);
  color: #facc15;
  font-size: 13px;
}

.pro-title span {
  line-height: 1;
}

.pro-console-head em {
  color: rgba(245, 158, 11, 0.72);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.08em;
}

.pro-console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr);
  gap: 20px;
}

.pro-section {
  display: grid;
  gap: 10px;
}

.pro-section-title {
  color: #facc15;
  font-size: 13px;
  font-weight: 600;
}

.pro-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.pro-count-grid,
.aspect-grid {
  display: grid;
  gap: 10px;
}

.pro-count-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.aspect-grid[data-visible-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pro-aspect-status {
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pro-count-button,
.aspect-button {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.07);
  color: #94a3b8;
  overflow: hidden;
}

.pro-count-button strong {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1;
}

.pro-count-button span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
}

.pro-count-button del {
  color: #94a3b8;
  font-size: 11px;
  opacity: 0.72;
}

.pro-count-button b {
  position: absolute;
  top: 8px;
  right: -16px;
  width: 58px;
  padding: 2px 0;
  transform: rotate(45deg);
  background: #f97316;
  color: white;
  font-size: 9px;
}

.pro-count-button.active,
.aspect-button.active {
  border-color: #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.34), rgba(245, 158, 11, 0.1));
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.18), 0 0 0 1px rgba(245, 158, 11, 0.3) inset;
}

.pro-count-button.active strong,
.aspect-button.active span {
  color: #fef3c7;
}

.pro-count-button.active span {
  color: #34d399;
}

.aspect-button {
  gap: 5px;
  min-height: 58px;
}

.aspect-button i {
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.aspect-button[data-aspect="3:4"] i,
.aspect-button[data-aspect="9:16"] i {
  width: 13px;
  height: 22px;
}

.aspect-button[data-aspect="4:3"] i,
.aspect-button[data-aspect="16:9"] i,
.aspect-button[data-aspect="21:9"] i {
  width: 23px;
  height: 13px;
}

.aspect-button[data-aspect="21:9"] i {
  width: 28px;
  height: 10px;
}

.aspect-button span {
  font-size: 12px;
  font-weight: 600;
}

.pro-assist-form {
  margin-top: 0;
}

.pro-assist-form .field input {
  border-color: rgba(245, 158, 11, 0.46);
  background: rgba(15, 23, 42, 0.62);
}

.strict-packaging-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-radius: 12px;
  padding: 13px 15px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.42));
  color: #fef3c7;
  cursor: pointer;
}

.strict-packaging-option input {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: #f59e0b;
}

.strict-packaging-option > span {
  display: grid;
  gap: 4px;
}

.strict-packaging-option strong {
  color: #facc15;
  font-size: 13px;
}

.strict-packaging-option small {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.55;
}

.pro-more-fields {
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.42);
  overflow: hidden;
}

.pro-more-fields summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 13px 16px;
  color: #fef3c7;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
}

.pro-more-fields summary::-webkit-details-marker {
  display: none;
}

.pro-more-fields summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #f59e0b;
  font-size: 18px;
  line-height: 1;
}

.pro-more-fields[open] summary::after {
  content: "-";
}

.pro-more-fields summary small {
  margin-left: auto;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.pro-more-grid {
  padding: 0 16px 16px;
}

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

.species-form {
  margin-top: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.platform-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 14px;
  align-items: stretch;
  margin-top: 14px;
}

.listing-settings-card {
  display: flex;
  min-width: 0;
  min-height: 238px;
  flex-direction: column;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 16px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.58);
}

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

.listing-settings-head > div,
.step-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.listing-settings-head > div > span,
.step-heading > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(96, 165, 250, 0.13);
  color: #60a5fa;
  font-size: 12px;
  font-weight: 800;
}

.listing-settings-head h3,
.step-heading h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 17px;
}

.listing-settings-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  text-align: right;
}

.platform-market-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.platform-market-tabs button {
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 9px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 750;
}

.platform-market-tabs button.active {
  border-color: rgba(96, 165, 250, 0.58);
  background: rgba(37, 99, 235, 0.18);
  color: #dbeafe;
}

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

.suite-platform-grid button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 86px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.suite-platform-grid button.active {
  border-color: rgba(96, 165, 250, 0.62);
  background: rgba(37, 99, 235, 0.18);
  box-shadow: inset 0 0 22px rgba(59, 130, 246, 0.07);
}

.suite-platform-grid img {
  box-sizing: border-box;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  padding: 4px;
  background: #fff;
  object-fit: contain;
}

.suite-platform-grid .platform-wordmark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #ff8a00, #f04400);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.4px;
}

.suite-platform-grid button > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.suite-platform-grid strong,
.suite-platform-grid small {
  display: block;
}

.suite-platform-grid strong {
  color: #f8fafc;
  font-size: 14px;
}

.suite-platform-grid small {
  color: var(--muted);
  font-size: 11px;
}

.platform-site-field {
  grid-column: 1 / -1;
}

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

.listing-field-grid:has(#detailBatchField[hidden]):has(#promotionInfoField[hidden]):has(#featuredServiceField[hidden]) #outputLanguageField {
  grid-column: 1 / -1;
}

.product-title-field {
  grid-column: 1 / -1;
}

#brandNameField {
  grid-column: 1 / -1;
}

#brandNameField .field-label-row {
  flex-wrap: wrap;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.field-label-row > label {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
}

.brand-frame-placement-options {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.brand-frame-placement-options[hidden] {
  display: none;
}

.brand-frame-placement-prefix {
  white-space: nowrap;
}

.brand-frame-placement-options label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #f97316;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.field .brand-frame-placement-options input[type="checkbox"] {
  width: 15px;
  min-height: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  accent-color: #f97316;
  cursor: pointer;
}

.brand-library-status {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(249, 115, 22, 0.28);
  border-radius: 10px;
  padding: 9px 11px;
  background: rgba(249, 115, 22, 0.08);
  color: #cbd5e1;
  font-size: 12px;
}

.brand-library-status[hidden] { display: none; }
.brand-library-status a { color: #fb923c; font-weight: 700; text-decoration: none; white-space: nowrap; }

.platform-settings-grid + .product-extra-info {
  margin-top: 14px;
}

.assist-form {
  margin-top: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field-inline {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.field-inline span {
  flex-shrink: 0;
  min-width: 90px;
}

.field-inline select {
  flex: 1;
  height: 40px;
  box-sizing: border-box;
}

.field span,
.section-label {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
}

.field-guidance-label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
}

.field-required-marker {
  position: relative;
  top: -1px;
  color: #fb7185;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.field-optional-marker,
.assist-field .field-optional-marker {
  color: #94a3b8;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.field-guidance {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: inherit;
  font: inherit;
  line-height: 1;
}

.field-guidance-trigger,
.field .field-guidance-trigger {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  border: 0;
  color: transparent;
  background: transparent;
  font-size: 0;
  line-height: 1;
  cursor: help;
  outline: none;
  user-select: none;
}

.field-guidance-trigger::before {
  content: "!";
  display: grid;
  place-items: center;
  width: 11px;
  height: 11px;
  box-sizing: border-box;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 50%;
  color: rgba(148, 163, 184, 0.88);
  background: rgba(148, 163, 184, 0.05);
  font-size: 7px;
  font-weight: 700;
  line-height: 1;
}

.field-guidance-trigger:hover::before,
.field-guidance-trigger:focus-visible::before,
.field-guidance.is-open .field-guidance-trigger::before {
  border-color: rgba(251, 146, 60, 0.58);
  color: rgba(251, 146, 60, 0.92);
  background: rgba(249, 115, 22, 0.07);
}

.field-guidance-trigger:focus-visible {
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.1);
}

.field-guidance-popover,
.field .field-guidance-popover {
  position: absolute;
  z-index: 90;
  top: calc(100% + 9px);
  left: 0;
  display: none;
  width: min(320px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 12px 13px;
  border: 1px solid rgba(251, 146, 60, 0.4);
  border-radius: 10px;
  color: #dbeafe;
  background: #111827;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  text-align: left;
  white-space: normal;
}

.field-guidance:hover .field-guidance-popover,
.field-guidance:focus-within .field-guidance-popover,
.field-guidance.is-open .field-guidance-popover {
  display: grid;
  gap: 6px;
}

.field-guidance-popover::before {
  position: absolute;
  top: -5px;
  left: var(--guidance-arrow-left, 7px);
  width: 9px;
  height: 9px;
  border-top: 1px solid rgba(251, 146, 60, 0.4);
  border-left: 1px solid rgba(251, 146, 60, 0.4);
  background: #111827;
  content: "";
  transform: rotate(45deg);
}

.field-guidance-line,
.field .field-guidance-line {
  display: block;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
}

.field .field-guidance-line span {
  display: inline;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.field-guidance-line[hidden] {
  display: none;
}

.field-guidance-line strong {
  color: #fdba74;
  font-size: 12px;
  font-weight: 700;
}

.brand-frame-placement-options label {
  position: relative;
}

.pro-more-fields[open] {
  overflow: visible;
}

.assist-field span {
  color: #facc15;
}

.assist-field em {
  color: #fef3c7;
  font-style: normal;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  outline: none;
  font-size: 14px;
}

.field input,
.field select {
  height: 40px;
}

.field textarea {
  min-height: 82px;
  padding: 12px 14px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #64748b;
}

.field small {
  color: var(--muted-2);
  font-size: 12px;
}

.upload-row {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.upload-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

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

.watermark-use-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.85fr) 92px;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.watermark-use-panel.is-enabled {
  border-color: rgba(34, 211, 238, 0.36);
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.12), transparent 150px),
    rgba(15, 23, 42, 0.58);
}

.watermark-checkline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.watermark-checkline input {
  width: 18px;
  height: 18px;
  accent-color: #22d3ee;
}

.watermark-checkline strong,
.watermark-checkline small {
  display: block;
}

.watermark-checkline strong {
  color: #f8fafc;
  font-size: 14px;
}

.watermark-checkline small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.watermark-use-panel.is-enabled .watermark-checkline small {
  color: #a7f3d0;
}

.watermark-use-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.watermark-use-controls select {
  min-height: 34px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 10px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.075);
  color: white;
  font-size: 12px;
}

.watermark-use-controls a {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.watermark-mini-preview {
  display: grid;
  place-items: center;
  min-height: 66px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.62);
}

.watermark-mini-preview img {
  max-width: 100%;
  max-height: 60px;
  object-fit: contain;
  opacity: 0.82;
}

.upload-list-shell {
  position: relative;
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 204px;
}

.upload-list-shell.is-dragging .upload-add-tile,
.upload-add-tile:focus-visible,
.upload-list-shell:hover .upload-add-tile {
  border-color: rgba(96, 165, 250, 0.75);
  background: rgba(96, 165, 250, 0.1);
}

.upload-add-tile input {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-add-tile {
  display: grid;
  flex: 0 0 204px;
  width: 204px;
  height: 204px;
  place-items: center;
  justify-items: center;
  align-content: center;
  gap: 12px;
  border: 1.5px dashed rgba(255, 255, 255, 0.24);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.13);
  color: #94a3b8;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, width 0.18s ease, flex-basis 0.18s ease;
}

/* Empty state: upload tile spans full width with new content */
.upload-list-shell.is-empty .upload-add-tile {
  flex: 1 1 100%;
  width: 100%;
  height: 180px;
}

.upload-list-shell.is-empty .upload-add-tile .add-icon,
.upload-list-shell.is-empty .upload-add-tile .add-text {
  display: none;
}

.upload-list-shell.is-empty .upload-add-tile .upload-empty-content {
  display: flex;
}

/* Non-empty state: show small add button, hide empty content */
.upload-list-shell:not(.is-empty) .upload-add-tile .upload-empty-content {
  display: none;
}

.upload-list-shell:not(.is-empty) .upload-add-tile .add-icon,
.upload-list-shell:not(.is-empty) .upload-add-tile .add-text {
  display: block;
}

/* Empty state content styles */
.upload-empty-content {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 20px;
}

.upload-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(40, 45, 65, 0.8);
  color: rgba(180, 190, 220, 0.9);
}

.upload-main-text {
  font-size: 15px;
  font-weight: 500;
  color: rgba(230, 235, 250, 0.95);
  margin: 0;
}

.upload-sub-text {
  font-size: 12px;
  font-weight: 400;
  color: rgba(160, 170, 200, 0.7);
  margin: 0;
}

.upload-add-tile .add-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: rgba(245, 158, 11, 0.5);
  font-size: 24px;
  line-height: 1;
}

.upload-add-tile .add-text {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 650;
}

.upload-add-tile:hover {
  color: #cbd5e1;
}

.preview-grid {
  display: contents;
}

.upload-preview-tile {
  position: relative;
  flex: 0 0 204px;
  width: 204px;
  height: 204px;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.92);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.34);
}

.upload-preview-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview-button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.upload-preview-button:focus-visible {
  outline: 2px solid #67e8f9;
  outline-offset: -3px;
}

.upload-remove-button {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(244, 114, 182, 0.76);
  color: white;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  transform: translate(-50%, -50%);
  box-shadow: 0 8px 22px rgba(244, 114, 182, 0.28);
}

.upload-remove-button:hover {
  background: rgba(251, 113, 133, 0.92);
}

.upload-count {
  margin: 2px 0 0;
  color: var(--muted-2);
  font-size: 12px;
  text-align: center;
}

.optional-info {
  display: none;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.optional-info summary {
  padding: 13px 15px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.optional-info .form-grid {
  padding: 0 15px 15px;
}

.product-extra-info {
  grid-column: 1 / -1;
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.product-extra-info summary {
  padding: 12px 15px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.product-extra-info summary::-webkit-details-marker {
  display: none;
}

.product-extra-info summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.2s ease;
}

.product-extra-info[open] summary::before {
  transform: rotate(90deg);
}

.product-extra-info .form-grid {
  padding: 0 15px 15px;
}

.deal-strip {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  border: 1px solid rgba(245, 158, 11, 0.74);
  border-radius: 12px;
  padding: 16px 14px 13px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.1), rgba(127, 29, 29, 0.28));
}

.deal-badge {
  position: absolute;
  top: -10px;
  left: 15px;
  border-radius: 999px;
  padding: 3px 9px;
  background: linear-gradient(90deg, #f59e0b, #f97316);
  color: white;
  font-size: 10px;
  font-weight: 900;
}

.deal-strip label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 13px;
  font-weight: 750;
}

.deal-strip input {
  width: 14px;
  height: 14px;
}

.deal-strip small {
  color: var(--green);
  font-size: 11px;
}

.deal-strip strong {
  color: #fbbf24;
}

.deal-strip strong span {
  margin-right: 6px;
  color: #64748b;
  font-size: 12px;
  text-decoration: line-through;
}

.generate-wrap {
  position: relative;
  margin-top: 28px;
  text-align: center;
}

.sale-tag {
  position: absolute;
  top: -18px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 4px 12px;
  background: #facc15;
  color: #1e293b;
  font-size: 12px;
  font-weight: 900;
}

.sale-tag span {
  opacity: 0.7;
  text-decoration: line-through;
}

.pro-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 4px 14px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.pro-badge svg {
  flex-shrink: 0;
}

.generate-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 58px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(90deg, #2563eb, #8b5cf6, #ec4899);
  color: white;
  box-shadow: 0 18px 42px rgba(139, 92, 246, 0.36);
}

.generate-button span {
  font-size: 16px;
  font-weight: 900;
}

.generate-button small {
  margin-top: 4px;
  opacity: 0.74;
  font-size: 12px;
}

.generate-wrap p {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 12px;
}

.results-panel {
  margin-top: 22px;
  padding: 20px;
}

.results-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.results-head h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.results-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.result-actions span {
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
}

.result-actions button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.job-wait-recovery {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.55);
  color: #cbd5e1;
}

.job-wait-recovery[hidden] {
  display: none;
}

.job-wait-recovery strong {
  display: block;
  margin-bottom: 3px;
  color: #e2e8f0;
  font-size: 13px;
}

.job-wait-recovery p {
  margin: 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.55;
}

.job-wait-recovery button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 9px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}

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

.result-separator {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 4px;
  color: var(--muted-2);
  font-size: 13px;
}
.result-separator::before,
.result-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.empty-state div {
  display: grid;
  gap: 6px;
  text-align: center;
}

.empty-state span {
  color: var(--muted);
  font-size: 13px;
}

.image-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.image-card.is-pending {
  border-color: rgba(96, 165, 250, 0.2);
}

.image-stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: rgba(15, 23, 42, 0.72);
}

.image-card.is-pending .image-stage {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(96, 165, 250, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.86));
}

.image-card.is-pending .image-stage::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.08) 45%, transparent 70%);
  content: "";
  animation: loadingSweep 1.8s ease-in-out infinite;
}

.image-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-zoom-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.image-zoom-button:disabled {
  cursor: wait;
}

.preview-preparing-placeholder {
  position: absolute;
  inset: 0;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 35%, rgba(96, 165, 250, 0.18), transparent 36%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.92));
}

.preview-preparing-placeholder .generation-spinner {
  width: 34px;
  height: 34px;
}

.image-zoom-button::after {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(2, 6, 23, 0.78);
  color: white;
  content: "查看大图";
  font-size: 12px;
  font-weight: 850;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.image-zoom-button:hover::after,
.image-zoom-button:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.placeholder {
  width: 80%;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}

.generation-placeholder {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 8px;
  color: #e2e8f0;
  text-align: center;
}

.generation-placeholder strong {
  font-size: 15px;
}

.generation-placeholder small {
  color: #94a3b8;
  font-size: 12px;
}

.generation-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes loadingSweep {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

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

.image-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(15, 23, 42, 0.84);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.image-caption {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.image-caption strong {
  font-size: 13px;
  line-height: 1.35;
}

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

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.card-actions a,
.card-actions button {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.card-actions a.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.error-box {
  grid-column: 1 / -1;
  border: 1px solid rgba(251, 113, 133, 0.32);
  border-radius: 14px;
  padding: 14px;
  background: rgba(251, 113, 133, 0.08);
  color: var(--danger);
  line-height: 1.5;
}

/* Gallery Page (Works Page) - Reference: ai-species.com/history */
.gallery-page {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 32px;
}

/* Header Section */
.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.gallery-header-left {
  flex: 1;
}

.gallery-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.gallery-subtitle {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

.gallery-header-right {
  display: flex;
  gap: 32px;
  align-items: center;
}

.gallery-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-stat-number {
  font-size: 28px;
  font-weight: 700;
  color: #a78bfa;
  line-height: 1;
  margin-bottom: 4px;
}

.gallery-stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

/* Toolbar Section */
.gallery-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
}

.gallery-tabs {
  display: flex;
  gap: 10px;
}

.gallery-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gallery-tab:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.gallery-tab.active {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border-color: transparent;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.gallery-tab.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.gallery-tab .tab-icon {
  font-size: 14px;
}

.gallery-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.gallery-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
}

.gallery-search .search-icon {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.gallery-search input {
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 13px;
  outline: none;
  width: 120px;
}

.gallery-search input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.gallery-manage-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gallery-manage-btn:hover {
  background: rgba(251, 113, 133, 0.15);
  border-color: rgba(251, 113, 133, 0.3);
  color: #fca5a5;
}

.gallery-manage-btn .manage-icon {
  font-size: 14px;
}

/* Content Section */

/* Batch Bar */
.gallery-batch-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  margin-bottom: 12px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
}

.batch-select-all {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #c4b5fd;
  user-select: none;
}

.batch-select-all input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #a855f7;
  cursor: pointer;
}

.batch-info {
  font-size: 13px;
  color: #94a3b8;
}

.batch-info strong {
  color: #a855f7;
}

.batch-delete-btn {
  margin-left: auto;
  padding: 6px 16px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.batch-delete-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.gallery-content {
  min-height: 400px;
}

.gallery-load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.gallery-load-more[hidden],
.gallery-load-more-btn[hidden] {
  display: none;
}

.gallery-load-more-btn {
  min-width: 142px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}

.gallery-load-more-btn:hover:not(:disabled) {
  border-color: var(--blue);
  color: var(--blue);
}

.gallery-load-more-btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.work-preview-pending {
  background: var(--panel-2);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.gallery-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.gallery-empty .empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.gallery-loading-icon {
  position: relative;
  width: 82px;
  height: 72px;
  margin-bottom: 18px;
  filter: drop-shadow(0 10px 22px rgba(99, 102, 241, 0.28));
}

.gallery-loading-icon::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 2px;
  bottom: -7px;
  height: 12px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  filter: blur(8px);
}

.gallery-loading-icon .loading-frame {
  position: absolute;
  width: 48px;
  height: 42px;
  border: 1px solid rgba(125, 211, 252, 0.72);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.34), rgba(79, 70, 229, 0.2) 56%, rgba(15, 23, 42, 0.96));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.14);
}

.gallery-loading-icon .loading-frame::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  height: 9px;
  border-radius: 3px;
  background: linear-gradient(90deg, #6366f1, #ec4899);
}

.loading-frame-back { left: 6px; top: 3px; opacity: 0.35; transform: rotate(-8deg); }
.loading-frame-middle { left: 16px; top: 9px; opacity: 0.62; transform: rotate(-2deg); }
.loading-frame-front { left: 25px; top: 17px; }

.gallery-loading-icon .loading-spark {
  position: absolute;
  z-index: 2;
  right: 0;
  top: 3px;
  color: #f0abfc;
  font-size: 24px;
  text-shadow: 0 0 12px rgba(217, 70, 239, 0.85);
  animation: galleryLoadingSpark 1.35s ease-in-out infinite;
}

.gallery-loading .empty-hint {
  margin-bottom: 0;
}

.gallery-error-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  margin-bottom: 16px;
  border: 1px solid rgba(251, 113, 133, 0.55);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(244, 63, 94, 0.22), rgba(79, 70, 229, 0.16));
  box-shadow: 0 10px 28px rgba(244, 63, 94, 0.16);
  color: #fda4af;
  font-size: 28px;
  font-weight: 800;
}

@keyframes galleryLoadingSpark {
  0%, 100% { opacity: 0.48; transform: scale(0.78) rotate(-8deg); }
  50% { opacity: 1; transform: scale(1.08) rotate(8deg); }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-loading-icon .loading-spark { animation: none; }
}

.gallery-empty .empty-text {
  margin: 0 0 8px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.gallery-empty .empty-hint {
  margin: 0 0 24px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.gallery-empty .empty-btn {
  border: 0;
  padding: 12px 32px;
  border-radius: 24px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.gallery-empty .empty-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
}

/* Work Card */
.work-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.25s ease;
}

.work-card:hover {
  border-color: rgba(168, 85, 247, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.work-card.selected {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.08);
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.3);
}

.work-card-checkbox {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  cursor: pointer;
}

.checkbox-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}

.checkbox-box.checked {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  border-color: #a855f7;
}

.gallery-manage-btn.active {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: white;
  border-color: #a855f7;
}

.work-card-stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  overflow: hidden;
}

.work-card-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.work-card:hover .work-card-stage img {
  transform: scale(1.05);
}

.work-card-type-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: white;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.work-card-caption {
  padding: 12px 14px;
}

.work-card-caption strong {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}

.work-card-caption span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
}

.work-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 12px 12px;
}

.work-card-actions a,
.work-card-actions button {
  display: grid;
  place-items: center;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.work-card-actions a:hover,
.work-card-actions button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.work-card-actions button.work-delete {
  color: #fca5a5;
  border-color: rgba(251, 113, 133, 0.2);
}

.work-card-actions button.work-delete:hover {
  background: rgba(251, 113, 133, 0.15);
  color: #fecaca;
}

.gallery-filter-select {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #dbeafe;
  font-size: 13px;
  font-weight: 700;
}

.gallery-page .gallery-toolbar {
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 18px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.08), transparent 28%),
    rgba(15, 23, 42, 0.72);
}

.gallery-page .gallery-tab {
  border-radius: 13px;
}

.gallery-page .gallery-tab.active {
  background: linear-gradient(90deg, #2563eb, #8b5cf6);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
}

.gallery-grid {
  display: block;
}

.smart-works,
.works-date-section {
  display: grid;
  gap: 14px;
}

.works-date-section + .works-date-section {
  margin-top: 20px;
}

.works-date-head {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #dbeafe;
  font-size: 13px;
  font-weight: 950;
}

.works-date-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.35), transparent);
}

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

.work-batch-card,
.work-single-strip {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028)),
    rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

.work-batch-summary {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.work-batch-stack {
  position: relative;
  height: 104px;
  cursor: pointer;
}

.work-batch-thumb {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: linear-gradient(145deg, #fff7ed, #e0f2fe);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.28);
}

.work-batch-thumb:nth-child(1) {
  transform: translate(18px, 10px) rotate(5deg);
  opacity: 0.56;
}

.work-batch-thumb:nth-child(2) {
  transform: translate(9px, 5px) rotate(2deg);
  opacity: 0.82;
}

.work-batch-thumb img,
.work-single-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-batch-copy {
  min-width: 0;
}

.work-batch-copy h2 {
  margin: 0;
  overflow: hidden;
  color: white;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-batch-copy p {
  margin: 10px 0 0;
  color: #94a3b8;
  font-size: 12px;
}

.work-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.work-chips span {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 5px 9px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 800;
}

.work-chips .accent {
  border-color: rgba(34, 211, 238, 0.3);
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.08);
}

.work-chips .work-platform-site-chip {
  flex-basis: 100%;
  border-color: rgba(96, 165, 250, 0.24);
  padding: 4px 7px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.08);
  font-size: 10px;
  line-height: 1.35;
  white-space: nowrap;
}

.work-batch-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.work-tech-btn {
  min-height: 34px;
  border-radius: 10px;
  padding: 0 12px;
  color: white;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.92), rgba(139, 92, 246, 0.92));
  font-size: 12px;
  font-weight: 850;
}

.work-tech-btn.ghost {
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.055);
}

.work-batch-detail {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding: 14px;
}

.work-batch-card.expanded .work-batch-detail {
  display: block;
}

.work-group-image-grid,
.work-single-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 188px));
  gap: 12px;
  justify-content: start;
}

.work-single-strip {
  padding: 14px;
}

.work-single-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.work-single-head strong {
  color: white;
  font-size: 14px;
}

.work-single-head span {
  color: #94a3b8;
  font-size: 12px;
}

.work-single-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.work-single-card.selected {
  border-color: #a855f7;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.28);
}

.work-single-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(145deg, #fff7ed, #dbeafe);
  cursor: pointer;
}

.work-single-info {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.work-single-info strong {
  overflow: hidden;
  color: #f8fafc;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-single-info span {
  color: #94a3b8;
  font-size: 11px;
}

.work-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  line-height: 1.45;
}

.work-single-meta span:nth-child(-n + 2) {
  color: #bfdbfe;
}

.work-single-meta span:last-child {
  flex-basis: 100%;
}

.work-single-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.work-single-actions button {
  min-height: 28px;
  border-radius: 8px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.12);
  font-size: 11px;
  font-weight: 850;
}

.work-single-actions button.edit {
  color: #f0abfc;
  background: rgba(217, 70, 239, 0.13);
}

.work-single-actions button.danger {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.1);
}

/* Responsive */
@media (min-width: 901px) and (max-width: 1400px) {
  .work-batch-summary {
    grid-template-columns: 112px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .work-batch-stack {
    height: 86px;
  }
}

@media (max-width: 900px) {
  .gallery-header {
    flex-direction: column;
    gap: 20px;
  }
  
  .gallery-header-right {
    align-self: flex-start;
  }
  
  .gallery-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .gallery-actions {
    width: 100%;
  }
  
  .gallery-search {
    flex: 1;
  }
  
  .gallery-search input {
    width: 100%;
  }

  .work-batch-grid,
  .work-batch-summary {
    grid-template-columns: 1fr;
  }

  .work-batch-actions {
    justify-items: stretch;
  }

  .work-group-image-grid,
  .work-single-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .gallery-page {
    padding: 16px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
  
  .gallery-header-right {
    gap: 20px;
  }

  .work-group-image-grid,
  .work-single-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.modal-open {
  overflow: hidden;
}

.aspect-confirm-modal[hidden] {
  display: none;
}

.aspect-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
}

.aspect-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
}

.aspect-confirm-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(92vw, 520px);
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: #0f172a;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

.aspect-confirm-dialog strong {
  font-size: 20px;
}

.aspect-confirm-dialog p,
.aspect-confirm-dialog span {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.6;
}

.aspect-confirm-dialog span {
  color: #94a3b8;
  font-size: 13px;
}

.aspect-confirm-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
}

.aspect-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.aspect-confirm-actions button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-weight: 750;
}

.aspect-confirm-actions .primary {
  border-color: #f97316;
  background: #f97316;
}

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

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(10px);
}

.image-modal-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(94vw, 980px);
  max-height: 92vh;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: #0f172a;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.42);
}

.image-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.image-modal-head div {
  display: grid;
  gap: 4px;
}

.image-modal-head span {
  color: var(--muted);
  font-size: 12px;
}

.image-modal-head strong {
  line-height: 1.25;
}

.image-modal-head button,
.image-modal-actions a,
.image-modal-actions button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-weight: 850;
}

.image-modal-head button {
  min-height: 38px;
  padding: 0 14px;
}

.image-modal-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 18px;
  background: #020617;
}

.image-modal-stage img {
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 12px;
}

.image-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
}

.image-modal-actions[hidden] {
  display: none;
}

.image-modal-actions a,
.image-modal-actions button {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 0 16px;
  text-decoration: none;
}

.modal-counter {
  color: #67e8f9;
  font-size: 12px;
  font-weight: 850;
}

.modal-nav-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  color: white;
  font-size: 42px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
}

.modal-nav-btn.prev {
  left: 18px;
}

.modal-nav-btn.next {
  right: 18px;
}

.modal-nav-btn[hidden] {
  display: none;
}

.image-modal-actions button:last-child {
  color: #fecaca;
}

.image-modal-actions .modal-edit-button,
.image-modal-actions .modal-download-button {
  color: white;
}

body.dtip-modal-open { overflow: hidden; }
.dtip-modal[hidden], .dtip-modal__nav[hidden], .dtip-modal__actions[hidden] { display: none; }
.dtip-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; }
.dtip-modal__backdrop { position: absolute; inset: 0; background: rgba(2, 6, 23, 0.78); backdrop-filter: blur(10px); }
.dtip-modal__dialog { position: relative; z-index: 1; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(94vw, 980px); max-height: 92vh; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 20px; background: #0f172a; box-shadow: 0 30px 100px rgba(0, 0, 0, 0.42); }
.dtip-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.dtip-modal__head > div { display: grid; gap: 4px; }
.dtip-modal__head span { color: var(--muted); font-size: 12px; }
.dtip-modal__counter { color: #67e8f9 !important; font-weight: 850; }
.dtip-modal button { border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 11px; background: rgba(255, 255, 255, 0.08); color: white; font-weight: 850; }
.dtip-modal__close { min-height: 38px; padding: 0 14px; }
.dtip-modal__stage { position: relative; display: grid; place-items: center; min-height: 360px; padding: 18px; background: #020617; }
.dtip-modal__stage img { max-width: 100%; max-height: 68vh; object-fit: contain; border-radius: 12px; }
.dtip-modal__nav { position: absolute; top: 50%; z-index: 2; width: 44px; height: 64px; font-size: 42px; line-height: 1; transform: translateY(-50%); }
.dtip-modal__nav--previous { left: 18px; }
.dtip-modal__nav--next { right: 18px; }
.dtip-modal__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 18px 18px; }
.dtip-modal__variant-hint { align-self: center; margin-right: auto; color: #fbbf24; font-size: 13px; font-weight: 750; }
.dtip-modal__variant-hint[hidden] { display: none; }
.dtip-modal__actions button { min-height: 40px; padding: 0 16px; }
.dtip-modal__actions .dtip-modal__variant { border-color: rgba(103, 232, 249, 0.48); background: linear-gradient(135deg, #2563eb, #7c3aed); }
.dtip-modal__actions button:disabled { cursor: not-allowed; opacity: 0.45; }

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

  body {
    overflow: auto;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    height: auto;
    min-height: 100vh;
    padding: 82px 18px 34px;
  }

  .top-actions {
    left: 18px;
    right: 18px;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .site-footer {
    flex-direction: column;
    gap: 2px;
    margin-top: 28px;
  }

  .hero {
    padding: 20px 0 4px;
  }

  .hero-logo {
    width: 40px;
    height: 40px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 13px;
  }

  .creator-panel {
    padding: 28px 16px 20px;
  }

  .suite-intro {
    display: grid;
    width: calc(100% - 24px);
    padding: 18px;
  }

  .suite-intro h2 {
    font-size: 28px;
  }

  .suite-intro .credit-pill {
    width: 100%;
  }

  .floating-guide {
    top: 18px;
  }

  .panel-title,
  .results-head,
  .upload-row > div:first-child {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-title {
    display: grid;
    padding-top: 26px;
  }

  .credit-pill,
  .mode-grid,
  .form-grid,
  .species-form,
  .pro-console-grid,
  .pro-more-grid,
  .deal-strip {
    grid-template-columns: 1fr;
  }

  .platform-settings-grid,
  .listing-field-grid {
    grid-template-columns: 1fr;
  }

  .listing-settings-card {
    min-height: 0;
  }

  .listing-settings-head {
    display: grid;
  }

  .listing-settings-head p {
    text-align: left;
  }

  .listing-field-grid #outputLanguageField,
  .product-title-field {
    grid-column: 1;
  }

  .pro-console {
    padding: 18px;
  }

  .pro-console-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .compact-step {
    grid-template-columns: 1fr;
  }

  .content-tabs {
    width: 100%;
  }

  .content-option {
    flex: 1;
    padding: 0 10px;
  }

  .model-select-line {
    flex-wrap: wrap;
  }
}

/* ── Auth Modal ── */
.auth-modal[hidden] {
  display: none;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(14px);
}

.auth-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(94vw, 420px);
  max-height: 92vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(150deg, rgba(30, 41, 79, 0.92), rgba(15, 12, 30, 0.96) 60%),
    var(--panel);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5), 0 0 80px rgba(59, 130, 246, 0.08);
  backdrop-filter: blur(24px);
}

.auth-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 14px;
  transition: background 0.18s ease, color 0.18s ease;
}

.auth-close-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

.auth-panel {
  padding: 36px 32px 28px;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 17px;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.auth-logo img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 17px;
}

.auth-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-bonus-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #fbbf24;
}

.auth-bonus-badge .bonus-icon {
  font-size: 16px;
}

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

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

.auth-field > span {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 750;
}

.auth-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-field input:focus {
  border-color: rgba(96, 165, 250, 0.6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.auth-field input::placeholder {
  color: #64748b;
}

.auth-field input[readonly] {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  font-weight: 600;
  cursor: not-allowed;
}

.auth-password-wrap,
.auth-code-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-password-wrap input {
  flex: 1;
  padding-right: 44px;
}

.auth-eye-btn {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-2);
  font-size: 14px;
  transition: color 0.18s ease;
}

.auth-eye-btn:hover {
  color: var(--muted);
}

.auth-eye-btn.is-visible {
  color: var(--blue);
}

.auth-code-wrap input {
  flex: 1;
}

.auth-code-btn {
  flex-shrink: 0;
  min-height: 44px;
  min-width: 108px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 0 14px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.22), rgba(147, 51, 234, 0.18));
  color: #93c5fd;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  transition: background 0.18s ease, opacity 0.18s ease;
}

.auth-code-btn:hover:not(:disabled) {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.32), rgba(147, 51, 234, 0.28));
}

.auth-code-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-hint {
  display: block;
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.4;
}

.auth-hint.error {
  color: var(--danger);
}

.auth-hint.success {
  color: var(--green);
}

.auth-error {
  border: 1px solid rgba(251, 113, 133, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  background: rgba(251, 113, 133, 0.08);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.auth-success {
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  background: rgba(52, 211, 153, 0.08);
  color: var(--green);
  font-size: 13px;
  line-height: 1.5;
}

.auth-submit-btn {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 48px;
  border-radius: 13px;
  background: linear-gradient(90deg, #2563eb, #8b5cf6);
  color: white;
  font-size: 15px;
  font-weight: 850;
  box-shadow: 0 14px 36px rgba(59, 130, 246, 0.28);
  transition: box-shadow 0.18s ease, transform 0.1s ease;
}

.auth-submit-btn:hover {
  box-shadow: 0 18px 44px rgba(59, 130, 246, 0.36);
}

.auth-submit-btn:active {
  transform: scale(0.98);
}

.auth-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

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

.auth-footer span {
  color: var(--muted-2);
}

.auth-switch-btn {
  color: #60a5fa;
  font-size: 13px;
  font-weight: 700;
  transition: color 0.18s ease;
}

.auth-switch-btn:hover {
  color: #93c5fd;
}

/* Logged-in state for login button */
.login-button.is-logged-in {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.5), rgba(147, 51, 234, 0.45)) !important;
  border-color: rgba(96, 165, 250, 0.45) !important;
}

.login-button.is-logged-in:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.65), rgba(147, 51, 234, 0.58)) !important;
  border-color: rgba(96, 165, 250, 0.65) !important;
}

.change-password-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 13px;
  padding: 0 12px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.14), rgba(59, 130, 246, 0.1));
  color: #c4b5fd;
  font-size: 13px;
  transition: background 0.18s ease;
}

.change-password-link:hover {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.22), rgba(59, 130, 246, 0.18));
}

@media (max-width: 480px) {
  .auth-modal {
    padding: 12px;
  }

  .auth-modal-dialog {
    width: 100%;
    border-radius: 18px;
  }

  .auth-panel {
    padding: 28px 20px 22px;
  }

  .auth-code-btn {
    min-width: 96px;
    font-size: 12px;
  }
}

/* ── Admin Modal Styles ── */
.admin-modal-dialog,
.invitation-modal-dialog {
  position: relative;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  width: min(900px, 92vw);
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px 28px 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.admin-header {
  text-align: center;
  margin-bottom: 20px;
}

.admin-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 6px;
}

.admin-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0;
}

.admin-header p {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
}

.admin-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-toolbar input,
.admin-toolbar select {
  flex: 1;
  min-width: 120px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  font-size: 13px;
}

.admin-toolbar input::placeholder {
  color: #64748b;
}

.admin-search-btn {
  height: 38px;
  padding: 0 18px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(90deg, #8b5cf6, #3b82f6);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.18s ease;
}

.admin-search-btn:hover {
  opacity: 0.9;
}

.admin-table-wrap {
  overflow-x: auto;
  margin-bottom: 16px;
}

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

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.admin-table th {
  background: rgba(30, 41, 59, 0.6);
  color: #94a3b8;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
}

.admin-table td {
  color: #e2e8f0;
}

.admin-table .admin-empty {
  text-align: center;
  color: #64748b;
  padding: 24px;
}

.admin-table .role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.role-badge.super_admin {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.role-badge.admin {
  background: rgba(249, 115, 22, 0.2);
  color: #fdba74;
}

.role-badge.user {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.admin-table .status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.status-badge.active {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.status-badge.disabled {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.admin-table .action-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 4px;
  transition: opacity 0.18s ease;
}

.action-btn:hover {
  opacity: 0.85;
}

.action-btn.toggle-status {
  background: rgba(249, 115, 22, 0.2);
  color: #fdba74;
}

.action-btn.change-role {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.admin-pagination button {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  font-size: 12px;
  cursor: pointer;
  transition: opacity 0.18s ease;
}

.admin-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-pagination button:hover:not(:disabled) {
  opacity: 0.85;
}

.admin-pagination span {
  font-size: 12px;
  color: #94a3b8;
}

/* ── Invitation Modal Styles ── */
.invitation-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
.invitation-tab {
  flex: 1;
  padding: 10px 16px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.invitation-tab:hover {
  color: #e2e8f0;
}
.invitation-tab.active {
  color: #60a5fa;
  border-bottom-color: #60a5fa;
}
.invitation-tab-pane {
  animation: fadeIn 0.2s ease;
}
.invitation-form {
  max-width: 400px;
  margin: 0 auto 20px;
}

.invitation-form .auth-field {
  margin-bottom: 12px;
}

.invitation-form .auth-submit-btn {
  width: 100%;
  margin-top: 8px;
}

/* ── Sub-account Status & Toggle ── */
.status-active {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.status-disabled {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.sub-toggle-btn {
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.6);
  color: #e2e8f0;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.sub-toggle-btn:hover:not(:disabled) {
  border-color: rgba(148, 163, 184, 0.6);
  background: rgba(30, 41, 59, 0.8);
}
.sub-toggle-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.sub-disable-btn {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}
.sub-disable-btn:hover:not(:disabled) {
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(127, 29, 29, 0.3);
}
.sub-enable-btn {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.3);
}
.sub-enable-btn:hover:not(:disabled) {
  border-color: rgba(74, 222, 128, 0.6);
  background: rgba(20, 83, 45, 0.3);
}
.sub-display-name {
  color: #94a3b8;
  font-size: 12px;
  margin-right: 4px;
}
