/* Login Page Styles - OrderSync Theme */

/* Login container with gradient background */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-primary-dark) 100%);
    padding: var(--space-4);
    position: relative;
    overflow: hidden;
}

/* Animated background pattern */
.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    pointer-events: none;
}

@keyframes moveBackground {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* Login card */
.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: var(--bs-border-radius-xl);
    padding: 48px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2), 
                0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

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

/* Logo container */
.login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo img {
    height: 80px;
    width: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 4px 12px rgba(8, 145, 178, 0.2));
    animation: fadeIn 0.8s ease-out 0.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.login-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--bs-dark);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 16px;
    color: var(--color-text);
    font-weight: 400;
}

.login-subtitle .app-name {
    color: var(--bs-primary);
    font-weight: 600;
}

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

.login-form .form-floating {
    margin-bottom: 20px;
}

.login-form .form-control {
    border: 2px solid var(--color-border);
    border-radius: var(--bs-border-radius);
    padding: 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--bs-body-bg);
}

.login-form .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
    background: #fff;
}

.login-form label {
    color: var(--color-text);
    font-size: 14px;
    padding-left: 16px;
}

/* Remember me checkbox */
.remember-me-section {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    padding: 12px 0;
}

.remember-me-section input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--bs-primary);
}

.remember-me-section label {
    color: var(--color-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

/* Submit button */
.login-submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--bs-border-radius);
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-primary-dark) 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(8, 145, 178, 0.3);
    cursor: pointer;
}

.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(8, 145, 178, 0.4);
}

.login-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.3);
}

/* Alert messages */
.login-alert {
    border-radius: var(--bs-border-radius);
    padding: 16px;
    margin-bottom: 24px;
    border: none;
    font-size: 14px;
    animation: slideDown 0.4s ease-out;
}

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

.login-alert.alert-danger {
    background: rgba(220, 38, 38, 0.1);
    color: var(--bs-danger);
    border-left: 4px solid var(--bs-danger);
}

.login-alert.alert-info {
    background: rgba(8, 145, 178, 0.1);
    color: var(--bs-primary);
    border-left: 4px solid var(--bs-primary);
}

/* Logged in message */
.logged-in-message {
    text-align: center;
    padding: 24px;
}

.logged-in-message p {
    color: var(--color-text);
    margin-bottom: 16px;
}

.logged-in-message .user-email {
    color: var(--bs-primary);
    font-weight: 600;
}

.logged-in-message .logout-link {
    color: var(--bs-danger);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.logged-in-message .logout-link:hover {
    color: var(--bs-danger);
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 576px) {
    .login-card {
        padding: 32px 24px;
        border-radius: var(--bs-border-radius-lg);
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .login-subtitle {
        font-size: 14px;
    }
    
    .login-logo img {
        height: 60px;
    }
}

/* Focus visible for accessibility */
.login-form .form-control:focus-visible,
.login-submit-btn:focus-visible,
.remember-me-section input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Loading state for submit button */
.login-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-submit-btn:disabled:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(8, 145, 178, 0.3);
}
