/* ═══════════════════════════════════════════════════════════════
   AUTH UI — Split Panel Layout
   ═══════════════════════════════════════════════════════════════ */

/* Layout Container */
.auth-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6rem 1rem 2rem; /* Account for navbar */
}

.auth-shell {
  width: 100%;
  max-width: 1200px;
  background: transparent;
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
  }
}

/* ── LEFT PANEL (Image & Quote) ── */
.auth-panel-left {
  display: flex;
  position: relative;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  overflow: hidden;
  color: white;
  min-height: 250px;
  border-radius: 1rem 1rem 0 0;
}

@media (min-width: 900px) {
  .auth-panel-left {
    padding: 3rem;
    min-height: auto;
    border-radius: 0;
  }
}

.auth-panel-left-bg {
  position: absolute;
  inset: 0;
  transition: background-image 0.5s ease-in-out;
  z-index: 1;
}

/* Bottom gradient overlay so text is readable */
.auth-panel-left::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  background: linear-gradient(to top, #020617, transparent);
  z-index: 2;
}

.auth-panel-left-content {
  position: relative;
  z-index: 3;
  text-align: center;
}

/* Typewriter Quote Area */
.auth-panel-quote {
  padding-bottom: 1rem;
}

.auth-panel-quote blockquote {
  margin: 0;
}

.auth-typewriter-text {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  min-height: 3.5rem; /* Prevent layout shift while typing */
}

.auth-panel-cite {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  font-style: normal;
}

.typewriter-cursor {
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}


/* ── RIGHT PANEL (Form) ── */
.auth-panel-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

.auth-form-wrap {
  width: 100%;
  max-width: 350px; /* Matched to w-[350px] from React */
}

.auth-kicker {
  display: none; /* Removed kicker to match screenshot exactly */
}

.auth-title {
  font-size: 1.5rem; /* Matched text-2xl */
  font-weight: 700;
  color: var(--v-text, #fff);
  margin-bottom: 0.5rem;
  text-align: center;
}

.auth-desc {
  color: var(--v-text, #94a3b8);
  font-size: 0.875rem; /* text-sm */
  line-height: 1.5;
  margin-bottom: 2rem;
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--v-text, #e2e8f0);
}

.auth-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input {
  width: 100%;
  padding: 0.75rem 0.75rem;
  background: var(--v-bg, #020617);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem; /* rounded-lg */
  color: var(--v-text, #fff);
  font-size: 0.875rem; /* text-sm */
  transition: all 0.2s ease;
  font-family: inherit;
}

.auth-input::placeholder {
  color: var(--v-text, #94a3b8);
  opacity: 0.5;
}

.auth-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
  background: var(--v-bg, #020617);
}

/* Password eye toggle */
.auth-input--password {
  padding-right: 3rem; /* Make room for icon */
}

/* Removes default eye icon in Edge/IE */
.auth-input--password::-ms-reveal,
.auth-input--password::-ms-clear {
  display: none;
}

.auth-toggle-password {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--v-text, #94a3b8);
  opacity: 0.7;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: opacity 0.2s, background 0.2s;
}

.auth-toggle-password:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
}

.auth-toggle-password svg {
  width: 1rem;
  height: 1rem;
}

.auth-btn-submit {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  background: transparent;
  color: var(--v-text, #fff);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.375rem; /* rounded-md */
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-btn-submit:hover {
  background: rgba(255, 255, 255, 0.1);
}

.auth-links {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--v-text, #94a3b8);
  opacity: 0.8;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-links a {
  color: var(--v-text, #fff);
  font-weight: 500;
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.auth-links a:hover {
  opacity: 0.8;
}

.auth-forgot-link {
  font-weight: 400;
  opacity: 0.8;
  text-decoration: none !important;
}

.auth-forgot-link:hover {
  text-decoration: underline !important;
  opacity: 1;
}

.auth-divider {
  display: none;
}

.auth-links {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--v-text, #94a3b8);
  opacity: 0.8;
}

.auth-links a {
  color: var(--v-primary, #06b6d4);
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.auth-links a:hover {
  opacity: 0.8;
}

.auth-divider {
  margin: 0 0.75rem;
  opacity: 0.3;
}

/* Light theme specific overrides */
body.light-theme .auth-input {
  border-color: rgba(0, 0, 0, 0.2);
  background: #ffffff;
}

body.light-theme .auth-input:focus {
  border-color: var(--v-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

body.light-theme .auth-btn-submit {
  background: var(--v-primary);
  color: #ffffff;
  border-color: transparent;
}

body.light-theme .auth-btn-submit:hover {
  background: var(--v-text);
  color: #ffffff;
}

body.light-theme .auth-toggle-password {
  color: var(--v-text);
}

body.light-theme .auth-toggle-password:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* ═══════════════════════════════════════════════════════════════
   OTP VERIFICATION NUMBER ANIMATION & INPUTS
   ═══════════════════════════════════════════════════════════════ */
.otp-field {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.otp-group {
  position: relative;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.otp-box {
  width: 3.5rem;
  height: 4rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--v-bg, #020617);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--v-text, #fff);
  font-size: 1.75rem;
  font-weight: 800;
  font-family: 'Space Grotesk', ui-monospace, monospace;
  text-align: center;
  caret-color: var(--v-primary, #06b6d4);
  outline: none;
  -moz-appearance: textfield;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.otp-box::-webkit-outer-spin-button,
.otp-box::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.otp-box:hover {
  border-color: rgba(6, 182, 212, 0.5);
}

.otp-box:focus {
  background: var(--v-bg, #020617);
  border-color: var(--v-primary, #06b6d4);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2), 0 10px 20px -5px rgba(6, 182, 212, 0.3);
}

.otp-box.pop {
  animation: otp-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes otp-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.otp-hint {
  font-size: 0.8rem;
  color: var(--v-text, #94a3b8);
  opacity: 0.75;
  text-align: center;
}

/* Success state animation */
.otp-success {
  position: absolute;
  inset: -0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: radial-gradient(circle at center, rgba(2, 6, 23, 0.96) 40%, rgba(2, 6, 23, 0.9));
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 1rem;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10;
}

.otp-group.is-success .otp-success {
  opacity: 1;
  transform: scale(1);
}

.otp-group.is-success .otp-box {
  animation: otp-exit 0.3s ease forwards;
}

@keyframes otp-exit {
  to { opacity: 0; transform: scale(0.7); }
}

.otp-check {
  width: 3.2rem;
  height: 3.2rem;
}

.otp-check circle {
  fill: none;
  stroke: var(--v-primary, #06b6d4);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.65));
  animation: otp-draw 0.55s ease-out forwards;
}

.otp-check path {
  fill: none;
  stroke: #fff;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: otp-draw 0.4s ease-out 0.4s forwards;
}

@keyframes otp-draw {
  to { stroke-dashoffset: 0; }
}

.otp-success-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5rem;
  height: 5rem;
  margin: -2.5rem 0 0 -2.5rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.3), transparent 70%);
  animation: otp-glow 1.5s ease-out infinite;
}

@keyframes otp-glow {
  from { transform: scale(0.5); opacity: 1; }
  to { transform: scale(1.5); opacity: 0; }
}

.otp-ok {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--v-primary, #06b6d4);
  opacity: 0;
  animation: otp-fade-up 0.4s ease 0.55s forwards;
}

@keyframes otp-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 420px) {
  .otp-box { width: 3rem; height: 3.5rem; font-size: 1.5rem; border-radius: 0.5rem; }
  .otp-group { gap: 0.5rem; }
}

/* Light theme overrides for OTP */
body.light-theme .otp-box {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #0f172a;
}

body.light-theme .otp-box:focus {
  background: #ffffff;
  border-color: var(--v-primary, #06b6d4);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

body.light-theme .otp-success {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(6, 182, 212, 0.4);
}

body.light-theme .otp-check path {
  stroke: #0f172a;
}
