/* ── Auth pages shared CSS ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ══════════════════════════════════════════════════════════════
   KEYFRAME ANIMATIONS
══════════════════════════════════════════════════════════════ */

/* Entry: fade + slide up */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* Entry: fade only */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Badge float variants (different phases so they don't sync) */
@keyframes floatA {
    0%,100% { transform: translateY(0px)   rotate(-1deg); }
    50%     { transform: translateY(-10px) rotate(1deg);  }
}
@keyframes floatB {
    0%,100% { transform: translateY(-5px)  rotate(1deg);  }
    50%     { transform: translateY(6px)   rotate(-1deg); }
}
@keyframes floatC {
    0%,100% { transform: translateY(2px)   rotate(0deg);  }
    50%     { transform: translateY(-8px)  rotate(1.5deg);}
}

/* Ring icon subtle pulse */
@keyframes iconPulse {
    0%,100% { opacity: .5; transform: scale(1);    }
    50%     { opacity: .7; transform: scale(1.06); }
}

/* Dashed ring border slow rotate */
@keyframes spinCW {
    from { transform: rotate(0deg);   }
    to   { transform: rotate(360deg); }
}
@keyframes spinCCW {
    from { transform: rotate(0deg);    }
    to   { transform: rotate(-360deg); }
}

/* Background blob drift */
@keyframes blobDrift {
    0%,100% { transform: translate(0,0)      scale(1);    }
    33%     { transform: translate(12px,-18px) scale(1.05); }
    66%     { transform: translate(-10px,10px) scale(.96); }
}

/* Stats pop in */
@keyframes popIn {
    from { opacity: 0; transform: scale(.8) translateY(12px); }
    to   { opacity: 1; transform: scale(1)  translateY(0);    }
}

/* Shimmer line sweep on sign-in button */
@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}

body {
    min-height: 100vh;
    display: flex;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: #f0f4f8;
}

/* ── Wrapper ────────────────────────────────────────────────── */
.auth-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ══════════════════════════════════════════════════════════════
   LEFT PANEL
══════════════════════════════════════════════════════════════ */
.auth-left {
    flex: 0 0 50%;
    background: linear-gradient(160deg, #e8f4ff 0%, #d0e8ff 45%, #b4d4f8 100%);
    display: flex;
    flex-direction: column;
    padding: 36px 44px;
    position: relative;
    overflow: hidden;
}

/* Decorative blobs — animated drift */
.auth-left::before {
    content: '';
    position: absolute;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: rgba(255,255,255,.38);
    top: -130px; right: -100px;
    pointer-events: none;
    animation: blobDrift 9s ease-in-out infinite;
}
.auth-left::after {
    content: '';
    position: absolute;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,.22);
    bottom: 80px; left: -80px;
    pointer-events: none;
    animation: blobDrift 12s ease-in-out infinite reverse;
}

.auth-left-logo { margin-bottom: 24px; position: relative; z-index: 1;
    animation: fadeSlideUp .6s ease both; }
.auth-left-logo img { height: 46px; }

.auth-left-copy { position: relative; z-index: 1; }
.auth-left-copy h1 {
    font-size: 36px; font-weight: 800; color: #0f172a;
    line-height: 1.2; margin-bottom: 12px;
    animation: fadeSlideUp .65s ease .1s both;
}
.auth-left-copy h1 .hl { color: #1a56db; }
.auth-left-copy p {
    font-size: 14px; color: #475569; line-height: 1.75; max-width: 340px;
    animation: fadeSlideUp .65s ease .2s both;
}

/* ── Illustration with ring ─────────────────────────────────── */
.auth-left-visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 20px 0;
    animation: fadeIn .7s ease .3s both;
}
.illus-ring {
    width: 220px; height: 220px;
    border-radius: 50%;
    background: rgba(26,86,219,.08);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    flex-shrink: 0;
}
.illus-ring::before {
    content: '';
    position: absolute;
    inset: -22px;
    border-radius: 50%;
    border: 1.5px dashed rgba(26,86,219,.28);
    animation: spinCW 14s linear infinite;
}
.illus-ring::after {
    content: '';
    position: absolute;
    inset: -44px;
    border-radius: 50%;
    border: 1px dashed rgba(26,86,219,.14);
    animation: spinCCW 20s linear infinite;
}
.illus-ring-icon {
    font-size: 80px; color: #1a56db;
    animation: iconPulse 3.5s ease-in-out infinite;
}
.illus-badge {
    position: absolute;
    background: #fff;
    border-radius: 24px;
    padding: 8px 14px;
    display: flex; align-items: center; gap: 7px;
    font-size: 12px; font-weight: 600; color: #0f172a;
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
    white-space: nowrap;
}
.illus-badge i { font-size: 15px; color: #1a56db; }
.illus-b1 { top: 8px;    left: -36px;  animation: floatA 3.2s ease-in-out infinite; }
.illus-b2 { top: 8px;    right: -36px; animation: floatB 3.8s ease-in-out infinite; }
.illus-b3 { bottom: 16px; left: -24px; animation: floatC 4.4s ease-in-out infinite; }

/* ── Stats glass cards ──────────────────────────────────────── */
.auth-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
    position: relative; z-index: 1;
}
.auth-stat {
    background: rgba(255,255,255,.55);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    transition: transform .2s, box-shadow .2s;
}
.auth-stat:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(26,86,219,.12); }
.auth-stat:nth-child(1) { animation: popIn .5s ease .45s both; }
.auth-stat:nth-child(2) { animation: popIn .5s ease .55s both; }
.auth-stat:nth-child(3) { animation: popIn .5s ease .65s both; }
.auth-stat i { font-size: 18px; color: #1a56db; display: block; margin-bottom: 4px; }
.auth-stat-num  { font-size: 18px; font-weight: 800; color: #0f172a; line-height: 1; }
.auth-stat-text { font-size: 10.5px; color: #64748b; margin-top: 3px; line-height: 1.3; }

.auth-trust {
    display: flex; align-items: center; gap: 7px;
    font-size: 12.5px; color: #475569; font-weight: 500;
    position: relative; z-index: 1;
    animation: fadeSlideUp .5s ease .75s both;
}

/* ══════════════════════════════════════════════════════════════
   RIGHT PANEL
══════════════════════════════════════════════════════════════ */
.auth-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #f5f7fa;
}

.auth-card {
    width: 100%;
    max-width: 500px;
    background: #fff;
    border-radius: 20px;
    padding: 36px 40px 28px;
    box-shadow: 0 2px 24px rgba(0,0,0,.07);
    animation: fadeSlideUp .6s ease .1s both;
}

/* Card header: icon + title */
.auth-card-hdr {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 28px;
}
.auth-avatar {
    width: 58px; height: 58px; border-radius: 50%;
    background: #eff6ff;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; color: #1a56db; flex-shrink: 0;
}
.auth-card-hdr h2  { font-size: 22px; font-weight: 800; color: #0f172a; margin-bottom: 3px; }
.auth-card-hdr p   { font-size: 13px; color: #94a3b8; margin: 0; }

/* Section label */
.af-section-label { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 10px; display: block; }

/* Role cards grid */
.role-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}
.role-card {
    position: relative;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 6px 12px;
    text-align: center;
    cursor: pointer;
    transition: all .18s;
    background: #fff;
    user-select: none;
}
.role-card:hover {
    border-color: #93c5fd; background: #f0f7ff;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(26,86,219,.1);
}
.role-card.active {
    border-color: #1a56db; background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(26,86,219,.18);
}
.role-icon-wrap {
    width: 48px; height: 48px; border-radius: 50%;
    background: #f1f5f9;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px;
    font-size: 22px; color: #64748b;
    transition: all .18s;
}
.role-card:hover .role-icon-wrap { background: #e0eeff; color: #3b82f6; }
.role-card.active .role-icon-wrap { background: #dbeafe; color: #1a56db; }
.role-card-name {
    font-size: 11px; font-weight: 600; color: #475569; line-height: 1.3;
    transition: color .18s;
}
.role-card.active .role-card-name { color: #1a56db; }
.role-check {
    position: absolute; top: 7px; right: 7px;
    width: 18px; height: 18px; border-radius: 50%;
    background: #1a56db; color: #fff; font-size: 10px;
    display: none; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(26,86,219,.35);
}
.role-card.active .role-check { display: flex; }
.role-error { font-size: 12px; color: #ef4444; margin-top: -12px; margin-bottom: 14px; }

/* Form groups */
.af-group { position: relative; margin-bottom: 16px; }
.af-group .af-icon {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    font-size: 15px; color: #94a3b8; pointer-events: none;
}
.af-group input {
    width: 100%;
    padding: 12px 42px 12px 42px;
    border: 1.5px solid #e2e8f0; border-radius: 10px;
    font-size: 14px; color: #0f172a; background: #f8fafc;
    transition: all .16s; outline: none;
}
.af-group input:focus {
    border-color: #1a56db; background: #fff;
    box-shadow: 0 0 0 3px rgba(26,86,219,.1);
}
.af-group input.is-invalid { border-color: #ef4444; }
.af-toggle {
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: #94a3b8; font-size: 16px; padding: 2px 4px;
    transition: color .15s;
}
.af-toggle:hover { color: #64748b; }

/* Remember me + forgot */
.af-utils {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; font-size: 13px;
}
.af-utils .form-check-label { color: #475569; cursor: pointer; }
.af-forgot { color: #1a56db; font-weight: 600; text-decoration: none; }
.af-forgot:hover { text-decoration: underline; }

/* Submit button with shimmer */
.auth-btn {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg, #1a56db 0%, #2563eb 50%, #1a56db 100%);
    background-size: 200% auto;
    color: #fff; border: none;
    border-radius: 10px; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: background-position .4s, transform .16s, box-shadow .16s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-bottom: 18px; letter-spacing: .2px;
    box-shadow: 0 4px 16px rgba(26,86,219,.3);
}
.auth-btn:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26,86,219,.4);
}
.auth-btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(26,86,219,.3); }

/* Trust line */
.auth-trustline {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    font-size: 12px; color: #94a3b8; margin-bottom: 0;
}
.auth-trustline span { display: flex; align-items: center; gap: 4px; }
.auth-trustline .dot { width: 3px; height: 3px; border-radius: 50%; background: #cbd5e1; }

/* Card footer / page footer */
.auth-card-footer { margin-top: 16px; text-align: center; font-size: 11.5px; color: #94a3b8; line-height: 1.7; }
.auth-page-footer { margin-top: 20px; text-align: center; font-size: 11px; color: #94a3b8; line-height: 1.7; }

/* OTP boxes */
.otp-group { display: flex; gap: 10px; margin-bottom: 6px; }
.otp-box {
    flex: 1;
    height: 54px;
    font-size: 22px; font-weight: 700;
    text-align: center;
    border: 1.5px solid #e2e8f0; border-radius: 10px;
    background: #f8fafc; color: #0f172a;
    outline: none; transition: all .16s;
}
.otp-box:focus { border-color: #1a56db; background: #fff; box-shadow: 0 0 0 3px rgba(26,86,219,.1); }

/* Resend row */
.otp-resend {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; margin-top: 12px; margin-bottom: 20px;
}
.otp-resend .btn-link { font-size: 13px; font-weight: 600; color: #1a56db; padding: 0; border: none; background: none; }
.otp-resend .btn-link:disabled { color: #94a3b8; }

/* Back to login link */
.auth-back { font-size: 13px; color: #64748b; margin-top: 16px; text-align: center; }
.auth-back a { color: #1a56db; font-weight: 600; text-decoration: none; }
.auth-back a:hover { text-decoration: underline; }

/* Mobile number display badge */
.mobile-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: #eff6ff; color: #1a56db;
    font-size: 13px; font-weight: 600;
    padding: 6px 14px; border-radius: 20px;
    margin-bottom: 20px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .auth-left { display: none; }
    .auth-right { background: linear-gradient(160deg, #eaf5ff, #b8d9ff); padding: 24px 16px; }
    .auth-card { padding: 28px 22px 24px; }
    .role-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
    .auth-card { padding: 24px 16px; }
}
