body {font-family: system-ui,-apple-system,Segoe UI,Roboto,sans-serif;margin: 0;padding:0;background:#f5f7fa;color:#222;}
header {background:#174ea6;color:#fff;padding:12px 20px;}
header h1 {margin:0;font-size:20px;}
main {padding:20px;max-width:1280px;margin:auto;}
nav a {color:#fff;text-decoration:none;margin-right:14px;font-weight:500;}
nav a:hover {text-decoration:underline;}
.table {border-collapse:collapse;width:100%;background:#fff;box-shadow:0 2px 4px rgba(0,0,0,.08);}
.table th,.table td {padding:8px 10px;border:1px solid #ddd;font-size:14px;}
.table th {background:#eef4ff;text-align:left;}
/* Estilo apenas para formulários que são cards completos */
form.card {background:#fff;padding:16px;box-shadow:0 2px 4px rgba(0,0,0,.08);max-width:600px;}
/* Forms genéricos ficam fluidos (especialmente os que ficam dentro de um card wrapper) */
form {max-width:none;background:transparent;box-shadow:none;padding:0;}
input[type=text], textarea, select {width:100%;padding:8px;border:1px solid #bbb;border-radius:4px;font-size:14px;box-sizing:border-box;}
button {background:#174ea6;color:#fff;border:none;padding:8px 14px;border-radius:4px;cursor:pointer;font-size:14px;}
button.secondary {background:#666;}
button.danger {background:#c62828;}
button:hover {opacity:.9;}
.flex {display:flex;gap:16px;flex-wrap:wrap;}
.card {background:#fff;padding:14px;border-radius:6px;box-shadow:0 2px 4px rgba(0,0,0,.08);}
.status-pendente {color:#b76e00;font-weight:600;}
.status-direcionado {color:#174ea6;font-weight:600;}
.status-aprovado {color:#1b7e3c;font-weight:600;}
.status-reprovado {color:#c62828;font-weight:600;}
footer {text-align:center;font-size:12px;color:#555;padding:20px;}
.alert {background:#ffe8c5;padding:8px 12px;border-left:4px solid #ff9800;margin-bottom:14px;}
.success {background:#e6f4ea;padding:8px 12px;border-left:4px solid #1b7e3c;margin-bottom:14px;}
.grid-2 {display:grid;grid-template-columns:1fr 1fr;gap:20px;}
@media (max-width:700px){.grid-2{grid-template-columns:1fr;}header h1{font-size:16px;}nav a{display:inline-block;margin-right:8px;margin-bottom:4px;}}

/* Inline edit helpers */
.editable {min-width:120px; padding:4px 6px; border-bottom:1px dashed #bbb; cursor:text;}
.editable:focus {outline:2px solid #cfe3ff; background:#f5fbff;}
.editable.saving {background:#fff3cd;}
.editable.ok {background:#e6f4ea;}
.editable.error {background:#fdecea;}
.btn-link {display:inline-block; padding:8px 12px; color:#174ea6; text-decoration:none; border:1px solid #174ea6; border-radius:4px;}
.btn-link:hover {background:#174ea6; color:#fff;}

/* Table responsive wrapper */
.table-wrap {width:100%; overflow-x:auto;}
.table {min-width:800px;}

/* Generic buttons as links */
.btn {display:inline-block; background:#174ea6; color:#fff; text-decoration:none; padding:6px 10px; border-radius:4px; font-size:13px; margin-right:6px;}
.btn.secondary {background:#666;}
.btn.light {background:#e0e7ff; color:#174ea6;}
.btn:hover {opacity:.9;}

/* Modal */
.modal {position:fixed; inset:0; background:rgba(0,0,0,.4); display:none; align-items:center; justify-content:center; padding:20px;}
.modal.open {display:flex;}
.modal-content {background:#fff; width:100%; max-width:520px; border-radius:8px; box-shadow:0 10px 25px rgba(0,0,0,.2); overflow:hidden;}
.modal-header {display:flex; align-items:center; justify-content:space-between; padding:12px 16px; background:#eef4ff;}
.modal-header h4 {margin:0; font-size:16px;}
.modal-close {background:transparent; border:none; font-size:20px; cursor:pointer;}
.modal-body {padding:14px 16px;}
.modal-footer {padding:12px 16px; text-align:right; background:#fafbff;}

/* Full width (break out of main) */
.full-bleed {margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); padding-left: 20px; padding-right: 20px;}

/* Layout helpers */
.card-header {display:flex; gap:16px; align-items:flex-end; flex-wrap:wrap; margin-bottom:10px;}
.card-header .grow {flex:1; min-width:240px;}
.controls-inline {display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap;}
label {display:block; font-size:12px; color:#444; margin-bottom:4px;}
select, input[type=text] {height:36px;}

/* Map */
.map-container {height:72vh; width:100%; background:#eaeff7; border:1px solid #ccd7ea;}
.filters-grid {display:grid; grid-template-columns:1fr 1fr 2fr auto auto; gap:12px;}
@media (max-width:800px){.filters-grid{grid-template-columns:1fr;}}
