@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #070706;
  --surface: rgba(18, 17, 14, 0.94);
  --surface-2: #171510;
  --surface-3: #211d15;
  --line: rgba(255, 218, 137, 0.14);
  --line-strong: rgba(246, 190, 68, 0.34);
  --gold: #f3bd4e;
  --gold-light: #ffe29a;
  --gold-deep: #9e6516;
  --red: #a31522;
  --red-light: #e65b62;
  --green: #4fc78a;
  --text: #faf8f2;
  --muted: #9e9a90;
  --danger: #ff6b70;
  --blue: #5ca8ff;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --font: "Vazirmatn", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 80% 10%, rgba(168, 25, 35, 0.2), transparent 34%),
    radial-gradient(circle at 25% 90%, rgba(193, 126, 22, 0.1), transparent 31%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
a,
input,
.avatar-picker {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ambient {
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.ambient-one {
  top: -20%;
  right: -12%;
  width: 480px;
  height: 480px;
  background: rgba(170, 20, 30, 0.12);
}

.ambient-two {
  bottom: -30%;
  left: 18%;
  width: 520px;
  height: 520px;
  background: rgba(235, 169, 43, 0.09);
}

.noise {
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.028;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(440px, 0.88fr) minmax(520px, 1.12fr);
  min-height: 100vh;
  min-height: 100svh;
}

.auth-panel {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 100%;
  padding: 46px clamp(28px, 4vw, 76px) 32px;
  background: linear-gradient(145deg, rgba(7, 7, 6, 0.96), rgba(9, 8, 7, 0.88));
  border-left: 1px solid rgba(255, 218, 137, 0.08);
}

.auth-card {
  position: relative;
  width: min(100%, 500px);
  max-height: calc(100svh - 110px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(243, 189, 78, 0.32) transparent;
  padding: clamp(26px, 3.1vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(150deg, rgba(25, 23, 18, 0.96), rgba(11, 11, 9, 0.98)),
    var(--surface);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  isolation: isolate;
}

.auth-card::-webkit-scrollbar {
  width: 5px;
}

.auth-card::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(243, 189, 78, 0.3);
}

.auth-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: 18%;
  width: 42%;
  height: 100px;
  opacity: 0.5;
  background: radial-gradient(ellipse at top, rgba(243, 189, 78, 0.12), transparent 72%);
  pointer-events: none;
}

.card-topline {
  position: absolute;
  top: -1px;
  right: 12%;
  left: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 18px rgba(243, 189, 78, 0.42);
}

.demo-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 23px;
  padding: 7px 11px;
  border: 1px solid rgba(243, 189, 78, 0.14);
  border-radius: 999px;
  background: rgba(243, 189, 78, 0.055);
  color: #c9b98f;
  font-size: 11px;
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(243, 189, 78, 0.09), 0 0 12px rgba(243, 189, 78, 0.6);
  animation: statusPulse 2.4s ease-in-out infinite;
}

@keyframes statusPulse {
  50% { opacity: 0.45; box-shadow: 0 0 0 7px rgba(243, 189, 78, 0.03); }
}

.view,
.register-step {
  display: none;
}

.view.is-active,
.register-step.is-active {
  display: block;
  animation: viewEnter 430ms cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes viewEnter {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-header {
  margin-bottom: 29px;
}

.form-header.compact {
  margin-top: 27px;
  margin-bottom: 25px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(243, 189, 78, 0.5);
}

.form-header h1,
.success-state h1,
.app-preview h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(27px, 3vw, 35px);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.04em;
}

.form-header p,
.success-state > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.form-header p bdi {
  color: #e9e4d9;
  font-weight: 700;
}

.field {
  margin-bottom: 19px;
}

.field label,
.label-row label {
  display: inline-block;
  margin: 0 2px 8px;
  color: #e8e3d8;
  font-size: 12.5px;
  font-weight: 700;
}

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

.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
}

.text-button:hover {
  color: var(--gold-light);
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
  height: 54px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.027);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.input-shell:focus-within {
  border-color: rgba(243, 189, 78, 0.64);
  background: rgba(243, 189, 78, 0.035);
  box-shadow: 0 0 0 4px rgba(243, 189, 78, 0.07), inset 0 0 24px rgba(243, 189, 78, 0.02);
}

.field.has-error .input-shell,
.input-shell.has-error {
  border-color: rgba(255, 107, 112, 0.7);
  box-shadow: 0 0 0 4px rgba(255, 107, 112, 0.065);
}

.field.has-success .input-shell {
  border-color: rgba(79, 199, 138, 0.5);
}

.input-shell input {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 48px 0 43px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  caret-color: var(--gold);
  font-size: 14px;
}

.input-shell input::placeholder {
  color: #69665f;
}

.input-icon {
  position: absolute;
  z-index: 2;
  right: 16px;
  color: #77736a;
  pointer-events: none;
}

.input-icon svg {
  width: 19px;
  height: 19px;
}

.ltr-shell .input-icon {
  right: auto;
  left: 16px;
}

.ltr-shell input {
  padding-right: 48px;
  padding-left: 46px;
  text-align: left;
}

.at-sign {
  position: absolute;
  z-index: 2;
  right: 16px;
  color: #817b70;
  font: 600 15px Arial, sans-serif;
}

.ltr-shell .at-sign + input {
  padding-right: 40px;
}

.password-toggle {
  position: absolute;
  z-index: 2;
  right: 8px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #77736a;
  cursor: pointer;
}

.password-toggle:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #c9c2b5;
}

.password-toggle svg {
  width: 19px;
  height: 19px;
}

.password-toggle .eye-closed,
.password-toggle.is-visible .eye-open {
  display: none;
}

.password-toggle.is-visible .eye-closed {
  display: block;
}

.field-message {
  min-height: 16px;
  margin: 6px 3px 0;
  color: #79756c;
  font-size: 10.8px;
  line-height: 1.5;
}

.field.has-error .field-message,
.field-message.is-error {
  color: var(--danger);
}

.field.has-success .field-message,
.field-message.is-success {
  color: var(--green);
}

.field-message.centered {
  text-align: center;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 21px;
}

.check-control {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #aaa59a;
  cursor: pointer;
  font-size: 11.5px;
  line-height: 1.8;
  user-select: none;
}

.check-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-check {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.025);
  transition: 180ms ease;
}

.check-control input:focus-visible + .custom-check {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.check-control input:checked + .custom-check {
  border-color: var(--gold);
  background: linear-gradient(145deg, var(--gold-light), var(--gold-deep));
  box-shadow: 0 3px 12px rgba(243, 189, 78, 0.2);
}

.check-control input:checked + .custom-check::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 5px;
  width: 5px;
  height: 8px;
  transform: rotate(45deg);
  border-right: 2px solid #211704;
  border-bottom: 2px solid #211704;
}

.form-alert {
  display: none;
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 107, 112, 0.2);
  border-radius: 10px;
  background: rgba(255, 107, 112, 0.06);
  color: #ff9498;
  font-size: 11.5px;
  line-height: 1.7;
}

.form-alert.is-visible {
  display: block;
  animation: viewEnter 240ms ease both;
}

.primary-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 54px;
  overflow: hidden;
  padding: 0 22px;
  border: 1px solid #f5c966;
  border-radius: var(--radius-md);
  background: linear-gradient(115deg, #9f6816 0%, #f4c353 42%, #b67818 100%);
  box-shadow: 0 9px 26px rgba(191, 124, 22, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  color: #211703;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.primary-button::before {
  content: "";
  position: absolute;
  top: -80%;
  left: -35%;
  width: 24%;
  height: 260%;
  transform: rotate(22deg);
  background: rgba(255, 255, 255, 0.45);
  filter: blur(2px);
  transition: left 600ms ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  filter: saturate(1.08) brightness(1.04);
  box-shadow: 0 13px 34px rgba(191, 124, 22, 0.27), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.primary-button:hover::before {
  left: 120%;
}

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

.primary-button:disabled {
  transform: none;
  filter: grayscale(0.25);
  opacity: 0.65;
}

.button-arrow {
  position: absolute;
  left: 18px;
  width: 18px;
  height: 18px;
  stroke-width: 2.3;
}

.button-loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(32, 22, 3, 0.25);
  border-top-color: #201603;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.primary-button.is-loading .button-label,
.primary-button.is-loading .button-arrow {
  display: none;
}

.primary-button.is-loading .button-loader {
  display: block;
}

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

.switch-copy {
  margin: 23px 0 0;
  color: #8f8b82;
  text-align: center;
  font-size: 11.8px;
}

.switch-copy button {
  padding: 1px 3px;
  border: 0;
  background: none;
  color: var(--blue);
  cursor: pointer;
  font-weight: 800;
}

.switch-copy button:hover {
  color: #8bc2ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.demo-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px dashed rgba(243, 189, 78, 0.18);
  border-radius: 12px;
  background: rgba(243, 189, 78, 0.035);
}

.demo-account div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.demo-account strong {
  color: #c9c1b0;
  font-size: 10.5px;
}

.demo-account span {
  color: #77736b;
  font: 11px Arial, sans-serif;
}

.demo-account button {
  padding: 6px 10px;
  border: 1px solid rgba(243, 189, 78, 0.22);
  border-radius: 8px;
  background: rgba(243, 189, 78, 0.08);
  color: var(--gold);
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 800;
}

.register-topbar {
  display: flex;
  align-items: center;
  gap: 11px;
}

.round-button {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  color: #a7a298;
  cursor: pointer;
  transition: 180ms ease;
}

.round-button:hover {
  border-color: rgba(243, 189, 78, 0.28);
  background: rgba(243, 189, 78, 0.06);
  color: var(--gold);
}

.round-button svg {
  width: 18px;
  height: 18px;
}

.step-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.step-copy span {
  color: #77736b;
  font-size: 9.5px;
}

.step-copy strong {
  margin-top: 2px;
  color: #d8d2c5;
  font-size: 12px;
}

.step-counter {
  color: var(--gold);
  font: 700 11px Arial, sans-serif;
}

.progress-track {
  height: 3px;
  margin-top: 15px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.055);
}

.progress-track span {
  display: block;
  width: 33.333%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-light));
  box-shadow: 0 0 12px rgba(243, 189, 78, 0.42);
  transition: width 500ms cubic-bezier(.2, .8, .2, 1);
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 18px;
  color: #77736b;
  font-size: 10px;
  line-height: 1.7;
}

.privacy-note svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: #8e7d55;
}

.demo-code-box {
  margin: -7px 0 22px;
  padding: 13px;
  border: 1px dashed rgba(243, 189, 78, 0.27);
  border-radius: 13px;
  background: linear-gradient(100deg, rgba(243, 189, 78, 0.07), rgba(163, 21, 34, 0.035));
  text-align: center;
}

.demo-code-box span,
.demo-code-box small {
  display: block;
  color: #8d877b;
  font-size: 9.5px;
}

.demo-code-box strong {
  display: block;
  margin: 4px 0;
  color: var(--gold-light);
  font: 800 21px/1.25 Arial, sans-serif;
  letter-spacing: 0.18em;
  text-shadow: 0 0 14px rgba(243, 189, 78, 0.3);
}

.otp-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.otp-inputs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.otp-inputs input {
  width: 100%;
  min-width: 0;
  aspect-ratio: 0.87;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  caret-color: var(--gold);
  text-align: center;
  font: 800 19px Arial, sans-serif;
  transition: 180ms ease;
}

.otp-inputs input:focus {
  border-color: var(--gold);
  background: rgba(243, 189, 78, 0.05);
  box-shadow: 0 0 0 3px rgba(243, 189, 78, 0.07);
  transform: translateY(-2px);
}

.otp-inputs.has-error input {
  border-color: rgba(255, 107, 112, 0.62);
  animation: inputShake 320ms ease;
}

@keyframes inputShake {
  25% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
}

.resend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 17px;
  color: #817d74;
  font-size: 10.8px;
}

.resend-row button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold);
  cursor: pointer;
  font-weight: 800;
}

.resend-row button:disabled {
  display: none;
}

.avatar-section {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.022);
}

.avatar-picker {
  position: relative;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  overflow: visible;
  padding: 0;
  border: 1px solid rgba(243, 189, 78, 0.3);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(243, 189, 78, 0.09), rgba(163, 21, 34, 0.08));
  color: #9d8e6d;
  cursor: pointer;
}

.avatar-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.avatar-placeholder svg {
  width: 31px;
  height: 31px;
}

.avatar-picker > img {
  width: 100%;
  height: 100%;
  border-radius: 21px;
  object-fit: cover;
}

.camera-badge {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 2px solid #15130f;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--gold-light), var(--gold-deep));
  color: #271a04;
}

.camera-badge svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.avatar-section > div:last-child {
  min-width: 0;
}

.avatar-section strong {
  display: block;
  color: #ded8cc;
  font-size: 12px;
}

.avatar-section strong span {
  margin-right: 4px;
  color: #77736b;
  font-size: 9.5px;
  font-weight: 500;
}

.avatar-section p {
  margin: 4px 0 2px;
  color: #77736b;
  font-size: 9.5px;
}

.has-status input {
  padding-right: 40px;
  padding-left: 74px;
}

.availability-icon {
  position: absolute;
  right: auto;
  left: 43px;
  display: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
}

.availability-icon.is-checking {
  display: block;
  border: 2px solid rgba(243, 189, 78, 0.2);
  border-top-color: var(--gold);
  animation: spin 700ms linear infinite;
}

.availability-icon.is-available,
.availability-icon.is-taken {
  display: grid;
  place-items: center;
  font: 900 10px Arial, sans-serif;
}

.availability-icon.is-available {
  background: rgba(79, 199, 138, 0.16);
  color: var(--green);
}

.availability-icon.is-available::before { content: "✓"; }
.availability-icon.is-taken { background: rgba(255, 107, 112, 0.14); color: var(--danger); }
.availability-icon.is-taken::before { content: "×"; font-size: 14px; }

.username-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 2px 0;
}

.username-suggestions::before {
  content: "پیشنهادها:";
  align-self: center;
  color: #77736b;
  font-size: 9.5px;
}

.username-suggestions button {
  padding: 4px 7px;
  border: 1px solid rgba(243, 189, 78, 0.15);
  border-radius: 7px;
  background: rgba(243, 189, 78, 0.045);
  color: #c9b174;
  cursor: pointer;
  font: 10px Arial, sans-serif;
}

.password-meter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin: 8px 2px 0;
  direction: ltr;
}

.password-meter span {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  transition: background 200ms ease, box-shadow 200ms ease;
}

.password-meter[data-score="1"] span:nth-child(-n+1) { background: var(--danger); }
.password-meter[data-score="2"] span:nth-child(-n+2) { background: #ed9340; }
.password-meter[data-score="3"] span:nth-child(-n+3) { background: var(--gold); }
.password-meter[data-score="4"] span { background: var(--green); box-shadow: 0 0 8px rgba(79, 199, 138, 0.2); }

.terms-control {
  margin: 2px 1px 9px;
}

.terms-control button {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold);
  cursor: pointer;
  font-weight: 700;
}

.terms-message {
  margin: 0 3px 14px;
}

.success-state {
  padding: 45px 3px 15px;
  text-align: center;
}

.success-mark {
  position: relative;
  display: grid;
  width: 82px;
  height: 82px;
  margin: 0 auto 24px;
  place-items: center;
  border: 1px solid rgba(243, 189, 78, 0.42);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 189, 78, 0.17), rgba(243, 189, 78, 0.03));
  color: var(--gold-light);
  box-shadow: 0 0 0 9px rgba(243, 189, 78, 0.025), 0 0 42px rgba(243, 189, 78, 0.12);
  animation: successPop 600ms cubic-bezier(.18, .9, .22, 1.4) both;
}

.success-mark::after {
  content: "";
  position: absolute;
  inset: -13px;
  border: 1px dashed rgba(243, 189, 78, 0.19);
  border-radius: 50%;
  animation: slowRotate 14s linear infinite;
}

.success-mark svg {
  width: 38px;
  height: 38px;
  stroke-width: 2.4;
  animation: checkDraw 500ms 300ms ease both;
}

@keyframes successPop {
  from { opacity: 0; transform: scale(.55); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes checkDraw {
  from { stroke-dasharray: 28; stroke-dashoffset: 28; }
  to { stroke-dasharray: 28; stroke-dashoffset: 0; }
}

.success-state > p {
  margin: 11px auto 28px;
  max-width: 330px;
}

.success-state > p strong {
  color: var(--gold-light);
  font-family: Arial, sans-serif;
}

.app-preview {
  padding-top: 6px;
  text-align: center;
}

.app-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.welcome-avatar {
  display: grid;
  width: 92px;
  height: 92px;
  margin: 15px auto 19px;
  overflow: hidden;
  place-items: center;
  border: 2px solid rgba(243, 189, 78, 0.7);
  border-radius: 29px;
  background: linear-gradient(145deg, rgba(243, 189, 78, 0.17), rgba(163, 21, 34, 0.16));
  color: var(--gold-light);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3), 0 0 0 6px rgba(243, 189, 78, 0.03);
  font-size: 34px;
  font-weight: 900;
}

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

.app-preview h1 {
  font-size: 28px;
}

.welcome-id {
  margin: 5px 0 27px;
  color: var(--gold);
  font: 700 13px Arial, sans-serif;
}

.next-stage-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px;
  border: 1px solid rgba(243, 189, 78, 0.15);
  border-radius: 15px;
  background: linear-gradient(100deg, rgba(243, 189, 78, 0.065), rgba(163, 21, 34, 0.045));
  text-align: right;
}

.stage-icon {
  display: grid;
  flex: 0 0 auto;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--gold-light), var(--gold-deep));
  color: #2c1d04;
  font-size: 23px;
  box-shadow: 0 8px 18px rgba(164, 102, 15, 0.2);
}

.next-stage-card strong {
  color: #ded7c9;
  font-size: 12px;
}

.next-stage-card p {
  margin: 5px 0 0;
  color: #7e7a71;
  font-size: 10.5px;
  line-height: 1.7;
}

.responsible-note {
  margin-top: 15px;
  color: #77736b;
  font-size: 9.7px;
}

.responsible-note span {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 6px;
  border: 1px solid rgba(255, 107, 112, 0.24);
  border-radius: 5px;
  color: #d27679;
  font: 700 9px Arial, sans-serif;
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  color: #5f5c56;
  font-size: 9.5px;
}

.auth-footer button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.auth-footer button:hover { color: #969189; }
.footer-divider { width: 3px; height: 3px; border-radius: 50%; background: #4c4943; }

.mobile-brand {
  display: none;
}

.showcase {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: clamp(38px, 5vw, 82px);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.54)),
    radial-gradient(circle at 50% 31%, rgba(174, 25, 35, 0.34), transparent 33%),
    radial-gradient(circle at 50% 50%, rgba(243, 189, 78, 0.11), transparent 44%),
    #080705;
  isolation: isolate;
}

.showcase::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle, black, transparent 72%);
}

.showcase::after {
  content: "";
  position: absolute;
  z-index: -1;
  bottom: -18%;
  left: 4%;
  width: 92%;
  height: 44%;
  transform: perspective(420px) rotateX(62deg);
  border-top: 1px solid rgba(243, 189, 78, 0.13);
  border-radius: 50%;
  background: radial-gradient(ellipse at top, rgba(243, 189, 78, 0.08), transparent 60%);
}

.brand-emblem {
  position: relative;
  width: min(33vh, 285px);
  min-width: 205px;
  margin: -2vh auto 22px;
  aspect-ratio: 1;
  border: 1px solid rgba(243, 189, 78, 0.38);
  border-radius: 32%;
  background: rgba(0, 0, 0, 0.45);
  box-shadow:
    0 0 0 8px rgba(243, 189, 78, 0.025),
    0 24px 70px rgba(0, 0, 0, 0.5),
    0 0 55px rgba(188, 27, 35, 0.12),
    inset 0 0 40px rgba(243, 189, 78, 0.05);
  animation: emblemFloat 6s ease-in-out infinite;
}

.brand-emblem::before,
.brand-emblem::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 37%;
  border: 1px solid rgba(243, 189, 78, 0.11);
}

.brand-emblem::before { inset: -18px; }
.brand-emblem::after { inset: -35px; border-style: dashed; animation: slowRotate 28s linear infinite; }

.brand-emblem img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.emblem-glow {
  position: absolute;
  z-index: -2;
  inset: -28%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 31, 40, 0.2), rgba(243, 189, 78, 0.08) 30%, transparent 67%);
  filter: blur(10px);
}

@keyframes emblemFloat {
  50% { transform: translateY(-8px); }
}

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

.showcase-copy {
  max-width: 620px;
  text-align: center;
}

.showcase-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
  color: #a69d8c;
  font-size: 11px;
  font-weight: 700;
}

.showcase-label i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red-light);
  box-shadow: 0 0 11px rgba(230, 91, 98, 0.75);
}

.showcase-copy h2 {
  margin: 0;
  color: #f4efe3;
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.055em;
}

.showcase-copy h2 em {
  background: linear-gradient(90deg, #bd7b1c, #ffe5a5, #bf7f20);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: normal;
  text-shadow: 0 8px 38px rgba(243, 189, 78, 0.08);
}

.showcase-copy p {
  max-width: 520px;
  margin: 13px auto 0;
  color: #8f897e;
  font-size: 12.5px;
  line-height: 2;
}

.trust-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.trust-pills span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #837e74;
  font-size: 9.5px;
}

.trust-pills svg {
  width: 15px;
  height: 15px;
  color: #9c895d;
}

.trust-pills b {
  color: #c7797d;
  font: 800 9px Arial, sans-serif;
}

.showcase-suit {
  position: absolute;
  z-index: -1;
  color: rgba(243, 189, 78, 0.03);
  font-family: Georgia, serif;
  line-height: 1;
  user-select: none;
}

.suit-one { top: 8%; left: 7%; font-size: 160px; transform: rotate(-16deg); }
.suit-two { right: 7%; bottom: 7%; color: rgba(179, 26, 36, 0.05); font-size: 190px; transform: rotate(13deg); }

.gold-orbit {
  position: absolute;
  z-index: -2;
  border: 1px solid rgba(243, 189, 78, 0.055);
  border-radius: 50%;
}

.orbit-one { width: 76vh; height: 76vh; }
.orbit-two { width: 96vh; height: 96vh; border-style: dashed; }

.toast {
  position: fixed;
  z-index: 20;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 12px 15px;
  transform: translate(-50%, 24px);
  border: 1px solid rgba(243, 189, 78, 0.2);
  border-radius: 12px;
  background: rgba(20, 18, 14, 0.97);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.45);
  color: #d8d1c4;
  opacity: 0;
  pointer-events: none;
  font-size: 11px;
  line-height: 1.6;
  transition: 300ms ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast-icon {
  display: grid;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid rgba(243, 189, 78, 0.27);
  border-radius: 50%;
  color: var(--gold);
  font: 700 11px Georgia, serif;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 1080px) {
  .auth-layout { grid-template-columns: minmax(400px, .95fr) minmax(440px, 1.05fr); }
  .showcase { padding-inline: 38px; }
  .showcase-copy h2 { font-size: 39px; }
  .brand-emblem { width: min(29vh, 245px); }
}

@media (max-width: 840px) {
  body { overflow-y: auto; }
  .auth-layout { display: block; }
  .showcase { display: none; }
  .auth-panel {
    min-height: 100vh;
    min-height: 100svh;
    padding: max(22px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
    border: 0;
    background:
      radial-gradient(circle at 50% 0%, rgba(164, 25, 34, 0.15), transparent 31%),
      linear-gradient(180deg, #090807, #060605);
  }
  .mobile-brand {
    display: flex;
    align-items: center;
    align-self: flex-start;
    gap: 10px;
    width: min(100%, 500px);
    margin: 0 auto 18px;
  }
  .mobile-brand img {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(243, 189, 78, 0.35);
    border-radius: 14px;
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.4);
  }
  .mobile-brand div { display: flex; flex-direction: column; }
  .mobile-brand strong { font-size: 15px; font-weight: 900; }
  .mobile-brand span { color: var(--gold); font: 700 9px Arial, sans-serif; letter-spacing: .14em; }
  .auth-card { max-height: none; overflow: visible; }
}

@media (max-width: 540px) {
  .auth-panel { justify-content: flex-start; padding-inline: 13px; }
  .mobile-brand { padding-inline: 5px; }
  .auth-card { padding: 25px 19px; border-radius: 23px; }
  .demo-ribbon { margin-bottom: 20px; }
  .form-header { margin-bottom: 24px; }
  .form-header h1, .success-state h1 { font-size: 27px; }
  .input-shell { height: 52px; }
  .primary-button { height: 52px; }
  .otp-inputs { gap: 6px; }
  .otp-inputs input { border-radius: 10px; font-size: 17px; }
  .profile-header { margin-bottom: 20px; }
  .avatar-section { padding: 12px; }
  .avatar-picker { width: 64px; height: 64px; border-radius: 19px; }
  .avatar-picker > img { border-radius: 18px; }
  .auth-footer { margin-top: 17px; }
}

@media (max-width: 360px) {
  .auth-card { padding-inline: 15px; }
  .otp-inputs { gap: 4px; }
  .avatar-section { gap: 11px; }
  .avatar-section p { font-size: 8.7px; }
}

@media (min-height: 900px) and (min-width: 841px) {
  .auth-card { max-height: calc(100svh - 150px); }
}

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