:root { --cor-primaria: #2b2b2b; --cor-secundaria: #2b7a2b; }
body { font-family: system-ui, sans-serif; margin: 0; background: #f7f7f7; color: #222; }
.topnav { background: var(--cor-primaria); padding: 12px 24px; position: relative; z-index: 100; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.topnav a { color: white; margin-right: 20px; text-decoration: none; font-weight: 600; }
.topnav-logo { height: 36px; margin-right: 20px; vertical-align: middle; }
.nav-sair { margin-left: auto; background: none; padding: 0; max-width: none; display: block; }
.topnav .nav-sair button[type="submit"] { background: none; border: none; color: white; text-decoration: underline; font-weight: 600; font-size: 1em; font-family: inherit; padding: 0; cursor: pointer; }
.container { max-width: 900px; margin: 24px auto; padding: 0 16px; }
.tabela-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: 8px 12px; border-bottom: 1px solid #ddd; text-align: left; }
tr.alerta { background: #ffe1e1; }
.acoes a, .acoes button { margin-right: 8px; }
.acoes form { display: inline; }
.acoes button { background: none; border: none; color: #b00020; cursor: pointer; text-decoration: underline; padding: 0; }
.btn { display: inline-block; margin: 12px 8px 12px 0; padding: 8px 14px; background: var(--cor-secundaria); color: var(--cor-primaria); text-decoration: none; border-radius: 4px; font-weight: 600; }
.btn.secundario { background: #555; }
.filtro { flex-direction: row; align-items: flex-end; max-width: none; background: none; padding: 0; margin-bottom: 12px; }
.filtro label { flex-direction: row; align-items: center; gap: 8px; }
form { display: flex; flex-direction: column; gap: 12px; max-width: 400px; background: white; padding: 16px; border-radius: 6px; }
label { display: flex; flex-direction: column; font-size: 0.9em; gap: 4px; }
input { padding: 6px; font-size: 1em; }
button[type="submit"] { padding: 8px; background: var(--cor-secundaria); color: var(--cor-primaria); border: none; border-radius: 4px; cursor: pointer; font-weight: 600; }
.alerta-box { margin-top: 20px; padding: 12px 16px; background: #ffe1e1; border: 1px solid #b00020; border-radius: 6px; }
.ok-box { margin-top: 20px; padding: 12px 16px; background: #e1ffe4; border: 1px solid #2b7a2b; border-radius: 6px; }
.hint { color: #666; font-size: 0.85em; }
.cidade-bloco { background: white; padding: 16px; border-radius: 6px; margin-bottom: 20px; }
.cidade-cabecalho { display: flex; align-items: center; justify-content: space-between; }
.cidade-cabecalho h2 { margin: 0; }
.link-excluir { background: none; border: none; color: #b00020; text-decoration: underline; cursor: pointer; padding: 0; font-size: 0.9em; }
.novo-bairro { flex-direction: row; align-items: flex-end; max-width: none; background: none; padding: 16px 0 0; box-shadow: none; }
.novo-bairro input[type="hidden"] { display: none; }
form.form-invisivel { display: none; }

.planilha { max-width: none; background: none; padding: 0; margin-bottom: 24px; }
.planilha-titulo { background: var(--cor-primaria); color: white; font-size: 1.4em; font-weight: 700; text-align: center; padding: 14px; border-radius: 6px 6px 0 0; }
.planilha-tamanho-bloco { display: flex; align-items: center; gap: 12px; background: #dff0ff; padding: 10px 14px; }
.planilha-label { font-weight: 700; color: #222; }
.planilha-tamanho-form { flex-direction: row; max-width: none; background: none; padding: 0; gap: 8px; }
.planilha-tamanho-form input { width: 120px; }
.planilha-tabela { width: 100%; border-collapse: collapse; }
.planilha-tabela thead th { background: #111; color: white; padding: 10px 12px; text-align: center; font-size: 0.85em; }
.planilha-tabela thead th.col-insumo { text-align: left; }
.planilha-tabela tbody td { background: white; padding: 8px 12px; border-bottom: 1px solid #ddd; }
.planilha-tabela tbody td.col-insumo { font-weight: 600; }
.planilha-tabela tbody td.col-total { font-weight: 700; text-align: right; }
.planilha-tabela tbody input[type="number"] { width: 90px; }
.planilha-resumo { background: #111; color: white; padding: 12px 16px; border-radius: 0 0 6px 6px; }
.planilha-resumo div { display: flex; justify-content: space-between; padding: 4px 0; }
.planilha-resumo strong { color: #9be07a; }

.container:has(.precificacao-layout) { max-width: 1200px; }
.precificacao-layout { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.precificacao-col { flex: 1 1 420px; min-width: 0; }
.precificacao-form { max-width: none; }
.resumo-tabela { width: 100%; border-collapse: collapse; margin-top: 12px; }
.resumo-tabela td { background: white; padding: 6px 12px; border-bottom: 1px solid #eee; }
.resumo-tabela td:last-child { text-align: right; font-weight: 600; }
.resumo-tabela tr.linha-subtotal td { background: #eef5ea; font-weight: 700; }
.financeiro-menu { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.valor-negativo { color: #b00020; font-weight: 700; }
tr.linha-subtotal td { background: #eef5ea; font-weight: 700; }

.checkbox-label { flex-direction: row !important; align-items: center; gap: 8px !important; }
.checkbox-label input { width: auto; }
.kanban-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.kanban-coluna { background: #eee; border-radius: 6px; padding: 10px; min-width: 220px; flex: 0 0 220px; }
.kanban-coluna h3 { margin: 0 0 10px; font-size: 0.95em; }
.kanban-card { display: flex; flex-direction: column; gap: 2px; background: white; border-radius: 4px; padding: 8px 10px; margin-bottom: 8px; text-decoration: none; color: #222; font-size: 0.85em; box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.kanban-card:hover { box-shadow: 0 2px 4px rgba(0,0,0,0.2); }

.insight-card { display: flex; gap: 12px; align-items: flex-start; background: white; border-radius: 6px; padding: 12px 16px; margin-bottom: 10px; border-left: 5px solid #999; }
.insight-card.critico { border-left-color: #b00020; background: #fff2f2; }
.insight-card.atencao { border-left-color: #b8860b; background: #fff9e6; }
.insight-card.info { border-left-color: #2266cc; background: #eef4ff; }
.insight-categoria { font-weight: 700; font-size: 0.75em; text-transform: uppercase; letter-spacing: 0.03em; color: #666; min-width: 90px; }
.insight-texto { flex: 1; }
.insight-texto a { font-size: 0.85em; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; }
.modal-caixa { background: white; border-radius: 8px; padding: 24px; max-width: 360px; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.modal-caixa p { margin: 0 0 20px; }
.modal-botoes { display: flex; justify-content: flex-end; gap: 8px; }
.modal-botoes button { padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 1em; }
.modal-botoes button:not(.secundario) { background: #b00020; color: white; }
.modal-botoes button.secundario { background: #eee; color: #222; }

.nav-grupo { position: relative; display: inline-block; }
.nav-grupo > button { background: none; border: none; color: white; font-weight: 600; font-size: 1em; font-family: inherit; margin-right: 20px; padding: 0; cursor: pointer; }
.nav-grupo > button::after { content: " ▾"; font-size: 0.8em; }
.nav-dropdown { display: none; position: absolute; top: 100%; left: 0; background: white; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); padding: 6px 0; min-width: 180px; z-index: 200; }
.nav-grupo.aberto .nav-dropdown { display: block; }
.nav-dropdown a { display: block; color: #222; padding: 8px 16px; margin: 0; font-weight: 400; white-space: nowrap; }
.nav-dropdown a:hover { background: #f0f0f0; }
