
    :root{
      --navy:#0d3550;--navy2:#123f5d;--blue:#116b9f;--line:#d8e2e8;--paper:#f5f8fa;
      --yellow:#f3ad16;--green:#23986e;--red:#d85959;--muted:#647884;--ink:#163141;
    }
    *{box-sizing:border-box} html,body{height:100%;margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);background:#eaf1f4}
    button,input{font:inherit} button{cursor:pointer}
    .app{height:100%;display:grid;grid-template-rows:58px 1fr;overflow:hidden}
    header{display:grid;grid-template-columns:300px minmax(280px,720px) 1fr;gap:18px;align-items:center;background:linear-gradient(90deg,var(--navy),#0d4162);color:white;padding:0 18px;box-shadow:0 1px 4px #0002;z-index:10}
    .brand{display:flex;align-items:center;gap:10px;min-width:0}.logo{width:37px;height:37px;border-radius:9px;background:#fff;color:var(--navy);display:grid;place-items:center;font-weight:900;font-size:18px}.brand strong{display:block;font-size:14px;letter-spacing:.03em}.brand small{display:block;opacity:.82;margin-top:2px;font-size:10px}
    .search-wrap{position:relative}.search{display:flex;background:#fff;border-radius:11px;overflow:hidden;box-shadow:0 1px 3px #0003}.search input{border:0;outline:0;flex:1;padding:11px 13px;color:#233d4c;min-width:0}.search button{width:48px;border:0;background:#e8f1f6;color:#1f5c7b;font-weight:800}.results{position:absolute;left:0;right:0;top:49px;background:#fff;color:var(--ink);border:1px solid #ccdbe3;border-radius:10px;box-shadow:0 12px 30px #0003;display:none;max-height:350px;overflow:auto;z-index:30}.results.show{display:block}.result{padding:10px 12px;border-bottom:1px solid #edf2f5;cursor:pointer}.result:hover{background:#f1f7fa}.result:last-child{border-bottom:0}.result b{font-size:13px}.result div{font-size:11px;color:var(--muted);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .status-top{text-align:right;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status-top.ok{color:#b9f4d8}.status-top.warn{color:#ffe0a0}.status-top.err{color:#ffc0c0}
    main{min-height:0;display:grid;grid-template-columns:292px minmax(0,1fr) 335px}
    aside{background:#fff;overflow:auto;z-index:4}.left{border-right:1px solid var(--line)}.right{border-left:1px solid var(--line)}
    .section{padding:18px 15px;border-bottom:1px solid var(--line)}.section h2{font-size:14px;margin:0 0 8px}.section h3{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:#4d6573;margin:0 0 12px}.section p{font-size:12px;line-height:1.55;color:#607482;margin:0}
    .pill{display:inline-flex;gap:6px;align-items:center;margin-top:10px;padding:5px 9px;border-radius:999px;background:#f4f7f8;font-size:10px;font-weight:700}.dot{width:8px;height:8px;border-radius:50%;background:var(--yellow)}
    .layers label{display:flex;align-items:center;gap:9px;font-size:12px;margin:12px 0}.sw{width:9px;height:9px;border-radius:50%}.sw.road{background:#738896}.sw.cycle{background:var(--green)}.sw.cross{background:#166fa1}.sw.selected{background:var(--yellow)}
    .info-box{border:1px dashed #c7d7df;border-radius:9px;padding:11px;font-size:11px;line-height:1.5;color:#637885;background:#fbfdfe}.map-wrap{position:relative;min-width:0;min-height:0}#map{position:absolute;inset:0}.map-note{position:absolute;bottom:18px;left:18px;background:#fff;padding:8px 11px;border-radius:8px;box-shadow:0 2px 10px #0002;font-size:10px;color:#647884;max-width:330px;z-index:3}.map-chip{position:absolute;top:12px;left:50%;transform:translateX(-50%);background:linear-gradient(180deg,#fff,#f8fbfc);border:1px solid #c8dbe4;border-radius:999px;padding:7px 9px 7px 8px;box-shadow:0 5px 18px #0b355026;font-size:11px;z-index:3;display:none;align-items:center;gap:8px;max-width:min(560px,74vw);cursor:pointer;user-select:none}.map-chip:hover{border-color:#8fb6c8;box-shadow:0 7px 22px #0b355033}.map-chip .deselect-x{width:22px;height:22px;border-radius:999px;display:grid;place-items:center;background:#eaf1f5;color:#3d5968;font-weight:1000;font-size:12px;flex:0 0 auto}.map-chip:hover .deselect-x{background:#dce9ef;color:#17384f}.map-chip.show{display:flex}.map-chip .select-icon{width:24px;height:24px;border-radius:999px;background:#f3ad16;color:#0d3550;display:grid;place-items:center;font-weight:1000;box-shadow:0 0 0 4px #f3ad1624}.map-chip .select-copy{min-width:0}.map-chip b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.map-chip small{display:block;color:#6b7e88;font-size:8px;margin-top:1px}
    .empty{padding:4px 0}.road-title{font-size:17px;font-weight:800;margin:0 0 4px}.sub{font-size:11px;color:var(--muted);line-height:1.45}.badge{display:inline-block;padding:4px 7px;border-radius:6px;background:#fff4dc;color:#8e6400;font-size:9px;font-weight:800;margin-top:8px;text-transform:uppercase;letter-spacing:.04em}
    .cross-list{margin-top:12px;display:grid;gap:9px}.cross-btn{width:100%;min-height:66px;text-align:left;border:1px solid #d7e2e7;background:#fff;border-radius:11px;padding:12px 13px;display:flex;flex-direction:column;justify-content:center;position:relative;z-index:1;cursor:pointer;touch-action:manipulation;transition:.16s ease}.cross-btn *{pointer-events:none}.cross-btn:hover,.cross-btn:focus-visible{border-color:#5e9fbe;background:#f2f9fc;box-shadow:0 3px 12px #0b52731a;transform:translateY(-1px);outline:none}.cross-btn:active{transform:translateY(0);background:#eaf5fa}.cross-btn b{font-size:11px;line-height:1.35}.cross-btn span{display:block;font-size:9px;color:var(--muted);margin-top:4px}
    .back{border:0;background:#edf4f7;color:#315d73;border-radius:7px;padding:7px 9px;font-size:10px;font-weight:700;margin-bottom:12px}.approaches{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}.approach{border:1px solid #cfdde4;background:#fff;border-radius:8px;padding:7px 9px;font-size:10px}.approach.active{background:var(--navy);color:#fff;border-color:var(--navy)}
    .moves{display:grid;gap:10px}.move{border:1px solid #dce5e9;border-radius:11px;padding:11px;background:#fff;display:grid;grid-template-columns:34px 1fr;gap:10px;align-items:start}.arrow{width:34px;height:34px;border-radius:8px;background:#edf5f8;display:grid;place-items:center;font-size:18px;font-weight:900;color:#185f83}.move b{display:block;font-size:11px}.move small{display:block;font-size:9px;line-height:1.4;color:var(--muted);margin-top:2px}.move .state{font-size:9px;color:#936400;font-weight:800;margin-top:4px}.move.na{opacity:.55}.move.na .state{color:#6d7d85}.state-group{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:9px}.state-btn{border:1px solid #cfdde4;background:#fff;border-radius:7px;padding:6px 4px;font-size:8px;font-weight:800;color:#58707e;cursor:pointer;touch-action:manipulation}.state-btn:hover{background:#f4f9fb}.state-btn.active.allowed{background:#e6f6ef;border-color:#58ad8c;color:#1d7758}.state-btn.active.required{background:#e8f2ff;border-color:#699ac1;color:#245f88}.state-btn.active.forbidden{background:#fdecec;border-color:#dc7c7c;color:#9f4040}.state-btn.active.unknown{background:#fff4dc;border-color:#e7bb56;color:#8b6504}.draft-note{margin:10px 0;border:1px solid #d7e5eb;background:#f8fbfc;border-radius:9px;padding:9px 10px;font-size:9px;line-height:1.45;color:#5c7380}.draft-note b{color:#274d61}
    .direction-card{margin:10px 0;border:1px solid #cfe0e7;background:#fbfdfe;border-radius:11px;padding:11px}.direction-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.direction-head b{font-size:11px}.direction-head small{display:block;font-size:9px;line-height:1.4;color:var(--muted);margin-top:3px}.direction-badge{white-space:nowrap;border-radius:999px;padding:4px 7px;font-size:8px;font-weight:900;background:#fff4dc;color:#8b6504}.direction-badge.bidirectional{background:#e8f4fb;color:#216789}.direction-badge.toward{background:#e6f6ef;color:#1d7758}.direction-badge.away{background:#fdecec;color:#9f4040}.direction-group{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:10px}.direction-btn{border:1px solid #cfdde4;background:#fff;border-radius:8px;padding:8px 6px;font-size:8px;font-weight:800;color:#58707e;cursor:pointer;line-height:1.25}.direction-btn:hover{background:#f3f8fa}.direction-btn.active.bidirectional{background:#e8f4fb;border-color:#71aac4;color:#216789}.direction-btn.active.toward{background:#e6f6ef;border-color:#58ad8c;color:#1d7758}.direction-btn.active.away{background:#fdecec;border-color:#dc7c7c;color:#9f4040}.direction-btn.active.unknown{background:#fff4dc;border-color:#e7bb56;color:#8b6504}.direction-warning{margin-top:9px;border:1px solid #e7b1b1;background:#fff4f4;color:#8f4040;border-radius:8px;padding:8px 9px;font-size:9px;line-height:1.4}.draft-summary{margin-top:10px;display:grid;grid-template-columns:1fr 1fr;gap:7px}.summary-box{border:1px solid #dbe6eb;border-radius:8px;background:#f9fcfd;padding:8px}.summary-box b{display:block;font-size:14px;color:#24546c}.summary-box span{display:block;font-size:8px;color:#71848f;margin-top:2px}.approach .app-dot{display:inline-block;width:6px;height:6px;border-radius:50%;margin-left:5px;vertical-align:1px;background:#e0a620}.approach .app-dot.bidirectional{background:#3b8db4}.approach .app-dot.toward{background:#23986e}.approach .app-dot.away{background:#d85959}.cross-meta{display:flex;gap:5px;flex-wrap:wrap;margin-top:6px}.mini-tag{display:inline-flex;border-radius:999px;background:#eef5f8;color:#58717e;padding:3px 6px;font-size:8px;font-weight:800}
    .source-note{font-size:9px;line-height:1.45;color:#71848f;margin-top:12px;border-top:1px solid #e4ecef;padding-top:10px}
    .road-preview-card{position:absolute;z-index:8;display:none;pointer-events:none;min-width:190px;max-width:290px;background:#0d3550f2;color:#fff;border:1px solid #ffffff2b;border-radius:10px;padding:9px 11px;box-shadow:0 8px 24px #06263b35;backdrop-filter:blur(5px)}.road-preview-card.show{display:block}.road-preview-card b{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.road-preview-card small{display:block;font-size:8px;opacity:.78;margin-top:3px}.road-preview-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#48b8e8;margin-right:6px}.preview-help{font-size:8px;color:#7a8c95;line-height:1.45;margin-top:6px}.error-card{border:1px solid #ecc3c3;background:#fff7f7;color:#8f3b3b;border-radius:9px;padding:11px;font-size:11px;line-height:1.45}.db-pill{display:inline-flex;align-items:center;gap:6px;margin-top:8px;padding:5px 8px;border-radius:999px;font-size:9px;font-weight:900;background:#eef3f6;color:#607582}.db-pill.ok{background:#e7f6ef;color:#1d7758}.db-pill.warn{background:#fff4dc;color:#8b6504}.db-pill.err{background:#fdecec;color:#9f4040}.sync-btn{width:100%;margin-top:9px;border:1px solid #bdd2dc;background:#f4f9fb;color:#28596f;border-radius:8px;padding:8px 9px;font-size:9px;font-weight:800}.sync-btn:hover{background:#eaf5fa}

    .logic-engine{margin:10px 0;border:1px solid #bfd8e6;background:#f5fbfe;border-radius:11px;padding:10px}.logic-engine-head{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}.logic-engine-head b{font-size:11px;color:#143f58}.logic-engine-head span{font-size:8px;font-weight:900;border-radius:999px;padding:4px 7px;background:#e3f1f8;color:#286481}.logic-engine-summary{font-size:9px;color:#526f7e;line-height:1.45;margin-top:5px}.logic-engine-rule{margin-top:8px;padding:7px 8px;border-radius:8px;background:#fff;border:1px solid #d8e6ed;font-size:9px;line-height:1.4;color:#4c6572}.logic-engine-rule b{color:#17384f}.logic-engine-rule.required{border-color:#94bce0;background:#f1f7ff}.logic-engine-rule.forbidden{border-color:#e4b8b8;background:#fff7f7}.logic-engine-rule.allowed{border-color:#a8d8c6;background:#f6fcf9}.logic-engine-conflict{margin-top:8px;border:1px solid #e5a5a5;background:#fff2f2;color:#8f3f3f;border-radius:8px;padding:8px;font-size:9px;line-height:1.4}.logic-engine-note{margin-top:7px;font-size:8px;color:#6a7f89;line-height:1.4}
    .header-right{display:flex;justify-content:flex-end;align-items:center;gap:10px;min-width:0}.user-chip{display:none;align-items:center;gap:8px;background:#ffffff16;border:1px solid #ffffff26;border-radius:10px;padding:6px 8px;min-width:0}.user-chip.show{display:flex}.user-meta{min-width:0}.user-meta b{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:130px}.user-meta span{display:block;font-size:8px;opacity:.78;margin-top:1px}.header-btn{border:0;border-radius:7px;background:#ffffff17;color:#fff;padding:6px 8px;font-size:9px;font-weight:800}.header-btn:hover{background:#ffffff28}.auth-overlay{position:fixed;inset:0;z-index:1000;background:linear-gradient(145deg,#0a2b42f2,#0d4162f2);display:grid;place-items:center;padding:20px}.auth-overlay.hidden{display:none}.auth-card{width:min(430px,100%);background:#fff;border-radius:16px;box-shadow:0 24px 80px #0007;padding:24px}.auth-logo{width:48px;height:48px;border-radius:12px;background:var(--navy);color:#fff;display:grid;place-items:center;font-size:22px;font-weight:900;margin-bottom:14px}.auth-card h1{font-size:20px;margin:0 0 6px}.auth-card p{font-size:11px;line-height:1.5;color:var(--muted);margin:0 0 16px}.form-grid{display:grid;gap:10px}.form-grid label{font-size:9px;font-weight:800;color:#526a77;text-transform:uppercase;letter-spacing:.04em}.form-grid input,.form-grid select{width:100%;margin-top:4px;border:1px solid #cddce3;border-radius:9px;padding:10px 11px;outline:none;color:var(--ink);background:#fff}.form-grid input:focus,.form-grid select:focus{border-color:#4f98ba;box-shadow:0 0 0 3px #5ba7ca1f}.primary-btn{border:0;border-radius:9px;background:var(--navy);color:#fff;padding:10px 12px;font-size:10px;font-weight:900}.auth-error{display:none;margin-top:10px;border:1px solid #efc6c6;background:#fff6f6;color:#973f3f;border-radius:8px;padding:8px 9px;font-size:10px}.auth-error.show{display:block}.role-box{margin-top:8px;border:1px solid #dbe6eb;background:#f8fbfc;border-radius:9px;padding:9px;font-size:9px;color:#647985;line-height:1.45}.manage-btns{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:8px}.manage-btn{border:1px solid #cbdce4;background:#fff;border-radius:8px;padding:8px 7px;font-size:9px;font-weight:800;color:#315f75}.manage-btn:hover{background:#f2f8fb}.manage-btn[hidden]{display:none}.modal-backdrop{position:fixed;inset:0;z-index:900;background:#0b2436a8;display:none;align-items:center;justify-content:center;padding:18px}.modal-backdrop.show{display:flex}.modal{width:min(780px,100%);max-height:86vh;overflow:auto;background:#fff;border-radius:14px;box-shadow:0 20px 70px #0006}.modal-head{position:sticky;top:0;background:#fff;border-bottom:1px solid var(--line);padding:14px 16px;display:flex;align-items:center;justify-content:space-between;z-index:2}.modal-head h2{font-size:15px;margin:0}.modal-close{border:0;background:#eef4f7;border-radius:7px;padding:6px 9px}.modal-body{padding:16px}.user-list{display:grid;gap:8px;margin-top:14px}.user-row{border:1px solid #dbe5ea;border-radius:10px;padding:10px;display:grid;grid-template-columns:1.3fr 1fr auto;gap:10px;align-items:center}.user-row b{font-size:11px}.user-row small{display:block;font-size:9px;color:var(--muted);margin-top:2px}.user-row select{border:1px solid #ccdbe2;border-radius:7px;padding:6px;font-size:9px}.toggle-user{border:1px solid #ccdbe2;background:#fff;border-radius:7px;padding:6px 8px;font-size:8px;font-weight:800}.history-list{display:grid;gap:8px}.history-row{border-left:3px solid #93afbd;background:#f8fbfc;border-radius:8px;padding:9px 10px}.history-row b{font-size:10px}.history-row div{font-size:9px;color:var(--muted);line-height:1.45;margin-top:2px}.validation{display:flex;align-items:center;justify-content:space-between;gap:7px;margin-top:8px;padding-top:7px;border-top:1px solid #edf2f4}.validation-badge{display:inline-flex;border-radius:999px;padding:4px 7px;font-size:8px;font-weight:900}.validation-badge.pending{background:#fff4dc;color:#8b6504}.validation-badge.approved{background:#e6f6ef;color:#1d7758}.validation-badge.rejected{background:#fdecec;color:#9f4040}.validation-badge.provisional{background:#e8f2ff;color:#285f8d;border:1px dashed #7ea8c9}.provisional-note{display:flex;align-items:flex-start;gap:7px;margin-top:8px;padding:8px 9px;border:1px dashed #9fc1d4;border-radius:8px;background:#f3f9fc;color:#557180;font-size:8px;line-height:1.4}.provisional-note b{color:#285f78}.state-btn.provisional.active,.direction-btn.provisional.active{box-shadow:inset 0 0 0 1px #fff,0 0 0 2px #6fa5c655}.operational-tag{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:4px 7px;background:#e8f2ff;color:#285f8d;font-size:8px;font-weight:900;margin-top:7px}.operational-tag:before{content:"~";width:15px;height:15px;border-radius:50%;background:#fff;display:grid;place-items:center;font-size:10px;font-weight:1000}.review-actions{display:flex;gap:5px}.review-btn{border:1px solid #ccdbe2;background:#fff;border-radius:6px;padding:5px 7px;font-size:8px;font-weight:800}.review-btn.approve{color:#1d7758}.review-btn.reject{color:#9f4040}.read-only{opacity:.7}.state-btn:disabled,.direction-btn:disabled{cursor:not-allowed;opacity:.58}.editor-note{font-size:8px;color:#6d7f88;margin-top:5px}
    @media(max-width:1050px){main{grid-template-columns:235px 1fr 290px}header{grid-template-columns:230px 1fr 170px}}
    @media(max-width:760px){header{grid-template-columns:1fr 1.4fr}.status-top{display:none}.brand small{display:none}main{grid-template-columns:1fr}.left,.right{display:none}.map-note{max-width:260px}}
  
    /* v1.1 · catálogo de sinalização e revisão */
    .catalog-search{width:100%;border:1px solid #ccdae1;border-radius:8px;padding:8px 9px;font-size:10px;outline:none;margin-bottom:8px}
    .catalog-help{font-size:8px;color:#73858f;line-height:1.4;margin-bottom:8px}
    .catalog-list{display:grid;gap:7px;max-height:340px;overflow:auto;padding-right:2px}.catalog-item{display:grid;grid-template-columns:52px 1fr;gap:10px;align-items:center;border:1px solid #d9e4e9;border-radius:11px;background:#fff;padding:8px;cursor:grab;user-select:none;transition:.15s ease}.catalog-item:hover{background:#f4f9fb;border-color:#72a9c1;box-shadow:0 3px 12px #0b527318;transform:translateY(-1px)}.catalog-item.disabled{opacity:.55;cursor:not-allowed}.catalog-item:active{cursor:grabbing}.catalog-item.armed{background:#e9f8f1;border-color:#36a178;box-shadow:0 0 0 2px #36a17822,0 5px 18px #0b52731c}.catalog-item.armed:after{content:'CLIQUE NO MAPA';justify-self:end;grid-column:1/-1;font-size:7px;font-weight:1000;color:#1d7758;letter-spacing:.04em}.map-wrap.placing-catalog .drop-hint{display:grid;background:#e9f8f1d9;border-color:#36a178;color:#176a4f}.map-wrap.placing-catalog #map canvas{cursor:crosshair!important}.sign-mini{width:48px;height:48px;display:grid;place-items:center;background:linear-gradient(180deg,#f8fbfc,#eef4f7);border:1px solid #d5e2e8;border-radius:9px;padding:4px;box-shadow:0 1px 3px #0001}.sign-mini svg{display:block;width:100%;height:100%;filter:drop-shadow(0 1px 1px #0002)}.catalog-item b{display:block;font-size:10px}.catalog-item small{display:block;font-size:8px;color:var(--muted);line-height:1.3;margin-top:2px}.catalog-category{font-size:8px;font-weight:900;color:#55707e;text-transform:uppercase;letter-spacing:.05em;margin:9px 0 5px}.sign-marker{position:relative;width:34px;height:42px;cursor:pointer;--sign-scale:1;transform-origin:50% 50%}.sign-marker .sign-visual{position:absolute;inset:0;transform:scale(var(--sign-scale));transform-origin:50% 50%;transition:transform .12s ease,opacity .12s ease;filter:drop-shadow(0 2px 3px #0004)}.sign-marker .pole{position:absolute;width:3px;height:18px;background:#667783;left:15px;top:24px;border-radius:2px}.sign-marker .facing{position:absolute;left:17px;top:14px;width:20px;height:2px;background:#0d3550;transform-origin:left center;z-index:-1}.sign-marker .facing:after{content:'';position:absolute;right:-1px;top:-3px;border-left:6px solid #0d3550;border-top:4px solid transparent;border-bottom:4px solid transparent}.sign-marker .sign-glyph{position:absolute;left:0;top:-2px;width:34px;height:34px;display:grid;place-items:center;transform-origin:center;border-radius:7px}.sign-marker .sign-glyph svg{width:34px;height:34px;display:block;filter:drop-shadow(0 1px 1px #0003)}.sign-marker.pending .sign-glyph{filter:drop-shadow(0 0 4px #f3ad16)}.sign-marker.approved .sign-glyph{filter:drop-shadow(0 0 4px #23986e)}.sign-marker.rejected .sign-glyph{filter:drop-shadow(0 0 4px #d85959)}.sign-marker.selected .sign-glyph{filter:drop-shadow(0 0 5px #146f9f)}.sign-marker.inconsistent .sign-glyph{filter:drop-shadow(0 0 6px #d33)}.sign-marker.inconsistent:after{content:'!';position:absolute;right:-4px;top:-7px;width:15px;height:15px;border-radius:50%;background:#d43f3f;color:#fff;font:900 10px/15px Arial;text-align:center;transform:scale(var(--sign-scale));transform-origin:center}.sign-form{display:grid;gap:9px;margin-top:12px}.sign-form label{font-size:8px;font-weight:900;color:#607784;text-transform:uppercase;letter-spacing:.04em}.sign-form input,.sign-form select,.sign-form textarea{width:100%;margin-top:4px;border:1px solid #cfdde4;border-radius:8px;padding:8px 9px;font-size:10px;background:#fff;color:var(--ink)}.sign-form textarea{min-height:72px;resize:vertical}.sign-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.sign-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}.sign-action{border:1px solid #cbdde5;background:#fff;border-radius:8px;padding:7px 9px;font-size:8px;font-weight:900;color:#315f75}.sign-action.primary{background:var(--navy);border-color:var(--navy);color:#fff}.sign-action.danger{color:#9f4040}.link-card{margin-top:12px;border:1px solid #d6e5eb;border-radius:11px;background:#f8fbfc;padding:10px}.link-card h4{margin:0 0 4px;font-size:10px;color:#214f65}.link-card p{margin:0 0 8px;font-size:8px;color:#6d808a;line-height:1.4}.link-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.link-grid label:last-child:nth-child(odd){grid-column:1/-1}.consistency-card{margin-top:10px;border-radius:10px;padding:9px 10px;font-size:8px;line-height:1.45;border:1px solid}.consistency-card.ok{background:#effaf5;border-color:#9bd5bd;color:#176a4f}.consistency-card.warn{background:#fff8e8;border-color:#edcf79;color:#7a5b08}.consistency-card.bad{background:#fff0f0;border-color:#e4a1a1;color:#8f3333}.consistency-card.info{background:#eef7fb;border-color:#a9d0e1;color:#285f7a}.link-summary{display:flex;align-items:center;gap:7px;margin-top:7px;padding:7px 8px;border-radius:8px;background:#fff;border:1px solid #dfe9ed}.link-summary b{font-size:8px}.link-summary small{font-size:7px;color:#6d808a}.link-dot{width:8px;height:8px;border-radius:50%;background:#6fa8c1;flex:0 0 auto}.drop-hint{position:absolute;inset:10px;border:2px dashed #2c87b3;border-radius:14px;background:#eaf7fdc9;z-index:20;display:none;place-items:center;pointer-events:none;color:#165f82;font-weight:900;font-size:13px}.map-wrap.dragging-sign .drop-hint{display:grid}.pending-count{display:inline-flex;min-width:18px;height:18px;align-items:center;justify-content:center;border-radius:999px;background:#fff4dc;color:#8b6504;font-size:8px;font-weight:900;margin-left:4px}.pending-list{display:grid;gap:9px}.pending-row{border:1px solid #dce6ea;border-radius:10px;padding:10px;background:#fbfdfe}.pending-row b{font-size:10px}.pending-row small{display:block;color:var(--muted);font-size:8px;line-height:1.4;margin-top:3px}.pending-actions{display:flex;gap:6px;margin-top:8px}.history-group{border:1px solid #dce6ea;border-radius:10px;background:#fff;overflow:hidden}.history-group-head{padding:9px 10px;background:#f5f9fb;border-bottom:1px solid #e6eef1}.history-group-head b{font-size:10px}.history-group-head small{display:block;font-size:8px;color:var(--muted);margin-top:2px}.history-events{display:grid}.history-event{padding:8px 10px;border-bottom:1px solid #edf2f4}.history-event:last-child{border-bottom:0}.history-event div{font-size:8px;color:var(--muted);line-height:1.45}.review-btn.reopen{color:#285f7a}.validation-note{font-size:8px;color:#8a5d00;margin-top:4px}.catalog-mode{display:flex;gap:5px;margin-bottom:8px}.catalog-mode button{flex:1;border:1px solid #d2e0e6;background:#fff;border-radius:7px;padding:6px;font-size:8px;font-weight:800}.catalog-mode button.active{background:#eaf5fa;border-color:#6fa8c1;color:#1a6487}
    .map-wrap.dragging-horizontal .drop-hint{display:grid}.horizontal-mini{width:48px;height:48px;display:grid;place-items:center;background:linear-gradient(180deg,#3c454b,#22292d);border:1px solid #cfdce2;border-radius:9px;padding:5px;box-shadow:inset 0 0 0 2px #ffffff0d}.horizontal-mini svg{width:100%;height:100%;display:block}.horizontal-form-note{font-size:8px;color:#6d808a;line-height:1.45;margin-top:5px}.horizontal-selected-card{border:1px solid #8bbfd7;background:#eff8fc;border-radius:10px;padding:9px 10px;margin-top:10px;font-size:8px;color:#285f7a}.horizontal-selected-card b{font-size:9px}.horizontal-chip{display:inline-flex;padding:3px 6px;border-radius:999px;background:#eef5f8;color:#476b7d;font-size:7px;font-weight:900;margin-left:4px}

    .device-marker{width:42px;height:48px;position:relative;display:grid;place-items:center;transform:scale(var(--device-scale,1));transform-origin:50% 90%;filter:drop-shadow(0 3px 4px #0004);cursor:pointer}.device-marker.selected{filter:drop-shadow(0 0 0 #fff) drop-shadow(0 0 7px #1f79a5)}.device-marker .device-glyph{width:40px;height:40px;display:grid;place-items:center}.device-marker .device-glyph svg{width:100%;height:100%;display:block}.device-marker.pending:after{content:'';position:absolute;right:-2px;top:-3px;width:9px;height:9px;border-radius:50%;background:#e8a61b;border:2px solid #fff}.device-marker.approved:after{content:'✓';position:absolute;right:-5px;top:-6px;width:15px;height:15px;border-radius:50%;background:#23986e;color:#fff;font:900 9px/15px Arial;text-align:center}.device-marker.rejected:after{content:'×';position:absolute;right:-5px;top:-6px;width:15px;height:15px;border-radius:50%;background:#d85959;color:#fff;font:900 11px/14px Arial;text-align:center}.device-mini{width:48px;height:48px;border:1px solid #d3e0e6;border-radius:9px;background:#f7fbfd;display:grid;place-items:center;padding:4px}.device-mini svg{width:100%;height:100%}.device-type-tag{display:inline-flex;padding:3px 6px;border-radius:999px;background:#edf5f8;color:#3e687d;font-size:7px;font-weight:900}.movement-checks{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:5px}.movement-checks label{display:flex!important;align-items:center;gap:5px;text-transform:none!important;letter-spacing:0!important;font-size:9px!important;font-weight:700!important}.movement-checks input{width:auto!important;margin:0!important}.access-checks{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:5px}.access-checks label{display:flex!important;align-items:center;gap:6px;text-transform:none!important;letter-spacing:0!important;font-size:9px!important;font-weight:750!important;border:1px solid #d9e5ea;border-radius:8px;padding:7px 8px;background:#fff;min-width:0}.access-checks label:has(input:checked){background:#eaf5fa;border-color:#72a9c1;color:#185f83}.access-checks input{width:auto!important;margin:0!important;flex:0 0 auto}.access-help{font-size:8px;color:#6f828c;line-height:1.4;margin-top:4px}.device-state-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:4px;background:#23986e}.device-state-dot.inactive{background:#8a9aa3}.device-state-dot.planned{background:#f3ad16}.device-state-dot.maintenance{background:#d85959}

    /* v1.6.2 · correção de layout do painel lateral */
    .right,.right .section,#details,.sign-form,.link-card,.link-grid,.sign-row{min-width:0}
    .right{overflow-x:hidden}
    #details{max-width:100%;overflow-x:hidden}
    .road-title,.sub,.source-note,.link-card p{overflow-wrap:anywhere;word-break:normal}
    .sign-form label,.link-grid label,.sign-row label{min-width:0;max-width:100%}
    .sign-form input,.sign-form select,.sign-form textarea,
    .link-grid input,.link-grid select,.link-grid textarea{display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box}
    .link-grid{grid-template-columns:minmax(0,1fr)}
    .link-grid label:last-child:nth-child(odd){grid-column:auto}

    .dashboard-intro{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border:1px solid #cfe0e7;background:linear-gradient(135deg,#f7fbfd,#eef7fb);border-radius:12px;padding:12px;margin-bottom:12px}.dashboard-intro b{font-size:12px}.dashboard-intro p{font-size:9px;line-height:1.5;color:var(--muted);margin:3px 0 0}.dashboard-live{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;border-radius:999px;background:#e6f6ef;color:#1d7758;padding:5px 8px;font-size:8px;font-weight:900}.dashboard-live:before{content:'';width:7px;height:7px;border-radius:50%;background:#23986e;box-shadow:0 0 0 3px #23986e20}.dashboard-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.dashboard-kpi{min-width:0;border:1px solid #dbe6eb;border-radius:11px;background:#fff;padding:11px;box-shadow:0 1px 4px #0b35500a}.dashboard-kpi strong{display:block;font-size:22px;line-height:1;color:#123f5d}.dashboard-kpi span{display:block;margin-top:5px;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.04em;color:#69808d}.dashboard-kpi small{display:block;margin-top:4px;font-size:8px;color:#84949d;line-height:1.35}.dashboard-kpi.warn strong{color:#9a6a00}.dashboard-kpi.bad strong{color:#a23f3f}.dashboard-kpi.good strong{color:#1d7758}.dashboard-section{margin-top:13px;border:1px solid #dce6ea;border-radius:12px;background:#fff;overflow:hidden}.dashboard-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;background:#f5f9fb;border-bottom:1px solid #e4ecef}.dashboard-section-head b{font-size:10px}.dashboard-section-head small{font-size:8px;color:var(--muted)}.dashboard-section-body{padding:11px 12px}.dashboard-progress{height:10px;display:flex;overflow:hidden;border-radius:999px;background:#edf2f4}.dashboard-progress .approved{background:#23986e}.dashboard-progress .pending{background:#f3ad16}.dashboard-progress .rejected{background:#d85959}.dashboard-status-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:9px}.dashboard-status{border-radius:9px;padding:8px;background:#f8fbfc;border:1px solid #e2eaee}.dashboard-status b{display:block;font-size:13px}.dashboard-status span{display:block;font-size:8px;color:var(--muted);margin-top:2px}.dashboard-entities{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}.dashboard-entity{border:1px solid #e0e8ec;border-radius:9px;padding:8px;background:#fbfdfe}.dashboard-entity b{display:block;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-entity strong{display:block;font-size:17px;color:#24546c;margin-top:4px}.dashboard-entity small{display:block;font-size:7px;color:#72848e;margin-top:3px;line-height:1.35}.dashboard-split{display:grid;grid-template-columns:1fr 1fr;gap:10px}.dashboard-list{display:grid;gap:6px}.dashboard-list-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #edf2f4;padding:6px 0}.dashboard-list-row:last-child{border-bottom:0}.dashboard-list-row b{font-size:9px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-list-row span{font-size:8px;color:var(--muted);white-space:nowrap}.dashboard-change{border-left:3px solid #8cb3c5;background:#f8fbfc;border-radius:7px;padding:7px 8px}.dashboard-change b{font-size:8px}.dashboard-change small{display:block;font-size:7px;color:var(--muted);line-height:1.4;margin-top:2px}.dashboard-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.dashboard-action{border:1px solid #cbdde5;background:#fff;border-radius:8px;padding:7px 10px;font-size:8px;font-weight:900;color:#315f75}.dashboard-action.primary{background:var(--navy);border-color:var(--navy);color:#fff}.dashboard-note{margin-top:10px;border:1px dashed #9fc1d4;border-radius:9px;background:#f3f9fc;padding:9px 10px;font-size:8px;line-height:1.5;color:#557180}.dashboard-note b{color:#285f78}@media(max-width:760px){.dashboard-grid{grid-template-columns:1fr 1fr}.dashboard-entities{grid-template-columns:1fr 1fr}.dashboard-split{grid-template-columns:1fr}.dashboard-status-row{grid-template-columns:1fr}}
    .sign-row{grid-template-columns:repeat(2,minmax(0,1fr))}
    .sign-actions{min-width:0}
    .sign-action{max-width:100%;white-space:normal}

    .croqui-banner{position:absolute;top:12px;right:16px;z-index:7;display:none;align-items:center;gap:10px;max-width:min(520px,55vw);padding:9px 10px;border-radius:12px;background:linear-gradient(135deg,#4c2f79f2,#6b46a4f2);color:#fff;box-shadow:0 8px 28px #2c17435c;border:1px solid #ffffff33;backdrop-filter:blur(7px)}.croqui-banner.show{display:flex}.croqui-banner .croqui-icon{width:30px;height:30px;border-radius:9px;background:#ffffff20;display:grid;place-items:center;font-weight:1000}.croqui-banner .croqui-copy{min-width:0;flex:1}.croqui-banner b{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.croqui-banner small{display:block;font-size:8px;opacity:.82;margin-top:2px}.croqui-banner button{border:1px solid #ffffff35;background:#ffffff18;color:#fff;border-radius:8px;padding:6px 8px;font-size:8px;font-weight:900}.croqui-banner button:hover{background:#ffffff2a}.croqui-mode .map-note{background:#5d3a87;color:#fff}.croqui-mode .catalog-help{border-color:#b9a3d0;background:#faf7ff;color:#5c4772}.croqui-mode-tag{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:4px 7px;background:#efe7fb;color:#603f88;font-size:8px;font-weight:900;margin-top:7px}.croqui-mode-tag:before{content:'✎';font-size:9px}.validation-badge.croqui{background:#efe7fb;color:#603f88;border:1px solid #c7addf}.croqui-note{margin-top:8px;padding:8px 9px;border:1px dashed #bda6d2;border-radius:8px;background:#fbf8ff;color:#665278;font-size:8px;line-height:1.45}.croqui-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.croqui-grid label{font-size:9px;font-weight:850;color:#516a78}.croqui-grid label.full{grid-column:1/-1}.croqui-grid input,.croqui-grid textarea{width:100%;margin-top:4px;border:1px solid #cbdbe3;border-radius:9px;padding:9px 10px;font:inherit;font-size:10px}.croqui-grid textarea{min-height:82px;resize:vertical}.croqui-area{margin:12px 0;border:1px solid #d7e2e7;background:#f8fbfc;border-radius:10px;padding:10px;font-size:9px;line-height:1.5;color:#627986}.croqui-list{display:grid;gap:9px}.croqui-card{border:1px solid #d7e2e7;border-radius:11px;padding:11px;background:#fff;display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}.croqui-card:hover{border-color:#a98ac6;background:#fcfaff}.croqui-card b{display:block;font-size:11px}.croqui-card small{display:block;font-size:8px;color:#6b7f8a;margin-top:3px;line-height:1.4}.croqui-open{border:1px solid #bba5ce;background:#f7f1fc;color:#5d3c80;border-radius:8px;padding:7px 9px;font-size:8px;font-weight:900}.croqui-card-actions{display:flex;gap:6px;align-items:center}.croqui-delete{border:1px solid #e3a4a4;background:#fff5f5;color:#a43b3b;border-radius:8px;padding:7px 9px;font-size:8px;font-weight:900;cursor:pointer}.croqui-delete:hover{background:#ffe8e8;border-color:#d97878}.croqui-status{display:inline-flex;border-radius:999px;padding:3px 6px;background:#efe7fb;color:#603f88;font-size:7px;font-weight:900;margin-top:5px}.croqui-actions{display:flex;gap:7px;margin-top:12px}.croqui-primary{border:0;border-radius:9px;background:#5d3a87;color:#fff;padding:9px 11px;font-size:9px;font-weight:900}.croqui-secondary{border:1px solid #c9b7d9;border-radius:9px;background:#fff;color:#654c7c;padding:9px 11px;font-size:9px;font-weight:900}.manage-btn.croqui-create{background:#5d3a87;color:#fff;border-color:#5d3a87}.manage-btn.croqui-create:hover{background:#6d4897}.croqui-change-dot{display:inline-grid;place-items:center;min-width:18px;height:18px;border-radius:999px;background:#fff;color:#5d3a87;font-size:7px;font-weight:1000;margin-left:4px}.sign-marker.croqui-item .sign-glyph,.device-marker.croqui-item .device-glyph{filter:drop-shadow(0 0 5px #8b5bb4)}.truck-route-preset{margin-top:10px;border:1px solid #f5b47a;background:#fff7ed;border-radius:11px;padding:10px}.truck-route-preset b{display:block;font-size:10px;color:#9a4a08}.truck-route-preset p{font-size:8px;line-height:1.45;color:#75543b;margin:5px 0 8px}.truck-route-preset button{border:0;border-radius:8px;background:#ea6b14;color:#fff;padding:8px 10px;font-size:8px;font-weight:1000}.truck-route-list{display:grid;gap:5px;margin-top:9px}.truck-route-row{display:grid;grid-template-columns:22px 1fr;gap:7px;align-items:center;padding:6px 7px;border:1px solid #ead8c7;background:#fffaf5;border-radius:8px}.truck-route-num{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#f97316;color:#fff;font-size:8px;font-weight:1000}.truck-route-row b{font-size:8px}.truck-route-row small{font-size:7px;color:#7b6a5d}.truck-route-note{margin-top:9px;padding:8px 9px;border-radius:8px;background:#fff3e5;border:1px solid #f0c89f;font-size:8px;line-height:1.4;color:#74420d}
    @media(max-width:1180px){.sign-row{grid-template-columns:minmax(0,1fr)}}

  
    /* v2.2 - editor viario inspirado em ferramentas de jogos de gestao de trafego */
    .approaches{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px!important}.approach{min-height:48px!important;display:flex!important;align-items:center!important;gap:9px!important;text-align:left!important;padding:8px 10px!important}.approach .approach-arrow{width:29px;height:29px;border-radius:9px;background:#edf5f9;color:#176f9f;display:grid;place-items:center;font-size:19px;font-weight:1000;flex:0 0 auto}.approach.active .approach-arrow{background:#fff;color:#103a5b}.approach .approach-copy{display:flex;flex-direction:column;min-width:0}.approach .approach-copy b{font-size:9px;line-height:1.2}.approach .approach-copy small{font-size:7px;opacity:.72;margin-top:2px}.direction-group{grid-template-columns:repeat(2,minmax(0,1fr))!important}.direction-btn{min-height:46px!important;line-height:1.2!important}.direction-btn .dir-icon{display:block;font-size:18px;margin-bottom:3px}.easy-edit-note{margin:8px 0 10px;padding:9px 10px;border-radius:9px;background:#eef7fb;border:1px solid #cde4ef;color:#35596d;font-size:8px;line-height:1.45}.easy-edit-note b{color:#103a5b}.move b{font-size:10px}.move .state-group{margin-top:7px}.movement-map-tip{margin:8px 0 0;font-size:8px;color:#58717e}.movement-map-tip b{color:#103a5b}


    /* v3.0 · editor por via / segmento / cruzamento */
    .road-editor-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:10px 0 12px}.road-editor-tab{border:1px solid #d4e1e7;background:#fff;color:#4f6977;border-radius:9px;padding:8px 5px;font-size:8px;font-weight:900;cursor:pointer}.road-editor-tab.active{background:#103a5b;color:#fff;border-color:#103a5b}.road-editor-tab:hover:not(.active){background:#f1f7fa}.editor-section-card{border:1px solid #d7e4e9;border-radius:12px;background:#f9fcfd;padding:11px;margin:10px 0}.editor-section-card h4{margin:0 0 4px;font-size:11px;color:#17384f}.editor-section-card p{margin:0 0 9px;font-size:8px;line-height:1.45;color:#6a7e89}.road-direction-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.road-direction-btn{min-height:48px;border:1px solid #cfdde4;background:#fff;border-radius:9px;color:#506b79;font-size:8px;font-weight:900;cursor:pointer}.road-direction-btn span{display:block;font-size:18px;color:#176f9f;margin-bottom:3px}.road-direction-btn.active{background:#e9f4fa;border-color:#5d9dbb;color:#174f6a;box-shadow:inset 0 0 0 1px #5d9dbb}.road-direction-state{display:flex;align-items:center;gap:7px;margin-top:9px;padding:8px 9px;border-radius:8px;background:#fff;border:1px solid #dfe9ed;font-size:8px;color:#58717e}.road-direction-state b{color:#17384f}.segment-list{display:grid;gap:7px;margin-top:8px}.segment-card{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;border:1px solid #d9e5ea;border-radius:9px;padding:9px;background:#fff;cursor:pointer;text-align:left}.segment-card:hover{border-color:#67a9c7;background:#f4f9fb}.segment-card.active{border-color:#f3ad16;box-shadow:0 0 0 2px #f3ad1633;background:#fffaf0}.segment-card b{font-size:9px}.segment-card small{display:block;margin-top:2px;font-size:7px;color:#6f828c}.segment-pill{border-radius:999px;padding:4px 7px;background:#edf5f8;color:#365f74;font-size:7px;font-weight:900}.segment-editor{margin-top:10px;border:1px solid #9fc6d8;border-radius:11px;background:#eef8fc;padding:10px}.segment-editor h4{margin:0 0 3px;font-size:10px}.segment-editor p{margin:0 0 8px;font-size:8px;color:#54717f}.segment-help{font-size:8px;color:#677d88;line-height:1.45}.sign-context-card{border:1px solid #d7e5eb;border-radius:10px;padding:9px;background:#f8fbfc;font-size:8px;line-height:1.45;color:#59727f;margin-top:8px}.road-dir-marker{width:26px;height:26px;display:grid;place-items:center;pointer-events:none}.road-dir-marker span{display:block;font-size:24px;line-height:1;color:#176f9f;text-shadow:0 0 3px #fff,0 0 3px #fff;font-weight:1000}.segment-link-badge{display:inline-flex;padding:3px 6px;border-radius:999px;background:#eaf5fa;color:#185f83;font-size:7px;font-weight:900;margin-left:5px}

    /* v4.0 · interface mapa-primeiro inspirada em city builders */
    body{--sim-panel-bg:rgba(255,255,255,.96)}
    main{position:relative;display:block!important;overflow:hidden;background:#dfe9ee}
    .map-wrap{position:absolute!important;inset:0!important;z-index:1}
    .right{position:absolute;right:14px;top:14px;width:min(350px,calc(100vw - 28px));max-height:calc(100% - 112px);overflow:auto;z-index:12;border:1px solid #c9d9e1!important;border-radius:16px;background:var(--sim-panel-bg);box-shadow:0 14px 42px #0b35502a;backdrop-filter:blur(10px);transition:.18s ease}
    .right.sim-hidden{opacity:0;transform:translateX(18px);pointer-events:none}
    .right .section{padding:14px!important}.right>.section:last-child{display:none}
    .left{position:absolute;left:14px;top:14px;width:292px;max-height:calc(100% - 112px);overflow:auto;z-index:12;border:1px solid #c9d9e1!important;border-radius:16px;background:var(--sim-panel-bg);box-shadow:0 14px 42px #0b35502a;backdrop-filter:blur(10px);display:none}
    body.sim-signage .left,body.sim-more .left{display:block}
    body.sim-signage .left>.section{display:none}
    body.sim-signage .left>.section:nth-child(3){display:block}
    body.sim-more .left>.section{display:block}
    .map-note{display:none!important}
    .map-chip{top:14px!important}
    .sim-toolbar{position:absolute;left:50%;bottom:16px;transform:translateX(-50%);z-index:20;display:flex;align-items:stretch;gap:7px;padding:8px;border:1px solid #c4d6df;border-radius:16px;background:rgba(255,255,255,.96);box-shadow:0 14px 42px #0b355035;backdrop-filter:blur(12px);max-width:calc(100vw - 24px);overflow-x:auto}
    .sim-tool{min-width:82px;border:1px solid transparent;background:transparent;border-radius:11px;padding:7px 9px;color:#506977;font-size:8px;font-weight:900;white-space:nowrap;transition:.15s ease}
    .sim-tool span{display:block;font-size:20px;line-height:1;margin-bottom:4px;color:#315f75}.sim-tool:hover{background:#edf5f8}.sim-tool.active{background:#103a5b;color:#fff;box-shadow:0 4px 12px #103a5b30}.sim-tool.active span{color:#fff}
    .sim-tool.action{border-left:1px solid #dbe6eb;border-radius:0 11px 11px 0}
    .sim-mode-hint{position:absolute;left:50%;bottom:92px;transform:translateX(-50%);z-index:11;background:rgba(16,58,91,.92);color:#fff;border-radius:999px;padding:7px 12px;font-size:9px;font-weight:800;box-shadow:0 5px 18px #0002;pointer-events:none;white-space:nowrap;max-width:calc(100vw - 40px);overflow:hidden;text-overflow:ellipsis}
    .sim-inspector-title{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:9px}.sim-inspector-title b{font-size:14px;color:#17384f}.sim-inspector-title small{display:block;font-size:8px;color:#6b808a;margin-top:3px;line-height:1.4}.sim-mode-badge{display:inline-flex;padding:4px 7px;border-radius:999px;background:#e8f4fb;color:#216789;font-size:7px;font-weight:900;white-space:nowrap}
    .sim-direction-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:10px}.sim-direction-btn{min-height:66px;border:1px solid #cbdce4;background:#fff;border-radius:11px;color:#476777;padding:8px 5px;font-size:8px;font-weight:900;cursor:pointer}.sim-direction-btn span{display:block;font-size:22px;color:#176f9f;margin-bottom:5px}.sim-direction-btn:hover{background:#f0f8fb;border-color:#78abc1}.sim-direction-btn.active{background:#e6f3fa;border-color:#4d98bb;box-shadow:inset 0 0 0 1px #4d98bb;color:#174f6a}.sim-direction-btn.danger span{color:#8a9aa3}
    .sim-live-card{margin-top:9px;border:1px solid #d7e4e9;border-radius:10px;background:#f8fbfc;padding:9px 10px;font-size:8px;line-height:1.45;color:#5e747f}.sim-live-card b{color:#17384f}.sim-live-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#23986e;margin-right:5px;vertical-align:0}
    .sim-segment-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid #d7e4e9;border-radius:10px;padding:9px;background:#fff;margin-top:8px}.sim-segment-summary b{font-size:10px}.sim-segment-summary small{display:block;font-size:8px;color:#6a7f89;margin-top:2px}.sim-segment-summary .segment-pill{flex:0 0 auto}
    .road-editor-tabs{display:none!important}.editor-section-card{border:0!important;background:transparent!important;padding:0!important;margin:0!important}.source-note{margin-top:10px!important}
    .road-dir-marker{width:22px;height:22px!important}.road-dir-marker span{font-size:19px!important;text-shadow:0 0 4px #fff,0 0 4px #fff,0 0 7px #fff!important;animation:simArrowPulse 1.35s ease-in-out infinite}.road-dir-marker.segment-own span{color:#f0a51a!important}.road-dir-marker.bidirectional{width:28px;height:28px!important}.road-dir-marker.bidirectional span{font-size:28px!important;font-weight:1000;line-height:1!important}
    @keyframes simArrowPulse{0%,100%{opacity:.72;transform:var(--arrow-rot) scale(.92)}50%{opacity:1;transform:var(--arrow-rot) scale(1.08)}}
    .segment-card{display:none!important}.segment-list{display:none!important}.segment-editor{border:0!important;background:transparent!important;padding:0!important;margin:0!important}
    .cross-btn{min-height:52px!important;padding:9px 10px!important}.cross-btn span{font-size:8px!important}
    .approaches{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px!important}.approach{min-height:50px!important}.approach .approach-copy b{font-size:9px!important}.approach .approach-copy small{font-size:7px!important}
    .moves{grid-template-columns:1fr!important}.move{padding:9px!important}.move .arrow{width:30px;height:30px;font-size:16px}
    .state-group{grid-template-columns:repeat(2,minmax(0,1fr))!important}
    @media(max-width:900px){header{grid-template-columns:1fr auto}.search-wrap{position:absolute;left:12px;right:12px;top:64px;z-index:25}.app{grid-template-rows:58px 1fr}.right{left:10px;right:10px;top:auto;bottom:103px;width:auto;max-height:42vh}.left{left:10px;right:10px;top:auto;bottom:103px;width:auto;max-height:50vh}.sim-tool{min-width:70px}.sim-toolbar{bottom:10px}.sim-mode-hint{bottom:84px}.map-chip{top:66px!important}}


    /* v5.0 · cenário executável / simulação derivada do croqui */
    body.sim-simulation .sign-marker,body.sim-simulation .device-marker,body.sim-simulation .editor-signal-marker,body.sim-simulation .editor-device-marker{display:none!important}
    body.sim-simulation .left{display:none!important}
    body.sim-simulation .croqui-banner{display:none!important}
    .traffic-sim-sign-marker{width:30px;height:30px;display:grid;place-items:center;filter:drop-shadow(0 2px 3px #0005);pointer-events:none}.traffic-sim-sign-glyph,.traffic-sim-sign-glyph svg{width:30px;height:30px;display:block}.traffic-sim-device-marker{width:32px;height:32px;display:grid;place-items:center;filter:drop-shadow(0 2px 4px #0005);pointer-events:none}.traffic-sim-device-marker svg{width:32px;height:32px;display:block}.editor-signal-marker,.editor-device-marker{pointer-events:auto!important;cursor:grab!important;position:relative}.editor-signal-marker:active,.editor-device-marker:active{cursor:grabbing!important}.editor-signal-marker.selected,.editor-device-marker.selected{filter:drop-shadow(0 0 2px #fff) drop-shadow(0 0 7px #176f9f)}.editor-signal-marker.inconsistent:after{content:'!';position:absolute;right:-5px;top:-6px;width:14px;height:14px;border-radius:50%;background:#d43f3f;color:#fff;font:900 9px/14px Arial;text-align:center;border:1.5px solid #fff}.horizontal-edit-handle{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:#176f9f;color:#fff;border:2px solid #fff;box-shadow:0 1px 6px #0008;font:900 12px/1 Arial;cursor:grab}.horizontal-edit-handle:active{cursor:grabbing}.horizontal-cartographic-marker{width:42px;height:42px;display:grid;place-items:center;cursor:pointer;pointer-events:auto;filter:drop-shadow(0 1px 2px #fff) drop-shadow(0 2px 5px #0007);transition:width .12s ease,height .12s ease,opacity .12s ease}.horizontal-cartographic-marker .hcm-rotator{width:100%;height:100%;display:grid;place-items:center;transform-origin:center}.horizontal-cartographic-marker svg{width:100%;height:100%;display:block;overflow:visible}.horizontal-cartographic-marker.selected{filter:drop-shadow(0 0 2px #fff) drop-shadow(0 0 7px #176f9f)}.traffic-sim-vehicle-marker{width:20px;height:13px;display:grid;place-items:center;pointer-events:none}.traffic-sim-car{position:relative;width:17px;height:8px;border-radius:4px;background:#164d73;border:1.35px solid #fff;box-shadow:0 1px 4px #0006;transform-origin:center;transition:transform .05s linear,box-shadow .12s ease}.traffic-sim-car:before{content:'';position:absolute;left:4px;top:1px;width:7px;height:4px;border-radius:2px;background:#bfe4f2;border:1px solid #0e3852}.traffic-sim-car:after{content:'';position:absolute;right:-3px;top:1.7px;border-left:4px solid #164d73;border-top:2.3px solid transparent;border-bottom:2.3px solid transparent}.traffic-sim-car.braking{box-shadow:0 1px 4px #0006,0 0 7px #df3e3e}.traffic-sim-car.braking:after{border-left-color:#df3e3e}.traffic-sim-car.yielding{box-shadow:0 1px 4px #0006,0 0 7px #e5a91a}.sim-flow-key{display:flex;gap:7px;align-items:center;margin-top:8px;font-size:8px;color:#657985}.sim-flow-key span{display:inline-block;width:24px;height:4px;border-radius:999px}.sim-flow-key .low{background:#8fb7c8}.sim-flow-key .mid{background:#3e91ad}.sim-flow-key .high{background:#d2762d}
    .sim-scenario-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:8px 0}.sim-scenario-tabs button{border:1px solid #cddde4;background:#fff;color:#56707d;border-radius:9px;padding:8px;font-size:8px;font-weight:900}.sim-scenario-tabs button.active{background:#103a5b;color:#fff;border-color:#103a5b}.sim-stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:8px 0}.sim-stats-grid>div{border:1px solid #d7e4e9;border-radius:9px;background:#f8fbfc;padding:8px 5px;text-align:center}.sim-stats-grid b{display:block;font-size:15px;color:#17384f}.sim-stats-grid span{display:block;font-size:7px;color:#6a7e89;margin-top:2px}.sim-control-row{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:8px 0}.sim-control{border:1px solid #cadce4;background:#fff;color:#365f74;border-radius:9px;padding:9px 8px;font-size:8px;font-weight:900}.sim-control.primary{background:#176f9f;color:#fff;border-color:#176f9f}.sim-control-block{margin-top:9px}.sim-control-block>b{display:block;font-size:8px;color:#516a77;margin-bottom:5px;text-transform:uppercase;letter-spacing:.04em}.sim-mini-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.sim-mini-buttons button,.sim-toggle-grid button{border:1px solid #d1e0e6;background:#fff;border-radius:8px;padding:7px 5px;font-size:8px;font-weight:850;color:#54707f}.sim-mini-buttons button.active,.sim-toggle-grid button.active{background:#e6f3fa;border-color:#579bb9;color:#174f6a}.sim-toggle-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-top:9px}.sim-big-action{width:100%;margin-top:10px;border:0;border-radius:10px;padding:10px;background:#103a5b;color:#fff;font-size:9px;font-weight:900}.sim-warnings{display:grid;gap:5px;margin-top:9px}.sim-warnings div{border:1px solid #e6c96d;background:#fff8df;color:#765608;border-radius:8px;padding:7px 8px;font-size:8px;line-height:1.4}.sim-compile-loading{margin-top:12px;border:1px solid #cfe0e7;background:#f8fbfc;border-radius:10px;padding:12px;font-size:9px;color:#55717f;display:flex;align-items:center;gap:8px}.sim-compile-loading span{width:13px;height:13px;border:2px solid #b8ccd6;border-top-color:#176f9f;border-radius:50%;animation:simSpin .7s linear infinite}@keyframes simSpin{to{transform:rotate(360deg)}}


    /* v5.5 · ferramenta única de posicionamento */
    .catalog-item{cursor:pointer!important}.catalog-item:active{cursor:pointer!important}
    .catalog-item.armed{background:#e5f5fb!important;border-color:#1979a6!important;box-shadow:0 0 0 2px #1979a622,0 6px 20px #0b527322!important}
    .catalog-item.armed:after{content:'POSICIONANDO';justify-self:end;grid-column:1/-1;font-size:7px;font-weight:1000;color:#176f9f;letter-spacing:.05em}
    .map-wrap.placing-catalog .drop-hint{display:block!important;inset:auto!important;left:50%!important;bottom:92px!important;transform:translateX(-50%)!important;width:max-content!important;max-width:min(620px,calc(100% - 40px))!important;padding:9px 13px!important;border:1px solid #176f9f!important;border-radius:999px!important;background:#103a5bf2!important;color:#fff!important;text-align:center!important;font-size:10px!important;box-shadow:0 8px 24px #052c443d!important;backdrop-filter:blur(8px)!important}
    .catalog-placement-ghost{pointer-events:none!important;opacity:.78;filter:drop-shadow(0 2px 5px #0007);display:grid;place-items:center}
    .catalog-placement-ghost.sign{width:30px;height:30px}.catalog-placement-ghost.sign svg{width:30px;height:30px;display:block}
    .catalog-placement-ghost.device{width:32px;height:32px}.catalog-placement-ghost.device svg{width:32px;height:32px;display:block}
    .catalog-placement-ghost.horizontal{width:46px;height:46px;border-radius:9px;background:#163c50cc;border:1.5px dashed #fff;padding:5px}.catalog-placement-ghost.horizontal svg{width:100%;height:100%;display:block}

