/* ============================================================
   Auth Pages — Login / OTP / Register
   Tokens: --primary, --dark, etc. (from theme settings)
   ============================================================ */

.auth-page {
    min-height: calc(100vh - 100px);
    padding: 140px 0 60px;
    background: linear-gradient(135deg, var(--section-bg, #f8fafc) 0%, #fff 100%);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -150px;
    inset-inline-start: -150px;
    width: 460px; height: 460px;
    background: rgba(25, 150, 117, 0.08);
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
}

.auth-page::after {
    content: '';
    position: absolute;
    bottom: -180px;
    inset-inline-end: -180px;
    width: 520px; height: 520px;
    background: rgba(25, 150, 117, 0.05);
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
}

.auth-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    border: 1px solid #eef2f7;
    position: relative;
    z-index: 2;
}

.auth-card-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 540px;
}

.auth-card-illustration {
    background: linear-gradient(135deg, #0f172a 0%, var(--dark, #1e293b) 100%);
    color: #fff;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-card-illustration::before {
    content: '';
    position: absolute;
    top: -100px;
    inset-inline-end: -100px;
    width: 280px; height: 280px;
    background: rgba(25,150,117,0.22);
    border-radius: 50%;
    filter: blur(80px);
}

.auth-card-illustration::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: 0.5;
    pointer-events: none;
}

.auth-illustration-content { position: relative; z-index: 2; }

.auth-illustration-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(25, 150, 117, 0.18);
    color: #5eead4;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: 1px solid rgba(25, 150, 117, 0.3);
    margin-bottom: 20px;
}

.auth-illustration-content h2 {
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    font-weight: 900;
    line-height: 1.3;
    margin: 0 0 16px;
}

.auth-illustration-content p {
    color: #cbd5e1;
    font-size: 1.02rem;
    line-height: 1.85;
    margin: 0 0 28px;
}

.auth-illustration-features {
    display: flex; flex-direction: column; gap: 14px;
    position: relative; z-index: 2;
}

.auth-illustration-features li {
    display: flex; align-items: center; gap: 12px;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.auth-illustration-features li i {
    width: 32px; height: 32px;
    background: rgba(25,150,117,0.18);
    color: var(--primary, #199675);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
}

.auth-card-form {
    padding: 50px 44px;
    display: flex; flex-direction: column;
    justify-content: center;
}

.auth-form-header { margin-bottom: 32px; }

.auth-form-header h3 {
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--dark, #1e293b);
    margin: 0 0 6px;
}

.auth-form-header p {
    color: var(--text-muted, #64748b);
    font-size: 0.95rem;
    margin: 0;
}

/* Form fields ------------------------------------------------ */
.auth-form .form-label {
    color: var(--dark, #1e293b);
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 8px;
    display: block;
}

.auth-input-group {
    display: flex;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    transition: 0.3s;
}

.auth-input-group:focus-within {
    border-color: var(--primary, #199675);
    box-shadow: 0 0 0 4px rgba(25, 150, 117, 0.12);
}

.auth-input-group .country-code-wrap {
    flex: 0 0 auto;
    border-inline-end: 1px solid var(--border, #e2e8f0);
    background: var(--section-bg, #f8fafc);
    min-width: 110px;
}

.auth-input-group .country-code-wrap .select2-container,
.auth-input-group .country-code-wrap select { width: 100% !important; }

.auth-input-group .country-code-wrap .select2-selection {
    border: none !important;
    background: transparent !important;
    height: 56px !important;
    display: flex; align-items: center;
}

.auth-input-group .country-code-wrap .select2-selection__rendered {
    line-height: 56px !important;
    padding-inline-start: 14px !important;
    padding-inline-end: 28px !important;
}

.auth-input-group input.form-control {
    flex: 1;
    border: none !important;
    height: 56px;
    padding: 0 18px;
    font-size: 1rem;
    background: transparent;
    box-shadow: none !important;
    outline: none !important;
}

.auth-input-group input.form-control::placeholder {
    color: var(--text-light, #94a3b8);
}

.flag-img {
    width: 22px;
    height: auto;
    border-radius: 3px;
    margin-inline-end: 4px;
    vertical-align: middle;
}

.auth-error {
    color: var(--danger, #ef4444);
    font-size: 0.85rem;
    margin-top: 6px;
    display: block;
}

/* Submit button ---------------------------------------------- */
.auth-submit-btn {
    width: 100%;
    background: var(--primary, #199675);
    color: #fff;
    border: none;
    height: 54px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.02rem;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 12px 28px rgba(25, 150, 117, 0.32);
}

.auth-submit-btn:hover:not(:disabled) {
    background: var(--primary-dark, #0f5c46);
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(25, 150, 117, 0.4);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-submit-btn .spinner-border-sm { width: 1rem; height: 1rem; }

/* OTP inputs ------------------------------------------------- */
.auth-otp-inputs {
    display: flex; gap: 10px;
    direction: ltr;
    justify-content: space-between;
    margin-bottom: 8px;
}

.auth-otp-inputs .otp-field {
    flex: 1;
    aspect-ratio: 1;
    max-width: 56px;
    height: auto;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark, #1e293b);
    border: 2px solid var(--border, #e2e8f0);
    border-radius: 14px;
    background: #fff;
    transition: 0.2s;
}

.auth-otp-inputs .otp-field:focus {
    border-color: var(--primary, #199675);
    box-shadow: 0 0 0 4px rgba(25, 150, 117, 0.15);
    outline: none;
}

.auth-otp-inputs .otp-field:disabled {
    background: var(--section-bg, #f8fafc);
    color: var(--text-light, #94a3b8);
}

/* Or divider + demo button ----------------------------------- */
.auth-or {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0 18px;
    color: var(--text-muted, #64748b);
    font-size: 0.85rem;
}

.auth-or::before, .auth-or::after {
    content: '';
    flex: 1; height: 1px;
    background: var(--border, #e2e8f0);
}

.auth-demo-btn {
    width: 100%;
    background: #fff;
    color: var(--dark, #1e293b);
    border: 1px solid var(--border, #e2e8f0);
    height: 50px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-demo-btn:hover {
    background: var(--primary, #199675);
    color: #fff;
    border-color: var(--primary, #199675);
}

/* Footer link ------------------------------------------------ */
.auth-footer-line {
    text-align: center;
    margin-top: 22px;
    color: var(--text-muted, #64748b);
    font-size: 0.95rem;
}

.auth-footer-line a {
    color: var(--primary, #199675);
    font-weight: 800;
    text-decoration: none;
    margin-inline-start: 4px;
}

.auth-footer-line a:hover { text-decoration: underline; }

.auth-resend {
    background: none;
    border: none;
    color: var(--primary, #199675);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 4px;
    padding: 0 4px;
}
.auth-resend:hover { color: var(--primary-dark, #0f5c46); }

/* Responsive ------------------------------------------------- */
@media (max-width: 991px) {
    .auth-card-row { grid-template-columns: 1fr; }
    .auth-card-illustration { padding: 40px 30px; min-height: 300px; }
    .auth-card-form { padding: 40px 30px; }
}

@media (max-width: 575px) {
    .auth-page { padding: 120px 0 40px; }
    .auth-card-form { padding: 30px 22px; }
    .auth-card-illustration { padding: 32px 22px; }
    .auth-otp-inputs .otp-field { max-width: 46px; font-size: 1.2rem; border-radius: 12px; }
}
