
/* css/style.css */
/* Este arquivo contém todos os estilos da aplicação. */

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--th-base, #ffffff);
    color: var(--th-txt, #111827);
    padding-bottom: 80px;
    transition: background-color 0.3s, color 0.3s;
}

.dark body {
    background-color: #030712;
    color: #f3f4f6;
}

/* Remove o padding para a tela de admin */
body.admin-body {
    padding-bottom: 0;
}


/* Estilo para a barra de rolagem */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #111827; }
::-webkit-scrollbar-thumb { background: #374151; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #4b5563; }

/* Estilos para inputs, botões e modais */
.form-input {
    background-color: #1f2937;
    border: 1px solid #4b5563;
    color: #f3f4f6;
    border-radius: 0.375rem;
    padding: 0.5rem;
    width: 100%;
}
.form-input:focus {
    outline: none;
    border-color: #facc15;
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.5);
}
.form-input:disabled {
    background-color: #374151;
    cursor: not-allowed;
}

.form-checkbox {
    background-color: #1f2937;
    border: 1px solid #4b5563;
    border-radius: 0.25rem;
    color: #facc15; /* Cor do "check" */
    height: 1.25rem;
    width: 1.25rem;
}
.form-checkbox:focus {
    outline: none;
    border-color: #facc15;
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.5);
}

.btn-disabled {
    background-color: #4b5563;
    cursor: not-allowed;
}

/* Overlay para formulários desabilitados */
.form-disabled-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(17, 24, 39, 0.8);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 0.5rem;
    padding: 1rem;
}

/* Overlay para modais */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    padding: 10px;
}

/* Modais secundários/filhos que abrem por cima de relatórios e de outros modais */
#modal-turno-retroativo,
#retroactive-corrida-modal,
#retroactive-despesa-modal,
#confirm-recebimento-modal,
#confirm-finalizar-dia-modal,
#modal-cliente-historico,
#view-history-modal,
#editar-pendencia-modal,
#cancel-corrida-modal,
#confirm-delete-user-modal,
#confirm-action-modal,
#shift-details-modal,
#simular-webhook-modal {
    z-index: 3000 !important;
}

#modal-voucher-pagamento,
#modal-selecionar-cliente,
#modal-cancelar-turno {
    z-index: 4000 !important;
}



/* Cor do ícone do calendário */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.8);
}

/* Remove setas de incremento/decremento de inputs tipo number */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* --- Voice Command Animations --- */
.mic-listening {
    animation: mic-pulse 1.5s infinite;
}

@keyframes mic-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

/* Status de autenticação */
#auth-status {
    background-color: #1f2937;
    color: #9ca3af;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid #4b5563;
}

/* Notificação Toast */
#toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.4s ease;
}

body:not(.admin-body) #toast {
    bottom: 90px;
}

#toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Estilos para Badges de Status */
.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
    margin-left: 0.5rem;
}
.badge-editada { background-color: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.badge-cancelada { background-color: rgba(239, 68, 68, 0.2); color: #fca5a5; }

/* Estilos para Corridas Canceladas */
.corrida-cancelada { opacity: 0.5; border-left-color: #ef4444; }
.relatorio-motivo-cancelamento td {
    background-color: rgba(239, 68, 68, 0.05) !important;
    font-style: italic;
    color: #d1d5db;
    padding-left: 2rem !important;
    border-top: none !important;
}

/* Estilos para o Sistema de Metas */
.goal-card { transition: all 0.3s ease; position: relative; overflow: hidden; }
.progress-bar-bg { background-color: #374151; border-radius: 9999px; height: 10px; overflow: hidden; }
.progress-bar-fill { background-color: #facc15; height: 100%; border-radius: 9999px; transition: width 0.5s ease-out; }
.goal-achieved .progress-bar-fill { background-color: #34d399; }
.goal-achieved { border: 1px solid #34d399; box-shadow: 0 0 15px rgba(52, 211, 153, 0.4); animation: glow 1.5s infinite alternate; }
@keyframes glow {
    from { box-shadow: 0 0 5px rgba(52, 211, 153, 0.3); }
    to { box-shadow: 0 0 20px rgba(52, 211, 153, 0.6); }
}

/* Estilos para a Navegação */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    background-color: #111827;
    border-top: 1px solid #374151;
    height: 64px;
    z-index: 100;
}
.nav-button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 0.75rem;
    padding: 4px 0;
    transition: color 0.2s ease-in-out;
    cursor: pointer;
}
.nav-button:hover {
    color: #f3f4f6;
}
.nav-button.active {
    color: #facc15;
    font-weight: 600;
}

/* Estilos para a Splash Screen */
#splash-screen.hidden {
  opacity: 0;
  pointer-events: none; /* Impede que o elemento bloqueie cliques após desaparecer */
}

/* --- NOVOS ESTILOS PARA O PAINEL DE ADMIN --- */
.admin-nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    color: #9ca3af; /* gray-400 */
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}
.admin-nav-link:hover {
    background-color: #1f2937; /* gray-800 */
    color: #f3f4f6; /* gray-100 */
}
.admin-nav-link.active {
    background-color: #facc15; /* yellow-400 */
    color: #111827; /* gray-900 */
    font-weight: 700;
}
.admin-page-content {
    animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- NOVOS ESTILOS PARA ÍCONES DE PAGAMENTO --- */
.payment-method {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* 8px de espaço entre ícone e texto */
}
.payment-method svg {
    width: 1.25rem; /* 20px */
    height: 1.25rem; /* 20px */
    flex-shrink: 0; /* Impede que o ícone seja esmagado se o espaço for pequeno */
}
.icon-pix { color: #32BCAD; }
.icon-dinheiro { color: #22C55E; }
.icon-cartao { color: #3B82F6; }
.icon-app { color: #F59E0B; }
.icon-default { color: #9CA3AF; }
 
/* Custom Scrollbar for side-panel */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 10px; }
 
/* Preview container shadow and font */
#orcamento-preview-container {
     font-family: 'Inter', sans-serif;
     box-shadow: inset 0 0 40px rgba(0,0,0,0.05);
     background-image: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
}
 
#orcamento-preview-container::-webkit-scrollbar { width: 4px; }
#orcamento-preview-container::-webkit-scrollbar-track { background: #f3f4f6; }
#orcamento-preview-container::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }

.custom-scrollbar-preview::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar-preview::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar-preview::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
}
.custom-scrollbar-preview::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.2);
}

/* Mobile Adjustments for Budget Modal */
@media (max-width: 768px) {
    #orcamento-modal > div {
        flex-direction: column !important;
        padding: 1rem;
        width: 100%;
        max-height: 90vh; /* Slightly smaller to be safe */
        overflow-y: auto !important;
        border-radius: 0; /* Full width on mobile looks better if it's tight */
    }
    
    #orcamento-modal .flex-1 {
        flex: none;
        width: 100%;
        overflow: visible !important;
    }

    #orcamento-preview-container {
        min-height: auto;
        height: auto;
        max-height: none;
        overflow: visible !important;
    }
}

/* Color Picker Styling */
input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    border-radius: 8px;
}
input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 8px;
}
