/* =============================
   Global Reset & Brand Variables
============================= */
*,
*::before,
*::after {
    box-sizing: border-box; /* include padding/border in width */
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; /* prevent horizontal scroll */
    font-family: 'Inter', 'Poppins', system-ui, sans-serif;
    background: linear-gradient(135deg, #e0f2ff, #fff2e6);
}

/* =============================
   Auth Container
============================= */
.auth-container {
    display: flex;
    min-height: 90vh;
    flex-wrap: wrap;
}

/* =============================
   Left Side - Lottie + Animated Text
============================= */
.auth-left {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    gap: 0.75rem;
    text-align: center;
    position: relative;
    max-width: 100%;
}

.auth-left::after {
    content: "";
    position: absolute;
    top: 10%;
    right: 0;
    height: 80%;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--brand-dark), var(--accent), transparent);
    border-radius: 2px;
}

.auth-left lottie-player {
    max-width: 300px;
    width: 100%;
    height: auto;
}

.auth-left h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0.25rem 0;
    opacity: 0;
    animation: fadeSlideUp 1s ease forwards;
    animation-delay: 0.5s;
}

.auth-left p {
    font-size: 1.1rem;
    color: var(--accent);
    margin: 0;
    opacity: 0;
    animation: fadeSlideUp 1s ease forwards;
    animation-delay: 1s;
}

/* =============================
   Right Side - Register/Login Form
============================= */
.auth-right {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    max-width: 100%;
}

.auth-box {
    width: 100%;
    max-width: 450px;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-smooth);
}

.auth-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.15);
}

.auth-box h3 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

.auth-box p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* =============================
   Form Fields
============================= */
.form-control {
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    padding-left: 2.5rem; /* space for icon */
    transition: var(--transition-fast);
}

.form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

/* Checkbox */
.form-check-input {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
}

/* Buttons */
.btn-register,
.btn-login {
    background: linear-gradient(90deg, var(--brand), var(--accent));
    color: #fff;
    border: none;
    padding: 0.75rem;
    border-radius: 50px;
    font-weight: 600;
    width: 100%;
    transition: var(--transition-base);
}

.btn-register:hover,
.btn-login:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Input Icons */
.position-relative i {
    font-size: 1rem;
}

#togglePassword {
    right: 0.75rem;
    cursor: pointer;
}

/* =============================
   OTP Modal Styling
============================= */
#otpModal .modal-content {
    border-radius: 12px;
    border: none;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

#otpModal .modal-header {
    border-bottom: none;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
}

#otpModal .modal-title {
    color: var(--text);
    font-weight: 600;
    font-size: 1.25rem;
}

#otpModal .btn-close {
    position: absolute;
    top: 15px;
    right: 15px;
}

#otpModal .modal-body {
    padding: 2rem 1.5rem;
    text-align: center;
}

#otpModal p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* OTP Inputs */
.otp-container,
#otpInputs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.otp-digit {
    width: 3rem;
    height: 3rem;
    font-size: 1.5rem;
    text-align: center;
    border-radius: 8px;
    border: 2px solid var(--border);
    box-sizing: border-box;
    padding: 0;
    transition: border 0.3s, box-shadow 0.3s;
}

.otp-digit:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
}

/* Error / Success Messages */
#otpError,
#resendMsg {
    font-size: 0.85rem;
}

/* Resend Link */
#otpModal a#resendOtp,
#otpModal a#resendOtpLink {
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 600;
    color: var(--brand);
}

#otpModal a#resendOtp:hover,
#otpModal a#resendOtpLink:hover {
    color: var(--brand-dark);
}

/* Modal Footer Buttons */
#otpModal .modal-footer {
    border-top: none;
    justify-content: center;
    padding: 1.25rem;
}

#otpModal .btn-primary {
    background-color: var(--brand);
    border-color: var(--brand);
    padding: 0.6rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#otpModal .btn-primary:hover {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
}

#otpModal .btn-secondary {
    padding: 0.6rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    background-color: #f1f5f9;
    color: var(--text);
    border: none;
}

#otpModal .btn-secondary:hover {
    background-color: #e2e8f0;
}

/* =============================
   Responsive
============================= */
@media (max-width: 768px) {
    .auth-left, .auth-right {
        flex: 1 1 100%;
        padding: 1rem;
    }
    .auth-left {
        order: 2;
    }
    .auth-right {
        order: 1;
    }

    #otpModal .modal-dialog {
        max-width: 95%;
        margin: 1rem auto;
    }

    .otp-digit {
        width: 2.8rem;
        height: 2.8rem;
        font-size: 1.4rem;
    }
}

@media (max-width: 576px) {
    .otp-digit {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }

    #otpModal .modal-body {
        padding: 1.5rem 1rem;
    }
}

/* =============================
   Animations
============================= */
@keyframes fadeSlideUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}



.role-container {
  display: flex;
  gap: 6px;
  margin: 8px 0;
  justify-content: space-between;
  flex-wrap: wrap;
}

.role-card {
  flex: 1;
  border: 1px solid #2563eb;
  border-radius: 10px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  background-color: #fff;
  font-weight: 500;
  font-size: 0.85rem;
  color: #1e3a8a;
  text-align: center;
  transition: transform 0.2s, background 0.2s;
}

.role-card:hover {
  background-color: #f1f5f9;
  transform: translateY(-2px);
}

.check {
  display: none;
  color: #fff;
  font-size: 0.7rem;
  background-color: #2563eb;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  text-align: center;
  line-height: 14px;
  position: absolute;
  top: 50%;          /* vertical center */
  right: 4px;        /* small padding from right edge */
  transform: translateY(-50%); /* center vertically */
}

.role-card.selected .check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* Responsive */
@media (max-width: 576px) {
  .role-container {
    gap: 6px;
  }
  .role-card {
    min-width: 90px;
    font-size: 0.8rem;
    padding: 5px 6px;
  }
}

/* ==============================
   Premium Login Redirect Loader
============================== */
#loginRedirectLoader {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
}

/* Card */
.login-loader-card {
  background: #fff;
  padding: 40px 42px;
  border-radius: 16px;
  text-align: center;
  width: 280px;
  box-shadow:
    0 10px 30px rgba(0,0,0,0.06),
    0 2px 8px rgba(0,0,0,0.04);
  animation: scaleIn 0.35s ease;
}

/* Brand */
.login-loader-logo {
  width: 120px;
  margin-bottom: 18px;
}

/* Spinner */
.premium-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 16px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--brand, #0d6efd);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

/* Text */
.login-loader-text {
  font-size: 0.95rem;
  color: #6b7280;
  font-weight: 500;
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}


