/* Auth enhancements: animated background + input actions
   Uses existing color palette (primary: #023E73, success: #F27052)
*/

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(120deg, rgba(2,62,115,0.06), rgba(167,228,242,0.04));
  overflow: hidden;
}

/* animated moving gradient */
.auth-bg::before,
.auth-bg::after {
  content: '';
  position: absolute;
  width: 60vw;
  height: 60vh;
  border-radius: 40%;
  filter: blur(50px);
  opacity: 0.35;
  transform: translate3d(0,0,0);
}

.auth-bg::before {
  left: -10vw;
  top: -10vh;
  background: radial-gradient(circle at 30% 30%, #023E73, transparent 30%);
  animation: float1 10s ease-in-out infinite;
}

.auth-bg::after {
  right: -10vw;
  bottom: -10vh;
  background: radial-gradient(circle at 70% 70%, #F27052, transparent 30%);
  animation: float2 12s ease-in-out infinite;
}

@keyframes float1 {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(6vh) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes float2 {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6vh) scale(1.08); }
  100% { transform: translateY(0) scale(1); }
}

/* ensure main content appears above background */
.login-page, .register-page { z-index: 1; }

/* input action wrapper */
.input-with-action { position: relative; display: flex; align-items: center; }
.input-with-action .form-input,
.input-with-action input { width: 100%; }

.show-pass-btn {
  position: absolute;
  left: 10px; /* RTL layout, icon on left */
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  color: #6c757d;
    /* use original brand colors with subtle gradient */
    background: radial-gradient(1200px circle at 10% 20%, rgba(2,62,115,0.10), transparent 15%),
                radial-gradient(1000px circle at 90% 80%, rgba(167,228,242,0.08), transparent 18%),
                linear-gradient(120deg, rgba(2,62,115,0.03), rgba(167,228,242,0.02));
}
.show-pass-btn:hover { background: rgba(0,0,0,0.04); color: #333; }


/* password strength */
.password-strength { margin-top: 10px; display: none; gap: 8px; align-items: center; }
.password-strength .strength-bar { height: 8px; width: 120px; background: #e9ecef; border-radius: 6px; overflow: hidden; }
.password-strength .strength-bar::after { content: ''; display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #ff6b6b, #ffc107, #F27052); transition: width 0.3s; }
.password-strength .strength-text { color: #6c757d; font-size: 13px; }

/* inner fill element for JS-driven bar */
.password-strength .strength-bar .bar-fill { height: 100%; width: 0%; border-radius: 6px; }

/* live-validation */
.form-input.valid { box-shadow: 0 0 0 4px rgba(167,228,242,0.08); border-color: #F27052; }
.form-input.invalid { box-shadow: 0 0 0 4px rgba(220,53,69,0.06); border-color: #dc3545; }

/* small responsive tweak: lower z-index for background on small screens */
@media (max-width: 720px) {
  .auth-bg::before {
    left: -14vw;
    top: -12vh;
    width: 65vw;
    height: 65vh;
    background: radial-gradient(circle at 30% 30%, rgba(2,62,115,0.95), rgba(2,62,115,0.6) 30%, transparent 60%);
    animation: float1 12s ease-in-out infinite;
  }
  .auth-bg::after {
    right: -14vw;
    bottom: -12vh;
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle at 70% 70%, rgba(167,228,242,0.9), rgba(167,228,242,0.5) 30%, transparent 60%);
    animation: float2 14s ease-in-out infinite;
  }
  .auth-card { margin: 20px; padding: 18px; }
  .form-input { padding-left: 38px; }
  .submit-button, .auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(2,62,115,0.12);
  }
  .submit-button:disabled { opacity: 0.7; cursor: not-allowed; }
  .auth-btn--primary:hover, .submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(2,62,115,0.20);
  }
  .auth-btn--secondary {
    background: #fff;
    color: #333;
    border: 1px solid #dee2e6;
    box-shadow: none;
  }
}

/* phone/start button style */
.btn-start-phone {
  background: linear-gradient(180deg, #F27052, #d45e3e);
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
.btn-start-phone:hover { transform: translateY(-2px); }

/* small icon buttons (show-pass-btn) refinement */
.show-pass-btn { display: inline-flex; align-items: center; justify-content: center; }
.show-pass-btn .icon { color: #495057; }
.show-pass-btn:focus { outline: 3px solid rgba(2,62,115,0.12); }

/* ensure links near buttons look balanced */
.register-link { color: #023E73; font-weight: 600; }
.register-link:hover { text-decoration: underline; }

/* Auth card and field icons */
.auth-card {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.12);
  max-width: 420px;
  margin: 12px auto;
}
.auth-card .form-group { position: relative; margin-bottom: 14px; }
.field-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #6c757d; pointer-events: none; }
.form-input { padding: 12px 14px 12px 40px; border-radius: 8px; border: 1px solid #e6e6e6; transition: box-shadow 150ms ease, border-color 150ms ease, transform 150ms ease; background: #fff; }
.form-input:focus { box-shadow: 0 8px 20px rgba(2,62,115,0.08); border-color: #023E73; transform: translateY(-1px); outline: none; }
.form-input::placeholder { color: #adb5bd; }

/* Button ripple */
.submit-button { position: relative; overflow: hidden; }
.submit-button .ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,0.35); animation: ripple 600ms linear; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* make background shapes more lively */
.auth-bg::before { filter: blur(60px); opacity: 0.45; }
.auth-bg::after { filter: blur(80px); opacity: 0.35; }

/* responsive tweaks */
@media (max-width: 720px) {
  .auth-card { margin: 20px; padding: 18px; }
  .form-input { padding-left: 38px; }
}

