/* Authentication page styles */

/* Auth body styles */
.auth-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

/* Auth container */
.auth-container {
    width: 100%;
    max-width: 440px;
    position: relative;
}

/* Auth card */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Auth header */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.auth-header .logo-icon {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 16px;
    color: #718096;
    font-weight: 400;
}

/* Auth form */
.auth-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    background-color: #fff;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input:invalid {
    border-color: #e53e3e;
}

.form-input:invalid:focus {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #a0aec0;
    margin-top: 4px;
}

/* Auth button */
.auth-button {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.auth-button.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.auth-button.primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

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

.auth-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.button-spinner {
    display: none;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages */
.error-message,
.success-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 16px;
}

.error-message {
    background-color: #fed7d7;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.success-message {
    background-color: #c6f6d5;
    color: #2f855a;
    border: 1px solid #9ae6b4;
}

.error-icon,
.success-icon {
    font-size: 16px;
}

/* Auth footer */
.auth-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.auth-link-text {
    font-size: 14px;
    color: #718096;
    margin-bottom: 12px;
}

.auth-link-text:last-child {
    margin-bottom: 0;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

.auth-link.secondary {
    color: #a0aec0;
    font-weight: 500;
}

.auth-link.secondary:hover {
    color: #718096;
}

/* Responsive design */
@media (max-width: 480px) {
    .auth-body {
        padding: 12px;
    }
    
    .auth-card {
        padding: 24px;
        border-radius: 12px;
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    .form-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .auth-card {
        border: 2px solid #2d3748;
        background: white;
    }
    
    .form-input {
        border-width: 2px;
    }
    
    .form-input:focus {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .auth-button,
    .form-input,
    .auth-link,
    .spinner {
        transition: none;
        animation: none;
    }
    
    .auth-button:hover:not(:disabled) {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .auth-card {
        background: rgba(26, 32, 44, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .auth-title {
        color: #f7fafc;
    }
    
    .auth-subtitle {
        color: #a0aec0;
    }
    
    .form-label {
        color: #e2e8f0;
    }
    
    .form-input {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #f7fafc;
    }
    
    .form-input:focus {
        border-color: #667eea;
    }
    
    .form-hint {
        color: #718096;
    }
    
    .auth-link-text {
        color: #a0aec0;
    }
    
    .auth-footer {
        border-color: #4a5568;
    }
}

