/* ======================================================= */
/*    BLOQUEIO DE SELEÇÃO DE TEXTO PARA "SENSAÇÃO DE APP"  */
/* ======================================================= */
body {
    -webkit-user-select: none; /* Safari, Chrome, Opera */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* Internet Explorer/Edge */
    user-select: none;         /* Padrão */
    -webkit-touch-callout: none; /* Desabilita o menu que aparece ao segurar o toque no iOS */
}
/* Reabilita a seleção de texto para campos onde é necessária */
input,
textarea,
[contenteditable="true"] {
    -webkit-user-select: text; /* Safari, Chrome, Opera */
    -moz-user-select: text;    /* Firefox */
    -ms-user-select: text;     /* Internet Explorer/Edge */
    user-select: text;         /* Padrão */
}

/* Reset básico e box-sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4; /* Cor de fundo geral */
    color: #333;
    padding-bottom: 70px; /* Altura aproximada do rodapé de navegação */
}

.app-header {
    background-color: #333; /* Cor do cabeçalho */
    color: #fff;
    padding: 15px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.app-header h1 {
    font-size: 1.2em;
    margin: 0;
}

.app-content {
    padding: 15px;
}

/* Rodapé de navegação fixo na parte inferior */
.app-footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff; /* Cor do rodapé */
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 1000;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

.app-footer-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #555; /* Cor dos ícones e texto da navegação */
    font-size: 0.75em; /* Tamanho do texto abaixo do ícone */
    flex-grow: 1; /* Para ocupar espaço igualmente */
    padding: 5px 0;
}

.app-footer-nav a.ativo {
    color: #007bff; /* Cor do item ativo na navegação */
}

.app-footer-nav img {
    width: 24px; /* Tamanho dos ícones */
    height: 24px;
    margin-bottom: 3px;
}


/* Estilos para Formulários (Mobile-First) */
.form-grupo {
    margin-bottom: 15px;
}

.form-grupo label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-grupo input[type="text"],
.form-grupo input[type="email"],
.form-grupo input[type="password"],
.form-grupo input[type="number"],
.form-grupo input[type="tel"], /* Adicionado para garantir o estilo */
.form-grupo select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

button, .botao {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #007bff; /* Cor primária do botão */
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    text-align: center;
    margin-top: 10px;
}

button:hover, .botao:hover {
    background-color: #0056b3;
}

.botao-secundario {
    background-color: #6c757d; /* Cor secundária */
}
.botao-secundario:hover {
    background-color: #545b62;
}

.botao-perigo {
    background-color: #dc3545; /* Cor de perigo/cancelar */
}
.botao-perigo:hover {
    background-color: #c82333;
}


/* ======================================================= */
/*    ESTILO DAS NOTIFICAÇÕES (ALERTAS E TOASTS)           */
/* ======================================================= */
/* ======================================================= */
/*    ESTILO DAS NOTIFICAÇÕES (ALERTAS E TOASTS)           */
/* ======================================================= */
.alerta {
    position: fixed;            /* Desacopla do fluxo da página */
    top: 60px;                  /* Distância do topo da tela (abaixo do header) */
    left: 50%;                  /* Centraliza horizontalmente */
    transform: translateX(-50%); /* Ajuste fino da centralização */
    z-index: 9998;              /* Garante que fique acima do conteúdo */
    width: 90%;                 /* Largura da notificação */
    max-width: 500px;           /* Largura máxima */
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    text-align: center;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 1;
    transition: opacity 0.5s ease-out, top 0.5s ease-out; /* Adiciona transição para o 'top' */
}
.alerta.fade-out {
    opacity: 0;
    top: 40px; /* Efeito de subir ao desaparecer */
}
.alerta-sucesso,
.alerta-erro,
.alerta-aviso {
    background-color: #2c3e50;
}
.alerta-aviso a { 
    color: #3498db; 
    font-weight: bold;
    text-decoration: underline;
}

.toast-container { 
    position: fixed; 
    top: 20px; 
    left: 50%; 
    transform: translateX(-50%); 
    z-index: 9999; 
    width: 90%; 
    max-width: 400px; 
}
.toast { 
    background-color: #2c3e50;
    padding: 15px; 
    margin-bottom: 10px; 
    border-radius: 8px; 
    color: #fff; 
    font-weight: 500; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); 
    opacity: 0; 
    transform: translateY(-20px); 
    animation: toast-in 0.5s forwards; 
}
@keyframes toast-in { 
    to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}


/* Cards para exibir informações no dashboard */
.card {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #333;
}
.card p {
    margin-bottom: 5px;
    font-size: 1em;
}
.card .valor_destaque {
    font-size: 1.6em;
    font-weight: bold;
    color: #007bff; /* Cor de destaque */
    text-align: center;
    margin: 10px 0;
}

/* Links gerais */
a {
    color: #007bff;
    text-decoration: none;
}
a:hover {
    text-decoration: none;
}

/* Utilitários */
.texto-centralizado {
    text-align: center;
}
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }

/* --- ESTILOS PARA O MODAL E BOTÃO FLUTUANTE --- */
.botao-flutuante {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 85px; 
    right: 20px;
    background-color: #007bff;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    line-height: 60px;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.25);
    z-index: 1001; 
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); 
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 2000; 
}
.modal-overlay.visivel {
    display: flex; 
}
.modal-content {
    position: relative;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
}
.modal-content .card {
    margin-bottom: 0; 
}
.modal-close {
    position: absolute;
    top: -5px;
    right: 5px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}

/* --- Estilo do Menu de Configurações (Bottom Sheet) --- */
.modal-overlay-config {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: flex-end;
    z-index: 1000;
}
.modal-content-config {
    background: #ffffff;
    width: 100%;
    padding: 20px;
    padding-top: 40px;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    position: relative;
}
.modal-overlay-config.active .modal-content-config {
    transform: translateY(0);
}
.modal-content-config h4 {
    margin: 0;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
    font-size: 1.2em;
}
.modal-close-config {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
.config-link {
    display: block;
    padding: 15px;
    background-color: #f1f1f1;
    border-radius: 8px;
    margin-bottom: 10px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.2s;
}
.config-link:hover {
    background-color: #e0e0e0;
}

/* --- CSS PARA O MODAL DE REGISTRO DE KM --- */
.registro-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.registro-overlay.visivel {
    display: flex;
}
.registro-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    position: relative;
}
.registro-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
.registro-content .form-card {
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
}

/* --- CSS ESPECÍFICO E ISOLADO PARA O TAXÍMETRO --- */
.taximetro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}
.taximetro-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: #333;
}
.bandeira-tag {
    background-color: #007bff;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.taximetro-form-group {
    margin-bottom: 25px;
}
.taximetro-form-group label {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}
.taximetro-input {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #ffffff;
    color: #333;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.taximetro-form-group small {
    display: block;
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
}
.resultado-corrida {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
    text-align: center;
}
.resultado-corrida h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #495057;
    font-size: 1.1em;
}
.resultado-corrida .valor-final {
    font-size: 2.8em;
    font-weight: 700;
    color: #28a745;
    margin: 10px 0;
}
.resultado-corrida small {
    color: #6c757d;
    font-size: 0.9em;
}
.link-voltar {
    display: block;
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    font-weight: 500;
}
.bandeira-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.bandeira-btn.bandeira-1 {
    background-color: #007bff;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}
.bandeira-btn.bandeira-1:hover {
    background-color: #0069d9;
}
.bandeira-btn.bandeira-2 {
    background-color: #fd7e14; 
    box-shadow: 0 4px 10px rgba(253, 126, 20, 0.3);
}
.bandeira-btn.bandeira-2:hover {
    background-color: #e36402;
}
#recalcular-toggle-btn {
    margin-bottom: 15px;
}

/* --- ESTILO PARA O LINK DE COMPRA PREMIUM --- */
.config-link.premium-link {
    background-color: #28a745; 
    color: white !important; 
    font-weight: bold;
    border: 1px solid #1e7e34;
}
.config-link.premium-link:hover {
    background-color: #218838; 
}