@charset "UTF-8";

/**
 * Modern Login Page
 * 
 * Purpose: Professional, modern login page design
 * Features:
 * - Modern form styling
 * - Professional layout
 * - Smooth animations
 * - 100% responsive
 * - Accessible form fields
 * 
 * @version 1.0.0
 * @date 2026-01-25
 */

/* ============================================================
   LOGIN SECTION
   ============================================================ */

.nx-login-section {
    padding: 4rem 0;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.nx-login-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* ============================================================
   LOGIN CARD
   ============================================================ */

.nx-login-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nx-login-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
                0 0 0 1px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
    .nx-login-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
}

/* ============================================================
   LOGIN HEADER
   ============================================================ */

.nx-login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.nx-login-title {
    font-size: 2.75rem;
    font-weight: 800;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    color: #1d1d1f;
    margin: 0 0 1rem 0;
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(135deg, #1d1d1f 0%, #4a4a4a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.nx-login-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--bs-primary, #0d6efd), transparent);
    border-radius: 2px;
}

.nx-login-subtitle {
    font-size: 1rem;
    color: #6e6e73;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .nx-login-title {
        font-size: 2.25rem;
        letter-spacing: -0.025em;
    }
    
    .nx-login-title::after {
        width: 50px;
        height: 3px;
        bottom: -6px;
    }
    
    .nx-login-subtitle {
        font-size: 0.9375rem;
    }
}

@media (max-width: 576px) {
    .nx-login-title {
        font-size: 1.875rem;
        letter-spacing: -0.02em;
    }
    
    .nx-login-title::after {
        width: 40px;
        height: 3px;
        bottom: -5px;
    }
}

/* ============================================================
   SOCIAL LOGIN BUTTONS
   ============================================================ */

.nx-social-login {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 576px) {
    .nx-social-login {
        grid-template-columns: 1fr;
    }
}

.nx-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border: 2px solid #e8e8ed;
    border-radius: 12px;
    background: #ffffff;
    color: #1d1d1f;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.nx-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d1d1d6;
    color: #1d1d1f;
    text-decoration: none;
}

.nx-social-btn:active {
    transform: translateY(0);
}

.nx-social-btn-facebook {
    border-color: #3b5998;
    color: #3b5998;
}

.nx-social-btn-facebook:hover {
    background: #3b5998;
    color: #ffffff;
    border-color: #3b5998;
    box-shadow: 0 4px 12px rgba(59, 89, 152, 0.3);
}

.nx-social-btn-google {
    border-color: #db4437;
    color: #db4437;
}

.nx-social-btn-google:hover {
    background: #db4437;
    color: #ffffff;
    border-color: #db4437;
    box-shadow: 0 4px 12px rgba(219, 68, 55, 0.3);
}

.nx-social-btn-icon {
    font-size: 1.25rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Divider */
.nx-login-divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    text-align: center;
}

.nx-login-divider::before,
.nx-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8e8ed;
}

.nx-login-divider-text {
    padding: 0 1rem;
    font-size: 0.875rem;
    color: #6e6e73;
}

/* ============================================================
   LOGIN FORM
   ============================================================ */

.nx-login-form {
    width: 100%;
}

.nx-form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.nx-form-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.nx-form-input-wrapper {
    position: relative;
    width: 100%;
}

.nx-form-input {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: #1d1d1f;
    background: #ffffff !important;
    border: 2px solid #e8e8ed;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.nx-form-input:focus {
    border-color: var(--bs-primary, #0d6efd) !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1) !important;
    background: #ffffff !important;
    outline: none !important;
}

.nx-form-input:hover {
    background: #ffffff !important;
    border-color: #d1d1d6;
}

.nx-form-input::placeholder {
    color: #c7c7cc;
}

/* Password toggle button */
.nx-password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #6e6e73;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 2;
}

.nx-password-toggle:hover {
    color: var(--bs-primary, #0d6efd);
}

.nx-password-toggle:focus {
    outline: 2px solid var(--bs-primary, #0d6efd);
    outline-offset: 2px;
    border-radius: 4px;
}

.nx-password-toggle-icon {
    font-size: 1.25rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Password input with toggle */
.nx-form-input-wrapper.has-toggle .nx-form-input {
    padding-right: 3rem;
}

/* ============================================================
   REMEMBER ME & FORGOT PASSWORD
   ============================================================ */

.nx-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.nx-form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

/* Override any Bootstrap or other conflicting styles */
.nx-form-check input[type="checkbox"],
.nx-form-check .form-check-input,
input[type="checkbox"].nx-form-check-input,
#remember.nx-form-check-input,
input#remember {
    width: 20px !important;
    height: 18px !important;
    min-width: 20px !important;
    min-height: 18px !important;
    max-width: 20px !important;
    max-height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background: #ffffff !important;
    border: 2px solid #e8e8ed !important;
    border-radius: 4px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-sizing: border-box !important;
    position: relative !important;
}

.nx-form-check-input {
    width: 20px !important;
    height: 18px !important;
    min-width: 20px !important;
    min-height: 18px !important;
    max-width: 20px !important;
    max-height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background: #ffffff !important;
    border: 2px solid #e8e8ed !important;
    border-radius: 4px !important;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-sizing: border-box !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.nx-form-check-input:checked {
    background-color: var(--bs-primary, #0d6efd) !important;
    border-color: var(--bs-primary, #0d6efd) !important;
}

.nx-form-check-input:checked::after {
    content: '✓' !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10;
}

/* Ensure checked state works for all selectors */
.nx-form-check input[type="checkbox"]:checked,
.nx-form-check .form-check-input:checked,
input[type="checkbox"].nx-form-check-input:checked,
#remember.nx-form-check-input:checked,
input#remember:checked {
    background-color: var(--bs-primary, #0d6efd) !important;
    border-color: var(--bs-primary, #0d6efd) !important;
}

.nx-form-check input[type="checkbox"]:checked::after,
.nx-form-check .form-check-input:checked::after,
input[type="checkbox"].nx-form-check-input:checked::after,
#remember.nx-form-check-input:checked::after,
input#remember:checked::after {
    content: '✓' !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10;
}

.nx-form-check-input:hover {
    border-color: var(--bs-primary, #0d6efd);
}

.nx-form-check-input:focus {
    outline: 2px solid var(--bs-primary, #0d6efd) !important;
    outline-offset: 2px;
    border-radius: 4px;
    border-color: var(--bs-primary, #0d6efd) !important;
}

/* Ensure checkbox is clickable and interactive */
.nx-form-check-input,
.nx-form-check input[type="checkbox"],
input[type="checkbox"].nx-form-check-input,
#remember {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 1;
}

/* Ensure label is clickable */
.nx-form-check-label {
    cursor: pointer !important;
    pointer-events: auto !important;
}

.nx-form-check-label {
    font-size: 0.9375rem;
    color: #1d1d1f;
    cursor: pointer;
    margin: 0;
    user-select: none;
    line-height: 1.5;
}

.nx-forgot-password {
    font-size: 0.9375rem;
    color: var(--bs-primary, #0d6efd);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nx-forgot-password:hover {
    color: var(--bs-primary-hover, #0b5ed7);
    text-decoration: underline;
}

/* ============================================================
   SUBMIT BUTTON
   ============================================================ */

.nx-login-submit {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.0625rem;
    font-weight: 600;
    font-family: inherit;
    color: #ffffff;
    background: var(--bs-primary, #0d6efd) !important;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.nx-login-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.nx-login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
    background: var(--bs-primary-hover, #0b5ed7) !important;
}

.nx-login-submit:hover::before {
    left: 100%;
}

.nx-login-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

.nx-login-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.nx-login-submit:disabled:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Loading state */
.nx-login-submit.loading {
    pointer-events: none;
    position: relative;
    color: transparent;
}

.nx-login-submit.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ============================================================
   SIGN UP LINK
   ============================================================ */

.nx-signup-link {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e8e8ed;
}

.nx-signup-text {
    font-size: 0.9375rem;
    color: #6e6e73;
    margin: 0;
}

.nx-signup-link-text {
    color: var(--bs-primary, #0d6efd);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nx-signup-link-text:hover {
    color: var(--bs-primary-hover, #0b5ed7);
    text-decoration: underline;
}

/* ============================================================
   FORM VALIDATION
   ============================================================ */

.nx-form-input.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1) !important;
}

.nx-form-input.is-valid {
    border-color: var(--bs-primary, #0d6efd) !important;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1) !important;
}

.nx-form-feedback {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nx-form-feedback.invalid-feedback {
    color: #dc3545;
}

.nx-form-feedback.valid-feedback {
    color: #28a745;
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */

@media (max-width: 576px) {
    .nx-login-section {
        padding: 2rem 0;
        min-height: auto;
    }
    
    .nx-login-card {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }
    
    .nx-form-input {
        padding: 0.875rem;
        font-size: 16px; /* Prevent zoom on iOS */
        border-radius: 10px;
    }
    
    .nx-login-submit {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .nx-form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

.nx-form-input:focus-visible,
.nx-login-submit:focus-visible {
    outline: 2px solid var(--bs-primary, #0d6efd);
    outline-offset: 2px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

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

.nx-login-card {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .nx-login-card,
    .nx-form-input,
    .nx-login-submit,
    .nx-social-btn {
        transition: none;
        animation: none;
    }
}
