/* Modern Login Page Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.login-page-wrapper {
    min-height: 100vh;
    width: 100% !important;
    max-width: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%),
                radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(240, 147, 251, 0.2) 0%, transparent 50%);
    background-size: 200% 200%, 100% 100%, 100% 100%, 100% 100%;
    background-position: center, center, center, center;
    animation: gradientShift 20s ease infinite;
    padding: 20px;
    margin: 0 !important;
    box-sizing: border-box;
}

/* Centered container for better balance */
.login-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animated background shapes - Better distribution */
.login-page-wrapper::before,
.login-page-wrapper::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    filter: blur(100px);
    animation: float 25s ease-in-out infinite;
    z-index: 0;
}

.login-page-wrapper::before {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.login-page-wrapper::after {
    bottom: 10%;
    right: 10%;
    animation-delay: 12s;
}


@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* Login Card - Centered and Well Designed */
.login-card {
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    border-radius: 32px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25),
                0 0 0 1px rgba(255, 255, 255, 0.6) inset,
                0 0 100px rgba(102, 126, 234, 0.1);
    padding: 56px 48px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.8s ease-out;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 auto !important;
    display: block;
    flex-shrink: 0;
}

.login-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 35px 100px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.7) inset,
                0 0 120px rgba(102, 126, 234, 0.15);
}

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

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    width: 90px;
    height: 90px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4),
                0 0 0 4px rgba(255, 255, 255, 0.2) inset;
    animation: pulse 3s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.login-logo:hover {
    transform: scale(1.05) rotate(5deg);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
    }
}

.login-logo i {
    font-size: 40px;
    color: white;
}

.login-title {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: -0.8px;
    text-align: center;
}

.login-subtitle {
    color: #6c757d;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    text-align: center;
}

/* Form Styles */
.login-form {
    margin-top: 32px;
}

.form-group-modern {
    margin-bottom: 24px;
    position: relative;
}

.form-label-modern {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    transition: color 0.3s ease;
    line-height: 1.5;
}

.form-input-modern {
    width: 100%;
    padding: 14px 16px 14px 48px;
    font-size: 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    color: #495057;
    outline: none;
    line-height: 1.5;
    height: 48px;
    box-sizing: border-box;
}

.form-input-modern:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-input-modern::placeholder {
    color: #adb5bd;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 18px;
    transition: color 0.3s ease;
    pointer-events: none;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.form-group-modern:focus-within .input-icon {
    color: #667eea;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.password-toggle:hover {
    color: #667eea;
}

/* Remember Me */
.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #667eea;
}

.remember-me label {
    font-size: 14px;
    color: #6c757d;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

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

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

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

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

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

/* Forgot Password Link */
.forgot-password {
    text-align: center;
    margin-top: 24px;
}

.forgot-password a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.forgot-password a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.forgot-password a:hover::after {
    width: 100%;
}

.forgot-password a:hover {
    color: #764ba2;
}

/* Alert Messages */
.alert-modern {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: none;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    border-left: 4px solid #2196f3;
}

/* Error Messages */
.invalid-feedback {
    display: none !important;
    color: #dc3545;
    font-size: 13px;
    margin-top: 6px;
    animation: shake 0.3s ease-out;
    font-weight: 500;
    line-height: 1.4;
    min-height: 18px;
}

.invalid-feedback:not(:empty),
.invalid-feedback[style*="display: block"] {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* Override Bootstrap invalid styles - Remove red border completely */
.form-input-modern.is-invalid,
.form-input-modern.is-invalid:focus,
.form-input-modern.is-invalid:active,
.form-input-modern.is-invalid:hover {
    border-color: #e9ecef !important;
    background: #f8f9fa !important;
    box-shadow: none !important;
}

.form-input-modern.is-invalid:focus {
    /* Keep normal focus style even when invalid */
    border-color: #667eea !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1) !important;
    background: white !important;
}

/* Override any Bootstrap border utilities */
.form-input-modern.border-danger,
.form-input-modern.border-danger:focus {
    border-color: #e9ecef !important;
}

/* Remove any red border from Bootstrap */
.login-form .form-input-modern.is-invalid {
    border: 2px solid #e9ecef !important;
    border-color: #e9ecef !important;
}

.login-form .form-input-modern.is-invalid:focus {
    border: 2px solid #667eea !important;
    border-color: #667eea !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-card {
        padding: 44px 36px;
        border-radius: 28px;
        max-width: 100%;
    }

    .login-title {
        font-size: 30px;
    }

    .login-logo {
        width: 80px;
        height: 80px;
    }

    .login-logo i {
        font-size: 38px;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 40px 28px;
        border-radius: 24px;
        margin: 0 10px;
    }

    .login-title {
        font-size: 28px;
    }

    .login-logo {
        width: 75px;
        height: 75px;
        margin-bottom: 20px;
    }

    .login-logo i {
        font-size: 35px;
    }

    .login-page-wrapper {
        padding: 15px;
    }
}

/* Loading State */
.login-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Remove default Bootstrap styles for login page - Force Centering */
body.login-page {
    width: 100vw !important;
    overflow-x: hidden !important;
}

body.login-page .c-app {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    min-height: 100vh !important;
    flex-direction: column !important;
}

body.login-page .c-app .container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
}

.login-page-wrapper .container {
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    position: relative !important;
}

/* Override any Bootstrap container margins */
body.login-page .container,
body.login-page .c-app .container,
.login-page-wrapper .container {
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.login-page-wrapper .c-app {
    background: transparent !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    width: 100% !important;
    margin: 0 !important;
}

.login-page-wrapper .card,
.login-page-wrapper .card-body {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}


/* Toastr.js - Use Default Design and Animations */
/* Only minimal customization to ensure proper display */
#toast-container {
    z-index: 99999;
    position: fixed;
}

/* Let toastr.js handle all animations and styling */
/* No custom overrides - use toastr.js defaults */

