/* /assets/css/login.css */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px; 
}

.login-box {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 420px;
    text-align: center;
}

/* --- CORREÇÃO DA LOGO AQUI --- */
.logo-login {
    max-width: 150px; 
    width: 100%;
    height: auto;
    max-height: 120px; /* Trava a altura máxima */
    object-fit: contain; /* Impede distorção da imagem */
    margin: 0 auto 20px auto; 
    cursor: pointer;
    display: block;
}

.login-box h2 { margin-bottom: 25px; font-weight: 600; color: #2c3e50; }
.input-group { margin-bottom: 20px; text-align: left; }
.input-group label { display: block; margin-bottom: 8px; font-weight: 500; color: #555; }

.input-group input, .input-group select {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px; 
    outline: none;
    transition: 0.3s;
    background-color: #fcfcfc;
}

.input-group input:focus, .input-group select:focus { border-color: #007bff; background-color: #fff; }

.btn-primary {
    width: 100%;
    padding: 15px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}
.btn-primary:hover { background-color: #0056b3; }
#fase2 { display: none; }

.rodape-login { margin-top: 30px; font-size: 13px; color: #999; }

/* --- GRID DE MÓDULOS (FASE 2) --- */
.modulos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.btn-modulo {
    border: none;
    border-radius: 6px;
    padding: 20px 10px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-modulo:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Usaremos emojis temporariamente como ícones. Depois podemos substituir por FontAwesome se desejar */
.btn-modulo .icone-mod {
    font-size: 24px;
}

/* Cores específicas de cada módulo */
.mod-retaguarda { background-color: #0d6efd; } /* Azul */
.mod-pdv { background-color: #ffc107; color: #fff; } /* Amarelo */
.mod-veterinario { background-color: #198754; } /* Verde */
.mod-banho_tosa { background-color: #0dcaf0; } /* Ciano */

/* --- TOGGLE SENHA (VISUALIZAR SENHA) --- */
.password-container {
    position: relative;
    width: 100%;
    display: block; /* Garante que o container ocupe a linha toda corretamente */
}

.password-container input {
    width: 100%;
    padding-right: 40px !important; /* Garante espaço para o ícone e força a prioridade */
    box-sizing: border-box; /* Impede que o padding quebre a largura do input */
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%; /* Joga o topo do ícone para o meio do container */
    transform: translateY(-50%); /* Puxa o ícone para cima exatamente na metade do seu próprio tamanho, centralizando perfeito */
    cursor: pointer;
    font-size: 16px;
    color: #666;
    user-select: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1; /* Evita que espaços de linha da fonte empurrem o emoji */
}

.toggle-password:hover {
    opacity: 1;
}

@media (max-width: 600px) {
    /* No celular, os botões também ficam em duas colunas, mas com texto menor */
    .modulos-grid { gap: 10px; }
    .btn-modulo { padding: 15px 5px; font-size: 11px; }
}

/* --- CORREÇÃO DO FLEXBOX NO CELULAR --- */
@media (max-width: 600px) {
    body { background-color: #ffffff; } 
    
    .login-wrapper { padding: 0; align-items: flex-start; }
    
    .login-box {
        padding: 40px 25px; 
        box-shadow: none;   
        border-radius: 0;   
        min-height: 100vh;  /* Usar min-height em vez de height fixo */
        height: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center; /* Centraliza horizontalmente */
    }

    /* Garante que os formulários ocupem toda a largura no mobile */
    #fase1, #fase2 { width: 100%; }
}

/* --- AJUSTES DO SWEETALERT PARA TELAS PEQUENAS (Ex: 320px) --- */
@media (max-width: 600px) {
    /* Força o popup a caber na tela com uma margem de respiro */
    div:where(.swal2-container) div:where(.swal2-popup) {
        width: 90% !important;
        padding: 20px 15px !important;
    }

    /* Força as caixas de texto a respeitarem 100% da largura, removendo margens laterais */
    div:where(.swal2-container) input:where(.swal2-input) {
        width: 100% !important;
        max-width: 100% !important;
        margin: 10px 0 !important;
        box-sizing: border-box !important;
        font-size: 15px !important;
    }

    /* Ajusta os botões para não vazarem e ficarem lado a lado proporcionalmente */
    div:where(.swal2-container) div:where(.swal2-actions) {
        width: 100% !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    
    div:where(.swal2-container) div:where(.swal2-actions) button {
        margin: 0 !important;
        width: 46% !important; 
        flex-grow: 1 !important;
        font-size: 15px !important;
        padding: 12px 10px !important;
    }
}
/* --- STATUS DO GPS --- */
#gps-status {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.gps-aguardando {
    color: #f39c12; /* Cor de alerta enquanto carrega */
}

.gps-ativo {
    color: #008f39; /* Verde igual ao sistema anterior */
}

/* Efeito visual para mostrar que os campos estão bloqueados */
input:disabled, button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #e9ecef !important;
}