/* Short Studio — modern dark UI */

:root {
  --bg-deep: #070708;
  --bg-elevated: #0f1014;
  --surface: #14151c;
  --surface-hover: #1a1c26;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #22d3ee;
  --accent-dim: rgba(34, 211, 238, 0.15);
  --accent-glow: rgba(34, 211, 238, 0.35);
  --danger: #fb7185;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.35);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

/* Ambient background */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(34, 211, 238, 0.12), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(99, 102, 241, 0.08), transparent 45%),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(236, 72, 153, 0.06), transparent 50%),
    var(--bg-deep);
}

.page-bg--glow {
  z-index: -1;
  background: radial-gradient(circle at 50% 120%, rgba(34, 211, 238, 0.06), transparent 40%);
  pointer-events: none;
}

/* Top loading strip (Studio fetch / feels like browser progress) */
.global-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 100;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s;
  background: rgba(34, 211, 238, 0.22);
}

.global-loading-bar--active {
  opacity: 1;
  visibility: visible;
}

.global-loading-bar__shine {
  height: 100%;
  width: 45%;
  max-width: 420px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(34, 211, 238, 0.35),
    var(--accent),
    rgba(167, 139, 250, 0.9),
    transparent
  );
  animation: global-loading-shine 1.05s ease-in-out infinite;
}

@keyframes global-loading-shine {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(380%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .global-loading-bar__shine {
    animation: none;
    width: 100%;
    max-width: none;
    opacity: 0.85;
    transform: none;
  }
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 7, 8, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.nav__mark {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.nav__word {
  background: linear-gradient(90deg, #fafafa, #a1a1aa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav__user {
  font-size: 0.8rem;
  color: var(--text-dim);
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .nav__user {
    display: none;
  }
}

.nav__link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.nav__link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* Main */
.main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Footer */
.foot {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.foot p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
}

.foot__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.foot__links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.foot__copy {
  margin: 0;
}

.foot__code {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Hero */
.hero {
  margin-bottom: 2.5rem;
}

.pill {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(34, 211, 238, 0.25);
  margin-bottom: 1rem;
}

.hero__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero__lead {
  margin: 0;
  max-width: 52ch;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.hero__lead strong {
  color: var(--text);
  font-weight: 600;
}

.hero__lead-split {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.98rem;
}
.hero__lead-split a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.hero__lead-split a:hover { text-decoration: underline; }

.hero__sub--billing {
  margin-top: 0.75rem;
  max-width: 52ch;
}
.hero__sub--billing a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.hero__sub--billing a:hover { text-decoration: underline; }

.hero--landing {
  text-align: center;
  padding: 4rem 1rem 3rem;
  margin: 2rem auto 0;
  max-width: 780px;
}

.hero--landing .hero__title {
  font-size: clamp(2.4rem, 6vw, 3.75rem);
  background: linear-gradient(135deg, #22d3ee 0%, #a78bfa 60%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero--landing .hero__lead {
  margin: 0 auto;
  font-size: 1.15rem;
}

.hero__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Layout */
.layout--2 {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .layout--2 {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.grid {
  display: grid;
  gap: 1rem;
}

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

@media (min-width: 560px) {
  .grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}

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

@media (min-width: 640px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Panels */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.35rem 1.15rem;
  box-shadow: var(--shadow-md);
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.panel:hover {
  border-color: var(--border-strong);
}

.panel--wide {
  margin-top: 1.25rem;
}

/* Background clip + 9:16 preview */
.bg-studio {
  display: grid;
  gap: 1.35rem;
}

@media (min-width: 900px) {
  .panel--bg .bg-studio {
    grid-template-columns: 1fr minmax(168px, 232px);
    align-items: start;
    gap: 1.5rem;
  }
}

.bg-preview {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.bg-preview__chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 1.4rem;
}

.bg-preview__badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(34, 211, 238, 0.2);
}

.bg-preview__hint {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.bg-preview__frame {
  position: relative;
  aspect-ratio: 9 / 16;
  width: 100%;
  max-width: 240px;
  margin-inline: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.05) 0%, transparent 45%),
    var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@media (min-width: 900px) {
  .panel--bg .bg-preview__frame {
    margin-inline: 0;
    max-width: none;
    width: 100%;
  }
}

.bg-preview__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.bg-preview__media--hide {
  display: none !important;
}

.bg-preview__placeholder {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(15, 16, 20, 0.92), rgba(7, 7, 8, 0.98));
}

.bg-preview--empty .bg-preview__placeholder {
  display: flex;
}

.bg-preview__placeholder-icon {
  font-size: 1.35rem;
  color: var(--accent);
  opacity: 0.45;
}

.bg-preview__placeholder-text {
  font-size: 0.8rem;
  color: var(--text-dim);
  max-width: 13rem;
  line-height: 1.45;
}

.bg-preview__filename {
  margin: 0;
  font-size: 0.72rem;
  font-family: var(--mono);
  color: var(--text-muted);
  word-break: break-word;
  text-align: center;
  line-height: 1.35;
}

@media (min-width: 900px) {
  .panel--bg .bg-preview__filename {
    text-align: left;
  }
}

.music-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}

.music-preview {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.music-preview__chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.music-preview__badge {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(34, 211, 238, 0.22);
}

.music-preview__hint {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.music-preview__player {
  width: 100%;
  min-height: 2.75rem;
  border-radius: var(--radius-sm);
  accent-color: var(--accent);
}

.music-preview--disabled .music-preview__player {
  opacity: 0.42;
  pointer-events: none;
}

.music-preview--disabled .music-preview__hint {
  color: var(--text-dim);
}

.music-folder-hint {
  margin: 0;
  padding-top: 0.25rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.music-folder-hint code {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.panel__head {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: flex-start;
}

.panel__step {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(34, 211, 238, 0.2);
}

.panel__title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.panel__hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.panel--hint {
  margin-top: 1.5rem;
  padding: 0;
  overflow: hidden;
}

/* Fields */
.field {
  margin-bottom: 0.25rem;
}

.field__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.field__hint {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-dim);
  font-size: 0.72rem;
}

.field__input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field__input:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.field__input:focus {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.field__input::placeholder {
  color: var(--text-dim);
}

.field__input--mono {
  font-family: var(--mono);
  font-size: 0.88rem;
}

.field__textarea {
  min-height: 5rem;
  resize: vertical;
  line-height: 1.5;
}

.field__select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2371717a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

.field--checkbox-row {
  display: flex;
  align-items: flex-end;
  padding-bottom: 0.35rem;
}

/* Checkbox */
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.checkbox--inline {
  margin-top: 0.75rem;
}

.checkbox input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox__box {
  position: relative;
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.checkbox input:focus-visible + .checkbox__box {
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.checkbox input:checked + .checkbox__box {
  background: linear-gradient(135deg, var(--accent), #06b6d4);
  border-color: transparent;
}

.checkbox input:checked + .checkbox__box::after {
  content: "";
  display: block;
  width: 5px;
  height: 9px;
  margin: 1px auto 0;
  border: solid var(--bg-deep);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox__text {
  line-height: 1.45;
}

/* Segments */
.segments {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.segment {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  overflow: hidden;
}

.segment__bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

.segment__num {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.9;
}

.segment__num--role {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.segment__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.segment__body {
  padding: 1rem 1rem 1.1rem;
}

/* Submit */
.submit-bar {
  margin-top: 2rem;
  text-align: center;
}

.submit-bar__note {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s, background 0.2s;
}

.btn--sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
}

.btn--block {
  width: 100%;
  padding: 0.75rem 1rem;
}

.btn--xl {
  position: relative;
  overflow: hidden;
  padding: 1rem 1.75rem;
  font-size: 1rem;
  border-radius: 14px;
}

.btn--primary {
  background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 45%, #0891b2 100%);
  color: #042f2e;
  box-shadow: 0 8px 32px var(--accent-glow), 0 2px 0 rgba(255, 255, 255, 0.15) inset;
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 40px var(--accent-glow), 0 2px 0 rgba(255, 255, 255, 0.2) inset;
}

.btn--primary:active {
  transform: translateY(0);
}

.btn__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.25) 50%, transparent 60%);
  transform: translateX(-100%);
  animation: shine 4s ease-in-out infinite;
}

@keyframes shine {
  0%,
  80% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(200%);
  }
}

.btn__spinner {
  display: none;
  width: 1em;
  height: 1em;
  margin-right: 0.55em;
  vertical-align: -0.15em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}

.btn--loading {
  cursor: progress;
  opacity: 0.85;
}

.btn--loading .btn__shine {
  animation: none;
  opacity: 0;
}

.btn--loading .btn__spinner {
  display: inline-block;
}

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

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
}

.btn--ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* Hint details */
.hint-summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hint-summary::-webkit-details-marker {
  display: none;
}

.hint-summary__icon {
  font-size: 1rem;
  opacity: 0.6;
}

.hint-body {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
}

.hint-pre {
  margin: 0;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-muted);
  overflow-x: auto;
}

/* Auth */
.auth {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 180px);
  padding: 2rem 0;
}

.auth__panel {
  width: 100%;
  max-width: 420px;
  padding: 2.25rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.auth__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.auth__title {
  margin: 0 0 0.5rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.auth__sub {
  margin: 0 0 1.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.auth__footer {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth__footer a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.auth__footer a:hover {
  text-decoration: underline;
}

.banner {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
}

.banner--err {
  background: rgba(251, 113, 133, 0.12);
  border: 1px solid rgba(251, 113, 133, 0.35);
  color: #fecdd3;
}

.banner--ok {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

.billing-grid {
  margin-top: 1.5rem;
}

.billing-pack {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
}

.billing-pack__credits {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.billing-pack__label {
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.billing-pack__price {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0.5rem 0 1rem;
}

.billing-foot {
  margin: 1.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
}

.nav__credits {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(34, 211, 238, 0.25);
  text-decoration: none;
  line-height: 1.15;
}

.nav__credits-dot {
  flex-shrink: 0;
  opacity: 0.9;
}

.nav__credits-body {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.28rem;
}

.nav__credits-balance {
  font-weight: 700;
}

.nav__credits-sep {
  opacity: 0.55;
  font-weight: 500;
  user-select: none;
}

.nav__credits-more {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.9;
}

.nav__credits:hover {
  filter: brightness(1.15);
}

.form .field {
  margin-bottom: 1rem;
}

/* Links in body */
a {
  color: var(--accent);
}

code {
  font-family: var(--mono);
  font-size: 0.85em;
  padding: 0.12em 0.35em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .btn__shine {
    animation: none;
  }
  .btn--primary:hover {
    transform: none;
  }
}

/* ===== Admin / tables ===== */
.stat-grid { gap: 0.75rem; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
}
.stat-card__num {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}
.stat-card__label {
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 1rem;
}
.table th, .table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.table td code { font-family: var(--mono); font-size: 0.82rem; color: var(--accent); }
.table td a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}
.table td a:hover { text-decoration: underline; }
.table tr:hover td { background: rgba(255,255,255,0.02); }

.table-scroll {
  overflow-x: auto;
  margin-top: 0.25rem;
  -webkit-overflow-scrolling: touch;
}
.table__nowrap { white-space: nowrap; }
.table__ellipsis {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 768px) {
  .table__ellipsis { max-width: 14rem; }
}

/* Legal / terms */
.legal-panel .legal-prose {
  max-width: 56rem;
  margin: 0 auto;
}

.legal-prose p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.legal-prose__h {
  margin: 1.75rem 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.legal-prose__h:first-child {
  margin-top: 0;
}

.legal-prose__contact {
  margin-top: 2rem !important;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem !important;
}

.empty-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 1.25rem 0;
  text-align: center;
}

.admin-code-form { margin: 0.5rem 0 1.5rem; }
.admin-code-form .btn { margin-top: 0.75rem; }

.invoice__id { font-family: var(--mono); font-size: 0.78rem; color: var(--text-muted); }

.discount-field { margin: 1rem 0 0.5rem; max-width: 380px; }

.nav__link--admin {
  color: #f472b6;
  font-weight: 600;
}
.nav__link--admin:hover { color: #fb7185; }

/* ===== Landing page ===== */
.hero--landing {
  text-align: center;
  padding: 5rem 1rem 3rem;
  margin: 1rem auto 0;
  max-width: 880px;
  position: relative;
}
.hero--landing .hero__title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  background: linear-gradient(135deg, #22d3ee 0%, #a78bfa 55%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.hero--landing .hero__lead {
  margin: 1rem auto 0;
  font-size: 1.15rem;
  max-width: 640px;
}

.landing-free-credit {
  margin: 1.85rem auto 0;
  max-width: 38rem;
  padding: 1rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(34, 211, 238, 0.45);
  background: linear-gradient(
    145deg,
    rgba(34, 211, 238, 0.18),
    rgba(167, 139, 250, 0.14),
    rgba(244, 114, 182, 0.08)
  );
  box-shadow: 0 8px 32px rgba(34, 211, 238, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
}

@media (min-width: 540px) {
  .landing-free-credit {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    text-align: left;
  }
}

.landing-free-credit__badge {
  flex-shrink: 0;
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #042f2e;
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
}

.landing-free-credit__text {
  margin: 0;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  line-height: 1.35;
  color: var(--text);
  font-weight: 500;
}

.landing-free-credit__text strong {
  color: var(--accent);
  font-weight: 800;
}

.hero__sub {
  margin-top: 1rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.hero--landing .hero__sub {
  margin-top: 1rem;
}

.landing-feats {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin: 4rem auto 0;
  max-width: 1100px;
  padding: 0 1rem;
}
@media (min-width: 700px) { .landing-feats { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .landing-feats { grid-template-columns: 1fr 1fr 1fr; } }

.feat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  transition: transform 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.feat:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.feat__icon {
  font-size: 1.85rem;
  margin-bottom: 0.5rem;
}
.feat__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
}
.feat__body {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.landing-h2 {
  text-align: center;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 auto 2rem;
}

.landing-how {
  margin: 5rem auto 0;
  max-width: 1100px;
  padding: 0 1rem;
}
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
}
.step__num {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
  color: #042f2e;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.6rem;
}
.step__title {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  font-weight: 600;
}
.step__body {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.landing-pricing {
  margin: 5rem auto 0;
  max-width: 1100px;
  padding: 0 1rem;
  scroll-margin-top: 5.5rem;
}
.pricing-grid { gap: 1rem; }
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1rem;
  text-align: center;
  position: relative;
  transition: transform 200ms var(--ease-out);
}
.pricing-card:hover { transform: translateY(-2px); }
.pricing-card--feature {
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.15), 0 12px 40px rgba(34, 211, 238, 0.12);
}
.pricing-card__badge {
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
  color: #042f2e;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}
.pricing-card__num {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.pricing-card__label {
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0.25rem 0 0.75rem;
}
.pricing-card__price {
  font-size: 1.6rem;
  font-weight: 700;
}
.pricing-card__hint {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.landing-cta {
  margin: 5rem auto 4rem;
  max-width: 800px;
  padding: 3rem 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(244, 114, 182, 0.08));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
}
.landing-cta__lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 1.25rem;
}
