/**
 * Login Page Styling
 * Premium gradient design voor het login systeem
 *
 * @author Erik
 * @version 1.0
 * @date 2025-10-01
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-color: #28a745;
    --danger-color: #dc3545;
    --border-radius: 15px;
    --box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    gap: 3rem;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.logo-container {
    margin-bottom: 1.5rem;
}

.logo {
    max-height: 50px;
    height: auto;
    animation: fadeIn 0.8s ease-out;
}

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

.login-title {
    font-size: 2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
}

.alert {
    border-radius: 12px;
    border: none;
    margin-bottom: 1.5rem;
    animation: slideInDown 0.4s ease-out;
}

#formErrorSummary {
    border-left: 4px solid var(--danger-color);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-form {
    margin-top: 1.5rem;
}

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

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.95rem;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
}

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

.form-control:hover {
    border-color: #dee2e6;
}

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

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

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

.password-toggle:focus-visible,
.forgot-password-link:focus-visible,
.btn-login:focus-visible,
.form-check-input:focus-visible {
    outline: 3px solid rgba(102, 126, 234, 0.45);
    outline-offset: 2px;
    box-shadow: none;
}

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

.form-check-input {
    cursor: pointer;
}

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

.form-check-label {
    cursor: pointer;
    font-size: 0.95rem;
    color: #495057;
}

.forgot-password-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-password-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 0.875rem;
    font-size: 1.05rem;
    font-weight: 600;
    background: var(--primary-gradient);
    border: none;
    border-radius: 10px;
    color: white;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn-login:hover::before {
    width: 300px;
    height: 300px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
}

.footer-text {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

.login-info {
    display: none;
}

@media (min-width: 992px) {
    .login-info {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        max-width: 400px;
    }
}

.info-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    animation: fadeInRight 0.6s ease-out;
    animation-fill-mode: backwards;
}

.info-card:nth-child(1) { animation-delay: 0.2s; }
.info-card:nth-child(2) { animation-delay: 0.4s; }
.info-card:nth-child(3) { animation-delay: 0.6s; }

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.info-icon {
    font-size: 2.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
}

.info-card p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

.login-page-footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.login-page-footer p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

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

.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

@media (max-width: 768px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .login-title {
        font-size: 1.75rem;
    }

    .login-subtitle {
        font-size: 0.95rem;
    }

    .form-control {
        padding: 0.65rem 0.875rem;
        font-size: 0.95rem;
    }

    .btn-login {
        padding: 0.75rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1rem 0.5rem;
    }

    .login-card {
        padding: 1.5rem 1rem;
    }

    .logo {
        max-height: 40px;
    }

    .login-title {
        font-size: 1.5rem;
    }
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

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

/* ===========================================
   Forgot Password & Reset Password Pages
   =========================================== */

.forgot-container,
.reset-container {
    max-width: 450px;
    width: 100%;
    padding: 20px;
    margin: 0 auto;
}

.reset-container {
    max-width: 500px;
}

.forgot-card,
.reset-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

.forgot-header,
.reset-header {
    background: var(--primary-gradient);
    padding: 40px 30px;
    text-align: center;
    color: white;
}

.forgot-icon,
.reset-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.forgot-header h1,
.reset-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.forgot-header p,
.reset-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.forgot-body,
.reset-body {
    padding: 40px 30px;
}

.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.back-link a:hover {
    text-decoration: underline;
}

.success-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 20px;
}

.email-icon {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 15px;
}

/* Password Requirements Box */
.password-requirements {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 0.875rem;
}

.password-requirements ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.password-requirements li {
    margin: 5px 0;
    color: #6c757d;
    transition: color 0.2s ease;
}

.password-requirements li.valid {
    color: var(--success-color);
}

.password-requirements li.valid::marker {
    content: '\2713 ';
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    padding: 12px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    color: white;
    transition: var(--transition);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

/* Form control valid state */
.form-control.is-valid {
    border-color: var(--success-color);
}

.form-control.is-valid:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
}

/* Password match indicator */
.password-match-indicator {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.password-match-indicator.match {
    color: var(--success-color);
}

.password-match-indicator.no-match {
    color: var(--danger-color);
}

/* Responsive adjustments for forgot/reset */
@media (max-width: 480px) {
    .forgot-container,
    .reset-container {
        padding: 1rem 0.5rem;
    }

    .forgot-body,
    .reset-body {
        padding: 30px 20px;
    }

    .forgot-header,
    .reset-header {
        padding: 30px 20px;
    }
}
