:root {
  color-scheme: dark;
  --bg: #070509;
  --panel: #0d0912;
  --panel-soft: #110b18;
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(207, 66, 255, 0.28);
  --text: #f7f3fa;
  --muted: #8e8498;
  --purple: #b92dff;
  --pink: #ef2cff;
  --green: #56f7ba;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 15%, rgba(122, 27, 175, 0.12), transparent 26rem),
    linear-gradient(130deg, #09060c 0%, #050407 100%);
  color: var(--text);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.25;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.ambient {
  position: fixed;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  opacity: .15;
}
.ambient-one { top: -13rem; left: 32%; background: var(--purple); }
.ambient-two { right: -13rem; bottom: -14rem; background: #4b00ff; }

.shell {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

.step {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 1.65rem;
  color: #c459ec;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .23em;
}

.auth-panel {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 100vh;
  padding: clamp(1.5rem, 5vw, 5rem);
  background: rgba(4, 3, 6, .38);
}
.auth-card { width: min(100%, 30rem); padding-block: 2rem; }
.auth-card header { margin-bottom: 1.7rem; }
.step { margin-bottom: 1rem; }
.auth-card h2 { margin: 0; font-size: clamp(1.9rem, 3vw, 2.55rem); letter-spacing: -.045em; }
.auth-card header > p:last-child { margin: .8rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.6; }

form { display: grid; }
label { margin-bottom: .55rem; color: #cfc7d6; font-size: .71rem; font-weight: 650; letter-spacing: .025em; }
.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 1rem;
  padding: .28rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.018);
}
.mode-switch button {
  min-height: 2.4rem;
  border: 0;
  background: transparent;
  color: #716779;
  font-size: .7rem;
  font-weight: 700;
  cursor: pointer;
}
.mode-switch button.active { background: rgba(191,45,244,.11); color: #e9c4f7; box-shadow: inset 0 0 0 1px rgba(211,88,255,.18); }
.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.social-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 3rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  color: #d9d3dd;
  font-size: .73rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.social-button:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.045); }
.social-button svg { width: 1.05rem; }
.divider { display: flex; align-items: center; gap: .8rem; margin: 1.15rem 0; color: #5d5564; font-size: .59rem; }
.divider::before, .divider::after { flex: 1; height: 1px; content: ""; background: var(--line); }
.registration-fields { display: grid; gap: .55rem; }
.registration-fields .field + label { margin-top: .55rem; }
.label-row { display: flex; justify-content: space-between; margin-top: 1.2rem; }
.label-row span { color: #655c6e; font-size: .64rem; }
.field {
  display: flex;
  align-items: center;
  min-height: 3.45rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.018);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field:focus-within { border-color: rgba(195, 55, 255, .6); background: rgba(185,45,255,.035); box-shadow: 0 0 0 3px rgba(185,45,255,.07), 0 12px 32px rgba(0,0,0,.18); }
.field > svg, .reveal svg { width: 1rem; fill: none; stroke: currentColor; stroke-width: 1.6; }
.field > svg { flex: 0 0 auto; margin-right: .75rem; color: #6e6377; }
input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: .86rem; }
input::placeholder { color: #4f4856; }
.reveal { display: grid; place-items: center; padding: .45rem; border: 0; background: transparent; color: #746a7d; cursor: pointer; }
.reveal:hover { color: #d69bee; }

.form-message { min-height: 1.3rem; margin: .85rem 0 .3rem; color: #ff7898; font-size: .72rem; line-height: 1.4; }
.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 3.55rem;
  margin-top: .25rem;
  border: 1px solid #d46bff;
  background: linear-gradient(110deg, #a91ee7, #c72cf4 55%, #ae1ee3);
  color: white;
  font-size: .79rem;
  font-weight: 750;
  letter-spacing: .045em;
  cursor: pointer;
  box-shadow: 0 12px 40px rgba(179, 33, 228, .2), inset 0 1px rgba(255,255,255,.28);
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}
.submit svg { width: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; }
.submit:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 15px 45px rgba(179,33,228,.3); }
.submit:disabled { cursor: wait; opacity: .68; }
.submit.secondary { border-color: var(--line-strong); background: rgba(183,40,238,.07); box-shadow: none; }

.auth-card footer { display: flex; justify-content: center; gap: .4rem; margin-top: 1.8rem; color: #68606f; font-size: .67rem; }
.auth-card footer a { color: #c76aeb; text-decoration: none; }
.auth-card footer a:hover { text-decoration: underline; }
.legal { position: absolute; left: 50%; bottom: 1.8rem; margin: 0; color: #504858; font-size: .57rem; letter-spacing: .08em; transform: translateX(-50%); white-space: nowrap; }
.legal span { display: inline-block; width: 2px; height: 2px; margin: 0 .45rem .15rem; border-radius: 50%; background: #716578; }

.account-open .auth-panel {
  align-content: start;
  padding: 0 clamp(1rem, 4vw, 3rem) 2rem;
  background: radial-gradient(ellipse at 55% 0%, #20102b, transparent 36rem), rgba(7, 5, 10, .68);
}
.account-open .legal { position: static; transform: none; margin: 2rem 0 0; color: #91859a; }
.account-card { width: min(100%, 63rem); min-width: 0; }
.account-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  min-height: 4.5rem;
  padding-block: .55rem;
  border-bottom: 1px solid var(--line);
  background: #100919;
}
.account-download-tools { display: flex; flex: 1 1 100%; justify-content: space-between; align-items: center; gap: .55rem; padding-top: .35rem; }
.account-download-tools .account-actions { justify-content: flex-end; flex: 0 0 auto; }
.account-download-tools .download-status { margin: 0; min-height: 2.4em; font-size: .75rem; }
.account-wordmark { font-size: .93rem; font-weight: 800; letter-spacing: .12em; }
.account-wordmark span { color: #d896f9; }
.account-shell { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: clamp(1rem, 3vw, 2rem); align-items: start; }
.account-sidebar {
  position: sticky;
  top: 8rem;
  display: grid;
  gap: .3rem;
  margin-top: clamp(1.6rem, 4vw, 3rem);
  padding: .45rem;
  border: 1px solid #362841;
  border-radius: .8rem;
  background: #150e1c;
}
.account-sidebar a {
  display: flex;
  align-items: center;
  min-height: 2.65rem;
  padding: .45rem .65rem;
  border: 1px solid transparent;
  border-radius: .5rem;
  color: #c1b3ca;
  text-decoration: none;
  font-size: .87rem;
  font-weight: 650;
}
.account-sidebar a:hover { color: #fff; background: #21172b; }
.account-sidebar a[aria-current="page"] { color: #f7dcff; background: #321a43; border-color: #634078; }
.account-content { min-width: 0; }
.account-content [data-account-page] { min-width: 0; }
.account-bar-actions, .account-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
}
.account-heading { margin: clamp(1.6rem, 4vw, 3rem) 0 1.55rem; }
.account-heading p { margin: 0; color: #b5a6be; font-size: .9rem; overflow-wrap: anywhere; }
.account-heading p:first-child { color: #e1a8f8; font-weight: 700; }
.account-heading h1 {
  margin: .25rem 0 .4rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}
.account-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: .85rem; }
.account-tile {
  min-width: 0;
  padding: clamp(1rem, 3vw, 1.45rem);
  border: 1px solid #362841;
  border-radius: 1rem;
  background: #150e1c;
}
.account-tile h2 { margin: 0 0 .8rem; font-size: 1.05rem; letter-spacing: -.015em; }
.account-list { display: grid; margin: 0; padding: 0; list-style: none; }
.account-empty {
  padding: .8rem .9rem;
  border: 1px dashed #473653;
  border-radius: .6rem;
  background: #110b17;
  color: #c1b3ca;
  font-size: .85rem;
}
.account-record {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .45rem .7rem;
  padding: .65rem 0;
}
.account-record + .account-record { border-top: 1px solid var(--line); }
.account-record div { display: grid; gap: .2rem; min-width: 0; }
.account-record strong { font-size: .9rem; }
.account-record div span { font-size: .78rem; color: #b5a6be; }
.account-badge {
  padding: .22rem .55rem;
  border-radius: 2rem;
  background: #2b2333;
  color: #d1c4d9;
  font-size: .72rem;
  font-weight: 650;
}
.account-badge[data-tone="positive"] { background: #16352e; color: #91f1ca; }
.account-badge[data-tone="pending"] { background: #3b2b1c; color: #ffd29e; }
.account-status, .client-instructions li, .client-instructions p {
  margin: 0 0 .8rem;
  color: #c1b3ca;
  font-size: .88rem;
  line-height: 1.5;
}
.account-status:empty, .account-notice:empty { margin: 0; padding: 0; border: 0; }
.account-download { min-inline-size: 8rem; }
.profile-fields { margin: 0; }
.profile-fields div { display: grid; gap: .25rem; padding: .65rem 0; }
.profile-fields div + div { border-top: 1px solid var(--line); }
.profile-fields dt { color: #c1b3ca; font-size: .82rem; }
.profile-fields dd { margin: 0; overflow-wrap: anywhere; }
.account-notice { margin: 0 0 .9rem; padding: .65rem .9rem; border: 1px solid #634078; border-radius: .55rem; color: #ebc8f8; font-size: .88rem; }
.account-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: .45rem .85rem;
  border: 1px solid #574362;
  border-radius: .6rem;
  background: #21172b;
  color: #f7f0fa;
  font-size: .85rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.account-button:hover:not(:disabled) { border-color: #b976d7; background: #33203e; }
.account-button-quiet { background: transparent; }
.account-button-primary { border-color: #b96ee0; background: #822ab3; }
.account-button-primary:hover:not(:disabled) { background: #963bca; }
.account-button:disabled { color: #b5a6be; background: #211a28; border-color: #41334b; cursor: not-allowed; }
.account-card :focus-visible { outline: 2px solid #e6a2ff; outline-offset: 3px; }
.checkout-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .55rem; }
.checkout-field { flex: 1 1 6rem; display: grid; }
.checkout-field label { margin-bottom: .35rem; }
.checkout-field select {
  width: 100%;
  min-height: 2.7rem;
  padding: .35rem .55rem;
  border: 1px solid #574362;
  border-radius: .6rem;
  background: #21172b;
  color: var(--text);
  font: inherit;
}
.client-instructions ol { padding-left: 1.15rem; }
[hidden] { display: none !important; }

@media (max-width: 900px) {
  .auth-panel { padding-top: 3rem; padding-bottom: 5rem; }
  .legal { position: static; margin-top: 3rem; text-align: center; transform: none; white-space: normal; }
}

@media (max-width: 480px) {
  .auth-panel { padding-inline: 1.35rem; }
  .auth-card footer { flex-direction: column; align-items: center; }
}

@media (max-width: 640px) {
  .account-grid { grid-template-columns: minmax(0, 1fr); }
  .account-shell { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .account-sidebar { position: static; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .2rem; margin-top: 1rem; padding: .28rem; }
  .account-sidebar a { justify-content: center; padding-inline: .15rem; font-size: .72rem; }
  .account-download-tools { flex-direction: column; align-items: stretch; }
  .account-download-tools .download-status { order: 2; min-height: 2.3em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
