/* Authentication Pages Styles */

/* Login/Register Page Background */
.auth-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Auth Card Styling */
.auth-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    max-width: 400px;
    width: 100%;
    animation: slideUp 0.6s ease-out;
}

/* Card Header */
.auth-header {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 2rem;
    text-align: center;
}

.auth-header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 300;
}

.auth-header .subtitle {
    opacity: 0.9;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Card Body */
.auth-body {
    padding: 2rem;
}

/* Form Styling */
.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form .form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.auth-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Submit Button */
.btn-auth {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    color: white;
    padding: 12px 0;
    border-radius: 8px;
    font-weight: 500;
    width: 100%;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    color: white;
}

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

/* Links */
.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Flash Messages in Auth */
.auth-flash {
    margin-bottom: 1rem;
    border-radius: 8px;
    padding: 12px 15px;
    border: none;
}

.auth-flash.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.auth-flash.alert-success {
    background: #d4edda;
    color: #155724;
}

.auth-flash.alert-info {
    background: #cce7ff;
    color: #004085;
}

/* Remember Me Checkbox */
.form-check {
    margin: 1rem 0;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 0.125em;
    border: 2px solid #667eea;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-label {
    color: #666;
    margin-left: 0.5rem;
}

/* Password Field with Show/Hide */
.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
}

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

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

.btn-auth.loading::after {
    content: "";
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

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

/* Responsive Design */
@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-header,
    .auth-body {
        padding: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
}

/* Logo/Brand in Auth */
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.auth-brand img {
    max-height: 40px;
    margin-right: 10px;
}

/* Form Validation Styling */
.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath 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);
}

.form-control.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.14-.14L4.47 4.56l.14.14 1.42-1.42-.14-.14L4.47 4.56l.14.14L6.03 6.12l.14.14-1.42 1.42L4.61 7.54 2.3 6.73z'/%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);
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.valid-feedback {
    display: block;
    color: #28a745;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}