/* ============================================================
   NinzaSMS V2 - Shared Authentication CSS
   Used for Login, Registration, Forgot Password
   ============================================================ */

/* ----- RESET & BASE ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f0f4ff 0%, #e6edff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
}

/* ----- CONTAINER ----- */
.login-container {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 40px 32px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    animation: fadeUp 0.6s ease-out;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ----- LOGO & HEADER ----- */
.logo-wrapper {
    text-align: center;
    margin-bottom: 30px;
}
.logo {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0a2540;
    letter-spacing: -0.5px;
}
.logo span {
    color: #0066ff;
}
.tagline {
    font-size: 0.9rem;
    color: #4a5a6a;
    margin-top: 4px;
    font-weight: 500;
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}
.login-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0a2540;
    margin-bottom: 6px;
}
.login-header p {
    color: #5a6a7a;
    font-size: 0.95rem;
}

/* ----- FORM ELEMENTS ----- */
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a2a3a;
    margin-bottom: 5px;
}
.form-group label i {
    margin-right: 6px;
    color: #0066ff;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    transition: all 0.3s ease;
}
.input-wrapper:focus-within {
    border-color: #0066ff;
    box-shadow: 0 0 0 4px rgba(0,102,255,0.15);
}
.input-wrapper i {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 1rem;
}
.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 14px 14px 14px 44px;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-family: inherit;
    color: #0a2540;
    outline: none;
    border-radius: 14px;
}
.input-wrapper input::placeholder {
    color: #aab5c0;
}
.input-wrapper select {
    appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

/* OTP & referral extras */
.input-group-flex {
    display: flex;
    gap: 10px;
    align-items: center;
}
.input-group-flex .input-wrapper {
    flex: 1;
    margin: 0;
}
.send-otp-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    padding: 14px 22px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.send-otp-btn:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(245,158,11,0.3);
}
.send-otp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ----- GOOGLE BUTTON ----- */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    font-size: 1rem;
    font-weight: 600;
    color: #1a2a3a;
    cursor: pointer;
    transition: 0.2s;
    margin: 18px 0 10px;
}
.google-btn:hover {
    background: #f8faff;
    border-color: #0066ff;
}
.google-btn img {
    width: 22px;
    height: 22px;
}
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 20px 0;
}
.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}
.divider span {
    padding: 0 16px;
}

/* ----- ALERTS ----- */
.alert {
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 0.9rem;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}
.alert.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}
.alert.success {
    background: #dcfce7;
    color: #166534;
    border-left: 4px solid #22c55e;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ----- SECURITY BADGES ----- */
.security-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #4a5a6a;
    margin: 16px 0 8px;
}
.security-badges span i {
    color: #0066ff;
    margin-right: 4px;
}

/* ----- OTP SECTION ----- */
.otp-section {
    animation: fadeUp 0.4s ease;
}
.otp-flex {
    display: flex;
    gap: 12px;
    align-items: center;
}
.otp-flex .input-wrapper {
    flex: 1;
}
.otp-flex input {
    text-align: center;
    font-size: 1.4rem;
    letter-spacing: 6px;
    font-weight: 700;
    padding: 14px !important;
}
.verify-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.verify-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(16,185,129,0.3);
}
.otp-hint {
    background: #f3f6fb;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-size: 0.85rem;
    margin: 16px 0;
}
.resend-area {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    margin-top: 10px;
}
.resend-link {
    color: #0066ff;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
}
.resend-link:hover {
    text-decoration: underline;
}
.timer-text {
    display: block;
    font-size: 0.8rem;
    color: #f59e0b;
    margin-top: 6px;
}

/* ----- REGISTER LINK / FOOTER ----- */
.register-link {
    text-align: center;
    margin-top: 10px;
}
.register-link a {
    color: #0066ff;
    font-weight: 600;
    text-decoration: none;
}
.register-link a:hover {
    text-decoration: underline;
}
.footer {
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 24px;
}

/* ----- RECAPTCHA WRAPPER ----- */
.recaptcha-wrapper {
    margin: 16px 0;
    display: flex;
    justify-content: center;
}

/* ----- BUTTONS (General) ----- */
.login-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #0066ff, #004fcc);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0,102,255,0.25);
}
.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ----- RESPONSIVE ----- */
@media (max-width: 550px) {
    .login-container {
        padding: 24px 16px;
    }
    .logo {
        font-size: 1.8rem;
    }
    .input-group-flex,
    .otp-flex {
        flex-direction: column;
    }
    .send-otp-btn,
    .verify-btn {
        width: 100%;
        justify-content: center;
    }
    .recaptcha-wrapper {
        transform: scale(0.85);
        transform-origin: center;
    }
}

/* ----- PAGE LOADER (used for form submits) ----- */
.page-loader {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
}
.page-loader.active {
    display: flex;
}
.spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #e2e8f0;
    border-top-color: #0066ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.loader-text {
    font-weight: 600;
    color: #0a2540;
}
.loader-dots span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #0066ff;
    border-radius: 50%;
    margin: 0 2px;
    animation: dotBounce 1.4s infinite;
}
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}






 
        /* ===== SIDEBAR TOGGLE FIX – MOBILE RESPONSIVE ===== */
        .sidebar-toggle {
            display: none;
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--text-primary, #0a2540);
        }

        @media (max-width: 768px) {
            .sidebar {
                position: fixed;
                top: 0;
                left: 0;
                transform: translateX(-100%);
                transition: transform 0.3s ease;
                width: 280px;
                height: 100vh;
                z-index: 1000;
                background: #0a1a2e;
                overflow-y: auto;
            }
            .sidebar.open {
                transform: translateX(0);
            }
            .sidebar-toggle {
                display: flex;
                align-items: center;
                justify-content: center;
            }
            .main-content {
                margin-left: 0 !important;
                width: 100%;
            }
            .top-header .page-title h1 {
                font-size: 1rem;
            }
        }

        /* ===== REST OF THE STYLES (modal, etc.) ===== */
        .modal-overlay {
            display: <?= $show_popup ? 'flex' : 'none' ?>;
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            background: rgba(0,0,0,0.5);
            backdrop-filter: blur(4px);
            z-index: 9999;
            justify-content: center;
            align-items: center;
        }
        .modal-box {
            background: #fff;
            border-radius: 24px;
            padding: 40px;
            max-width: 500px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            animation: fadeInUp 0.3s ease;
        }
        @keyframes fadeInUp {
            from { opacity:0; transform: translateY(20px); }
            to { opacity:1; transform: translateY(0); }
        }
        .modal-box .step { display: none; }
        .modal-box .step.active { display: block; }
        .modal-box .input-wrapper { display: flex; gap: 10px; align-items: center; }
        .modal-box .input-wrapper input, .modal-box .input-wrapper select { flex: 1; padding: 12px; border: 2px solid #e2e8f0; border-radius: 12px; font-size: 1rem; }
        .modal-box .input-wrapper button { padding: 12px 20px; border: none; border-radius: 12px; background: #0066ff; color: #fff; font-weight: 600; cursor: pointer; }
        .modal-box .input-wrapper button:disabled { opacity: 0.6; cursor: not-allowed; }
        .modal-box .btn-primary { width: 100%; padding: 14px; background: #10b981; color: #fff; border: none; border-radius: 12px; font-weight: 600; cursor: pointer; }
        .modal-box .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
        .modal-box .password-strength { font-size: 0.8rem; margin-top: 4px; }
        .loader-spinner { display: inline-block; width: 20px; height: 20px; border: 3px solid #fff; border-radius: 50%; border-top: 3px solid transparent; animation: spin 0.8s linear infinite; margin-right: 8px; }
        @keyframes spin { to { transform: rotate(360deg); } }
        .status-msg { font-size: 0.9rem; margin-top: 6px; }
        .timer-text { font-size: 0.85rem; color: #f59e0b; margin-top: 4px; }
        .resend-link { color: #0066ff; cursor: pointer; font-weight: 500; }
        .resend-link:hover { text-decoration: underline; }
        .modal-box .form-group { margin-bottom: 18px; }
        .modal-box .alert { margin-bottom: 15px; }
    