/* ============================================================
   iNeed — Auth Page Styles
   ============================================================ */

.auth-body {
    background: linear-gradient(145deg, #EFF6FF 0%, #F8FAFC 60%, #F0FDF4 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Card ── */
.auth-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 32px rgba(30, 64, 175, .1), 0 1px 4px rgba(0,0,0,.05);
    padding: 40px 36px;
    width: 100%;
    max-width: 440px;
}

@media (max-width: 480px) {
    .auth-card { padding: 28px 20px; border-radius: 16px; }
}

/* ── Brand ── */
.auth-brand {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    display: inline-block;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    text-decoration: none;
    line-height: 1;
    margin-bottom: 6px;
}

.auth-logo .i { color: #1E40AF; }
.auth-logo .need { color: #1E293B; }

.auth-tagline {
    color: #94A3B8;
    font-size: 13px;
    margin: 0;
}

/* ── Heading ── */
.auth-heading {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}

.auth-subheading {
    color: #64748B;
    font-size: 14px;
    margin: 0 0 24px;
}

/* ── Form elements ── */
.auth-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.auth-input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    background: #F8FAFC;
    color: #1E293B;
    transition: border-color .15s, box-shadow .15s, background .15s;
    outline: none;
    -webkit-appearance: none;
}

.auth-input:focus {
    border-color: #3B82F6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.auth-input::placeholder { color: #CBD5E1; }

.auth-input.is-invalid {
    border-color: #EF4444;
    background: #FFF5F5;
}

/* Password wrapper (show/hide toggle) */
.password-wrap {
    position: relative;
}

.password-wrap .auth-input {
    padding-right: 46px;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94A3B8;
    padding: 4px;
    display: flex;
    align-items: center;
    font-size: 18px;
    transition: color .15s;
}

.password-toggle:hover { color: #64748B; }

/* ── Form group spacing ── */
.auth-group { margin-bottom: 18px; }
.auth-group:last-of-type { margin-bottom: 0; }

/* ── Error list ── */
.auth-errors {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    list-style: none;
}

.auth-errors li {
    color: #DC2626;
    font-size: 13.5px;
    padding: 2px 0;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.auth-errors li::before {
    content: '✕';
    flex-shrink: 0;
    font-size: 11px;
    margin-top: 2px;
}

/* ── Primary button ── */
.auth-btn {
    display: block;
    width: 100%;
    padding: 13px;
    background: #1E40AF;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
    margin-top: 24px;
    letter-spacing: 0.1px;
}

.auth-btn:hover   { background: #1d3a9e; }
.auth-btn:active  { transform: scale(.99); }
.auth-btn:disabled {
    background: #93C5FD;
    cursor: not-allowed;
    transform: none;
}

/* Loading spinner inside button */
.auth-btn .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

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

/* ── Links ── */
.auth-link {
    color: #1E40AF;
    font-weight: 600;
    text-decoration: none;
    transition: color .12s;
}
.auth-link:hover { color: #1d3a9e; text-decoration: underline; }

/* ── Divider ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #CBD5E1;
    font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E2E8F0;
}

/* ── Footer text (sign up / log in switch) ── */
.auth-switch {
    text-align: center;
    font-size: 14px;
    color: #64748B;
    margin-top: 20px;
}

/* ── Forgot password link ── */
.auth-forgot {
    text-align: right;
    margin-top: 6px;
    font-size: 12.5px;
}

/* ── OTP boxes ── */
.otp-boxes {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 24px 0;
}

.otp-box {
    width: 52px;
    height: 58px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    background: #F8FAFC;
    color: #1E40AF;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
}

.otp-box:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
    background: #fff;
}

.otp-box.filled { border-color: #1E40AF; background: #EFF6FF; }

@media (max-width: 380px) {
    .otp-box { width: 42px; height: 50px; font-size: 20px; gap: 6px; }
    .otp-boxes { gap: 6px; }
}

/* ── Resend OTP ── */
.otp-resend {
    text-align: center;
    font-size: 13.5px;
    color: #64748B;
    margin-top: 4px;
}

/* ── Password strength indicator ── */
.strength-bar {
    height: 4px;
    border-radius: 2px;
    background: #E2E8F0;
    margin-top: 8px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width .3s, background .3s;
    width: 0%;
}

.strength-label {
    font-size: 11.5px;
    margin-top: 4px;
    font-weight: 500;
}

/* ── Phone input with flag ── */
.phone-wrap {
    display: flex;
    align-items: center;
    gap: 0;
}

.phone-prefix {
    padding: 12px 12px;
    background: #F1F5F9;
    border: 1.5px solid #E2E8F0;
    border-right: none;
    border-radius: 10px 0 0 10px;
    font-size: 14px;
    color: #64748B;
    font-weight: 500;
    white-space: nowrap;
}

.phone-wrap .auth-input {
    border-radius: 0 10px 10px 0;
    flex: 1;
}

/* ── Back to home ── */
.auth-back {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
}

.auth-back a {
    color: #94A3B8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color .12s;
}
.auth-back a:hover { color: #64748B; }
