/* ============================================ */
/* CREATE USER PAGE - Complete Styles           */
/* ============================================ */

:root {
    --white: #fff;
    --page-bg: #f5f7fa;
    --primary-blue: #1e3a8a;
    --light-blue: #3b82f6;
    --soft-blue: #eef2ff;
    --gold: #FFD700;
    --deep-gold: #e6c200;
    --gold-shadow: rgba(255, 215, 0, .4);
    --gray: #6b7280;
    --light-gray: #9ca3af;
    --input-border: #e2e8f0;
    --input-focus-border: #1e3a8a;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Nunito', sans-serif;
    min-height: 100vh;
    display: flex;
    margin: 0;
    padding: 0;
    background: var(--page-bg);
}

.container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ADS SECTION */
.ad-section {
    flex: 6;
    position: relative;
    color: #fff;
    overflow: hidden;
}

.ad-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.ad-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.85), rgba(30, 58, 138, 0.95));
    z-index: 2;
}

.ad-top-bar {
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-arrow {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.back-arrow:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-5px);
    border-color: rgba(255, 255, 255, 0.4);
}

.ad-login-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ad-login-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ad-language-toggle {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ad-language-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ad-content {
    position: relative;
    z-index: 3;
    max-width: 520px;
    height: 100%;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 15%;
}

.ad-header { display: flex; align-items: center; margin-bottom: 20px; }

.ad-bar {
    width: 8px;
    height: 60px;
    background: var(--gold);
    margin-right: 15px;
    border-radius: 4px;
}

.ad-title {
    font-size: 2.5rem;
    font-weight: 800;
    opacity: 0;
    transform: translateY(20px);
    color: var(--white);
    line-height: 1.2;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.ad-text {
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0;
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(20px);
    transition: opacity 0.7s ease 0.2s, transform 0.7s ease 0.2s;
}

.show-text .ad-title,
.show-text .ad-text { opacity: 1; transform: translateY(0); }

.dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 4;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover { background: rgba(255, 215, 0, 0.6); }
.dot.active { background: var(--gold); transform: scale(1.3); }

/* LOGIN SECTION */
.login-section {
    flex: 4;
    display: flex;
    flex-direction: column;
    background: var(--white);
    overflow-y: auto;
    max-height: 100vh;
    position: relative;
}

.login-header {
    padding: 30px 40px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.logo-container { display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }

.logo-img {
    height: 60px;
    width: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15);
}

.login-content { flex: 1; padding: 10px 40px 30px; }

.login-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.welcome-text { margin-bottom: 30px; text-align: center; }

.welcome-text h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.welcome-text p { color: var(--gray); font-size: 0.95rem; }

.form-card { background: var(--white); padding: 0; border-radius: 0; width: 100%; }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }

.form-group { position: relative; margin-bottom: 0; }

.form-group input {
    width: 100%;
    padding: 16px 16px 8px;
    border: 1.5px solid var(--input-border);
    border-radius: 14px;
    background: var(--white);
    color: #1e293b;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.25s ease;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
    line-height: 1.5;
}

.form-group input::placeholder { opacity: 0; }

.form-group label {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    pointer-events: none;
    font-weight: 500;
    color: var(--light-gray);
    transition: all 0.2s ease;
    margin-bottom: 0;
    display: block;
    font-size: 1rem;
    font-family: 'Nunito', sans-serif;
    background: transparent;
    padding: 0 4px;
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label {
    top: -0px;
    left: 12px;
    font-size: 0.75rem;
    padding: 0 6px;
    background: var(--white);
    color: var(--primary-blue);
    font-weight: 700;
    transform: translateY(-50%);
    z-index: 11;
}

.form-group input:focus {
    outline: none;
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.08);
}

.form-group input:hover:not(:focus) { border-color: #cbd5e1; }

.form-group.valid input { border-color: var(--success); }
.form-group.valid input:focus { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.08); }

.form-group.invalid input { border-color: var(--error); }
.form-group.invalid input:focus { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08); }

.validation-message {
    font-size: 0.75rem;
    margin-top: 6px;
    margin-left: 12px;
    display: none;
    color: var(--error);
    line-height: 1.3;
    font-weight: 600;
}

.form-group.invalid .validation-message { display: block; }

/* Phone Prefix */
.input-prefix-wrapper { position: relative; }
.input-prefix-wrapper input.phone-input-field { padding-left: 65px !important; }

.input-prefix-wrapper::before {
    content: '+237';
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--light-gray);
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    pointer-events: none;
    opacity: 0;
    z-index: 12;
}

.input-prefix-wrapper:focus-within::before { color: var(--primary-blue); opacity: 1; }
.input-prefix-wrapper.has-value::before { color: var(--primary-blue); opacity: 1; }

/* Password Toggle */
.password-toggle-wrapper { position: relative; }
.password-toggle-wrapper input { padding-right: 45px !important; }

.password-toggle-icon {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--light-gray);
    transition: color 0.2s;
    z-index: 12;
    font-size: 1.1rem;
}

.password-toggle-icon:hover { color: var(--primary-blue); }

/* Submit Button */
.submit-container { margin-top: 32px; }

.submit-button {
    background: linear-gradient(135deg, var(--primary-blue), var(--light-blue));
    color: var(--white);
    font-weight: 700;
    padding: 16px 35px;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.submit-button:hover:not(:disabled) {
    box-shadow: 0 12px 25px rgba(30, 58, 138, 0.25);
    transform: translateY(-3px);
}

.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.1);
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid var(--white);
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.submit-button.loading .spinner { display: block; }
.submit-button.loading span { display: none; }

/* Footer */
footer {
    text-align: center;
    font-size: 13px;
    color: var(--light-gray);
    padding: 24px 40px;
    margin-top: auto;
    border-top: 1px solid var(--input-border);
    font-weight: 500;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 138, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.loading-overlay.active { opacity: 1; visibility: visible; }
.loading-text { color: #fff; font-size: 1.2rem; font-weight: 600; }

.loading-line {
    width: 200px;
    height: 4px;
    background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
    border-radius: 2px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    animation: loadingLine 1.5s ease-in-out infinite;
}

.loading-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .8) 50%, transparent 100%);
    animation: loadingLine 1.5s ease-in-out infinite .75s;
}

@keyframes loadingLine {
    0% { transform: scaleX(0); opacity: .3; }
    50% { transform: scaleX(1); opacity: 1; }
    100% { transform: scaleX(0); opacity: .3; }
}

/* Notification Popup */
.notification-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 20px 25px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 420px;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    transform: translateX(150%);
    transition: 0.4s cubic-bezier(.68, -.55, .27, 1.55), opacity 0.4s ease, visibility 0.4s;
    border: 1px solid rgba(0,0,0,0.05);
}

.notification-popup.show { opacity: 1; visibility: visible; transform: translateX(0); }
.notification-popup.success { border-left: 6px solid var(--success); }
.notification-popup.error { border-left: 6px solid var(--error); }

.notification-icon { font-size: 1.8rem; }
.notification-popup.success .notification-icon i { color: var(--success); }
.notification-popup.error .notification-icon i { color: var(--error); }

.notification-content { flex: 1; }
.notification-title { font-weight: 800; margin-bottom: 5px; color: #1e293b; font-size: 1.1rem; }

.notification-close {
    background: none;
    border: none;
    color: var(--light-gray);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.2s;
}

.notification-close:hover { background: #f1f5f9; color: #1e293b; }

.mobile-header, .mobile-signin-link { display: none; }
.desktop-hidden { display: none; }

/* Mobile */
@media (max-width: 768px) {
    .ad-section { display: none; }
    .login-section { flex: 1; }

    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 20px 0;
    }

    .mobile-back-arrow {
        width: 40px;
        height: 40px;
        background: var(--soft-blue);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--primary-blue);
        font-size: 1.1rem;
        text-decoration: none;
        transition: all 0.3s ease;
    }

    .mobile-back-arrow:hover { background: var(--primary-blue); color: var(--white); }

    .mobile-language-toggle {
        display: flex;
        align-items: center;
        gap: 5px;
        padding: 8px 12px;
        border-radius: 25px;
        background: transparent;
        border: 1.5px solid var(--input-border);
        color: var(--primary-blue);
        font-weight: 600;
        font-size: 0.9rem;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .mobile-language-toggle:hover { border-color: var(--primary-blue); background: var(--soft-blue); }

    .login-header { padding: 20px 20px 10px; justify-content: center; }
    .logo-img { height: 50px; }

    .mobile-signin-link {
        display: flex;
        justify-content: center;
        margin-top: 15px;
        margin-bottom: 5px;
    }

    .mobile-signin-link a {
        color: var(--primary-blue);
        text-decoration: none;
        font-weight: 600;
        font-size: 1rem;
        padding: 8px 20px;
        border-radius: 25px;
        background: var(--soft-blue);
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .mobile-signin-link a:hover { background: var(--primary-blue); color: var(--white); }
    .login-content { padding: 10px 20px 30px; }
    .welcome-text h2 { font-size: 1.5rem; }

    .notification-popup {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-150%);
    }

    .notification-popup.show { transform: translateY(0); }
    footer { padding: 20px; }
}