.ha-controls{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:16px 0}.ha-controls label{display:grid;gap:6px;flex:1;min-width:160px}.ha-controls .field{width:100%}.ha-map{height:560px;border-radius:12px;border:1px solid #ded4df;background:#f3f0f4;z-index:0}.ha-legend{display:flex;flex-wrap:wrap;gap:16px;margin:16px 0}.ha-legend span{display:flex;align-items:center;gap:6px}.ha-legend i{display:inline-block;width:12px;height:12px;border-radius:3px}.ha-note{display:block;font-size:12px;max-width:300px;margin-top:5px}.ha-map .leaflet-draw-toolbar a{box-sizing:content-box}#ha-root select,#ha-root input,#ha-root textarea{color:var(--text,#39273b)}@media(max-width:700px){.ha-map{height:420px}.ha-controls{align-items:stretch}.ha-controls label{min-width:100%}}

#ha-root{--ha-plum:#753267;--ha-border:#e8dfeb;--ha-muted:#82758a}
#ha-root .ha-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:4px 0 20px}
#ha-root h2{font-size:24px;margin:0 0 7px;letter-spacing:-.5px}
#ha-root h3{font-size:16px;margin:5px 0 12px}
#ha-root .transport-tabs{display:flex;gap:6px;padding:6px;background:#efe8f1;border-radius:12px;width:fit-content;margin-bottom:20px}
#ha-root .transport-tabs button{border:0;border-radius:8px;padding:12px 18px;background:transparent;color:#65546c;font-weight:700}
#ha-root .transport-tabs button.active{background:#753267;color:white;box-shadow:0 2px 6px #51204720}
#ha-root .ha-publish-bar{display:flex;align-items:end;gap:10px;flex-wrap:wrap;background:white;border:1px solid var(--ha-border);border-radius:14px;padding:16px 20px;margin-bottom:20px}
#ha-root .ha-publish-bar label{display:grid;gap:7px;min-width:220px;flex:1;max-width:360px}
#ha-root #ha-save-state{margin:auto 0 auto auto;font-size:12px;color:var(--ha-muted)}
.ha-editor-layout{display:grid;grid-template-columns:290px minmax(0,1fr);gap:20px;align-items:start}
.ha-sidebar{display:grid;gap:16px;min-width:0}
.ha-card,.ha-map-card{background:#fff;border:1px solid var(--ha-border);border-radius:16px;box-shadow:0 4px 16px #47203d05;overflow:hidden}
.ha-card{padding:20px}
.ha-step{font-size:10px;font-weight:800;letter-spacing:1px;color:#915881;margin-bottom:9px}
.ha-help,.ha-empty p{font-size:12px;line-height:1.65;color:var(--ha-muted);margin:0 0 16px}
.ha-card label{display:grid;gap:8px;font-size:12px;font-weight:600;margin-top:17px}
.ha-optional{font-weight:400;color:var(--ha-muted)}
#ha-root .field{font-family:inherit;min-height:42px;border:1px solid #dfd2e3;border-radius:9px;padding:10px 12px;background:white;width:100%;box-sizing:border-box}
#ha-root .field:focus{outline:2px solid #b67ba7;outline-offset:2px}
.ha-search-row{display:flex;gap:6px}
.ha-search-row .field{min-width:0}
.ha-map-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 20px 4px}
.ha-display-label{max-width:180px}
.ha-draw-tools{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:12px 20px}
#ha-root .button{cursor:pointer;min-height:38px;padding:9px 13px;border:1px solid #e3d5e7;background:#fff;border-radius:8px;color:#5b3455;font-family:inherit;font-size:12px;font-weight:700}
#ha-root .button.primary{background:#753267;border-color:#753267;color:white}
#ha-root .button:hover{background:#f5edf5}
#ha-root .button.primary:hover{background:#602452}
#ha-root .button:disabled{opacity:.5;cursor:wait}
.ha-tool-divider{height:22px;border-left:1px solid #e3d5e7;margin:0 3px}
.ha-draw-status{background:#f6f0f7;border-top:1px solid #ede3ef;border-bottom:1px solid #ede3ef;padding:11px 20px;color:#76536d;font-size:12px;line-height:1.5;min-height:18px}
#ha-root .ha-map{height:560px;border:0;border-radius:0;isolation:isolate;position:relative}
.ha-map .leaflet-tile-pane{pointer-events:none}
#ha-root .ha-legend{padding:14px 20px;margin:0;border-top:1px solid #eee5ef;font-size:12px;gap:14px}
#ha-map-message:empty{display:none}
#ha-map-message{padding:12px 20px;color:#9b3434;background:#fff7f5;font-size:12px}
.ha-list-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.ha-list-heading h3{margin:0}
#ha-area-count{background:#f1e8f2;color:#753267;padding:4px 8px;border-radius:6px;font-size:12px;font-weight:700}
#ha-area-list{max-height:330px;overflow-y:auto}
.ha-area-row{display:flex;align-items:center;gap:10px;width:100%;padding:13px 0;border:0;border-bottom:1px solid #f0e7f1;background:white;text-align:left;cursor:pointer;color:#41253d}
.ha-area-row i{width:10px;height:10px;border-radius:3px;flex-shrink:0}
.ha-area-row>span:first-of-type{flex:1;min-width:0}
.ha-area-row strong,.ha-area-row small{display:block;overflow:hidden;text-overflow:ellipsis}
.ha-area-row strong{font-size:12px}.ha-area-row small{font-size:11px;color:var(--ha-muted);margin-top:4px}
.ha-empty{padding:14px 0 0}.ha-empty strong{font-size:13px}.ha-empty p{margin:8px 0 0}
.ha-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:1100px){.ha-editor-layout{grid-template-columns:250px minmax(0,1fr)}.ha-draw-tools{padding:12px}.ha-card{padding:16px}}
@media(max-width:800px){.ha-editor-layout{grid-template-columns:minmax(0,1fr)}.ha-sidebar{grid-template-columns:1fr 1fr}.ha-map-heading{padding:16px 16px 4px}#ha-root .ha-map{height:480px}#ha-root #ha-save-state{margin:0;width:100%}}
@media(max-width:540px){.ha-sidebar{grid-template-columns:1fr}.ha-area-card{order:2}.ha-heading{align-items:start!important}.ha-heading h2{font-size:20px!important}#ha-root .transport-tabs{width:auto}#ha-root .transport-tabs button{padding:10px;font-size:11px}#ha-root .ha-publish-bar{padding:14px}#ha-root .ha-publish-bar label{max-width:none;width:100%}.ha-map-heading{flex-wrap:wrap}.ha-draw-tools .button{flex:1 1 auto}#ha-root .ha-map{height:430px}}

body.nx-redesigned #ha-root .ha-overview-metrics{grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin-bottom:20px}body.nx-redesigned #ha-root .ha-overview-metrics>.metric{min-width:0;padding:20px}body.nx-redesigned #ha-root .ha-overview-metrics .label{font-size:12px;line-height:1.4}body.nx-redesigned #ha-root .ha-overview-metrics .value{font-size:30px;line-height:1.2;margin:10px 0}body.nx-redesigned #ha-root .ha-overview-metrics .caption{font-size:11px;line-height:1.4}@media(max-width:1000px){body.nx-redesigned #ha-root .ha-overview-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:600px){body.nx-redesigned #ha-root .ha-overview-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}body.nx-redesigned #ha-root .ha-overview-metrics>.metric{padding:15px}}
