/* Pooshino auth — professional animated login / register */

.auth-page {
  min-height: 100svh;
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  overflow-x: clip;
}

.auth-layout {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
}

/* —— Visual panel (animated) —— */
.auth-visual {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-content: end;
  padding: clamp(32px, 5vw, 64px);
  color: #fff;
  background:
    radial-gradient(ellipse 70% 55% at 20% 15%, rgba(59, 111, 232, 0.35), transparent 55%),
    radial-gradient(ellipse 50% 45% at 90% 80%, rgba(26, 86, 214, 0.28), transparent 50%),
    linear-gradient(155deg, #0b1c36 0%, #122844 48%, #0d213f 100%);
}

.auth-visual-atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.auth-wash {
  position: absolute;
  inset: -15%;
  background:
    radial-gradient(ellipse 45% 40% at 50% 40%, rgba(147, 180, 255, 0.18), transparent 65%),
    radial-gradient(ellipse 35% 30% at 70% 20%, rgba(26, 86, 214, 0.25), transparent 60%);
  animation: auth-wash 14s ease-in-out infinite alternate;
}

.auth-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(6px);
}

.auth-glow-a {
  width: min(70vw, 520px);
  height: min(70vw, 520px);
  top: -18%;
  inset-inline-start: -12%;
  background: radial-gradient(circle, rgba(59, 111, 232, 0.4), transparent 68%);
  animation: auth-drift 16s ease-in-out infinite alternate;
}

.auth-glow-b {
  width: min(50vw, 380px);
  height: min(50vw, 380px);
  bottom: -10%;
  inset-inline-end: -8%;
  background: radial-gradient(circle, rgba(26, 86, 214, 0.35), transparent 70%);
  animation: auth-drift 18s ease-in-out infinite alternate-reverse;
}

.auth-geometry {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(45deg, transparent 47.5%, #93b4ff 49%, #93b4ff 51%, transparent 52.5%),
    linear-gradient(-45deg, transparent 47.5%, #93b4ff 49%, #93b4ff 51%, transparent 52.5%);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 70% 65% at 45% 45%, black 20%, transparent 75%);
  animation: auth-geo 26s linear infinite;
}

.auth-orbit {
  position: absolute;
  top: 42%;
  left: 48%;
  border: 1.5px solid rgba(147, 180, 255, 0.28);
  border-radius: 50%;
  translate: -50% -50%;
}

.auth-orbit-a {
  width: min(58vw, 420px);
  height: min(58vw, 420px);
  animation: auth-orbit-spin 32s linear infinite;
}

.auth-orbit-b {
  width: min(40vw, 290px);
  height: min(40vw, 290px);
  border-style: dashed;
  border-color: rgba(147, 180, 255, 0.2);
  animation: auth-orbit-spin 44s linear infinite reverse;
}

.auth-orbit::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 50%;
  width: 9px;
  height: 9px;
  margin-inline-start: -4.5px;
  margin-top: -4.5px;
  border-radius: 2px;
  background: #93b4ff;
  box-shadow: 0 0 18px rgba(147, 180, 255, 0.55);
  transform: rotate(45deg);
}

.auth-diamond {
  position: absolute;
  width: 11px;
  height: 11px;
  border: 1.5px solid rgba(147, 180, 255, 0.45);
  border-radius: 2px;
  transform: rotate(45deg);
  animation: auth-float 7s ease-in-out infinite;
}

.auth-diamond-1 { top: 18%; inset-inline-start: 16%; }
.auth-diamond-2 { top: 28%; inset-inline-end: 18%; width: 8px; height: 8px; animation-delay: 1.2s; opacity: 0.7; }
.auth-diamond-3 { bottom: 34%; inset-inline-start: 28%; width: 9px; height: 9px; animation-delay: 2s; }

.auth-visual-copy {
  position: relative;
  z-index: 1;
  max-width: 420px;
  animation: auth-rise 0.8s var(--ease-out) both;
}

.auth-visual-logo {
  width: 72px;
  height: 72px;
  margin: 0 0 20px;
  padding: 12px;
  box-sizing: border-box;
  border-radius: 18px;
  display: block;
  object-fit: contain;
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-hover) 100%);
  box-shadow: 0 16px 36px rgba(26, 86, 214, 0.35);
}

.auth-visual-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 600;
  color: #c7d7fa;
}

.auth-visual-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7dd3a8;
  box-shadow: 0 0 0 4px rgba(125, 211, 168, 0.2);
  animation: auth-pulse 2s ease-in-out infinite;
}

.auth-visual-copy h2 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-visual-copy p {
  margin: 14px 0 0;
  color: #b8c5d8;
  font-size: 15px;
  line-height: 1.95;
}

.auth-visual-points {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.auth-visual-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 500;
  color: #e8eef8;
  animation: auth-rise 0.7s var(--ease-out) both;
}

.auth-visual-points li:nth-child(1) { animation-delay: 0.15s; }
.auth-visual-points li:nth-child(2) { animation-delay: 0.25s; }
.auth-visual-points li:nth-child(3) { animation-delay: 0.35s; }

.auth-visual-points li span {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(26, 86, 214, 0.45);
  color: #c7d7fa;
}

/* —— Form panel —— */
.auth-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(28px, 4vw, 48px) clamp(20px, 4vw, 40px);
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(26, 86, 214, 0.08), transparent 55%),
    linear-gradient(180deg, #f7f8fc 0%, var(--background) 100%);
}

.auth-panel-inner {
  width: min(100%, 420px);
  animation: auth-rise 0.75s var(--ease-out) 0.08s both;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--text-primary);
  text-decoration: none;
}

.auth-brand:hover {
  color: var(--text-primary);
}

.auth-brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-hover) 100%);
  box-shadow: 0 10px 24px rgba(26, 86, 214, 0.28);
}

.auth-brand-mark img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  display: block;
}

.auth-brand-text {
  display: grid;
  gap: 1px;
  line-height: 1.15;
}

.auth-brand-word {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-brand-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.auth-card {
  width: 100%;
  padding: clamp(24px, 3.5vw, 36px);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88));
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(12px);
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary-soft) 60%, var(--border));
  background: color-mix(in srgb, var(--primary-light) 65%, white);
  color: var(--primary-hover);
  font-size: 12px;
  font-weight: 700;
}

.auth-card h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-lede {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.9;
}

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

.auth-page .field span {
  font-weight: 600;
  color: var(--text-primary);
}

.auth-page .input {
  min-height: 52px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border-color: var(--border);
  background: var(--surface);
  font-size: 16px;
  letter-spacing: 0.02em;
  transition: border-color var(--duration) ease, box-shadow var(--duration) ease, transform var(--duration-fast) ease;
}

.auth-page .input:hover {
  border-color: var(--border-strong);
}

.auth-page .input:focus {
  border-color: var(--primary);
  box-shadow: var(--focus);
  transform: translateY(-1px);
}

.auth-submit {
  margin-top: 4px;
  min-height: 52px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 14px 34px rgba(26, 86, 214, 0.28);
  transition: background var(--duration-fast) ease, box-shadow var(--duration) ease, transform 120ms ease;
}

.auth-submit:hover:not(:disabled) {
  box-shadow: 0 16px 40px rgba(26, 86, 214, 0.34);
}

.auth-submit.is-loading {
  position: relative;
  color: transparent !important;
}

.auth-submit.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: auth-spin 0.7s linear infinite;
}

.auth-foot {
  margin: 22px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-foot a {
  font-weight: 700;
  color: var(--primary-hover);
}

.auth-foot a:hover {
  color: var(--primary);
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  transition: color var(--duration-fast) ease, gap var(--duration) var(--ease-out);
}

.auth-back:hover {
  color: var(--primary-hover);
  gap: 9px;
}

.auth-page .form-status {
  min-height: 1.4em;
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-page .form-status.err {
  color: var(--error);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--error-soft);
}

.auth-panel-inner.is-wide {
  width: min(100%, 520px);
}

.auth-otp {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  direction: ltr;
}

.auth-otp input {
  flex: 1 1 0;
  min-width: 0;
  max-width: 52px;
  height: 56px;
  padding: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-primary);
  transition: border-color var(--duration) ease, box-shadow var(--duration) ease, transform var(--duration-fast) ease;
}

.auth-otp input:hover {
  border-color: var(--border-strong);
}

.auth-otp input:focus {
  border-color: var(--primary);
  box-shadow: var(--focus);
  outline: none;
  transform: translateY(-1px);
}

.auth-dev-otp {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px dashed color-mix(in srgb, var(--primary-soft) 55%, var(--border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--primary-light) 45%, white);
}

.auth-page .hidden {
  display: none !important;
}

.auth-dev-otp > .caption {
  display: block;
  margin: 0;
  color: var(--text-muted);
}

.auth-dev-otp p {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--text-primary);
}

.auth-dev-otp strong {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.18em;
  color: var(--primary-hover);
  direction: ltr;
  display: inline-block;
}

.auth-dev-otp .auth-dev-note {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-code {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.auth-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.auth-actions {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.auth-actions .btn {
  border-radius: var(--radius-md);
}

.auth-actions .btn-primary {
  border-radius: 999px;
  min-height: 52px;
  font-weight: 700;
  box-shadow: 0 14px 34px rgba(26, 86, 214, 0.28);
}

@media (max-width: 480px) {
  .auth-otp {
    gap: 6px;
  }

  .auth-otp input {
    height: 48px;
    font-size: 18px;
  }
}

@keyframes auth-wash {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-2%, 3%, 0); }
}

@keyframes auth-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4%, 6%, 0) scale(1.1); }
}

@keyframes auth-geo {
  from { background-position: 0 0, 0 0; }
  to { background-position: 52px 52px, -52px 52px; }
}

@keyframes auth-orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@keyframes auth-float {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.5; }
  50% { transform: rotate(45deg) translateY(-12px); opacity: 0.95; }
}

@keyframes auth-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(125, 211, 168, 0.18); }
  50% { box-shadow: 0 0 0 7px rgba(125, 211, 168, 0.08); }
}

@keyframes auth-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-wash,
  .auth-glow,
  .auth-geometry,
  .auth-orbit,
  .auth-diamond,
  .auth-visual-kicker::before,
  .auth-visual-copy,
  .auth-visual-points li,
  .auth-panel-inner,
  .auth-submit.is-loading::after {
    animation: none !important;
  }
}

@media (max-width: 960px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 240px;
    align-content: center;
    padding: 28px 24px;
    order: -1;
  }

  .auth-visual-copy h2 {
    font-size: 24px;
  }

  .auth-visual-points {
    display: none;
  }

  .auth-orbit-a {
    width: 280px;
    height: 280px;
  }

  .auth-orbit-b {
    width: 190px;
    height: 190px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 22px 18px;
    border-radius: var(--radius-xl);
  }

  .auth-panel {
    padding: 20px 16px 32px;
  }
}
