/* =====================================================
   ABC Trainings - Shared Auth Pages Styles
   Used by: Login, OTP Login, Register, Forgot Password
   ===================================================== */

:root {
  --navy-1: #0B2545;
  --navy-2: #153A63;
  --red: #E63946;
  --ink: #1B1F3B;
  --ink-dim: #6B7280;
  --line: #E7E9F3;
  --danger: #DC2626;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

/* Backdrop */
.auth-stage {
  min-height: 100dvh;
  background: linear-gradient(135deg, #1E3555 0%, #2A4468 35%, #355580 65%, #406090 100%);
  background-size: 300% 300%;
  animation: bgShift 16s ease-in-out infinite;
}
@keyframes bgShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Card shell */
.auth-shell {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateY(18px);
  animation: riseIn 0.6s cubic-bezier(0.16, 0.8, 0.3, 1) forwards;
}
@keyframes riseIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Left navy panel */
.auth-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, var(--navy-1) 0%, var(--navy-2) 100%);
  min-height: 100%;
}
.auth-panel .deco {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}
.deco-1 { width: 340px; height: 340px; top: -110px; right: -90px; }
.deco-2 { width: 220px; height: 220px; top: 60px; right: 60px; background: rgba(255, 255, 255, 0.04); }
.deco-3 { width: 260px; height: 260px; bottom: -90px; left: -70px; }

.auth-panel h2 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: clamp(27px, 3.4vw, 40px);
  line-height: 1.3;
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.6s 0.1s ease forwards;
}
.auth-panel .accent { color: var(--red); }
.auth-panel p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 15.5px;
  line-height: 1.65;
  max-width: 360px;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.6s 0.25s ease forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Right form area */
.auth-form-wrap {
  background: #fff;
}
.auth-form-inner {
  width: 100%;
  max-width: 400px;
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 0.55s 0.15s ease forwards;
}

.auth-form-inner h1 {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy-1);
}

.auth-field label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Underline inputs */
.auth-input.form-control {
  background: transparent;
  border: none;
  border-bottom: 2px solid #C7CEDD;
  border-radius: 0;
  padding-left: 0;
  padding-right: 26px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  box-shadow: none;
}
.auth-input.form-control:focus {
  border-bottom-color: var(--red);
  box-shadow: none;
}
.auth-input.form-control::placeholder {
  color: #9199B0;
  font-weight: 400;
}

/* Password toggle */
#toggle_pwd {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--ink-dim);
}
#toggle_pwd:hover {
  color: var(--red);
}

/* Links */
.auth-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy-1) !important;
  text-decoration: none;
}
.auth-link:hover {
  text-decoration: underline;
}

.otp-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-1) !important;
}
.otp-link:hover {
  text-decoration: underline;
}

/* ===== Back to Login link (common for all auth pages) ===== */
.auth-back-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy-1) !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}
.auth-back-link:hover {
  color: var(--red) !important;
  text-decoration: none;
}
.auth-back-link i {
  font-size: 13px;
}

/* Validation error */
.mobile-error {
  font-size: 12.5px;
  color: var(--danger);
  margin-top: 6px;
  display: none;
}

/* ===== Primary Button (SIGN IN / SEND OTP / etc.) ===== */
.btn-auth {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: 50px;
  padding: 16px 24px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(135deg, #F04A57 0%, var(--red) 45%, #C92A37 100%);
  box-shadow:
    0 12px 28px -6px rgba(230, 57, 70, 0.55),
    0 4px 12px -2px rgba(230, 57, 70, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.22s cubic-bezier(0.16, 0.8, 0.3, 1),
              box-shadow 0.22s ease,
              filter 0.22s ease,
              opacity 0.2s ease;
}

.btn-auth:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
}
.btn-auth:disabled::before { display: none; }
.btn-auth:disabled:hover .btn-icon { transform: none; }

.btn-auth::before {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 45%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-22deg);
  transition: left 0.65s cubic-bezier(0.16, 0.8, 0.3, 1);
}
.btn-auth:not(:disabled):hover::before {
  left: 140%;
}
.btn-auth .btn-icon {
  display: inline-block;
  margin-left: 10px;
  transition: transform 0.28s cubic-bezier(0.16, 0.8, 0.3, 1);
}
.btn-auth:not(:disabled):hover .btn-icon {
  transform: translateX(6px);
}
.btn-auth:not(:disabled):hover {
  color: #fff;
  transform: translateY(-4px);
  box-shadow:
    0 18px 36px -6px rgba(230, 57, 70, 0.7),
    0 8px 16px -4px rgba(230, 57, 70, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  filter: brightness(1.12);
}
.btn-auth:not(:disabled):active {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mobile adjustments */
@media (max-width: 576px) {
  .auth-stage { padding: 10px !important; }
  .auth-form-wrap { padding: 24px 20px !important; }
  .auth-form-inner .mb-4 { margin-bottom: 0.9rem !important; }
  .auth-form-inner .mb-3 { margin-bottom: 0.65rem !important; }
  .auth-form-inner h1 { font-size: 19px; }
  .btn-auth { padding: 13px 20px; font-size: 14px; }
  .auth-input.form-control { padding-top: 6px; padding-bottom: 6px; }
  .mt-4 { margin-top: 1rem !important; }
}