﻿/* === PÁGINA DE LOGIN === */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    background: linear-gradient(135deg, #1a365d 0%, #0f2d4a 100%);
    overflow: hidden;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    animation: float 8s ease-in-out infinite;
}

.shape-1 {
    width: 320px;
    height: 320px;
    top: -160px;
    right: -160px;
    animation-delay: 0s;
}

.shape-2 {
    width: 240px;
    height: 240px;
    bottom: -120px;
    left: -120px;
    animation-delay: 3s;
}

.shape-3 {
    width: 180px;
    height: 180px;
    top: 50%;
    left: -90px;
    animation-delay: 6s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.8;
    }

    50% {
        transform: translateY(-30px) rotate(10deg);
        opacity: 1;
    }
}

.login-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    width: 72px;
    height: 72px;
    margin-bottom: 1.5rem;
    object-fit: contain;
}

.login-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.login-subtitle {
    color: #718096;
    font-size: 1rem;
    margin: 0;
}

.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e0;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s ease;
    background-color: white;
    color: #2d3748;
    box-sizing: border-box;
}

    .form-control:focus {
        outline: none;
        border-color: #1a365d;
        box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
    }

    .form-control.error {
        border-color: #e53e3e;
        box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
    }

.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #718096;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 0.25rem;
}

    .password-toggle:hover {
        color: #1a365d;
        background-color: #edf2f7;
    }

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4a5568;
    position: relative;
}

.checkbox-input {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.checkmark {
    width: 18px;
    height: 18px;
    background-color: white;
    border: 2px solid #cbd5e0;
    border-radius: 0.25rem;
    transition: all 0.15s ease;
    position: relative;
    flex-shrink: 0;
}

.checkbox-input:checked + .checkmark {
    background-color: #1a365d;
    border-color: #1a365d;
}

    .checkbox-input:checked + .checkmark::after {
        content: '';
        position: absolute;
        left: 5px;
        top: 2px;
        width: 4px;
        height: 8px;
        border: solid white;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
    }

.checkbox-text {
    user-select: none;
}

.forgot-link {
    color: #1a365d;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

    .forgot-link:hover {
        color: #0f2d4a;
        text-decoration: underline;
    }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    white-space: nowrap;
    user-select: none;
    line-height: 1.5;
}

    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        pointer-events: none;
    }

.btn-primary {
    background-color: #1a365d;
    color: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

    .btn-primary:hover:not(:disabled) {
        background-color: #2d5985;
        transform: translateY(-1px);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

.btn-login {
    width: 100%;
    font-size: 1rem;
    padding: 1rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.login-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.footer-text {
    color: #718096;
    font-size: 0.875rem;
    margin: 0 0 1rem 0;
}

.register-link {
    color: #1a365d;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

    .register-link:hover {
        color: #0f2d4a;
        text-decoration: underline;
    }

/* Demo credentials */
.demo-credentials {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

.demo-title {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.875rem;
    margin: 0 0 0.5rem 0;
}

.demo-info {
    color: #4a5568;
    font-size: 0.75rem;
    margin: 0.25rem 0;
    font-family: 'Courier New', monospace;
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid;
}

.alert-error {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.field-validation-error {
    color: #e53e3e;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

/* Responsive */
@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
    }

    .login-card {
        padding: 2rem;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}
