/* 
 * Enhanced Styles for Login and Authentication Pages
 * Improves mobile responsiveness, visual hierarchy, and form validation
 * Compatible with PHP version 8.3.15
 */

.auth-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

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

.auth-header h2 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

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

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

.auth-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.auth-form .form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s;
}

.auth-form .form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

.auth-form .form-check {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.auth-form .form-check input {
    margin-right: 0.5rem;
}

.auth-form .form-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form .btn {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-form .btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.auth-form .btn-primary:hover {
    background-color: #2980b9;
}

.auth-form .btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
}

.auth-form .btn-outline:hover {
    background-color: #f5f5f5;
}

.auth-links {
    margin-top: 2rem;
    text-align: center;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

.auth-divider span {
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Password Strength Meter */
.password-strength-meter {
    margin-top: 0.5rem;
}

.meter-bar {
    height: 5px;
    background-color: #e74c3c;
    width: 0;
    transition: width 0.3s, background-color 0.3s;
    border-radius: 2px;
}

.strength-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease-in-out;
}

.alert-error {
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 4px solid var(--error-color);
    color: #c0392b;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    border-left: 4px solid var(--success-color);
    color: #27ae60;
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.1);
    border-left: 4px solid var(--primary-color);
    color: #2980b9;
}

/* Loading Spinner */
.spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    .auth-container {
        margin: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .auth-header h2 {
        font-size: 1.5rem;
    }
    
    .auth-form .form-group input {
        padding: 0.7rem;
        font-size: 0.95rem;
    }
    
    .auth-form .btn {
        padding: 0.7rem;
        font-size: 0.95rem;
    }
}
