*{box-sizing:border-box}body{margin:0;font:14px system-ui, sans-serif;color:#17243a;background:#f6f8fb}header{height:65px;background:white;border-bottom:1px solid #e0e5ed;display:flex;align-items:center;justify-content:space-between;padding:0 22px;gap:10px}.brand{display:flex;align-items:center;gap:12px}.brand b{letter-spacing:1.8px;font-size:16px}.logo{display:grid;place-items:center;width:40px;height:40px;background:#2459db;color:white;font-size:28px;font-weight:800;border-radius:9px}small,.muted{color:#68788e;font-size:12px}small{display:block}.online{font-size:12px;color:#617187}.online i{display:inline-block;width:8px;height:8px;background:#15945b;border-radius:50%;margin-right:5px}main{display:grid;grid-template-columns:330px minmax(0,1fr);height:calc(100dvh - 65px)}aside{background:white;overflow:auto;padding:20px;border-right:1px solid #e0e5ed}h1{font-size:20px;letter-spacing:-.7px;margin:5px 0}h2{font-size:13px;margin:0 0 10px}.intro p,p{font-size:12px;line-height:1.5;color:#69798e;margin:7px 0}section{border-top:1px solid #e7ebf1;padding:14px 0}label{display:flex;align-items:center;gap:8px;min-height:28px;font-size:12px;overflow-wrap:anywhere}label input{accent-color:#2459db}.dot{display:inline-block;height:9px;width:9px;border-radius:50%;flex-shrink:0}button,input{font:inherit;border:1px solid #d9e1ec;border-radius:7px;background:white;color:#23334c;padding:9px;min-width:0}button{cursor:pointer;font-size:12px;font-weight:600}button:hover:not(:disabled){border-color:#2459db}button:disabled{opacity:.45;cursor:not-allowed}.primary{width:100%;background:#2459db;color:white;border-color:#2459db;padding:12px}.secondary{margin-top:12px;background:#fff;color:#2459db}.buttons,.stats{display:grid;grid-template-columns:1fr 1fr;gap:7px}.link{padding:0;border:0;color:#2459db;margin:4px 0 10px}.loc{display:flex;gap:6px}.loc input{flex:1;font-size:12px}.progress{height:7px;background:#e9edf4;border-radius:5px;overflow:hidden;margin:13px 0 7px}.progress div{height:100%;width:0;background:#2459db;transition:width .2s}.between{display:flex;justify-content:space-between;gap:5px;align-items:center;font-size:11px;color:#69788b}.stats div{padding:10px;background:#f4f7fb;border-radius:8px}.stats strong{display:block;font-size:18px;margin-top:4px;letter-spacing:-.5px}.stats small{font-size:11px}#error{font-size:12px;color:#a72b22;overflow-wrap:anywhere;margin-top:7px}#mapWrap{position:relative;min-height:0}#map{position:absolute;inset:0}#mapTip{position:absolute;top:12px;left:12px;max-width:70%;background:white;padding:10px 12px;border-radius:8px;box-shadow:0 2px 10px #18243a15;font-size:12px;pointer-events:none}#legend{position:absolute;bottom:30px;left:12px;background:white;border-radius:8px;padding:10px;box-shadow:0 2px 10px #18243a15;font-size:11px;line-height:1.8;pointer-events:none}#legend .dot{margin-right:6px}.pop{max-height:240px;overflow:auto;min-width:190px}.pop h3{margin:0 0 8px;font-size:14px}.pop dl{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:0;font-size:11px}.pop dt{color:#68788e;overflow-wrap:anywhere}.pop dd{margin:0;overflow-wrap:anywhere}@media(max-width:700px){header{height:55px;padding:0 12px}.online{font-size:10px}main{height:auto;display:flex;flex-direction:column-reverse}#mapWrap{height:55dvh;min-height:300px}aside{border-right:0;padding:14px}.intro{display:none}#legend{max-height:100px;overflow:hidden}.brand b{font-size:13px}}
/* NIC Web 1.2 — painel territorial; não altera a área do mapa. */
#territory[hidden],#territoryBody[hidden],#heatSettings[hidden]{display:none!important}
.territory{position:absolute;top:12px;right:54px;width:280px;max-width:calc(100% - 68px);z-index:3;background:#fff;border:1px solid #e0e6ef;border-radius:11px;box-shadow:0 3px 18px #14233e18;overflow:hidden;color:#172337;max-height:calc(100% - 50px);overflow-y:auto}
#territoryToggle{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;border:0;border-radius:0;background:#2459db;color:white;padding:12px 14px;font-size:13px;position:sticky;top:0;z-index:1}
#territoryChevron{font-size:17px;line-height:1}
#territoryBody{padding:13px}
.territory-sub{font-size:11px;color:#69788b;line-height:1.45;margin:0 0 8px}
.uc-main small,.uc-grid small{display:block;color:#65758a;font-size:11px}
.uc-main strong{display:block;color:#2459db;font-size:32px;font-weight:750;letter-spacing:-1px;line-height:1.25;margin:4px 0 10px}
.uc-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.uc-grid>div{background:#f3f6fa;border-radius:7px;padding:9px}
.uc-grid b{display:block;font-size:19px;margin-top:4px}
.uc-breakdown{margin:12px 0 8px}
.uc-breakdown>div{display:flex;justify-content:space-between;align-items:center;padding:4px 0;font-size:12px;color:#46566d}
.uc-breakdown b{color:#172337}
.heat-section{border-top:1px solid #e4e9f0;padding-top:10px}
.heat-switch{display:flex;justify-content:space-between;gap:12px;min-height:38px;cursor:pointer}
.heat-switch small{display:block;font-size:10px;color:#69788b;margin-top:3px;font-weight:normal}
.heat-switch input{appearance:none;width:36px;height:21px;flex-shrink:0;background:#bdc8d8;border:0;border-radius:20px;padding:0;position:relative;cursor:pointer;margin:0}
.heat-switch input:before{content:"";position:absolute;left:3px;top:3px;height:15px;width:15px;border-radius:50%;background:white;transition:transform .15s}
.heat-switch input:checked{background:#2459db}
.heat-switch input:checked:before{transform:translateX(15px)}
.heat-switch input:disabled{opacity:.5;cursor:not-allowed}
.heat-switch input:focus-visible{outline:2px solid #2459db;outline-offset:3px}
.heat-range{justify-content:space-between;font-size:11px;color:#65758a;min-height:22px;margin-top:5px}
#heatSettings input[type=range]{display:block;width:100%;padding:0;accent-color:#2459db;cursor:pointer}
.heat-gradient{height:8px;border-radius:4px;margin:12px 0 3px;background:linear-gradient(90deg,#2563eb,#06b6d4,#22c55e,#facc15,#f97316,#dc2626)}
.heat-scale{display:flex;justify-content:space-between;font-size:10px;color:#69788b}
.marker-switch{margin:10px 0 6px;font-size:11px;cursor:pointer}
.heat-section>.territory-sub{margin-bottom:0}
@media(max-width:700px){.territory{width:250px;max-height:calc(100% - 48px);top:8px;right:48px}#territoryToggle{padding:10px 12px;font-size:12px}#territoryBody{padding:10px}}

#legend[hidden]{display:none!important}


/* Assinatura institucional — NIC Web 1.2.3 */
.company-credit{display:flex;align-items:center;justify-content:center;gap:10px;padding:6px 13px;border:1px solid #dfe7f0;border-radius:999px;background:#fff;white-space:nowrap;flex-shrink:0}
.company-credit span{font-size:12px;color:#526278;font-weight:500}
.company-credit img{display:block;width:112px;height:auto;max-height:28px;object-fit:contain}
@media(max-width:700px){.company-credit{gap:6px;padding:5px 8px}.company-credit span{font-size:10px}.company-credit img{width:86px}.brand{gap:8px}.brand small{font-size:10px}}
@media(max-width:380px){header{padding:0 8px;gap:5px}.logo{width:32px;height:32px;font-size:23px}.brand{gap:6px}.brand b{font-size:11px;letter-spacing:.8px}.brand small{font-size:9px}.company-credit{gap:4px;padding:4px 6px}.company-credit span{font-size:9px}.company-credit img{width:68px}}

/* NIC Web 1.2.4 — marca INFRA oficial no lado esquerdo. */
header .brand{min-width:0;flex:1 1 auto}
header .infra-brand{display:block;width:200px;max-width:100%;height:auto;max-height:45px;object-fit:contain;object-position:left center}
@media(max-width:700px){header .infra-brand{width:164px;max-height:38px}}
@media(max-width:380px){header .infra-brand{width:128px;max-height:32px}}

/* NINFRA — edição e importação de polígonos */
header .infra-brand{width:160px;max-height:36px}
@media(max-width:700px){header .infra-brand{width:131px;max-height:30px}}
@media(max-width:380px){header .infra-brand{width:102px;max-height:26px}}
#finish.drawing-active{background:#2459db;color:#fff;border-color:#2459db}
#finish.drawing-active:disabled{opacity:.7}
#layers .all-layers{font-weight:700;border-bottom:1px solid #e7ebf1;padding-bottom:7px;margin-bottom:5px}
.import-button{width:100%;margin:0 0 10px;color:#2459db;border-color:#d9e1ec}
#importChoice[hidden],#polygonFile[hidden]{display:none!important}
#importChoice{margin-bottom:10px}
select{font:inherit;color:#23334c;background:white;border:1px solid #d9e1ec;border-radius:7px;padding:8px;max-width:100%}
#importChoice select{width:100%}
.basemap-picker{position:absolute;bottom:55px;right:10px;z-index:2;background:white;border:1px solid #e0e5ed;border-radius:8px;padding:7px 9px;box-shadow:0 2px 10px #18243a15;max-width:200px}
.basemap-picker label{font-weight:600;min-height:18px;font-size:11px}
.basemap-picker select{font-size:12px;padding:5px;max-width:100%;width:100%}
#styleNotice:empty{display:none}
#styleNotice{font-size:10px;margin-top:4px}
.vertex-handle{width:13px;height:13px;border-radius:50%;background:#fff;border:2px solid #2459db;cursor:grab;touch-action:none;box-shadow:0 1px 3px #17243a35}
.vertex-handle:active{cursor:grabbing}
.vertex-handle[aria-disabled="true"]{cursor:not-allowed;pointer-events:none;opacity:.7}
@media(max-width:700px){.basemap-picker{bottom:52px;max-width:158px;padding:5px}.basemap-picker select{font-size:11px}}

/* NINFRA V1.4 — levantamento local */
#fieldSection h2{display:flex;align-items:center;justify-content:space-between}
.field-tag{font-size:9px;letter-spacing:1px;color:#64748b;background:#f0f4f9;border-radius:4px;padding:3px 5px}
#fieldSection select,#fieldEditor input:not([type=checkbox]),#fieldEditor textarea{width:100%;border:1px solid #d9e1ec;border-radius:7px;padding:9px;font:inherit;font-size:12px;color:#23334c;background:white}
#fieldSection .buttons{margin-top:7px}
#fieldEditor{margin-top:14px;padding:12px;background:#f5f8fc;border:1px solid #e0e7f0;border-radius:9px}
#fieldEditor[hidden]{display:none!important}
#fieldEditor h2{font-size:14px}
#fieldEditor label{margin-top:6px}
#fieldEditor .primary{margin-top:8px}
.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#fieldMessage{color:#1d4ed8;overflow-wrap:anywhere}
.field-draft{width:19px;height:19px;background:#16a34a;border:3px solid #fff;box-shadow:0 0 0 2px #166534,0 2px 6px #0005;border-radius:50%;cursor:grab}

#fieldPanel summary{cursor:pointer;font-weight:700;font-size:13px;line-height:24px}#fieldPanel summary .field-tag{float:right}#fieldPanel summary::marker{color:#2459db}

.field-origin-legend{display:grid;gap:5px;font-size:11px;color:#475569;margin:8px 0 12px}.field-origin-legend span{display:flex;align-items:center;gap:6px}.field-origin-legend i{width:9px;height:9px;border-radius:50%;display:inline-block;flex:none}

/* V1.5 - páginas de consulta e campo */
.mode-button{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;background:#2459db;color:#fff;border-radius:8px;text-decoration:none;font-weight:700}
.mode-button:focus-visible,.back-link:focus-visible{outline:3px solid #93b4ff;outline-offset:3px}
.back-link{color:#2459db;font-weight:600;text-decoration:none;display:inline-block;margin-bottom:9px}
body[data-mode="field"] .office-only,body[data-mode="field"] #territory,body[data-mode="field"] #legend,body[data-mode="field"] .basemap-picker,body[data-mode="field"] .vertex-handle{display:none!important}
body[data-mode="field"] main{grid-template-columns:380px minmax(0,1fr)}
body[data-mode="field"] #fieldSection button{min-height:44px;font-size:13px}
body[data-mode="field"] #fieldSection input:not([type=checkbox]),body[data-mode="field"] #fieldSection select,body[data-mode="field"] #fieldSection textarea{font-size:16px;min-height:44px}
body[data-mode="field"] #fieldSection summary{list-style:none;font-size:16px}
body[data-mode="field"] #fieldSection summary::-webkit-details-marker{display:none}
body[data-mode="field"] #fieldSection summary .field-tag{font-size:10px}
@media(max-width:700px){body[data-mode="field"] main{display:flex;flex-direction:column-reverse}body[data-mode="field"] #mapWrap{height:46dvh;min-height:235px}body[data-mode="field"] aside{padding:14px 16px}body[data-mode="field"] #fieldSection label{font-size:14px}body[data-mode="field"] .field-intro h1{font-size:20px}}

.login-page{min-height:100dvh;display:grid;place-items:center;padding:20px;background:#f2f5f9}.login-card{width:min(100%,390px);background:white;padding:32px;border:1px solid #e0e5ed;border-radius:14px;box-shadow:0 10px 35px #17243a0c;display:flex;flex-direction:column;gap:9px}.login-card img{max-width:100%;height:auto;margin-bottom:15px}.login-card input{padding:12px;border:1px solid #cfd8e4;border-radius:7px;font-size:16px}.login-card button{background:#2459db;color:white;border:0;min-height:44px;font-weight:700}.login-error{color:#b91c1c}.user-session{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:10px 0;color:#52647c;font-size:12px}.user-session form{margin-left:auto}.user-session button{padding:5px 10px}

body[data-role="projetista"] .mode-nav,body[data-role="tecnico"] .back-link{display:none!important}

/* NINFRA V1.8.1 — alinhamento da tela de acesso */
.login-card > img{display:block;align-self:center;margin:0 auto 15px;max-width:100%;height:auto}
.login-card > h1,.login-card > p:not(.login-error),.login-card > small{text-align:center}

/* V1.8.2 — Gestão de usuários */
.account-nav{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 15px}.account-nav a{color:#2459db;text-decoration:none;font-size:12px;font-weight:600;border:1px solid #d7e1ef;border-radius:7px;padding:8px 10px}body:not([data-role="administrador"]) .admin-link{display:none}.account-page{min-height:100dvh;background:#f6f8fb;padding:24px}.account-wrap{max-width:1000px;margin:auto}.account-header{height:auto;padding:16px 20px;border:1px solid #e0e5ed;border-radius:12px}.account-header img{height:auto;max-width:50%}.account-links{display:flex;justify-content:space-between;align-items:center;margin:16px 0}.account-links a{color:#2459db;font-weight:600;text-decoration:none}.account-card{background:white;border:1px solid #e0e5ed;border-radius:12px;padding:24px;margin:20px 0}.account-card h2{font-size:16px}.account-card label{display:flex;flex-direction:column;align-items:stretch;gap:6px;font-weight:600;margin:10px 0}.account-card input,.account-card select{width:100%;min-height:42px;border:1px solid #d7e1ef;border-radius:7px;padding:10px;font:inherit;background:white}.account-card button{background:#2459db;color:white;border:0;border-radius:7px;padding:10px 16px;cursor:pointer;font-weight:600}.account-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 20px}.account-table{overflow:auto}.account-table table{border-collapse:collapse;width:100%;font-size:13px}.account-table td,.account-table th{padding:14px;text-align:left;border-bottom:1px solid #e7ebf1;vertical-align:top}.account-table td form{margin-top:10px}.account-table td details{min-width:125px}.account-message:empty{display:none}.account-message.error{color:#b91c1c}.account-message.success{color:#166534}.password-card{max-width:470px;margin:30px auto}.password-card button{width:100%;margin-top:10px}@media(max-width:600px){.account-page{padding:12px}.account-grid{grid-template-columns:1fr}.account-card{padding:16px}}

/* NINFRA: configuração da conta master no cabeçalho */
.header-actions{display:flex;align-items:center;gap:10px;min-width:0;flex-shrink:0}
.master-config{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:8px 11px;border:1px solid #dfe7f0;border-radius:9px;color:#526278;text-decoration:none;font-size:12px;font-weight:600;white-space:nowrap;background:#fff;min-height:36px}
.master-config:hover{color:#2459db;border-color:#93b4ff;background:#f3f7ff}.master-config:focus-visible{outline:2px solid #2459db;outline-offset:2px}
@media(max-width:700px){.master-config span{display:none}.master-config{width:36px;padding:7px}.header-actions{gap:6px}}

/* V1.8.4 — exclusão de usuários */
.account-card .delete-user{border-top:1px solid #e7ebf1;padding-top:12px}.account-card .delete-confirm{flex-direction:row;align-items:flex-start;font-weight:400;color:#991b1b;gap:8px}.account-card .delete-confirm input{width:16px;height:16px;min-height:0;flex-shrink:0;margin:2px 0 0;accent-color:#b91c1c}.account-card .danger-button{background:#b91c1c}.account-card .danger-button:hover{background:#991b1b}


/* V1.8.5 — alterar senha no cabeçalho */
.header-link{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:8px 12px;border:1px solid #dfe7f0;border-radius:9px;color:#526278;text-decoration:none;font-size:12px;font-weight:600;white-space:nowrap;background:#fff;min-height:36px}
.header-link:hover{color:#2459db;border-color:#93b4ff;background:#f3f7ff}.header-link:focus-visible{outline:2px solid #2459db;outline-offset:2px}
@media(max-width:700px){.header-link{padding:7px 10px;font-size:11px;min-height:34px}}


/* V1.8.6 — gerenciamento em largura total */
.account-table .user-row td{vertical-align:middle}
.account-table th:nth-child(1){width:29%}.account-table th:nth-child(2){width:25%}.account-table th:nth-child(3){width:18%}
.account-card .manage-toggle{display:inline-flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;color:#2459db;border:1px solid #d7e1ef;padding:7px 12px;white-space:nowrap;font-size:12px}
.manage-toggle span{font-size:16px;line-height:1}.manage-toggle[aria-expanded=true] span{transform:rotate(180deg)}
.account-card .manage-toggle:hover,.account-card .manage-toggle[aria-expanded=true]{background:#edf4ff;border-color:#9cb8ef}
.user-status{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;font-size:12px}.user-status::before{content:"";width:7px;height:7px;border-radius:50%;background:#94a3b8}.user-status.active::before{background:#16a34a}
.manage-row[hidden]{display:none!important}.account-table .manage-row>td{padding:0 0 14px;border-bottom:1px solid #e7ebf1}
.manage-panel{padding:16px;background:#f6f8fb;border:1px solid #e0e7f0;border-radius:10px;margin-top:8px}
.manage-heading{font-size:13px;color:#526278;margin-bottom:12px}.manage-heading strong{color:#17243a}
.manage-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.account-table .manage-panel form{margin:0}.manage-block{min-width:0;display:flex;flex-direction:column;align-items:stretch;gap:9px;background:#fff;border:1px solid #e0e7f0;border-radius:8px;padding:12px}
.manage-panel h3{font-size:13px;margin:0;color:#17243a}.manage-panel .manage-block label{margin:0;font-size:12px;font-weight:500}.manage-panel .manage-block input,.manage-panel .manage-block select{min-height:38px;font-size:12px;padding:8px}
.manage-panel .manage-block button{margin-top:auto;min-height:36px;font-size:12px;white-space:normal;width:100%;padding:8px 10px}.manage-panel .manage-state-description{margin:0;color:#68788e;font-size:12px;line-height:1.5;min-height:54px}
.account-card .secondary-action{background:#fff;color:#526278;border:1px solid #cfd9e6}.account-card .secondary-action:hover{background:#edf2f8}
.account-card .manage-delete{margin-top:14px!important;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 2px 0}.manage-delete p{margin:4px 0}.manage-delete .delete-confirm{margin:6px 0 0;font-size:12px;min-height:0}.manage-delete .danger-button{flex-shrink:0;font-size:12px;min-height:36px}
@media(max-width:720px){.manage-grid{grid-template-columns:1fr}.manage-panel .manage-state-description{min-height:0}.account-card .manage-delete{align-items:stretch;flex-direction:column}.account-table .user-row td,.account-table th{padding:9px 5px;font-size:12px;overflow-wrap:anywhere}.account-table .manage-toggle{gap:4px;padding:7px}.account-table .manage-toggle span{display:none}.account-table table{table-layout:fixed}.account-table th:nth-child(1){width:30%}.account-table th:nth-child(2){width:27%}.account-table th:nth-child(3){width:17%}}
