/**
 * Filename: auth.css
 * Purpose: Styles for authentication pages (login, register, password reset)
 * Author: VTT Development Team
 * Created: 2025-11-07
 * Last Modified: 2025-11-07
 * 
 * Description:
 * Contains styles specific to authentication pages including
 * centered login forms, registration forms, and password reset.
 */

/* ==========================================================================
   Auth Page Layout
   ========================================================================== */

.auth-page {
    /* Full viewport height */
    min-height: 100vh;
    
    /* Center the auth container */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Background gradient */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Padding for mobile */
    padding: 2rem 1rem;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

/* ==========================================================================
   Auth Box (Main Card)
   ========================================================================== */

.auth-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 2.5rem;
}

/* ==========================================================================
   Auth Header
   ========================================================================== */

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

.auth-header h1 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #7f8c8d;
    font-size: 1rem;
    margin-bottom: 0;
}

.auth-logo {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0;
}

/* ==========================================================================
   Auth Form
   ========================================================================== */

.auth-form {
    margin-bottom: 0;
}

.auth-form .form-group {
    margin-bottom: 0;
}

.auth-form .form-group:last-of-type {
    margin-bottom: 0;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    border: 2px solid #ecf0f1;
    border-radius: 4px;
    transition: all 0.2s ease;
}

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

.auth-form input::placeholder {
    color: #bdc3c7;
}

/* Invalid input styling */
.auth-form input:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
}

.auth-form input:valid:not(:placeholder-shown) {
    border-color: #27ae60;
}

/* ==========================================================================
   Form Row (Remember Me / Forgot Password)
   ========================================================================== */

.auth-form .form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

.form-check label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
    color: #7f8c8d;
}

.form-link a {
    color: #667eea;
    font-size: 0.9rem;
}

.form-link a:hover {
    color: #764ba2;
}

/* ==========================================================================
   Form Description
   ========================================================================== */

.form-description {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* ==========================================================================
   Auth Footer (Links)
   ========================================================================== */

.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #ecf0f1;
}

.auth-footer p {
    margin-bottom: 0.5rem;
    color: #7f8c8d;
}

.auth-footer a {
    color: #667eea;
    font-weight: 500;
}

.auth-footer a:hover {
    color: #764ba2;
}

/* ==========================================================================
   Auth Alerts (Override main.css for auth pages)
   ========================================================================== */

.auth-box .alert {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* ==========================================================================
   Form Hints (Small text under inputs)
   ========================================================================== */

.auth-form .form-hint {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.8rem;
    color: #95a5a6;
}

/* ==========================================================================
   Submit Button Styling
   ========================================================================== */

.auth-form .btn-block {
    margin-top: 1.5rem;
    padding: 0.875rem;
    font-size: 1.05rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.auth-form .btn-block:hover {
    background: linear-gradient(135deg, #5568d3 0%, #65408b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* ==========================================================================
   Loading State (Optional Enhancement)
   ========================================================================== */

.auth-form .btn-block:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 480px) {
    .auth-box {
        padding: 2rem 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.75rem;
    }
    
    .auth-form .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* ==========================================================================
   Animation Effects
   ========================================================================== */

/* Fade in animation for auth box */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-box {
    animation: fadeIn 0.4s ease-out;
}

/* Input focus animation */
@keyframes inputFocus {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    100% {
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }
}

.auth-form input:focus {
    animation: inputFocus 0.3s ease;
}
