* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
}

.company-logo {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.company-logo:hover {
    transform: scale(1.05);
}

.login-container {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    opacity: 0.2;
}

.login-container::after {
    content: "";
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2575fc 0%, #6a11cb 100%);
    opacity: 0.2;
}

.login-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.5px;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.pwdInput{
    margin-bottom: 0 ;
}

.form-group input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    padding-left: 45px; /* Space for the icon */
}

.form-group input:focus {
    border-color: #2575fc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 117, 252, 0.1);
}

.form-group .floating-label {
    position: absolute;
    left: 45px;
    top: 16px;
    color: #888;
    font-size: 16px;
    transition: all 0.25s ease;
    pointer-events: none;
    background-color: white;
    padding: 0 5px;
}

.form-group input:focus + .floating-label,
.form-group input:not(:placeholder-shown) + .floating-label {
    top: -10px;
    left: 15px;
    font-size: 12px;
    color: #2575fc;
    font-weight: 600;
}

.form-group .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

/* Toggle switch styles - smaller version */
.toggle-container {
    display: flex;
    align-items: center;
    margin-top: 6px;
    margin-bottom: 24px;
    margin-left: 8px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
    margin-right: 8px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e0e0e0;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background: linear-gradient(135deg, #2575fc 0%, #6a11cb 100%);
}

input:checked + .toggle-slider:before {
    transform: translateX(16px);
}

.toggle-label {
    color: #888;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.signin-btn {
    width: 100%;
    background: linear-gradient(135deg, #2575fc 0%, #6a11cb 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(37, 117, 252, 0.2);
    position: relative;
    overflow: hidden;
}

.signin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 117, 252, 0.3);
}

.signin-btn:active {
    transform: translateY(1px);
}

.signin-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease-in-out;
}

.signin-btn:hover:before {
    left: 100%;
}

.links-container {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    font-size: 14px;
}

.links-container span {
    color: #2575fc;
    text-decoration: none;
    margin: 5px 0;
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
}

.links-container span:hover {
    color: #6a11cb;
    transform: translateY(-1px);
}

.signup-link {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.signup-link span {
    color: #666;
}

.signup-link a {
    color: #2575fc;
    font-weight: 600;
    text-decoration: none;
    margin-left: 5px;
    transition: all 0.3s ease;
}

.signup-link a:hover {
    color: #6a11cb;
}

@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
    }
    
    .links-container {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .form-group input {
        font-size: 14px;
    }
    
    .form-group .floating-label {
        font-size: 14px;
    }
    
    .form-group .floating-label.invalid {
        font-size: 12px;
    }
    
}

/* Form validation styles */
.form-group input.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    transition: all 0.3s ease;
}

.inputSignin.is-invalid {
    border-color: #dc3545 !important;
}

.invalid {
    color: #dc3545 !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Button loading state */
.signin-btn.processing {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
  
.signin-btn.processing::after {
    content: "";
    position: absolute;
    top: calc(50% - 0.5em);
    left: calc(50% - 0.5em);
    width: 1em;
    height: 1em;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: button-loading-spinner 1s linear infinite;
}
  
@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Error and success message animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

/* Error and success message styling */
.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    padding: 12px 16px;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.2);
    color: #28a745;
    padding: 12px 16px;
}


/* Add these animations to your existing CSS file */

/* Define the animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Apply animations to elements */
.header {
    animation: fadeInDown 0.6s ease-out forwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container {
    animation: scaleIn 0.7s ease-out 0.2s both;
}

.login-title {
    animation: fadeInUp 0.5s ease-out 0.4s both;
}

.form-group:nth-of-type(1) {
    animation: fadeInLeft 0.5s ease-out 0.6s both;
}

.form-group:nth-of-type(2) {
    animation: fadeInLeft 0.5s ease-out 0.8s both;
}

.signin-btn {
    animation: fadeInUp 0.5s ease-out 1s both;
}

.links-container {
    animation: fadeInUp 0.5s ease-out 1.2s both;
}

.signup-link {
    animation: fadeInUp 0.5s ease-out 1.4s both;
}

/* Add this to temporarily hide elements before animation starts */
.login-title, .form-group, .signin-btn, .links-container, .signup-link {
    opacity: 0;
}

/* Optional: Add a subtle animation to the background */
body {
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
