:root {
  --bg: #07090f;
  --panel: rgba(17, 23, 35, 0.78);
  --panel-strong: #101725;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4f7fb;
  --muted: #9aa8bc;
  --soft: #5c6b82;
  --cyan: #4dd9d2;
  --blue: #6da7ff;
  --gold: #f2c15f;
  --pink: #ff7ab6;
  --green: #78dc9c;
  --violet: #a58cff;
  --danger: #ff6b6b;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 8%, rgba(77, 217, 210, 0.14), transparent 28%),
    radial-gradient(circle at 84% 12%, rgba(242, 193, 95, 0.12), transparent 24%),
    linear-gradient(140deg, #07090f 0%, #0b101a 42%, #080b11 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.auth-body {
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-shell {
  width: min(1080px, 100%);
  min-height: 680px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

.auth-brand,
.auth-card,
.hero-panel,
.panel-card,
.tool-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(22px);
}

.auth-brand {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-brand::after {
  content: "";
  position: absolute;
  inset: auto -18% -25% 18%;
  height: 280px;
  background: linear-gradient(90deg, rgba(77, 217, 210, 0.2), rgba(242, 193, 95, 0.16));
  filter: blur(70px);
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #061015;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-mark.small {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 13px;
}

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

.auth-brand h1,
.topbar h1 {
  margin: 0;
}

.auth-brand h1 {
  max-width: 540px;
  font-size: 56px;
  line-height: 1.02;
}

.auth-copy {
  max-width: 460px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.visual-board {
  position: relative;
  z-index: 1;
  height: 230px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid var(--line);
}

.visual-strip {
  position: absolute;
  inset: 18px;
  border-radius: 18px;
  background:
    linear-gradient(120deg, rgba(77, 217, 210, 0.35), transparent 42%),
    linear-gradient(250deg, rgba(255, 122, 182, 0.28), transparent 48%),
    #121b2a;
}

.visual-tile {
  position: absolute;
  width: 112px;
  height: 88px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.tile-a { left: 42px; bottom: 34px; }
.tile-b { right: 70px; top: 38px; background: rgba(242, 193, 95, 0.16); }
.tile-c { right: 34px; bottom: 30px; background: rgba(77, 217, 210, 0.16); }

.auth-card {
  border-radius: 28px;
  padding: 42px;
  align-self: center;
}

.auth-card-head h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.auth-card-head p,
.muted {
  color: var(--muted);
}

.form-stack {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.form-stack label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-stack input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  outline: none;
}

.form-stack input:focus {
  border-color: rgba(77, 217, 210, 0.7);
  box-shadow: 0 0 0 4px rgba(77, 217, 210, 0.1);
}

.primary-btn,
.primary-link-btn,
.secondary-btn,
.secondary-link-btn,
.ghost-btn,
.icon-btn {
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.primary-btn {
  min-height: 48px;
  border-radius: 14px;
  padding: 0 20px;
  color: #061015;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
}

.primary-link-btn,
.secondary-link-btn {
  min-height: 42px;
  border-radius: 12px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.primary-link-btn {
  color: #061015;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
}

.secondary-btn,
.secondary-link-btn,
.ghost-btn,
.icon-btn {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.secondary-btn,
.secondary-link-btn,
.ghost-btn {
  min-height: 42px;
  border-radius: 12px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
}

.primary-btn:hover,
.primary-link-btn:hover,
.secondary-btn:hover,
.secondary-link-btn:hover,
.ghost-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
}

.auth-switch {
  margin: 22px 0 0;
  color: var(--muted);
  text-align: center;
}

.local-login-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-switch a {
  color: var(--cyan);
  font-weight: 800;
}

.form-error {
  margin-top: 20px;
  border: 1px solid rgba(255, 107, 107, 0.32);
  border-radius: 12px;
  padding: 12px 14px;
  color: #ffd0d0;
  background: rgba(255, 107, 107, 0.1);
}

.app-body {
  min-height: 100vh;
}

.front-page {
  position: relative;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(77, 217, 210, 0.08), transparent 34%),
    linear-gradient(235deg, rgba(242, 193, 95, 0.08), transparent 38%),
    #07090f;
}

.front-page::before,
.front-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.front-page::before {
  z-index: -2;
  opacity: 0.46;
  background:
    linear-gradient(rgba(77, 217, 210, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 217, 210, 0.1) 1px, transparent 1px),
    linear-gradient(rgba(242, 193, 95, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 193, 95, 0.07) 1px, transparent 1px);
  background-size: 72px 72px, 72px 72px, 18px 18px, 18px 18px;
  animation: gridDrift 18s linear infinite;
}

.front-page::after {
  z-index: -1;
  opacity: 0.68;
  background:
    linear-gradient(115deg, transparent 0 26%, rgba(77, 217, 210, 0.12) 28%, transparent 31% 62%, rgba(242, 193, 95, 0.1) 64%, transparent 67%),
    repeating-linear-gradient(165deg, transparent 0 42px, rgba(255, 255, 255, 0.035) 43px, transparent 46px);
  background-size: 220% 220%, 100% 100%;
  animation: scanSweep 12s ease-in-out infinite alternate;
}

@keyframes gridDrift {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0;
  }
  to {
    background-position: 72px 72px, 72px 72px, 18px 18px, 18px 18px;
  }
}

@keyframes scanSweep {
  from {
    background-position: 0% 0%, 0 0;
  }
  to {
    background-position: 100% 58%, 0 0;
  }
}

.home-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 15, 0.76);
  backdrop-filter: blur(18px);
}

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

.home-nav nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
}

.home-nav nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.account-cluster {
  justify-content: flex-end;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.home-main {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 54px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 28px;
  align-items: center;
  min-height: 430px;
  padding: 34px 0 24px;
}

.home-hero-copy h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: 54px;
  line-height: 1.08;
}

.home-hero-copy p {
  max-width: 650px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.home-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px));
  gap: 12px;
  margin-top: 26px;
}

.home-metrics div,
.step-card,
.home-tool-card,
.home-split > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 23, 35, 0.72);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.home-metrics div {
  padding: 14px;
}

.home-metrics strong,
.home-metrics span {
  display: block;
}

.home-metrics strong {
  font-size: 28px;
}

.home-metrics span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.home-showcase {
  min-height: 330px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(77, 217, 210, 0.13), rgba(242, 193, 95, 0.08)),
    #101725;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

.showcase-top,
.showcase-line,
.pricing-lines div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.showcase-top {
  min-height: 48px;
  color: var(--muted);
}

.showcase-top strong {
  color: var(--gold);
}

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

.showcase-grid i {
  min-height: 98px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.showcase-grid .accent-cyan { background: linear-gradient(135deg, rgba(77,217,210,.72), rgba(109,167,255,.18)); }
.showcase-grid .accent-gold { background: linear-gradient(135deg, rgba(242,193,95,.75), rgba(77,217,210,.12)); }
.showcase-grid .accent-pink { background: linear-gradient(135deg, rgba(255,122,182,.66), rgba(120,220,156,.16)); }
.showcase-grid .accent-green { background: linear-gradient(135deg, rgba(120,220,156,.66), rgba(242,193,95,.14)); }

.showcase-line {
  min-height: 42px;
  margin-top: 10px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.showcase-line span,
.showcase-line b {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.showcase-line span { width: 48%; }
.showcase-line b { width: 22%; background: rgba(77, 217, 210, 0.35); }
.showcase-line.short span { width: 34%; }

.home-section {
  margin-top: 34px;
}

.step-grid,
.home-tool-grid,
.home-split {
  display: grid;
  gap: 14px;
}

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

.step-card {
  padding: 18px;
}

.step-card span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #061015;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
}

.step-card h3,
.home-tool-card h3 {
  margin: 14px 0 8px;
}

.step-card p,
.home-tool-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.home-tool-card {
  padding: 14px;
}

.home-tool-visual {
  height: 120px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.home-tool-visual span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.home-tool-card.accent-cyan .home-tool-visual span { background: linear-gradient(135deg, rgba(77,217,210,.68), rgba(109,167,255,.16)); }
.home-tool-card.accent-gold .home-tool-visual span { background: linear-gradient(135deg, rgba(242,193,95,.7), rgba(77,217,210,.12)); }
.home-tool-card.accent-pink .home-tool-visual span { background: linear-gradient(135deg, rgba(255,122,182,.64), rgba(120,220,156,.16)); }
.home-tool-card.accent-green .home-tool-visual span { background: linear-gradient(135deg, rgba(120,220,156,.64), rgba(77,217,210,.14)); }
.home-tool-card.accent-blue .home-tool-visual span { background: linear-gradient(135deg, rgba(109,167,255,.66), rgba(242,193,95,.12)); }
.home-tool-card.accent-violet .home-tool-visual span { background: linear-gradient(135deg, rgba(165,140,255,.62), rgba(77,217,210,.14)); }

.home-split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.home-split > div {
  padding: 20px;
}

.pricing-lines {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.pricing-lines div {
  min-height: 48px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.pricing-lines span {
  color: var(--muted);
}

.simple-home {
  max-width: 980px;
}

.simple-hero,
.simple-account,
.app-list-row {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 23, 35, 0.68);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.simple-hero::before,
.app-list-row::before,
.simple-account::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(120deg, transparent, rgba(77, 217, 210, 0.11), transparent);
  transform: translateX(-100%);
  transition: opacity 0.25s ease;
}

.simple-hero > *,
.simple-account > * {
  position: relative;
  z-index: 1;
}

.simple-hero:hover::before,
.app-list-row:hover::before,
.simple-account:hover::before {
  opacity: 1;
  animation: cardSweep 1.35s ease forwards;
}

@keyframes cardSweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .front-page::before,
  .front-page::after,
  .simple-hero:hover::before,
  .app-list-row:hover::before,
  .simple-account:hover::before {
    animation: none;
  }

  .app-list-row:hover {
    transform: none;
  }
}

.simple-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 28px;
}

.simple-hero h1 {
  margin: 16px 0 10px;
  font-size: 42px;
  line-height: 1.15;
}

.simple-hero p,
.simple-account p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.app-cover-card {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(17, 23, 35, 0.72);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.app-cover-card:hover {
  transform: translateY(-3px);
  border-color: rgba(77, 217, 210, 0.32);
  background: rgba(20, 30, 45, 0.82);
}

.app-cover {
  position: relative;
  min-height: 168px;
  background-image: url("/static/img/apps/cover-sheet.png");
  background-repeat: no-repeat;
  background-size: 300% 200%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(7, 9, 15, 0.58));
}

.cover-image-gen { background-position: 0% 0%; }
.cover-outfit { background-position: 50% 0%; }
.cover-avatar-video { background-position: 100% 0%; }
.cover-voice-clone { background-size: 200% 200%; background-position: 0% 100%; }
.cover-prompt-assistant { background-size: 200% 200%; background-position: 100% 100%; }
.cover-ecommerce-main { background-position: 0% 100%; }
.cover-id-photo { background-position: 50% 100%; }
.cover-photo-restore { background-position: 100% 100%; }
.cover-logo-design { background-size: 200% 200%; background-position: 0% 0%; }
.cover-text-video { background-size: 200% 200%; background-position: 100% 0%; }
.cover-image-upscale { background-size: 200% 200%; background-position: 0% 100%; }
.cover-product-bg { background-size: 200% 200%; background-position: 100% 100%; }
.cover-poster-edit { background-size: 200% 200%; background-position: 50% 50%; }
.cover-motion-transfer { background-size: 200% 200%; background-position: 50% 0%; }
.cover-video-outfit { background-size: 200% 200%; background-position: 0% 50%; }

.vip-corner {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  color: #101015;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), #ffe8a6);
  box-shadow: 0 8px 28px rgba(242, 193, 95, 0.28);
}

.app-cover-body {
  display: grid;
  gap: 12px;
  padding: 15px;
}

.app-cover-body span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.app-cover-body h3 {
  margin: 4px 0 0;
  font-size: 20px;
}

.app-cover-body p {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.app-cover-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.app-cover-foot strong {
  color: var(--gold);
  font-size: 13px;
  white-space: nowrap;
}

.app-cover-foot a,
.app-cover-foot button {
  min-height: 36px;
  border: 1px solid rgba(77, 217, 210, 0.22);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--cyan);
  background: rgba(77, 217, 210, 0.08);
  cursor: pointer;
}

.app-run-shell,
.task-detail-shell,
.task-page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.task-page-shell {
  grid-template-columns: 1fr;
}

.app-run-panel,
.task-result-panel {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 24px;
  background: rgba(13, 18, 29, 0.76);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.app-run-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 20px;
}

.app-run-head h1 {
  margin: 12px 0 8px;
  font-size: 34px;
  line-height: 1.18;
}

.app-run-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.app-run-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.app-run-form textarea,
.app-run-form select,
.settings-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  outline: none;
}

.app-run-form input[type="file"] {
  width: 100%;
  border: 1px dashed rgba(77, 217, 210, 0.38);
  border-radius: 12px;
  padding: 14px;
  color: var(--muted);
  background: rgba(77, 217, 210, 0.055);
  outline: none;
}

.app-run-form input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 0;
  border-radius: 8px;
  padding: 9px 12px;
  color: #061015;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  cursor: pointer;
}

.file-input-hidden {
  position: absolute;
  width: 1px !important;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.app-run-form textarea {
  resize: vertical;
  min-height: 170px;
}

.upload-dropzone {
  min-height: 230px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px dashed rgba(134, 148, 176, 0.58);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 0%, rgba(77, 217, 210, 0.08), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.052), rgba(77, 217, 210, 0.035)),
    rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.upload-dropzone:hover,
.upload-dropzone:focus-visible,
.upload-dropzone.is-dragging {
  border-color: rgba(77, 217, 210, 0.82);
  background:
    radial-gradient(circle at 50% 0%, rgba(77, 217, 210, 0.16), transparent 42%),
    rgba(77, 217, 210, 0.055);
  box-shadow: 0 0 0 4px rgba(77, 217, 210, 0.08);
  outline: none;
}

.upload-dropzone.has-file {
  place-items: stretch;
  border-style: solid;
}

.upload-dropzone img,
.upload-dropzone video {
  display: block;
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.22);
}

.upload-dropzone audio {
  width: calc(100% - 28px);
  align-self: center;
  justify-self: center;
}

.upload-dropzone-empty,
.upload-dropzone-file {
  display: grid;
  gap: 10px;
  padding: 24px;
  text-align: center;
}

.upload-dropzone-empty svg {
  width: 54px;
  height: 54px;
  justify-self: center;
  fill: none;
  stroke: rgba(180, 190, 210, 0.82);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upload-dropzone-empty strong,
.upload-dropzone-file strong,
.upload-dropzone-meta strong {
  color: var(--text);
}

.upload-dropzone-empty span,
.upload-dropzone-file span,
.upload-dropzone-meta span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.upload-dropzone-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
}

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

.app-run-side {
  display: grid;
  align-content: start;
  gap: 16px;
}

.app-status-card {
  display: grid;
  gap: 8px;
}

.app-status-card span,
.muted-text {
  color: var(--muted);
}

.app-status-card strong {
  overflow-wrap: anywhere;
}

.app-status-card p,
.empty-result p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.task-list.compact {
  margin-top: 12px;
}

.home-task-list {
  display: grid;
  gap: 12px;
}

.task-list-large {
  gap: 12px;
}

.user-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-task-row > div {
  min-width: 0;
}

.user-task-row strong,
.user-task-row span {
  display: block;
}

.user-task-row span {
  max-width: 720px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-task-row em {
  color: var(--cyan);
  font-style: normal;
  font-weight: 900;
}

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

.form-alert {
  margin-bottom: 16px;
  border: 1px solid rgba(255, 111, 137, 0.24);
  border-radius: 12px;
  padding: 12px 14px;
  color: #ffd5dc;
  background: rgba(255, 111, 137, 0.08);
}

.result-preview {
  margin: 18px 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

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

.empty-result {
  display: grid;
  gap: 8px;
  min-height: 260px;
  place-content: center;
  text-align: center;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.045);
}

.app-list-row {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.app-list-row:hover {
  transform: translateY(-2px);
  border-color: rgba(77, 217, 210, 0.26);
  background: rgba(20, 30, 45, 0.78);
}

.app-list-main,
.app-list-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-list-main h3 {
  margin: 0;
  font-size: 18px;
}

.app-list-main p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.app-list-meta {
  flex-shrink: 0;
}

.app-list-meta strong {
  color: var(--gold);
  font-size: 13px;
  white-space: nowrap;
}

.app-list-meta a,
.app-list-meta button {
  min-height: 36px;
  border: 1px solid rgba(77, 217, 210, 0.22);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--cyan);
  background: rgba(77, 217, 210, 0.08);
  cursor: pointer;
}

.app-dot {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 8px;
  background: rgba(77, 217, 210, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 26px rgba(77, 217, 210, 0.16);
}

.app-dot.accent-cyan { background: linear-gradient(135deg, rgba(77,217,210,.78), rgba(109,167,255,.24)); }
.app-dot.accent-gold { background: linear-gradient(135deg, rgba(242,193,95,.78), rgba(77,217,210,.18)); }
.app-dot.accent-pink { background: linear-gradient(135deg, rgba(255,122,182,.72), rgba(120,220,156,.2)); }
.app-dot.accent-green { background: linear-gradient(135deg, rgba(120,220,156,.72), rgba(77,217,210,.2)); }
.app-dot.accent-blue { background: linear-gradient(135deg, rgba(109,167,255,.72), rgba(242,193,95,.18)); }
.app-dot.accent-violet { background: linear-gradient(135deg, rgba(165,140,255,.72), rgba(77,217,210,.2)); }

.vip-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  background: rgba(242, 193, 95, 0.12);
  border: 1px solid rgba(242, 193, 95, 0.24);
}

.simple-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
}

.simple-account h2 {
  margin: 0 0 8px;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(6, 9, 15, 0.72);
  backdrop-filter: blur(18px);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 18px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  margin-top: 34px;
}

.sidebar-nav a {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--muted);
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-note {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
}

.sidebar-note strong {
  color: var(--text);
}

.workspace {
  padding: 28px;
}

.topbar,
.section-head,
.topbar-actions,
.hero-actions,
.tool-meta,
.task-row,
.section-head.compact {
  display: flex;
  align-items: center;
}

.topbar,
.section-head,
.task-row,
.section-head.compact {
  justify-content: space-between;
}

.topbar {
  gap: 20px;
  margin-bottom: 22px;
}

.topbar .eyebrow {
  margin-top: 0;
}

.topbar h1 {
  font-size: 30px;
}

.topbar-actions,
.hero-actions {
  gap: 12px;
}

.point-pill,
.status-chip,
.soft-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 800;
}

.point-pill {
  color: var(--gold);
  background: rgba(242, 193, 95, 0.12);
  border: 1px solid rgba(242, 193, 95, 0.22);
}

.vip-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 13px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  background: rgba(77, 217, 210, 0.1);
  border: 1px solid rgba(77, 217, 210, 0.18);
}

.status-chip,
.soft-badge {
  color: var(--cyan);
  background: rgba(77, 217, 210, 0.1);
  border: 1px solid rgba(77, 217, 210, 0.18);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: center;
  min-height: 310px;
  border-radius: 24px;
  padding: 32px;
  overflow: hidden;
}

.hero-content h2 {
  max-width: 720px;
  margin: 18px 0 14px;
  font-size: 36px;
  line-height: 1.18;
}

.hero-content p {
  max-width: 640px;
  color: var(--muted);
  line-height: 1.75;
}

.hero-visual {
  display: grid;
  place-items: center;
}

.preview-window {
  width: 100%;
  max-width: 330px;
  border-radius: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #0c1320;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 30px 80px rgba(0,0,0,0.35);
}

.preview-toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.preview-toolbar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--soft);
}

.preview-art {
  height: 160px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 70% 28%, rgba(255, 122, 182, 0.55), transparent 24%),
    radial-gradient(circle at 28% 70%, rgba(77, 217, 210, 0.52), transparent 24%),
    linear-gradient(145deg, #1a2637, #0e1724);
}

.preview-lines {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.preview-lines i {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.preview-lines i:nth-child(1) { width: 88%; }
.preview-lines i:nth-child(2) { width: 66%; }
.preview-lines i:nth-child(3) { width: 74%; }

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  margin-top: 22px;
}

.section-head {
  gap: 18px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

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

.tool-card {
  overflow: hidden;
  border-radius: 18px;
}

.tool-thumb {
  height: 118px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
}

.tool-thumb span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.04));
}

.accent-cyan .tool-thumb span { background: linear-gradient(135deg, rgba(77,217,210,.68), rgba(109,167,255,.16)); }
.accent-gold .tool-thumb span { background: linear-gradient(135deg, rgba(242,193,95,.7), rgba(77,217,210,.12)); }
.accent-pink .tool-thumb span { background: linear-gradient(135deg, rgba(255,122,182,.64), rgba(165,140,255,.18)); }
.accent-green .tool-thumb span { background: linear-gradient(135deg, rgba(120,220,156,.64), rgba(77,217,210,.14)); }
.accent-blue .tool-thumb span { background: linear-gradient(135deg, rgba(109,167,255,.66), rgba(242,193,95,.12)); }
.accent-violet .tool-thumb span { background: linear-gradient(135deg, rgba(165,140,255,.7), rgba(77,217,210,.14)); }

.tool-body {
  padding: 16px;
}

.tool-meta {
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.tool-meta em,
.task-row em {
  font-style: normal;
  color: var(--cyan);
}

.tool-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
}

.tool-card p {
  min-height: 46px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.tool-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.tool-actions span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.tool-actions a,
.tool-actions button {
  min-height: 34px;
  border: 1px solid rgba(77, 217, 210, 0.22);
  border-radius: 10px;
  padding: 0 11px;
  color: var(--cyan);
  background: rgba(77, 217, 210, 0.08);
  cursor: pointer;
}

.inline-action-form {
  margin: 0;
}

.right-column {
  display: grid;
  gap: 16px;
  align-content: start;
}

.panel-card {
  border-radius: 18px;
  padding: 18px;
}

.account-meter {
  height: 10px;
  margin: 18px 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.account-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
}

.panel-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.mini-ledger {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.mini-ledger div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.mini-ledger strong,
.point-positive {
  color: var(--green);
}

.point-negative {
  color: var(--danger);
}

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

.task-row {
  gap: 12px;
  padding: 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.055);
}

.task-row strong,
.task-row span {
  display: block;
}

.task-row span {
  margin-top: 4px;
  color: var(--soft);
  font-size: 12px;
}

.point-log-row em {
  color: var(--gold);
}

.billing-shell,
.pay-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.billing-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.billing-head .ghost-btn {
  margin-bottom: 18px;
}

.billing-head h1,
.pay-card h1 {
  margin: 0;
  font-size: 34px;
}

.billing-head p {
  color: var(--muted);
}

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

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

.package-card {
  display: grid;
  gap: 12px;
  min-height: 260px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.package-card h3 {
  margin: 0;
  font-size: 20px;
}

.package-card strong {
  font-size: 28px;
}

.package-card p {
  min-height: 44px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.vip-package {
  border-color: rgba(242, 193, 95, 0.2);
}

.package-price,
.pay-amount {
  color: var(--gold);
  font-weight: 900;
}

.package-price {
  font-size: 22px;
}

.billing-orders {
  margin-top: 22px;
}

.user-billing-shell {
  display: grid;
  gap: 22px;
}

.billing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: center;
  gap: 28px;
  padding: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 18%, rgba(77, 217, 210, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.045));
}

.billing-hero h1 {
  margin: 12px 0 10px;
  font-size: 34px;
  line-height: 1.18;
}

.billing-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.custom-recharge-form {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(77, 217, 210, 0.18);
  border-radius: 16px;
  background: rgba(6, 12, 19, 0.62);
}

.custom-recharge-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.custom-recharge-form input {
  width: 100%;
  border: 1px solid rgba(134, 148, 176, 0.36);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.065);
  outline: none;
}

.custom-recharge-form input:focus {
  border-color: rgba(77, 217, 210, 0.7);
  box-shadow: 0 0 0 4px rgba(77, 217, 210, 0.12);
}

.recharge-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid rgba(242, 193, 95, 0.24);
  border-radius: 14px;
  background: rgba(242, 193, 95, 0.08);
}

.recharge-preview span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.recharge-preview strong {
  color: var(--gold);
  font-size: 26px;
}

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

.membership-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  background:
    radial-gradient(circle at 12% 18%, rgba(242, 193, 95, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.045));
}

.membership-hero h1 {
  margin: 12px 0 10px;
  font-size: 34px;
  line-height: 1.18;
}

.membership-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.membership-current-status {
  min-width: 240px;
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
}

.membership-current-status span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.membership-current-status strong {
  font-size: 28px;
}

.membership-current-status em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.membership-current-status.is-active strong,
.membership-current-status.is-active em {
  color: var(--gold);
}

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

.membership-package-card {
  display: grid;
  gap: 14px;
  min-height: 290px;
  padding: 20px;
  border: 1px solid rgba(242, 193, 95, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(242, 193, 95, 0.1), transparent 42%),
    var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.membership-package-card h2 {
  margin: 0;
  font-size: 22px;
}

.membership-package-card strong {
  color: var(--gold);
  font-size: 34px;
}

.membership-package-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.membership-package-foot {
  align-self: end;
  display: grid;
  gap: 14px;
}

.pay-shell {
  display: grid;
  gap: 18px;
  place-items: start center;
  min-height: 100vh;
}

.pay-card {
  width: min(520px, 100%);
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  text-align: center;
  background: var(--panel);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.pay-amount {
  font-size: 44px;
}

.wechat-qr {
  width: 220px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #eef7f2;
  box-shadow: inset 0 0 0 12px rgba(0, 0, 0, 0.08);
}

.qr-grid {
  width: 156px;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.qr-grid span {
  border-radius: 10px;
  background:
    linear-gradient(90deg, #101820 12px, transparent 0) 0 0 / 24px 24px,
    linear-gradient(#101820 12px, transparent 0) 0 0 / 24px 24px,
    #eef7f2;
  border: 10px solid #101820;
}

.pay-status {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.pay-status.subtle {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

@media (max-width: 1100px) {
  .home-hero,
  .home-split {
    grid-template-columns: 1fr;
  }

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

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

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-note {
    position: static;
    margin-top: 20px;
  }

  .content-grid,
  .hero-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .home-nav {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .home-nav nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .home-nav .topbar-actions {
    width: 100%;
  }

  .account-cluster {
    justify-content: flex-start;
    flex-wrap: wrap;
    border-radius: 12px;
  }

  .home-main {
    width: min(100% - 28px, 1180px);
    padding-top: 18px;
  }

  .home-hero {
    min-height: auto;
    padding-top: 18px;
  }

  .home-hero-copy h1 {
    font-size: 34px;
  }

  .home-metrics,
  .step-grid,
  .home-tool-grid,
  .app-card-grid {
    grid-template-columns: 1fr;
  }

  .simple-hero,
  .simple-account,
  .app-list-row,
  .app-list-meta {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .app-cover {
    min-height: 190px;
  }

  .app-cover-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-body {
    padding: 16px;
  }

  .auth-shell {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .auth-brand,
  .auth-card,
  .hero-panel {
    border-radius: 20px;
    padding: 24px;
  }

  .auth-brand h1,
  .hero-content h2 {
    font-size: 32px;
  }

  .workspace {
    padding: 18px;
  }

  .topbar,
  .topbar-actions {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

.admin-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(77, 217, 210, 0.12), transparent 24%),
    linear-gradient(140deg, #07090f, #0b111c 48%, #080b11);
}

.admin-shell {
  display: grid;
  grid-template-columns: 252px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(6, 9, 15, 0.82);
  backdrop-filter: blur(18px);
}

.admin-nav {
  display: grid;
  gap: 8px;
  margin-top: 34px;
}

.admin-nav a,
.admin-logout {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  border-radius: 12px;
  padding: 0 14px;
  color: var(--muted);
  border: 1px solid transparent;
  background: transparent;
}

.admin-nav a.active,
.admin-nav a:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.065);
}

.admin-logout {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  width: calc(100% - 48px);
  cursor: pointer;
  justify-content: center;
  border-color: rgba(255, 107, 107, 0.22);
  color: #ffb4b4;
  background: rgba(255, 107, 107, 0.08);
}

.admin-main {
  padding: 28px;
}

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.admin-top .eyebrow {
  margin-top: 0;
}

.admin-top h1 {
  margin: 0;
  font-size: 30px;
}

.admin-stat-grid,
.admin-info-grid,
.admin-app-grid {
  display: grid;
  gap: 16px;
}

.admin-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.admin-stat,
.admin-panel,
.admin-app-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(20px);
}

.admin-stat {
  padding: 18px;
}

.admin-stat span,
.admin-info-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.admin-stat strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
}

.admin-panel {
  padding: 20px;
}

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

.admin-info-grid div {
  border-radius: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.admin-info-grid strong {
  display: block;
  margin-top: 8px;
}

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

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

.admin-table-wrap table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.admin-table-wrap th {
  color: var(--muted);
  font-size: 12px;
  text-align: left;
  text-transform: uppercase;
}

.admin-table-wrap td {
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.admin-table-wrap td:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px 0 0 12px;
}

.admin-table-wrap td:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 0 12px 12px 0;
}

.admin-table-wrap td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.log-level {
  display: inline-flex !important;
  width: fit-content;
  margin: 0 !important;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--text) !important;
  font-weight: 900;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
}

.log-info {
  color: var(--green) !important;
  background: rgba(120, 220, 156, 0.12);
}

.log-warn {
  color: var(--gold) !important;
  background: rgba(242, 193, 95, 0.12);
}

.log-error {
  color: var(--danger) !important;
  background: rgba(255, 107, 107, 0.12);
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 130px 130px 110px 92px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.055);
}

.user-row {
  grid-template-columns: minmax(220px, 1fr) 130px 130px 110px 92px minmax(260px, 1fr);
}

.inline-admin-form {
  display: contents;
}

.grant-points-form {
  display: grid;
  grid-template-columns: 78px minmax(100px, 1fr) 68px;
  gap: 8px;
  align-items: center;
}

.admin-row-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  background: transparent;
}

.admin-row strong,
.admin-row small {
  display: block;
}

.admin-row small {
  margin-top: 4px;
  color: var(--soft);
}

.admin-row input,
.admin-row select,
.admin-app-card input,
.admin-app-card textarea,
.settings-form input,
.settings-form textarea,
.settings-form select,
.mini-package-form input,
.mini-package-form textarea,
.mini-package-form select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 11px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  outline: none;
}

.admin-app-card textarea,
.settings-form textarea,
.mini-package-form textarea {
  min-height: 88px;
  padding: 11px;
  resize: vertical;
}

.admin-save {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  color: #061015;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
}

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

.admin-app-card,
.settings-form {
  display: grid;
  gap: 14px;
}

.admin-app-card {
  padding: 18px;
}

.admin-app-card label,
.settings-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

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

.form-grid.three {
  grid-template-columns: 1.4fr 0.7fr 0.8fr;
}

.switch-line {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  color: var(--text) !important;
}

.switch-line input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--cyan);
}

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

.mini-package-form {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 0.7fr 0.7fr auto auto;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.mini-package-form textarea {
  grid-column: 1 / -1;
}

.new-package-form {
  border-color: rgba(77, 217, 210, 0.18);
  background: rgba(77, 217, 210, 0.06);
}

.payment-row {
  grid-template-columns: minmax(250px, 1fr) 110px 90px 110px 190px 180px;
}

.point-ledger-row {
  grid-template-columns: minmax(240px, 1fr) 130px 100px 90px 90px;
}

.payment-row .admin-save:disabled {
  cursor: default;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
}

.payment-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.payment-actions form {
  margin: 0;
}

.compact-btn {
  min-height: 38px;
  padding: 0 12px;
}

.result-retention-tip {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(242, 193, 95, 0.22);
  border-radius: 14px;
  color: var(--gold);
  background: rgba(242, 193, 95, 0.08);
}

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

.payment-test-panel {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.payment-test-panel div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.payment-test-panel span,
.payment-test-panel p {
  color: var(--muted);
}

.payment-test-panel p {
  margin: 0;
  line-height: 1.6;
}

.payment-test-panel.is-ok {
  border-color: rgba(120, 220, 156, 0.26);
  background: rgba(120, 220, 156, 0.08);
}

.payment-test-panel.is-warn {
  border-color: rgba(242, 193, 95, 0.24);
  background: rgba(242, 193, 95, 0.07);
}

.admin-login-shell {
  width: min(440px, 100%);
}

.admin-login-card {
  display: grid;
  gap: 18px;
}

.admin-auth {
  background:
    radial-gradient(circle at 50% 0%, rgba(77, 217, 210, 0.18), transparent 32%),
    linear-gradient(140deg, #07090f, #0b111c);
}

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

  .admin-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-logout {
    position: static;
    width: 100%;
    margin-top: 20px;
  }

  .admin-stat-grid,
  .admin-app-grid,
  .admin-split,
  .app-run-shell,
  .task-detail-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-row,
  .payment-row,
  .point-ledger-row,
  .mini-package-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .admin-main {
    padding: 18px;
  }

  .admin-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-stat-grid,
  .admin-info-grid,
  .admin-app-grid,
  .admin-split,
  .app-run-shell,
  .task-detail-shell,
  .billing-hero,
  .billing-history-grid,
  .membership-package-grid,
  .billing-grid,
  .form-grid.two,
  .form-grid.three {
    grid-template-columns: 1fr;
  }

  .app-run-head {
    flex-direction: column;
  }

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

  .membership-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .membership-current-status {
    justify-items: start;
    text-align: left;
  }

  .pay-card {
    padding: 22px;
  }

  .wechat-qr {
    width: min(220px, 100%);
  }
}
