/* assets/css/style.css */

/* 1. Fonte e Comportamento Geral */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* 2. Scrollbar Personalizada (Fina e Discreta) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb {
    background-color: #475569;
}
::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* 3. Correções de Formulário para Modo Escuro */
/* Garante que o calendário do navegador fique branco no tema escuro */
html.dark {
    color-scheme: dark;
}

/* Garante que as setinhas de número (spin-buttons) apareçam sempre */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  opacity: 1;
  height: auto;
}

/* 4. Tabela "Excel Robusta" (Para os Painéis de Preenchimento) */
.table-container {
    overflow-x: auto;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.table-excel { 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0; 
    min-width: 1000px; /* Garante scroll em telas pequenas */
}

/* Cabeçalho Fixo */
.table-excel th {
    font-size: 0.75rem; 
    text-transform: uppercase;
    font-weight: 700;
    padding: 12px 8px; 
    border-bottom: 2px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    background-color: #f8fafc; 
    color: #475569; 
    position: sticky; 
    top: 0; 
    z-index: 10;
    white-space: nowrap;
}
.dark .table-excel th {
    border-color: #334155;
    background-color: #1e293b; 
    color: #94a3b8; 
}

/* Células */
.table-excel td {
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #f1f5f9;
    padding: 6px;
    height: 50px;
    vertical-align: middle;
}
.dark .table-excel td {
    border-color: #334155;
    border-right-color: #1e293b;
}

/* Inputs dentro da tabela (Caixinhas bem definidas) */
.table-input {
    background-color: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    width: 100%;
    height: 36px;
    padding: 0 8px;
    font-size: 0.875rem; 
    color: #1e293b;
    transition: all 0.2s;
}
.dark .table-input {
    background-color: #0f172a;
    border-color: #475569;
    color: #f1f5f9;
}

.table-input:hover { border-color: #94a3b8; }
.dark .table-input:hover { border-color: #64748b; }

.table-input:focus {
    border-color: #8b5cf6; /* Cor roxa da marca */
    outline: none;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

/* Células de Leitura/Calculadas (Cinza claro) */
.calc-cell {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border-radius: 4px;
    border: 1px solid transparent;
}
.dark .calc-cell {
    background-color: #1e293b;
    color: #94a3b8;
}

/* Botões de Ação na Tabela (Excluir) */
.btn-row-action {
    display: flex; 
    align-items: center; 
    justify-content: center;
    width: 30px; 
    height: 30px;
    border-radius: 6px;
    color: #ef4444;
    cursor: pointer;
    transition: background 0.2s;
    margin: 0 auto;
}
.btn-row-action:hover { background-color: #fee2e2; }
.dark .btn-row-action:hover { background-color: rgba(239, 68, 68, 0.2); }

/* Estilos para Sidebar Colapsada */
.sidebar-collapsed {
    width: 5rem !important; /* w-20 */
}

/* Esconde textos e títulos de grupo quando colapsado */
.sidebar-collapsed .sidebar-text, 
.sidebar-collapsed .sidebar-group-title {
    display: none !important;
}

/* Centraliza os ícones */
.sidebar-collapsed .sidebar-icon {
    margin: 0 auto;
}

/* Ajusta o link para centralizar o conteúdo flex */
.sidebar-collapsed a {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}