:root{font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;color:#17392c;background:#f3f6f1}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}header{height:72px;background:#103e2e;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 26px}header small{opacity:.7}.brand{font-weight:850;letter-spacing:.03em;font-size:19px}.brand span{color:#a6dcb3}#app{display:grid;grid-template-columns:370px 1fr;height:calc(100vh - 72px)}aside{background:white;overflow:auto;padding:22px;border-right:1px solid #dce6de}.heading{display:flex;align-items:center;justify-content:space-between}h2{font-size:20px;margin:0 0 15px}h3{font-size:16px;margin:22px 0 12px}.muted{font-size:12px;color:#64796c;line-height:1.5}label{display:block;color:#354d41;font-size:12px;font-weight:700;margin:13px 0 5px}input,select,textarea{width:100%;background:#fff;border:1px solid #cbd9ce;border-radius:10px;padding:11px;outline-color:#368761}textarea{min-height:74px}.primary{background:#216d4d;border:0;color:white;padding:11px 15px;border-radius:10px;font-weight:700}.secondary{border:1px solid #cbd9ce;background:white;padding:10px 12px;border-radius:10px;color:#216d4d;font-weight:700}.danger{color:#a0473f}.row{display:flex;gap:9px;align-items:center}.row>*{flex:1}#map{height:100%;min-height:500px}.maparea{position:relative}.floating{position:absolute;z-index:500;top:16px;right:16px;background:white;padding:14px;border-radius:14px;box-shadow:0 4px 24px #15352430;min-width:210px}.stat{display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px solid #edf0ee}.stat strong{font-variant-numeric:tabular-nums}.list{display:grid;gap:8px;margin-top:12px}.item{border:1px solid #d9e4db;border-radius:12px;padding:12px;text-align:left;background:#fff}.item.active{border-color:#297c56;background:#f0f8f1}.item strong{display:block}.tag{font-size:11px;background:#e9f2e9;padding:4px 7px;border-radius:10px}.error{color:#ae342e}.success{color:#166b45}.screen{position:fixed;inset:0;background:#f3f6f1;z-index:2000;display:grid;place-items:center;padding:16px}.login{max-width:420px;width:100%;background:white;padding:32px;border-radius:18px;box-shadow:0 18px 60px #16352817}.login h1{margin:10px 0 8px}.hidden{display:none!important}.sep{border:0;border-top:1px solid #e7ede7;margin:22px 0}#notice{min-height:22px;font-size:12px;margin:10px 0}.hint{padding:12px;background:#f4f8ef;border-radius:10px;font-size:12px;line-height:1.5}.leaflet-container{font:inherit}@media(max-width:850px){#app{display:flex;flex-direction:column;height:auto}aside{max-height:none}#map{height:62vh;min-height:430px}.maparea{order:-1}.floating{top:8px;right:8px;min-width:160px;padding:9px;font-size:12px}header{padding:0 16px}}

.map-toolbar{position:absolute;z-index:500;left:12px;top:12px;background:white;border-radius:10px;box-shadow:0 3px 15px #1234;padding:9px 12px;display:flex;align-items:center;gap:8px;font-size:12px}.map-toolbar select{margin:0;width:auto;max-width:170px;padding:6px}.item button{font-size:12px}.muted{overflow-wrap:anywhere}

/* 1.2.3 — módulos recolhíveis e identificação semântica das ações */
.module{border:1px solid #d8e4da;border-radius:14px;margin:18px 0;background:#fff;overflow:hidden}
.module>summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;background:#edf6ee;padding:15px 12px;font-weight:800;color:#174831;list-style:none}
.module>summary::-webkit-details-marker{display:none}
.module>summary:after{content:'▾';color:#236d4c;font-size:18px}
.module:not([open])>summary:after{content:'▸'}
.module>summary span{font-size:10px;color:#52715e;font-weight:600;text-align:right}
.module>section{padding:0 12px 14px}
.module>section h3{margin-top:14px}
.btn-edit{background:#e8f1ff!important;color:#1556a2!important;border-color:#a8c9f5!important}
.btn-delete{background:#fff0ef!important;color:#a72d2d!important;border:1px solid #edb0ab!important}
.btn-map{background:#fff4e3!important;color:#885510!important;border:1px solid #f0c67a!important}
.inventory-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.inventory-actions button{flex:1 1 auto;font-size:12px}
button:focus-visible,summary:focus-visible{outline:3px solid #407fa8;outline-offset:2px}

/* Marcadores selecionáveis e arrastáveis: árvore (azul) e plantio (verde). */
.ra-marker { display:flex;align-items:center;justify-content:center;font-size:22px;background:#fff;border:3px solid #2563a6;border-radius:50%;box-shadow:0 2px 9px #0005;cursor:grab !important; }
.ra-marker.ra-plant { border-color:#2d8b4e; }
.ra-marker:active {cursor:grabbing !important;}

/* v1.2.8a - distinção visual de registros. Sem alterações em dados ou autenticação. */
.ra-marker.ra-tree{border-color:#19683d;background:#e9f5eb;color:#145a35}
.ra-marker.ra-plant{border-color:#1479bc;background:#e9f5ff;color:#07588b}
.ra-marker.ra-inventory-seedling{border-color:#c47a18;background:#fff3dc;color:#87540a}
.ra-marker.ra-seed{border-color:#8641a7;background:#f6eafd;color:#6d3189}
.ra-marker.ra-draft{border-style:dashed;outline:2px solid rgba(0,0,0,.13);outline-offset:2px}
.ra-category-legend{margin:14px 0;padding:12px;background:#f7faf7;border:1px solid #d8e7da;border-radius:12px}
.ra-category-legend>strong{display:block;margin-bottom:8px;font-size:12px;color:#214d37}
.ra-legend-row{display:flex;gap:10px;align-items:center;padding:3px 0;font-size:12px}
.ra-legend-symbol{width:28px;height:28px;display:grid;place-items:center;border-radius:50%;border:2px solid;font-size:16px;background:white;flex:none}
.ra-tree-key{border-color:#19683d}.ra-plant-key{border-color:#1479bc}.ra-muda-key{border-color:#c47a18}.ra-seed-key{border-color:#8641a7}
.ra-category-legend .muted{margin:8px 0 0}

/* v1.3.0e: cards independentes, acessíveis e recolhíveis, sem alterar formulários */
#inventoryModule, #plantModule {display:block;margin:18px 0 20px;border-radius:16px;overflow:hidden;border:2px solid transparent;box-shadow:0 5px 18px rgba(19,63,45,.07);background:#fff;}
#inventoryModule{border-color:#a8cbb4;}
#plantModule{border-color:#9ec6e5;}
#inventoryModule>summary,#plantModule>summary {min-height:74px;padding:16px 13px;line-height:1.45;gap:8px;font-size:15px;}
#inventoryModule>summary{background:#e9f5ea;color:#145636;}
#plantModule>summary{background:#e8f4ff;color:#135c8e;}
#inventoryModule>summary span,#plantModule>summary span{font-size:11px;max-width:120px;line-height:1.35;}
#plantModule>summary span{color:#386f93;}
#inventoryModule>summary:after{color:#17663d;}
#plantModule>summary:after{color:#156ea8;}
#inventoryModule>section,#plantModule>section{padding:14px 12px 18px;}
#inventoryModule:not([open]),#plantModule:not([open]){box-shadow:none;}
#inventoryModule>summary:hover{background:#dff1e2;}
#plantModule>summary:hover{background:#deefff;}
#inventoryModule>summary:focus-visible,#plantModule>summary:focus-visible{outline:3px solid #e4a124;outline-offset:-4px;}
