/**
 * ProEduc Login Theme
 * Sistema de Cursos para Presídios
 * Tema personalizado para tela de login
 */

:root {
    --proeduc-primary: #2c5aa0;
    --proeduc-secondary: #1e3d72;
    --proeduc-accent: #4a7bc8;
    --proeduc-light: #f8fafc;
    --proeduc-dark: #1a202c;
    --proeduc-success: #28a745;
    --proeduc-warning: #ffc107;
    --proeduc-danger: #dc3545;
    --proeduc-info: #17a2b8;
}

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.proeduc-login {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--proeduc-primary) 0%, var(--proeduc-secondary) 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Loader */
.proeduc-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--proeduc-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Container Principal */
.proeduc-container {
    display: flex;
    min-height: 100vh;
}

/* Lado Esquerdo - Branding */
.proeduc-left {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.proeduc-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--proeduc-primary) 0%, var(--proeduc-secondary) 100%);
}

.wave-layer {
    position: absolute;
    width: 120%;
    height: 120%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 45%;
    animation: wave 8s infinite linear;
}

.wave-layer:nth-child(1) {
    animation-delay: 0s;
    opacity: 0.3;
}

.wave-layer:nth-child(2) {
    animation-delay: -2s;
    opacity: 0.2;
}

.wave-layer:nth-child(3) {
    animation-delay: -4s;
    opacity: 0.1;
}

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

.mesh-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: float 6s infinite ease-in-out;
}

.particle:nth-child(1) { top: 20%; left: 20%; animation-delay: 0s; }
.particle:nth-child(2) { top: 60%; left: 80%; animation-delay: 1s; }
.particle:nth-child(3) { top: 80%; left: 10%; animation-delay: 2s; }
.particle:nth-child(4) { top: 40%; left: 60%; animation-delay: 3s; }
.particle:nth-child(5) { top: 10%; left: 90%; animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); opacity: 0.6; }
    50% { transform: translateY(-20px) scale(1.1); opacity: 1; }
}

/* Conteúdo da Esquerda */
.left-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 500px;
    padding: 40px;
}

.brand-logo img {
    max-width: 180px;
    height: auto;
    margin-bottom: 30px;
    filter: brightness(1.1);
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.brand-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

.features-list {
    list-style: none;
    text-align: left;
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.2rem;
}

.feature-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.feature-desc {
    opacity: 0.8;
    font-size: 0.9rem;
}

.company-footer {
    margin-top: 40px;
    font-style: italic;
    opacity: 0.8;
}

/* Lado Direito - Formulário */
.proeduc-right {
    flex: 0 0 450px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.form-container {
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    max-width: 80px;
    height: auto;
    margin-bottom: 20px;
}

.form-title {
    color: var(--proeduc-primary);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.form-subtitle {
    color: #6c757d;
    font-size: 0.95rem;
}

/* Alertas */
.proeduc-alert {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.proeduc-alert i {
    margin-right: 10px;
    font-size: 1rem;
}

/* Campos do Formulário */
.proeduc-form-group {
    margin-bottom: 25px;
}

.proeduc-label {
    display: block;
    color: var(--proeduc-dark);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1rem;
    z-index: 1;
}

.proeduc-input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.proeduc-input:focus {
    outline: none;
    border-color: var(--proeduc-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

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

.password-toggle:hover {
    color: var(--proeduc-primary);
}

/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.proeduc-checkbox {
    position: relative;
    margin-right: 12px;
}

.proeduc-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 18px;
    height: 18px;
}

.checkbox-custom {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.proeduc-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--proeduc-primary);
    border-color: var(--proeduc-primary);
}

.proeduc-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
}

.checkbox-label {
    color: #495057;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

/* Botões */
.btn-proeduc {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 15px;
}

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

.btn-primary:hover {
    background: var(--proeduc-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 90, 160, 0.3);
}

.btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #f8f9fa;
    color: var(--proeduc-primary);
    border: 2px solid var(--proeduc-primary);
}

.btn-secondary:hover {
    background: var(--proeduc-primary);
    color: white;
    text-decoration: none;
}

/* Footer do Formulário */
.form-footer {
    text-align: center;
    margin-top: 30px;
}

.form-footer p {
    margin-bottom: 15px;
}

.form-link {
    color: var(--proeduc-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-link:hover {
    color: var(--proeduc-secondary);
    text-decoration: underline;
}

.external-link {
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
}

/* Modal de Recuperação */
.proeduc-modal .modal-content {
    background: var(--proeduc-primary);
    color: white;
    border: none;
    border-radius: 12px;
}

.proeduc-modal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.proeduc-modal .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.proeduc-modal .form-control {
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.proeduc-modal .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.proeduc-modal .form-control:focus {
    border-color: white;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* Responsividade */
@media (max-width: 768px) {
    .proeduc-container {
        flex-direction: column;
    }

    .proeduc-left {
        min-height: 300px;
        flex: none;
    }

    .proeduc-right {
        flex: 1;
    }

    .left-content {
        padding: 20px;
    }

    .brand-title {
        font-size: 2rem;
    }

    .features-list {
        display: none;
    }

    .form-container {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .proeduc-left {
        min-height: 200px;
    }

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

    .brand-subtitle {
        font-size: 1rem;
    }

    .form-container {
        padding: 20px 15px;
    }

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

/* Animações de validação */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
    border-color: var(--proeduc-danger) !important;
}

.focused .input-icon {
    color: var(--proeduc-primary) !important;
}

/* Estados de foco aprimorados */
.proeduc-form-group.focused .proeduc-input {
    border-color: var(--proeduc-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

/* Auto-fill styling */
.proeduc-input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: var(--proeduc-dark) !important;
}
