/* Login Page Styles - OneOneNinetySix */
/* Optimized for performance and accessibility */

.login-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 1rem;
    animation: gradientShift 15s ease infinite;
    background-size: 200% 200%;
}

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

.login-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 2;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

.form-header-subtitle {
    color: var(--color-text-muted);
    font-size: 1rem;
}

.form-step {
    display: none;
}

.form-step.active,
.form-step[style*="display:block"],
.form-step:not([style*="display:none"]) {
    display: block;
}

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

.form-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.form-label i {
    margin-right: 0.5rem;
    color: var(--color-primary-100);
}

.form-control {
    border: 2px solid var(--color-border-light);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus {
    border-color: var(--color-primary-100);
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
    outline: none;
}

.form-control.is-invalid {
    border-color: var(--color-danger);
}

.form-control:disabled {
    background-color: var(--color-neutral-100);
    cursor: not-allowed;
}

.invalid-feedback {
    color: var(--color-danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Password input wrapper */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--color-primary-100);
}

.password-toggle:focus {
    outline: 2px solid var(--color-primary-100);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-100), var(--color-primary-200));
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    color: white !important;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #808000, #9acd32);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(128, 128, 0, 0.4);
    color: white !important;
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

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

.btn-primary:focus-visible {
    outline: 3px solid var(--color-primary-200);
    outline-offset: 2px;
}

.btn-outline-secondary {
    background: transparent;
    border: 2px solid var(--color-neutral-300);
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-outline-secondary:hover {
    background: var(--color-neutral-100);
    color: var(--color-text-primary);
}

.btn-outline-secondary:focus-visible {
    outline: 3px solid var(--color-neutral-400);
    outline-offset: 2px;
}

/* Form check */
.form-check {
    margin-bottom: 1.5rem;
}

.form-check-input {
    margin-top: 0.25rem;
}

.form-check-input:focus {
    border-color: var(--color-primary-100);
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

.form-check-label {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    cursor: pointer;
}

/* User info display */
.user-info {
    background: var(--color-neutral-50);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-100);
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger,
.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Login footer */
.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border-light);
}

.login-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.login-link {
    color: var(--color-primary-100);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-link:hover {
    color: var(--color-primary-200);
    text-decoration: underline;
}

.login-link:focus-visible {
    outline: 2px solid var(--color-primary-100);
    outline-offset: 2px;
    border-radius: 4px;
}

.login-link[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading state */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive design */
@media (max-width: 576px) {
    .login-card {
        padding: 1.5rem;
    }
    
    .form-header-title {
        font-size: 1.5rem;
    }
    
    .login-links {
        flex-direction: column;
        align-items: center;
    }
}

/* Print styles */
@media print {
    .login-hero {
        display: none;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 3px;
    }
    
    .btn-primary {
        border: 2px solid currentColor;
    }
}

