/* ===== EDULIM AUTH — Modern Login / Register ===== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --auth-primary: var(--system_primery_color, #6366f1);
    --auth-primary-dark: color-mix(in srgb, var(--auth-primary) 82%, #0f172a);
    --auth-primary-soft: color-mix(in srgb, var(--auth-primary) 12%, #fff);
    --auth-ink: #0f172a;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-bg: #f8fafc;
    --auth-radius: 14px;
    --auth-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif !important;
    background: #eef2ff;
    color: var(--auth-ink);
    -webkit-font-smoothing: antialiased;
}

/* ===== LAYOUT ===== */
.auth_page_outer {
    display: flex;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: #fff;
}

/* ===== LEFT PANEL ===== */
.auth_left_panel {
    width: min(520px, 46vw);
    min-width: 420px;
    min-height: 100vh;
    min-height: 100dvh;
    background: #fff;
    display: flex;
    flex-direction: column;
    padding: clamp(1.25rem, 2.5vw, 2.5rem) clamp(1.5rem, 3vw, 3rem);
    position: relative;
    z-index: 10;
    box-shadow: 8px 0 48px rgba(15, 23, 42, 0.06);
    overflow-y: auto;
}

.auth_left_panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--auth-primary), color-mix(in srgb, var(--auth-primary) 55%, #0ea5e9));
}

.auth_left_inner {
    width: 100%;
    max-width: 400px;
    margin: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 0 2rem;
}

.auth_topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    gap: 12px;
}

.auth_back_link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--auth-muted);
    text-decoration: none !important;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--auth-bg);
    border: 1px solid var(--auth-border);
    transition: all 0.2s ease;
}

.auth_back_link:hover {
    color: var(--auth-primary);
    border-color: color-mix(in srgb, var(--auth-primary) 25%, var(--auth-border));
    background: var(--auth-primary-soft);
}

.auth_logo_area { margin-bottom: 1.5rem; }
.auth_logo_area a { display: inline-block; line-height: 0; }
.auth_logo_area img {
    max-height: 72px;
    width: auto;
    object-fit: contain;
}

.auth_heading { margin-bottom: 1.5rem; }
.auth_heading_kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--auth-primary);
    background: var(--auth-primary-soft);
    border: 1px solid color-mix(in srgb, var(--auth-primary) 18%, transparent);
    padding: 5px 10px;
    border-radius: 999px;
    margin-bottom: 0.85rem;
}

.auth_heading h1 {
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    font-weight: 800;
    color: var(--auth-ink);
    line-height: 1.25;
    margin: 0 0 0.55rem;
    letter-spacing: -0.03em;
}

.auth_heading_accent {
    color: var(--auth-primary);
    display: block;
}

.auth_heading p {
    color: var(--auth-muted);
    font-size: 0.92rem;
    line-height: 1.65;
    margin: 0;
}

/* Mobile hero strip */
.auth_mobile_hero {
    display: none;
    margin-bottom: 1.25rem;
    padding: 1rem 1.1rem;
    border-radius: var(--auth-radius);
    background: linear-gradient(135deg, var(--auth-primary-dark), color-mix(in srgb, var(--auth-primary) 70%, #312e81));
    color: #fff;
    box-shadow: 0 12px 32px color-mix(in srgb, var(--auth-primary) 28%, transparent);
}

.auth_mobile_hero strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.auth_mobile_hero span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.5;
}

/* Social */
.auth_social_row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.65rem;
    margin-bottom: 1.1rem;
}

.auth_social_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.72rem 0.85rem;
    border: 1.5px solid var(--auth-border);
    border-radius: 12px;
    background: #fff;
    color: #334155;
    font-weight: 600;
    font-size: 0.84rem;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.auth_social_btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    text-decoration: none;
}

.auth_social_btn--facebook:hover {
    border-color: #1877f2;
    background: #eff6ff;
    color: #1877f2;
}

.auth_social_btn--google:hover {
    border-color: #ea4335;
    background: #fef2f2;
    color: #ea4335;
}

.auth_social_btn .fab.fa-facebook-f { color: #1877f2; }
.auth_social_btn .fab.fa-google { color: #ea4335; }

.auth_or_divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
}

.auth_or_divider::before,
.auth_or_divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--auth-border), transparent);
}

/* Form fields */
.auth_field { margin-bottom: 1rem; }

.auth_recaptcha_wrap {
    margin: 0.35rem 0 0.85rem !important;
    width: 100% !important;
    min-height: 78px;
    overflow: visible !important;
    position: relative !important;
}

#loginRecaptchaTarget,
#registerRecaptchaTarget,
.auth_recaptcha_wrap .g-recaptcha,
.auth_recaptcha_wrap > div {
    display: block !important;
    position: static !important;
    inset: auto !important;
    margin: 0 !important;
    max-width: 100% !important;
    float: none !important;
    clear: both !important;
    width: auto !important;
    height: auto !important;
}

.auth_field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.42rem;
}

.auth_input_wrap { position: relative; }

.auth_input_wrap i.field_icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 2;
}

.auth_input_wrap input,
.auth_input_wrap select {
    width: 100%;
    padding: 0.82rem 1rem 0.82rem 2.65rem;
    border: 1.5px solid var(--auth-border);
    border-radius: 12px;
    background: var(--auth-bg);
    font-size: 0.92rem;
    color: var(--auth-ink);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
    display: block;
}

.auth_input_wrap--password input {
    padding-right: 2.75rem;
}

.auth_input_wrap input:focus,
.auth_input_wrap select:focus {
    border-color: var(--auth-primary);
    background: #fff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--auth-primary) 14%, transparent);
}

.auth_input_wrap:focus-within i.field_icon {
    color: var(--auth-primary);
}

.auth_input_wrap input.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.auth_toggle_password {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #94a3b8;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
    z-index: 3;
}

.auth_toggle_password:hover {
    color: var(--auth-primary);
    background: var(--auth-primary-soft);
}

.auth_error_msg {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: #ef4444;
    font-weight: 500;
}

.auth_field_hint {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.35;
}

.auth_section_divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1.1rem 0 0.55rem;
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 700;
}

.auth_section_divider::before,
.auth_section_divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth_section_note {
    margin: 0 0 0.85rem;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.45;
}

.auth_input_wrap--select select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 2.2rem;
}

/* Options row */
.auth_row_options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 1.15rem;
}

.auth_remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    color: #475569;
    font-weight: 500;
    margin: 0;
}

.auth_remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--auth-primary);
    cursor: pointer;
}

.auth_forgot {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--auth-primary);
    text-decoration: none !important;
}

.auth_forgot:hover { text-decoration: underline !important; }

/* Submit button */
.auth_login_btn {
    width: 100%;
    padding: 0.92rem 1.5rem;
    background: linear-gradient(135deg, var(--auth-primary), color-mix(in srgb, var(--auth-primary) 78%, #4338ca));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 28px color-mix(in srgb, var(--auth-primary) 32%, transparent);
}

.auth_login_btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.22) 0%, transparent 55%);
    pointer-events: none;
}

.auth_login_btn:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow: 0 14px 34px color-mix(in srgb, var(--auth-primary) 38%, transparent);
}

.auth_login_btn:active:not(:disabled) { transform: translateY(0); }

.auth_login_btn:disabled {
    opacity: 0.72;
    cursor: wait;
}

/* Terms / register */
.auth_terms {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 1.15rem;
    font-size: 0.82rem;
    color: #475569;
}

.auth_terms input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--auth-primary);
    flex-shrink: 0;
}

.auth_terms a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 700;
}

.auth_register_row {
    text-align: center;
    margin-top: 1.35rem;
    font-size: 0.86rem;
    color: var(--auth-muted);
}

.auth_register_row a {
    color: var(--auth-primary);
    font-weight: 800;
    text-decoration: none !important;
}

.auth_register_row a:hover { text-decoration: underline !important; }

.auth_demo_row {
    display: flex;
    gap: 0.45rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.15rem;
    padding-top: 1.15rem;
    border-top: 1px dashed var(--auth-border);
}

.auth_demo_row a {
    padding: 0.42rem 0.85rem;
    background: var(--auth-bg);
    color: #475569;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none !important;
    border: 1px solid var(--auth-border);
    transition: all 0.2s ease;
}

.auth_demo_row a:hover {
    background: var(--auth-primary);
    color: #fff;
    border-color: transparent;
}

/* ===== RIGHT PANEL ===== */
.auth_right_panel {
    flex: 1;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--auth-primary) 35%, transparent), transparent 42%),
        radial-gradient(circle at 85% 10%, rgba(14, 165, 233, 0.22), transparent 38%),
        linear-gradient(145deg, #0b1020 0%, #151433 42%, #1a1145 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 3vw, 2.5rem);
}

.auth_right_panel::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(circle at center, #000 35%, transparent 100%);
}

.auth_blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: authBlobPulse 12s ease-in-out infinite;
}

.auth_blob_1 {
    width: 520px;
    height: 520px;
    opacity: 0.35;
    background: radial-gradient(circle, var(--auth-primary), transparent 70%);
    top: -120px;
    right: -60px;
}

.auth_blob_2 {
    width: 380px;
    height: 380px;
    opacity: 0.28;
    background: radial-gradient(circle, #0ea5e9, transparent 70%);
    bottom: -80px;
    left: -40px;
    animation-delay: -4s;
}

.auth_blob_3 {
    width: 280px;
    height: 280px;
    opacity: 0.22;
    background: radial-gradient(circle, #a855f7, transparent 70%);
    top: 42%;
    left: 28%;
    animation-delay: -8s;
}

@keyframes authBlobPulse {
    0%, 100% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.06) translate(18px, -16px); }
}

.auth_right_content {
    position: relative;
    z-index: 2;
    width: min(560px, 100%);
}

.auth_right_pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    color: #ddd6fe;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.auth_right_content h2 {
    font-size: clamp(1.85rem, 3.2vw, 2.55rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.18;
    margin: 0 0 0.85rem;
    letter-spacing: -0.03em;
}

.auth_right_content > p {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0 0 1.5rem;
    max-width: 46ch;
}

.auth_features {
    display: grid;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.auth_feature_item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.72rem 0.9rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.84rem;
    font-weight: 600;
}

.auth_feature_icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--auth-primary) 35%, rgba(255,255,255,0.08));
    color: #e9d5ff;
    flex-shrink: 0;
    font-size: 0.82rem;
}

.auth_img_wrap {
    position: relative;
    margin-bottom: 1.35rem;
}

.auth_img_inner {
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.auth_right_panel:hover .auth_img_inner {
    transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
}

.auth_img_inner img {
    width: 100%;
    display: block;
    max-height: 260px;
    object-fit: cover;
}

.auth_notif_badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 8px 13px;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--auth-ink);
    white-space: nowrap;
    z-index: 5;
}

.auth_notif_badge_top {
    top: -12px;
    left: -10px;
    animation: authFloatUp 3.6s ease-in-out infinite;
}

.auth_notif_badge_bot {
    bottom: -12px;
    right: -10px;
    animation: authFloatUp 3.6s ease-in-out infinite;
    animation-delay: -1.8s;
}

.auth_notif_badge .notif_dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}

@keyframes authFloatUp {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

.auth_stats_row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
}

.auth_stat_card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    border-radius: 14px;
    padding: 0.9rem 0.65rem;
    text-align: center;
    transition: background 0.25s, transform 0.25s;
}

.auth_stat_card:hover {
    background: rgba(255, 255, 255, 0.11);
    transform: translateY(-2px);
}

.auth_stat_num {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 4px;
}

.auth_stat_label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.52);
    font-weight: 600;
}

.auth_section_title {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

/* Register phone field compat */
.auth_input_wrap--phone .iti { width: 100%; display: block; }
.auth_input_wrap--phone .iti input#phone {
    width: 100% !important;
    padding: 0.82rem 1rem 0.82rem 96px !important;
    border: 1.5px solid var(--auth-border) !important;
    border-radius: 12px !important;
    background: var(--auth-bg) !important;
    font-size: 0.92rem !important;
    color: var(--auth-ink) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .auth_page_outer {
        flex-direction: column;
        background: #fff;
    }

    .auth_left_panel {
        width: 100%;
        min-width: 100%;
        min-height: auto;
        box-shadow: none;
        padding-bottom: 2rem;
    }

    .auth_left_inner {
        max-width: 440px;
    }

    .auth_right_panel {
        display: none !important;
    }

    .auth_mobile_hero {
        display: block;
    }

    .auth_logo_area img {
        max-height: 58px;
    }
}

@media (max-width: 575px) {
    .auth_left_panel {
        padding: 1.15rem 1.1rem 1.75rem;
    }

    .auth_topbar {
        margin-bottom: 1.25rem;
    }

    .auth_social_row {
        grid-template-columns: 1fr;
    }

    .auth_recaptcha_wrap .g-recaptcha,
    .auth_recaptcha_wrap .g-recaptcha > div {
        transform: scale(0.92);
        transform-origin: left top;
    }

    .auth_recaptcha_wrap {
        min-height: 72px;
    }
}
