/* Importa uma fonte mais moderna do Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

/* --- Reset Básico e Estilos Globais --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-image: url('/imagens/fundo_login.webp'); /* SUA IMAGEM DE FUNDO AQUI */
    background-size: cover;
    background-position: center;
    color: #fff;
}

/* --- Container Principal (Usa Flexbox para centralizar tudo) --- */
.login-container {
    display: flex;
    justify-content: center; /* Centraliza horizontalmente */
    align-items: center;    /* Centraliza verticalmente */
    min-height: 100vh;      /* Ocupa a altura inteira da tela */
    padding: 20px;
}

/* --- O "Cartão" de Login --- */
.login-card {
    background: linear-gradient(145deg, rgba(20, 35, 50, 0.6), rgba(5, 15, 25, 0.95));
    backdrop-filter: blur(10px);
    padding: 40px 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px; /* Largura máxima no desktop */
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    width: 240px;
    margin-bottom: 25px;
}

/* --- Estilo dos Campos do Formulário --- */
.input-group {
    text-align: left;
    margin-bottom: 15px;
}

.input-group label, .form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #ccc;
}

.input-group input {
    width: 100%;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
}

.input-group input::placeholder {
    color: #888;
}

/* --- Estilo do Botão --- */
button {
    width: 100%;
    padding: 12px;
    background-color: #DC143C; 
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #A00B2B;
}

/* --- Mensagem de Erro --- */
#error-message {
    margin-top: 15px;
    color: #ff4d4d;
    font-weight: 500;
}

/* --- RESPONSIVIDADE (A MÁGICA PARA CELULAR) --- */
/* Esta regra só se aplica para telas com largura de até 600px */
@media (max-width: 600px) {
    .login-card {
        padding: 30px 20px;
    }

    .logo {
        width: 200px;
    }
}

/* --- Estilos do Banner PWA --- */
.pwa-banner {
    display: none; /* Começa escondido */
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: linear-gradient(145deg, #2c3e50, #1a2533);
    color: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    align-items: center;
    gap: 15px;
    z-index: 1000;
}
.pwa-banner img {
    width: 50px;
    height: 50px;
}
.pwa-text {
    flex-grow: 1;
}
.pwa-text h3 {
    margin: 0 0 5px 0;
    font-size: 1rem;
}
.pwa-text p {
    margin: 0;
    font-size: 0.8rem;
    color: #ccc;
}
/* --- Botões de Ação do Banner --- */
.pwa-actions {
    display: flex;
    flex-direction: column; /* Coloca os botões um em cima do outro */
    gap: 8px;
}

.pwa-install-btn, .pwa-dismiss-btn {
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    border: none;
    width: 90px; /* Largura fixa para os botões */
    text-align: center;
}

.pwa-install-btn {
    background-color: #27ae60; /* Verde */
    color: white;
}

.pwa-dismiss-btn {
    background-color: transparent;
    color: #ccc;
}

.form-group {
    text-align: left;
    margin-bottom: 30px;
}

.pin-container {
    display: flex;
    justify-content: space-between; /* Distribui o espaço para ocupar a largura total */
    gap: 10px;
}

.pin-input {
    flex-grow: 1; /* Faz cada input crescer para ocupar o espaço disponível */
    width: 20%;   /* Base para o crescimento */
    height: 50px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    
    /* Copiando o estilo do seu campo de CPF */
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
}

.pin-input:focus {
    outline: none;
    border-color: #fff; /* Borda branca ao focar, para combinar */
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.button-group {
    margin-top: 15px; /* Adiciona o espaço entre o PIN e o botão */
}
/* ============================================ */
/* MODAL DE ALERTA BONITO */
/* ============================================ */
.alert-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.alert-modal.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.alert-content {
    background: linear-gradient(145deg, rgba(20, 35, 50, 0.95), rgba(5, 15, 25, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.alert-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.alert-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.alert-message {
    font-size: 15px;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 24px;
}

.alert-btn {
    width: auto;
    padding: 12px 40px;
    background: linear-gradient(135deg, #DC143C 0%, #A00B2B 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.alert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.4);
}

.alert-btn:active {
    transform: translateY(0);
}