/* Reset e configurações gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* Background será definido dinamicamente via CSS inline na view */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #333;
}

/* Container principal */
.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-bottom: 100px; /* Espaço para o footer fixo */
    min-height: 100vh;
}

.login-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.6s ease-out;
}

/* Responsividade para tablets */
@media (max-width: 768px) {
    .login-container {
        padding: 15px;
        padding-bottom: 90px;
    }
    
    .login-footer {
        padding: 14px 0;
    }
    
    .login-footer .footer-text,
    .login-footer .version-text {
        font-size: 13px;
    }
    
    .login-wrapper {
        padding: 30px;
        max-width: 100%;
        margin: 0 10px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .login-header p {
        font-size: 13px;
    }
}

/* Logo/Título */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.login-header p {
    color: #718096;
    font-size: 14px;
    font-weight: 400;
}

/* Formulário */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
    color: #2d3748;
}

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

.form-group input::placeholder {
    color: #a0aec0;
}

/* Validação visual */
.form-group input.is-invalid {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.form-group input.is-valid {
    border-color: #38a169;
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.1);
}



.invalid-feedback {
    display: none;
    color: #e53e3e;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

.form-group input.is-invalid + .invalid-feedback {
    display: block;
}

/* Ícones nos labels */
.form-group label i {
    color: #667eea;
    font-size: 14px;
}



/* Botão de login */
.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

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

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

.login-btn.loading {
    cursor: not-allowed;
}

.login-btn.loading .btn-text {
    display: none;
}

.login-btn.loading .btn-loading {
    display: inline-flex !important;
}

.btn-loading i {
    animation: spin 1s linear infinite;
}

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

/* Checkbox para salvar credenciais */
.form-check {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

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

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-check-label {
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

/* Alertas Bootstrap */
.alert {
    padding: 12px 16px;
    margin: 15px 0;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeInUp 0.3s ease-out;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert i {
    font-size: 16px;
}

/* Links de ajuda */
.login-links {
    margin-top: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.login-links a:hover {
    color: #5a67d8;
    background-color: rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.forgot-password {
    color: #e53e3e !important;
}

.forgot-password:hover {
    color: #c53030 !important;
    background-color: rgba(229, 62, 62, 0.1) !important;
}

.create-account {
    color: #38a169 !important;
}

.create-account:hover {
    color: #2f855a !important;
    background-color: rgba(56, 161, 105, 0.1) !important;
}

/* Mensagem de erro */
.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid #feb2b2;
    text-align: center;
}

/* Footer centralizado na tela de login */
.login-footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.login-footer .footer-text,
.login-footer .version-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 400;
}

/* Responsividade */
@media (max-width: 480px) {
    .login-container {
        padding: 15px;
        padding-bottom: 100px;
    }
    
    .login-footer {
        padding: 12px 0;
    }
    
    .login-footer .footer-text,
    .login-footer .version-text {
        font-size: 12px;
    }
    
    .login-footer .row {
        flex-direction: column;
        gap: 4px;
    }
    
    .login-footer .footer-text {
        display: block;
        margin-bottom: 2px;
    }
    
    .login-footer .version-text {
        display: block;
    }
    
    .login-wrapper {
        padding: 30px 25px;
        border-radius: 15px;
        margin: 0 5px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .form-group input {
        padding: 10px 14px;
        font-size: 16px; /* Evita zoom no iOS */
    }
    
    .login-btn {
        padding: 12px 20px;
    }
    
    .login-links {
        gap: 8px;
    }
    
    .login-links a {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    /* Melhorar espaçamento em mobile */
    .login-form {
        gap: 16px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .form-check {
        margin: 12px 0;
    }
    
    .form-check-input {
        width: 16px;
        height: 16px;
    }
    
    .form-check-label {
        font-size: 13px;
    }
    
    .alert {
        padding: 10px 14px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .login-container {
        padding-bottom: 90px;
    }
    
    .login-wrapper {
        padding: 25px 20px;
        border-radius: 12px;
    }
    
    .login-footer {
        padding: 10px 0;
    }
    
    .login-footer .footer-text,
    .login-footer .version-text {
        font-size: 11px;
    }
    
    .login-header h1 {
        font-size: 22px;
    }
    

    
    /* Ajustes para telas muito pequenas */
    .form-group input {
        padding: 8px 12px;
    }
    
    .login-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .login-links a {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .form-check {
        margin: 10px 0;
    }
    
    .form-check-input {
        width: 14px;
        height: 14px;
    }
    
    .form-check-label {
        font-size: 12px;
    }
    
    .alert {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-wrapper {
    animation: fadeInUp 0.6s ease-out;
}

/* Estados de loading */
.login-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-btn.loading:hover {
    transform: none;
    box-shadow: none;
}

/* Modal Esqueci Minha Senha */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    padding: 0;
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #a0aec0;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #e53e3e;
    background-color: rgba(229, 62, 62, 0.1);
}

.modal-form {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-actions {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.btn-cancel {
    background: transparent;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-cancel:hover {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

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

/* Estilo para o link "Voltar para o Login" */
.back-to-login {
    color: #667eea !important;
}

.back-to-login:hover {
    color: #5a67d8 !important;
    background-color: rgba(102, 126, 234, 0.1) !important;
}

/* Botão cancelar na página de redefinição */
.login-links .btn-cancel {
    margin-top: 10px;
    background: transparent;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    width: 100%;
    justify-content: center;
}

.login-links .btn-cancel:hover {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

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

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsividade para o modal */
@media (max-width: 480px) {
    .modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-form {
        padding: 20px;
        gap: 15px;
    }
    
    .btn-cancel {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 12px 16px;
    }
    
    .modal-form {
        padding: 16px;
        gap: 12px;
    }
}

/* Mensagens Toast */
.message-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 15px 20px;
    max-width: 400px;
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.message-toast.show {
    transform: translateX(0);
}

.message-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2d3748;
    font-size: 14px;
    font-weight: 500;
}

.message-content i {
    font-size: 16px;
    flex-shrink: 0;
}

.message-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.message-close:hover {
    color: #e53e3e;
    background-color: rgba(229, 62, 62, 0.1);
}

/* Tipos de mensagem */
.message-success {
    border-left: 4px solid #38a169;
}

.message-success .message-content i {
    color: #38a169;
}

.message-error {
    border-left: 4px solid #e53e3e;
}

.message-error .message-content i {
    color: #e53e3e;
}

.message-warning {
    border-left: 4px solid #d69e2e;
}

.message-warning .message-content i {
    color: #d69e2e;
}

.message-info {
    border-left: 4px solid #3182ce;
}

.message-info .message-content i {
    color: #3182ce;
}

/* Responsividade para mensagens */
@media (max-width: 480px) {
    .message-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .message-toast.show {
        transform: translateY(0);
    }
} 

/* Garante que o reCAPTCHA fique acima do rodapé */
.grecaptcha-badge, .g-recaptcha {
    z-index: 9999 !important;
    position: fixed !important;
} 