.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}:root {
  --background: #ffffff;
  --foreground: #171717;
  --crm-bg: #f5f7f8;
  --crm-sidebar: #edf2ed;
  --crm-brand: #1f8d65;
  --crm-border: #d8dee3;
  --crm-text: #0f172a;
  --crm-muted: #64748b;
  --crm-muted-strong: #475569;
  --crm-accent-soft: #cdebd5;
  --crm-danger: #b42318;
  --crm-deploy-token: 20260519;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--crm-font-body, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  font-size: var(--crm-font-size-body, 15px);
  font-weight: var(--crm-font-weight-body, 400);
  line-height: var(--crm-line-height-body, 1.45);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
}

.screen-center {
  display: grid;
  min-height: 100vh;
  place-items: center;
  color: var(--crm-muted);
}

.platform-boot {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: #fff;
  color: #111827;
}

.platform-boot > span {
  width: 28px;
  height: 28px;
  border: 2px solid #e5e7eb;
  border-top-color: #111827;
  border-radius: 999px;
  animation: platform-boot-spin 0.8s linear infinite;
}

.platform-boot section {
  width: min(420px, calc(100vw - 48px));
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
}

.platform-boot h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.platform-boot p {
  margin: 8px 0 0;
  color: #4b5563;
  font-size: 14px;
}

@keyframes platform-boot-spin {
  to {
    transform: rotate(360deg);
  }
}

.crm-root {
  min-height: 100vh;
  background: var(--crm-bg);
  color: var(--crm-text);
}

.crm-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 250px minmax(0, 1fr);
  font-family: var(--crm-font-body, ui-sans-serif, system-ui, sans-serif);
}

.crm-sidebar {
  background: var(--crm-sidebar);
}

.crm-sidebar-desktop {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  border-right: 1px solid var(--crm-border);
  padding: 18px 14px;
}

.crm-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.crm-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.crm-brand-title {
  margin: 0;
  color: var(--crm-brand);
  font-size: 24px;
  font-family: var(--crm-font-display, var(--crm-font-heading, inherit));
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
}

.crm-brand-logo {
  display: block;
  max-width: 132px;
  max-height: 26px;
  object-fit: contain;
  object-position: left center;
}

.crm-brand-chip,
.login-brand-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--crm-brand) 28%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--crm-brand) 9%, white);
  color: var(--crm-muted-strong);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  line-height: 1;
  padding: 4px 7px;
  text-transform: uppercase;
}

.crm-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: #fff;
  color: var(--crm-muted-strong);
  padding: 8px;
}

.crm-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  margin-top: 18px;
  overflow-y: auto;
}

.crm-nav-section {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 11px 8px 4px;
  color: color-mix(in srgb, var(--crm-muted) 82%, var(--crm-text));
  font-family: var(--crm-font-body, ui-sans-serif, system-ui, sans-serif);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.crm-nav-section.is-locked {
  color: color-mix(in srgb, var(--crm-danger) 42%, var(--crm-muted-strong));
}

.crm-nav-lock-icon {
  flex: 0 0 auto;
  stroke-width: 2.6;
}

.crm-nav-section:first-child {
  margin-top: 0;
}

.crm-nav-link,
.crm-logout {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 6px 10px;
  color: var(--crm-muted-strong);
  cursor: pointer;
  font-family: var(--crm-font-body, ui-sans-serif, system-ui, sans-serif);
  font-size: 13px;
  font-weight: var(--crm-font-weight-label, 600);
  line-height: 1.25;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.crm-nav-link svg,
.crm-logout svg {
  flex: 0 0 auto;
}

.crm-nav-link:hover,
.crm-logout:hover {
  background: #fff;
}

.crm-nav-link.is-active,
.crm-subnav-link.is-active {
  background: var(--crm-accent-soft);
  color: var(--crm-text);
}

.crm-nav-link.is-highlight {
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 60%, #ec4899 100%);
  box-shadow: 0 8px 18px rgb(37 99 235 / 25%);
}

.crm-nav-link.is-highlight:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 60%, #db2777 100%);
  color: #fff;
}

.crm-nav-link.is-highlight.is-active {
  background: linear-gradient(135deg, #1e40af 0%, #5b21b6 60%, #be185d 100%);
  color: #fff;
}

.crm-nav-link.is-highlight svg {
  color: #fff;
}

.crm-nav-arrow {
  margin-left: auto;
  font-size: 18px;
  line-height: 1;
  transition: transform 0.15s ease;
}

.crm-nav-arrow.is-open {
  transform: rotate(90deg);
}

.crm-subnav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 1px 0 3px 24px;
  border-left: 1px solid var(--crm-border);
  padding-left: 8px;
}

.crm-subnav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 5px 8px;
  font-family: var(--crm-font-body, ui-sans-serif, system-ui, sans-serif);
  color: var(--crm-muted-strong);
  font-size: 12.5px;
  font-weight: var(--crm-font-weight-label, 600);
  line-height: 1.25;
}

.crm-subnav-link:hover {
  background: #fff;
}

.crm-logout {
  margin-top: auto;
}

.crm-logout-text {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.crm-logout-text strong,
.crm-logout-text em {
  min-width: 0;
  overflow: hidden;
  font-style: normal;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-logout-text strong {
  color: var(--crm-text);
  font-size: 12px;
  font-weight: var(--crm-font-weight-label, 650);
}

.crm-logout-text em {
  color: var(--crm-muted-strong);
  font-size: 11px;
  font-weight: 600;
}

.crm-main {
  min-width: 0;
}

.crm-mobile-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  color: var(--crm-muted-strong);
  box-shadow: 0 1px 2px rgb(15 23 42 / 8%);
}

.crm-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgb(0 0 0 / 35%);
}

.crm-sidebar-mobile {
  position: fixed;
  inset: 0 0 auto;
  z-index: 51;
  max-height: 90vh;
  overflow-y: auto;
  border-bottom: 1px solid var(--crm-border);
  padding: 24px 20px;
  box-shadow: 0 25px 70px rgb(15 23 42 / 24%);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 0;
  border-radius: var(--crm-radius-xl, 999px);
  padding: 0 16px;
  background: var(--crm-brand);
  color: var(--platform-main-text, #fff);
  font-family: var(--crm-font-heading, var(--crm-font-body, inherit));
  font-size: var(--crm-font-size-label, 13px);
  font-weight: var(--crm-font-weight-label, 700);
}

.button.secondary {
  border: 1px solid var(--crm-border);
  background: #fff;
  color: var(--crm-text);
}

.button.danger {
  background: #be123c;
  color: #fff;
}

.button.danger:hover:not(:disabled) {
  background: #9f1239;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  color: var(--crm-muted);
  font-size: var(--crm-font-size-label, 13px);
  font-weight: var(--crm-font-weight-label, 600);
}

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-md, 12px);
  padding: 0 12px;
  background: #fff;
  color: var(--crm-text);
  font-size: var(--crm-font-size-body, 15px);
}

.field textarea {
  width: 100%;
  min-height: 280px;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-md, 12px);
  padding: 12px;
  background: #fff;
  color: var(--crm-text);
  font-size: var(--crm-font-size-body, 15px);
}

.toggle-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  color: var(--crm-muted-strong);
  font-size: var(--crm-font-size-label, 13px);
  font-weight: 700;
}

.toggle-field input {
  width: 16px;
  height: 16px;
}

.error {
  color: var(--crm-danger);
}

.page {
  display: grid;
  gap: var(--crm-spacing-sm, 18px);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--crm-border);
  background: #fff;
  padding: var(--crm-spacing-sm, 16px) var(--crm-spacing-md, 24px);
}

.page-header span {
  color: var(--crm-muted);
  font-family: var(--crm-font-heading, var(--crm-font-body, inherit));
  font-size: var(--crm-font-size-caption, 12px);
  font-weight: var(--crm-font-weight-label, 700);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-header h1 {
  margin: 0;
  font-size: var(--crm-font-size-heading, 24px);
  font-family: var(--crm-font-heading, inherit);
  font-weight: var(--crm-font-weight-heading, 650);
  line-height: var(--crm-line-height-heading, 1.15);
  letter-spacing: 0;
}

.page-header p {
  margin: 4px 0 0;
  color: var(--crm-muted-strong);
  font-size: var(--crm-font-size-body, 14px);
}

.page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.mcp-page-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.toolbar-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.notice-ok {
  max-width: 640px;
  margin: 0;
  color: #047857;
  font-size: 12px;
  text-align: right;
}

.notice-error {
  max-width: 640px;
  overflow-x: auto;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  background: #fff1f2;
  color: #be123c;
  padding: 8px;
  font-size: 11px;
  line-height: 1.45;
  text-align: left;
  white-space: pre-wrap;
}

.queue-refresh-note {
  margin: 0 0 10px;
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.page > :not(.page-header) {
  margin-inline: 24px;
}

.page > :last-child {
  margin-bottom: 24px;
}

.panel {
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-lg, 16px);
  background: #fff;
  padding: var(--crm-spacing-sm, 16px);
  box-shadow: var(--crm-shadow-card, 0 1px 2px rgb(15 23 42 / 4%));
}

.warning-panel {
  border-color: #fde68a;
  background: #fffbeb;
}

.warning-panel h2,
.warning-panel li {
  color: #713f12;
}

.onboarding-source-note {
  border: 1px solid #bfdbfe;
  border-radius: var(--crm-radius-lg, 16px);
  background: #eff6ff;
  color: #1e3a8a;
  padding: 14px 18px;
  box-shadow: var(--crm-shadow-card, 0 1px 2px rgb(15 23 42 / 4%));
}

.onboarding-source-note strong {
  display: block;
  margin-bottom: 4px;
  color: #172554;
  font-size: 14px;
}

.onboarding-source-note p {
  margin: 3px 0;
  color: #1e40af;
  font-size: 14px;
  line-height: 1.45;
}

.onboarding-source-note code {
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #dbeafe;
  padding: 1px 5px;
  color: #1e3a8a;
  font-size: 12px;
}

.onboarding-source-note a {
  color: #075985;
  font-weight: 800;
  text-decoration: none;
}

.empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-lg, 16px);
  background: #fff;
  color: var(--crm-muted-strong);
  padding: var(--crm-spacing-lg, 32px);
  text-align: center;
}

.empty p {
  max-width: 520px;
  margin: 6px 0 0;
}

.loading-heading,
.inline-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--crm-muted-strong);
  font-size: var(--crm-font-size-body, 14px);
  font-weight: var(--crm-font-weight-label, 600);
}

.loading-heading {
  margin-bottom: 14px;
}

.inline-loading {
  width: fit-content;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-xl, 999px);
  background: #fff;
  padding: 8px 12px;
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid color-mix(in srgb, var(--crm-brand) 18%, #e5e7eb);
  border-top-color: var(--crm-brand);
  border-radius: var(--crm-radius-xl, 999px);
  animation: platform-boot-spin 0.8s linear infinite;
}

.button-spinner {
  width: 14px;
  height: 14px;
  border-color: rgb(255 255 255 / 45%);
  border-top-color: currentColor;
}

.button.secondary .button-spinner {
  border-color: color-mix(in srgb, var(--crm-brand) 18%, #e5e7eb);
  border-top-color: currentColor;
}

.skeleton-line,
.skeleton-number,
.skeleton-cell,
.skeleton-control,
.skeleton-segmented,
.skeleton-page-button {
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef2f5 0%, #f8fafc 42%, #eef2f5 84%);
  background-size: 240% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.skeleton-line {
  width: 72%;
  height: 12px;
}

.skeleton-line.short {
  width: 42%;
}

.skeleton-number {
  width: 82px;
  height: 34px;
  margin-top: 14px;
}

.skeleton-table tbody tr:hover {
  background: transparent;
}

.skeleton-cell {
  width: 74px;
  height: 18px;
}

.skeleton-cell.wide {
  width: 150px;
}

.skeleton-control {
  width: 240px;
  height: 43px;
  border-radius: 12px;
}

.skeleton-control.wide {
  width: 260px;
}

.skeleton-control.small {
  width: 190px;
}

.skeleton-control.status-sized {
  width: 220px;
}

.skeleton-control.order-sized {
  width: 205px;
}

.skeleton-control.button-sized {
  width: 88px;
  border-radius: 12px;
}

.skeleton-filters,
.skeleton-order-row {
  pointer-events: none;
}

.skeleton-segmented {
  width: 220px;
  height: 43px;
  border-radius: 999px;
}

.skeleton-leads-filter-bar {
  flex-wrap: nowrap;
}

.skeleton-pagination {
  justify-content: flex-end;
}

.skeleton-line.pagination-text {
  width: 160px;
  height: 14px;
}

.skeleton-page-button {
  width: 36px;
  height: 38px;
  border-radius: 10px;
}

@keyframes skeleton-shimmer {
  to {
    background-position: -240% 0;
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stats-grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stats-grid.six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.stats-grid.three,
.split-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.split-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-heading-row,
.snapshot-block-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading-row h2,
.snapshot-block-header h2 {
  margin-top: 0;
}

.platform-info-grid {
  display: grid;
  gap: 16px;
}

.platform-info-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 14px;
  color: var(--crm-muted-strong);
  font-size: 14px;
}

.platform-info-meta strong {
  color: var(--crm-text);
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: var(--crm-muted-strong);
  font-size: var(--crm-font-size-body, 15px);
  font-weight: 700;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--crm-brand);
}

.platform-info-payload {
  max-height: 420px;
  margin-top: 14px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
}

.form-error {
  margin: 10px 0 0;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 700;
}

.form-success {
  margin: 10px 22px 0;
  color: #047857;
  font-size: 13px;
  font-weight: 800;
}

.field-limit {
  justify-self: end;
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 700;
}

.field-limit.is-over {
  color: #b91c1c;
}

.muted {
  color: var(--crm-muted-strong);
}

.page-shell {
  display: grid;
  gap: 18px;
  padding: 28px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.metric-grid.compact {
  max-width: 420px;
}

.metric-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: #fff;
  padding: 14px 16px;
}

.metric-card span {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-card strong {
  color: var(--crm-text);
  font-size: 24px;
  line-height: 1;
}

.error-banner {
  border: 1px solid color-mix(in srgb, var(--crm-danger) 28%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--crm-danger) 8%, white);
  color: var(--crm-danger);
  font-weight: 700;
  padding: 12px 14px;
}

/* Counterpart of .error-banner — green box used by transient "operation
 * completed" notices (archive confirmations, etc.). Same visual weight,
 * positive color tone. */
.success-banner {
  border: 1px solid color-mix(in srgb, #10b981 30%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, #10b981 8%, white);
  color: #047857;
  font-weight: 700;
  padding: 12px 14px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--crm-border);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-table td strong,
.data-table td span,
.data-table td small {
  display: block;
}

.data-table td small {
  margin-top: 3px;
  color: var(--crm-muted);
  font-size: 12px;
}

.table-actions {
  text-align: right;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  background: #fff;
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 10px;
}

.status-pill--signable,
.status-pill--payable {
  border-color: color-mix(in srgb, var(--crm-brand) 28%, transparent);
  background: color-mix(in srgb, var(--crm-brand) 10%, white);
  color: var(--crm-brand);
}

.status-pill--completed,
.status-pill--materialized {
  border-color: color-mix(in srgb, #059669 28%, transparent);
  background: color-mix(in srgb, #059669 10%, white);
  color: #047857;
}

.status-pill--cancelled {
  border-color: color-mix(in srgb, var(--crm-danger) 28%, transparent);
  background: color-mix(in srgb, var(--crm-danger) 8%, white);
  color: var(--crm-danger);
}

.onboarding-process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.process-step {
  display: flex;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
}

.process-step > span {
  display: inline-grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--crm-soft);
  color: var(--crm-muted-strong);
  font-size: 13px;
  font-weight: 900;
}

.process-step.done > span {
  background: color-mix(in srgb, #059669 14%, white);
  color: #047857;
}

.process-step strong,
.process-step small {
  display: block;
}

.process-step small {
  margin-top: 4px;
  color: var(--crm-muted);
}

.stat-label {
  margin: 0 0 8px;
  color: var(--crm-muted);
  font-family: var(--crm-font-heading, var(--crm-font-body, inherit));
  font-size: var(--crm-font-size-caption, 12px);
  font-weight: var(--crm-font-weight-label, 700);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.big-number {
  display: block;
  font-family: var(--crm-font-heading, var(--crm-font-body, inherit));
  font-size: var(--crm-font-size-h2, 30px);
  font-weight: var(--crm-font-weight-heading, 650);
  letter-spacing: 0;
}

.verification-stat-card {
  position: relative;
  min-height: 126px;
}

.verification-stat-action {
  position: absolute;
  top: 12px;
  right: 12px;
}

.verification-stat-spinner {
  width: 24px;
  height: 24px;
  margin: 5px auto 0;
}

.verification-stat-card .big-number:has(.verification-stat-spinner) {
  display: grid;
  justify-items: center;
}

.verification-automatic-form {
  align-items: flex-end;
}

.verification-automatic-form .button {
  min-height: 42px;
}

.verification-list-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.verification-list-search-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  min-width: min(100%, 560px);
}

.verification-list-search-field {
  flex: 1;
  min-width: 280px;
}

.verification-list-search-form .button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.verification-pending-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--crm-brand) 35%, #dbeafe);
  border-radius: 12px;
  background: color-mix(in srgb, var(--crm-brand) 10%, #fff);
  color: #1d4ed8;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.verification-pending-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--crm-brand);
  cursor: pointer;
}

.verification-list-actions {
  gap: 16px;
  margin-bottom: 24px;
}

.verification-list-actions .button {
  min-height: 50px;
  padding: 0 26px;
}

.verification-list-actions .button:disabled {
  border: 1px solid #d1d5db;
  background: #e5e7eb;
  color: #6b7280;
  opacity: 1;
}

.verification-list-table tbody tr,
.verification-select-table tbody tr {
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.verification-list-table tbody tr.is-selected,
.verification-select-table tbody tr.is-selected {
  background: color-mix(in srgb, var(--crm-brand) 8%, #fff);
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--crm-brand) 72%, #2563eb);
}

.verification-list-table input[type="checkbox"],
.verification-select-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--crm-brand);
}

.verification-console-shell {
  min-width: 0;
}

.verification-console-panel {
  padding: var(--crm-spacing-sm, 16px);
}

.verification-console {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.verification-console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
  background: #18181b;
  padding: 10px 12px;
}

.verification-console-head p {
  margin: 0;
}

.verification-console-head strong {
  color: #f4f4f5;
  font-size: 12px;
  font-weight: 800;
}

.verification-progress {
  height: 8px;
  background: #27272a;
}

.verification-progress span {
  display: block;
  height: 100%;
  background: #22c55e;
  transition: width 180ms ease;
}

.verification-console pre {
  height: 320px;
  max-height: 320px;
  padding: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.verification-confirm-modal {
  width: min(560px, calc(100vw - 32px));
}

.verification-confirm-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.verification-confirm-summary > div {
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 14px;
}

.verification-confirm-summary span {
  display: block;
  margin-bottom: 4px;
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.verification-confirm-summary strong {
  font-size: 26px;
  font-weight: 800;
}

.campaign-template-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 14px;
}

.campaign-template-selector.wide {
  grid-column: 1 / -1;
}

.campaign-template-selector > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.campaign-template-selector span {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.campaign-template-selector strong {
  overflow: hidden;
  color: var(--crm-text);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-template-selector p {
  margin: 0;
  color: var(--crm-muted-strong);
  font-size: 13px;
  line-height: 1.4;
}

.campaign-template-picker-modal {
  width: min(1040px, 100%);
}

.campaign-template-picker-search {
  grid-template-columns: minmax(320px, 1.2fr) minmax(260px, 0.8fr) auto;
  margin-top: 16px;
}

.campaign-template-picker-table-frame {
  position: relative;
  min-height: 320px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
}

.campaign-template-picker-table th {
  background: #f8fafc;
}

.campaign-template-picker-table tbody tr {
  cursor: pointer;
}

.campaign-template-picker-table tbody tr:hover td,
.campaign-template-picker-table tbody tr.is-selected td {
  background: #eff6ff;
}

.campaign-template-picker-table code {
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  background: #f8fafc;
  padding: 4px 8px;
  color: #334155;
  font-size: 12px;
}

.campaign-sender-selector {
  display: grid;
  gap: 12px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 14px;
}

.campaign-sender-selector.wide {
  grid-column: 1 / -1;
}

.campaign-sender-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #f3f4f6;
  padding: 4px;
}

.campaign-sender-mode button {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--crm-muted-strong);
  font-weight: 800;
}

.campaign-sender-mode button.is-active {
  background: #fff;
  color: var(--crm-text);
  box-shadow: 0 8px 24px rgb(15 23 42 / 10%);
}

.campaign-sender-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sender-default-star {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fef3c7;
  color: #d97706;
}

.table-actions-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sender-profile-modal {
  width: min(560px, 100%);
}

.sender-profile-modal-form {
  margin-top: 18px;
}

.link-stack {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.link-stack a {
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  padding: 12px 16px;
}

.link-stack a:hover {
  background: #fafafa;
}

.inline-link {
  color: var(--crm-brand);
  font-weight: 700;
  word-break: break-all;
}

.json-tree,
.json-editor {
  margin: 0;
  width: 100%;
  max-height: 68vh;
  overflow: auto;
  color: var(--crm-text);
  font-family: var(--crm-font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
  font-size: var(--crm-font-size-mono, 12px);
  font-weight: var(--crm-font-weight-mono, 400);
  line-height: var(--crm-line-height-mono, 1.55);
  white-space: pre-wrap;
}

.json-editor {
  min-height: 520px;
  resize: vertical;
}

.html-editor {
  min-height: 68vh;
  font-family: var(--crm-font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
  font-size: var(--crm-font-size-mono, 12px);
  line-height: var(--crm-line-height-mono, 1.55);
}

.html-preview {
  width: 100%;
  height: 360px;
  margin-top: 14px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
}

.modal-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 30%);
  padding: 16px;
}

.sync-modal {
  width: min(672px, 100%);
  max-width: calc(100vw - 32px);
  border: 1px solid var(--crm-border);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgb(15 23 42 / 24%);
}

/* Generic modal card — for ad-hoc dialogs that don't need a full sync-modal.
 * Compact, centered on the backdrop, opens with two grid sections (header +
 * body). The dialog itself is responsible for laying out the body. */
.modal-card {
  width: min(520px, 100%);
  max-width: calc(100vw - 32px);
  border: 1px solid var(--crm-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 80px rgb(15 23 42 / 18%);
  overflow: hidden;
}

.modal-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--crm-border);
}

.modal-card-header h2 {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.2;
}

.modal-card-body {
  padding: 18px;
}

.modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.modal-heading > div {
  min-width: 0;
}

.modal-heading p {
  margin: 4px 0 0;
  color: var(--crm-muted-strong);
}

.modal-heading h3 {
  margin: 0;
  font-family: var(--crm-font-heading, var(--crm-font-body, inherit));
  font-size: var(--crm-font-size-h3, 18px);
  font-weight: var(--crm-font-weight-heading, 650);
  letter-spacing: 0;
}

.sync-modal-body {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  min-width: 0;
}

.provider-sync-modal {
  width: min(900px, calc(100vw - 32px));
}

.field-title {
  margin: 0 0 8px;
  font-size: var(--crm-font-size-label, 14px);
  font-weight: var(--crm-font-weight-label, 650);
}

.sync-console {
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #09090b;
  padding: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.wide-modal {
  width: min(980px, 100%);
}

.campaign-members-modal {
  width: min(1080px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.campaign-members-modal-body {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.campaign-members-modal-body .table-wrap {
  overflow: auto;
}

.campaign-push-modal {
  width: min(960px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.campaign-push-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.campaign-push-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.campaign-push-option {
  display: grid;
  gap: 8px;
  min-height: 136px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  color: var(--crm-text);
  padding: 16px;
  text-align: left;
  cursor: pointer;
}

.campaign-push-option:hover {
  border-color: #2563eb;
  background: #f8fbff;
}

.campaign-push-option strong {
  font-size: 15px;
  font-weight: 750;
}

.campaign-push-option span {
  color: var(--crm-muted);
  font-size: 13px;
  line-height: 1.45;
}

.campaign-push-progress-track {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  position: relative;
}

.campaign-push-progress-fill {
  position: absolute;
  inset: 0;
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
  box-shadow: 0 0 0 1px rgb(37 99 235 / 10%), 0 6px 16px rgb(37 99 235 / 22%);
  transform-origin: left center;
  transition: transform 180ms ease;
}

.campaign-push-progress strong {
  min-width: 44px;
  color: var(--crm-text);
  font-size: 13px;
  text-align: right;
}

.campaign-push-console {
  flex: 1;
  min-height: 280px;
  margin-top: 16px;
  overflow: hidden;
}

.campaign-push-console pre {
  max-height: min(420px, calc(100vh - 300px));
  overflow: auto;
}

@media (max-width: 760px) {
  .campaign-push-options {
    grid-template-columns: 1fr;
  }
}

.console-only {
  margin-top: 12px;
}

.sync-console p {
  margin: 0 0 8px;
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sync-console pre {
  max-height: 288px;
  overflow: auto;
  margin: 0;
  color: #f4f4f5;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.provider-sync-console pre {
  height: min(380px, calc(100vh - 300px));
  max-height: min(380px, calc(100vh - 300px));
  overflow-x: hidden;
  overflow-y: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.form-actions.compact {
  margin-top: 0;
  gap: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid.single {
  grid-template-columns: 1fr;
}

.form-grid.compact {
  gap: 10px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-grid > div {
  min-width: 0;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--crm-brand) 4%, #fff);
  padding: 12px;
}

.detail-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-grid strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--crm-text);
  font-size: 14px;
}

.wide {
  grid-column: 1 / -1;
}

.timeline {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.timeline article {
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.timeline article strong {
  display: block;
}

.timeline article span {
  display: block;
  margin-top: 3px;
  color: var(--crm-muted);
  font-size: 12px;
}

.timeline article p {
  margin: 8px 0 0;
  color: var(--crm-muted-strong);
  white-space: pre-wrap;
}

.lead-management-shell {
  display: grid;
  gap: 18px;
  /* Hard cap so no descendant (long URL in a note, wide quick-action row,
     etc.) can blow the page width and force horizontal scroll. The Panel and
     side column already use min-width:0 internally to wrap text. */
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.lead-summary-panel {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  /* Wrap on narrow viewports so the quick-actions chunk drops below the
     stat cards instead of pushing them past the right edge. */
  flex-wrap: wrap;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--crm-brand) 18%, var(--crm-border));
  border-radius: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--crm-brand) 9%, #fff), #fff 54%),
    #fff;
  padding: 18px;
  box-shadow: 0 14px 38px rgb(15 23 42 / 7%);
}

.lead-summary-main {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  gap: 14px;
}

.lead-summary-kicker {
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead-summary-panel h2 {
  margin: 2px 0 8px;
  color: var(--crm-text);
  font-size: 30px;
  line-height: 1.05;
}

.lead-summary-meta,
.lead-quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.lead-summary-meta > span,
.lead-muted-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  background: #fff;
  color: var(--crm-muted-strong);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 750;
}

.lead-summary-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.lead-summary-facts article {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--crm-brand) 12%, var(--crm-border));
  border-radius: 12px;
  background: rgb(255 255 255 / 0.78);
  padding: 11px 12px;
}

.lead-summary-facts svg {
  color: var(--crm-brand);
}

.lead-summary-facts span {
  display: block;
  margin-top: 5px;
  color: var(--crm-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead-summary-facts strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 3px;
  color: var(--crm-text);
  font-size: 13px;
}

.lead-summary-facts p {
  overflow: hidden;
  display: -webkit-box;
  min-height: 34px;
  margin: 4px 0 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--crm-muted-strong);
  font-size: 12px;
  line-height: 1.35;
}

.lead-quick-actions {
  align-content: flex-start;
  justify-content: flex-end;
  /* No hard floor: this row wraps onto its own line if it doesn't fit, and
     the inner buttons already break to multiple rows via flex-wrap. The old
     300px floor was forcing the panel wider than the viewport on laptops. */
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
}

.lead-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.lead-kpi-card {
  min-width: 0;
  border: 1px solid var(--crm-border);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 8px 24px rgb(15 23 42 / 5%);
}

.lead-kpi-card svg {
  color: var(--crm-brand);
}

.lead-kpi-card span,
.lead-info-grid span {
  display: block;
  margin-top: 8px;
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead-kpi-card strong,
.lead-info-grid strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 6px;
  color: var(--crm-text);
  font-size: 15px;
}

.lead-kpi-card p {
  margin: 5px 0 0;
  color: var(--crm-muted-strong);
  font-size: 13px;
  line-height: 1.4;
}

.lead-management-panel {
  border-radius: 16px;
  padding: 18px;
}

.lead-panel-heading {
  margin-bottom: 12px;
}

.lead-panel-heading h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
}

.lead-panel-heading p {
  margin: 4px 0 0;
  color: var(--crm-muted-strong);
  font-size: 13px;
}

.lead-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.lead-info-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lead-info-grid > div {
  min-width: 0;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--crm-brand) 3%, #fff);
  padding: 10px 11px;
}

.lead-info-grid span {
  margin-top: 0;
}

.lead-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  margin-top: 18px;
  min-width: 0;
  max-width: 100%;
}

.lead-main-column,
.lead-side-column {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

/* All panels in the lead detail must respect their column width — without
   min-width:0 a long unbroken string (URL in a note, an email address) can
   make the grid track grow past minmax(0, 1fr) and push the side column off. */
.lead-management-panel {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.lead-management-panel > * {
  min-width: 0;
  max-width: 100%;
}

.lead-side-column {
  position: sticky;
  top: 18px;
}

/* "Next action" editor panel on the lead detail. Lives at the top of the
   side column because scheduling/closing follow-ups is the #1 daily action. */
.lead-next-action-panel {
  border: 1px solid color-mix(in srgb, var(--crm-brand) 22%, var(--crm-border));
  background: color-mix(in srgb, var(--crm-brand) 4%, #fff);
}

.lead-next-action-current {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
}

.lead-next-action-empty {
  margin: 0 0 10px;
  font-size: 13px;
}

.lead-next-action-form .field {
  margin-bottom: 0;
}

.lead-next-action-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.lead-next-action-hint {
  font-size: 11px;
  margin: 0;
}

/* Restaurant context card (Qleber / selling_point full info). */
.lead-restaurant-card {
  display: grid;
  gap: 10px;
}

.lead-restaurant-card .lead-restaurant-name {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lead-restaurant-card .lead-restaurant-name .lead-tag-chip {
  font-size: 11px;
  padding: 2px 8px;
}

.lead-restaurant-card .lead-restaurant-address {
  color: var(--crm-muted, #5a6473);
  font-size: 13px;
  line-height: 1.45;
}

.lead-restaurant-card .lead-restaurant-rows {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.lead-restaurant-card .lead-restaurant-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lead-restaurant-card .lead-restaurant-row svg {
  flex: 0 0 auto;
  color: var(--crm-muted, #5a6473);
}

.lead-restaurant-card .lead-restaurant-row a {
  color: var(--crm-brand);
  text-decoration: none;
  word-break: break-all;
}

.lead-restaurant-card .lead-restaurant-row a:hover {
  text-decoration: underline;
}

.lead-restaurant-card .lead-restaurant-promote {
  border: 1px dashed var(--crm-border);
  border-radius: 10px;
  padding: 9px 11px;
  background: color-mix(in srgb, var(--crm-brand) 4%, #fff);
  display: grid;
  gap: 6px;
}

.lead-restaurant-card .lead-restaurant-promote .muted {
  font-size: 12px;
}

.lead-restaurant-card .lead-restaurant-promote .copy-button {
  align-self: start;
}

/* Unified activity timeline. */
.lead-activity-feed {
  display: grid;
  gap: 0;
  position: relative;
}

.lead-activity-feed::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--crm-border);
  border-radius: 2px;
}

.lead-activity-item {
  position: relative;
  padding: 8px 0 16px 30px;
}

.lead-activity-item:last-child {
  padding-bottom: 4px;
}

.lead-activity-item .lead-activity-dot {
  position: absolute;
  left: 0;
  top: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--crm-border);
  display: grid;
  place-items: center;
  color: var(--crm-muted, #5a6473);
}

.lead-activity-item[data-kind="status"] .lead-activity-dot {
  border-color: color-mix(in srgb, var(--crm-brand) 60%, #fff);
  color: var(--crm-brand);
}

.lead-activity-item[data-kind="call"] .lead-activity-dot {
  border-color: #1bbb88;
  color: #1bbb88;
}

.lead-activity-item[data-kind="interaction"] .lead-activity-dot {
  border-color: #f0a800;
  color: #f0a800;
}

.lead-activity-item[data-kind="note"] .lead-activity-dot {
  border-color: #7d6cf2;
  color: #7d6cf2;
}

.lead-activity-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 13px;
}

.lead-activity-head strong {
  font-weight: 600;
}

.lead-activity-head .muted {
  color: var(--crm-muted, #5a6473);
  font-size: 12px;
}

.lead-activity-body {
  font-size: 13px;
  color: var(--crm-text, #1f2937);
  margin: 4px 0 0;
  white-space: pre-wrap;
  /* Notes can carry pasted markdown / long URLs / mailto strings without
     spaces. Without anywhere/break-word these overflow horizontally and
     blow the page width out (Trello-imported descriptions did this). */
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.lead-activity-item {
  min-width: 0;
}

.lead-activity-item > div {
  min-width: 0;
  flex: 1;
}

/* Status chip-toggles on the leads list (replaces the single <select>). */
.lead-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}

.lead-status-chips .status-chip {
  border: 1px solid var(--crm-border);
  background: #fff;
  color: var(--crm-muted, #5a6473);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  --status-color: #94a3b8;
}

.lead-status-chips .status-chip::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--status-color);
  vertical-align: 1px;
}

.lead-status-chips .status-chip:hover {
  background: color-mix(in srgb, var(--status-color) 8%, #fff);
}

.lead-status-chips .status-chip.is-active {
  background: color-mix(in srgb, var(--status-color) 14%, #fff);
  color: var(--crm-text, #1f2937);
  border-color: color-mix(in srgb, var(--status-color) 65%, #fff);
}

.lead-status-chips .status-chip-clear {
  border: none;
  background: transparent;
  color: var(--crm-muted, #5a6473);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.lead-status-chips .status-chip-clear:hover {
  color: var(--crm-text, #1f2937);
}

/* Next-action urgency chip in the leads table. */
.next-action-chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  border: 1px solid transparent;
}

.next-action-chip.next-action-overdue {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}

.next-action-chip.next-action-today {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.next-action-chip.next-action-soon {
  background: #dbeafe;
  color: #1e40af;
  border-color: #bfdbfe;
}

.next-action-chip.next-action-later {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

/* Selection checkbox column on the leads table. */
.leads-checkbox-th,
.leads-checkbox-td {
  width: 36px;
  text-align: center;
  vertical-align: middle;
}

.leads-checkbox-th input[type="checkbox"],
.leads-checkbox-td input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--crm-brand);
}

.skeleton-checkbox {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e5e7eb, #f3f4f6, #e5e7eb);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.leads-table tr.is-selected-row {
  background: color-mix(in srgb, var(--crm-brand) 6%, #fff);
}

.leads-table tr.is-selected-row > td {
  border-top-color: color-mix(in srgb, var(--crm-brand) 25%, var(--crm-border));
}

/* Floating bulk-actions bar shown when ≥1 lead is selected. Sticky to the top
   of the content viewport so the user can scroll the table while keeping
   the action visible. */
.leads-bulk-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: color-mix(in srgb, var(--crm-brand) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--crm-brand) 28%, var(--crm-border));
  border-radius: 10px;
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.08);
}

.leads-bulk-bar-left {
  font-size: 14px;
  color: var(--crm-text, #1f2937);
}

.leads-bulk-bar-left strong {
  font-size: 16px;
  color: var(--crm-brand);
}

.leads-bulk-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.leads-bulk-bar-field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--crm-muted, #5a6473);
}

.leads-bulk-bar-field select {
  padding: 6px 10px;
  border: 1px solid var(--crm-border);
  border-radius: 7px;
  background: #fff;
  font: inherit;
  font-size: 13px;
}

.leads-bulk-bar-message {
  font-size: 13px;
  flex-basis: 100%;
}

.leads-bulk-bar-message.is-error {
  color: #b91c1c;
}

.leads-bulk-bar-message.is-ok {
  color: #047857;
}

/* Ghost-style clear button in the bulk bar. No underline, no link look —
   just an inline icon button that hovers with a subtle wash. */
.leads-bulk-bar-clear {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--crm-muted, #5a6473);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.leads-bulk-bar-clear:hover:not(:disabled) {
  background: color-mix(in srgb, var(--crm-text, #1f2937) 6%, transparent);
  color: var(--crm-text, #1f2937);
}

.leads-bulk-bar-clear:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.leads-bulk-bar-clear svg {
  flex: 0 0 auto;
}

/* Row-level icon buttons (Open / Archive) — small rectangle buttons with a
   leading icon. Same shape language as the contact-action-button family so
   the table reads consistently, but in neutral tones (primary blue & muted
   gray) so the channel buttons keep the spotlight. */
.row-actions-icons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  white-space: nowrap;
  min-width: 96px;
}

.row-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--crm-border);
  background: #ffffff;
  color: var(--crm-text, #1f2937);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
  font-family: inherit;
}

.row-action-btn svg {
  flex: 0 0 auto;
}

.row-action-btn:hover {
  transform: translateY(-1px);
}

.row-action-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06) inset;
}

/* Primary action ("Open") is the most important button on each row — make
 * it a solid brand-filled pill so the operator's eye locks onto it.
 * Inspired by Stitch's prominent Open button per card. */
.row-action-btn.primary {
  background: var(--crm-brand);
  border-color: var(--crm-brand);
  color: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), 0 2px 6px color-mix(in srgb, var(--crm-brand) 22%, transparent);
}

.row-action-btn.primary:hover {
  background: color-mix(in srgb, var(--crm-brand) 88%, #000);
  border-color: color-mix(in srgb, var(--crm-brand) 88%, #000);
  color: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08), 0 4px 10px color-mix(in srgb, var(--crm-brand) 30%, transparent);
}

.row-action-btn.primary svg {
  color: #ffffff;
}

.row-action-btn.muted {
  color: var(--crm-muted, #5a6473);
  background: #fff;
}

.row-action-btn.muted:hover {
  background: #f8fafc;
  color: var(--crm-text, #1f2937);
  border-color: #cbd5e1;
}

/* Clickable column header for sortable columns. */
.leads-sort-th {
  background: transparent;
  border: none;
  padding: 0;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.leads-sort-th:hover {
  color: var(--crm-brand);
}

/* Label prefix on a chip row ("Next action:" etc). */
.lead-chip-row-label {
  font-size: 12px;
  color: var(--crm-muted, #5a6473);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 4px;
}

/* Reuse next-action tone tinting on the filter chips above the table. */
.lead-next-action-chips .status-chip.next-action-overdue.is-active {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}
.lead-next-action-chips .status-chip.next-action-today.is-active {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}
.lead-next-action-chips .status-chip.next-action-soon.is-active {
  background: #dbeafe;
  color: #1e40af;
  border-color: #bfdbfe;
}
.lead-next-action-chips .status-chip.next-action-later.is-active {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.lead-activity-meta {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--crm-muted, #5a6473);
  align-items: center;
  flex-wrap: wrap;
}

.lead-activity-meta a,
.lead-activity-meta button {
  font-size: 12px;
}

.lead-activity-empty {
  color: var(--crm-muted, #5a6473);
  font-size: 13px;
  padding: 12px 0;
}

/* Collapsible "add" toolbar above the timeline. */
.lead-add-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.lead-add-toolbar .button {
  padding: 6px 12px;
  font-size: 13px;
}

.lead-add-toolbar .button.is-open {
  background: var(--crm-brand);
  color: #fff;
}

.lead-quick-form {
  margin-bottom: 14px;
}

.lead-quick-form[hidden] {
  display: none;
}

.lead-action-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--crm-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--crm-brand) 2%, #fff);
  padding: 12px;
}

.lead-action-form.single {
  grid-template-columns: 1fr;
}

.lead-action-form textarea {
  min-height: 72px;
  resize: vertical;
}

.lead-action-form > .button.wide {
  width: auto;
  min-width: 160px;
  justify-self: end;
}

.compact-note-form textarea {
  min-height: 82px;
}

.lead-timeline,
.lead-note-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.lead-timeline-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--crm-border);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}

.lead-timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--crm-brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--crm-brand) 12%, transparent);
}

.lead-timeline-dot.interaction {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgb(22 163 74 / 12%);
}

.lead-timeline-item strong,
.lead-note-list article strong {
  display: block;
  color: var(--crm-text);
  font-size: 14px;
}

.lead-timeline-item span,
.lead-note-list article span {
  display: block;
  margin-top: 2px;
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 650;
}

.lead-timeline-item p,
.lead-note-list article p {
  margin: 8px 0 0;
  color: var(--crm-muted-strong);
  line-height: 1.5;
  white-space: pre-wrap;
}

.lead-note-list article {
  border: 1px solid var(--crm-border);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}

.lead-context-panel {
  border-color: color-mix(in srgb, var(--crm-brand) 18%, var(--crm-border));
  background: color-mix(in srgb, var(--crm-brand) 3%, #fff);
}

.lead-side-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.lead-telegram-panel {
  border-color: color-mix(in srgb, #7c3aed 18%, var(--crm-border));
}

/* Hero variant of the onboarding/Telegram panel — promoted to the top of
 * the lead detail page so the operator sees the onboarding state and
 * actions without scrolling. Border + accent ribbon shift based on
 * state (is-missing / is-pending / is-ready) so the card itself carries
 * the urgency signal. */
.lead-onboarding-hero {
  position: relative;
  padding: 18px 20px 20px;
  border-width: 1.5px;
  background: linear-gradient(180deg, color-mix(in srgb, #7c3aed 4%, #fff) 0%, #fff 100%);
}
.lead-onboarding-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  border-radius: 16px 16px 0 0;
  background: var(--crm-brand);
}
.lead-onboarding-hero.is-missing {
  border-color: color-mix(in srgb, #f59e0b 35%, var(--crm-border));
  background: linear-gradient(180deg, color-mix(in srgb, #f59e0b 6%, #fff) 0%, #fff 100%);
}
.lead-onboarding-hero.is-missing::before { background: #f59e0b; }
.lead-onboarding-hero.is-pending {
  border-color: color-mix(in srgb, #6366f1 30%, var(--crm-border));
  background: linear-gradient(180deg, color-mix(in srgb, #6366f1 5%, #fff) 0%, #fff 100%);
}
.lead-onboarding-hero.is-pending::before { background: #6366f1; }
.lead-onboarding-hero.is-ready {
  border-color: color-mix(in srgb, #10b981 30%, var(--crm-border));
  background: linear-gradient(180deg, color-mix(in srgb, #10b981 5%, #fff) 0%, #fff 100%);
}
.lead-onboarding-hero.is-ready::before { background: #10b981; }
/* Archived: terminal state. Neutral grayscale so the card recedes
 * visually — the lead is closed and the onboarding has been taken
 * down in Core, no CTA, no urgency. */
.lead-onboarding-hero.is-archived {
  border-color: color-mix(in srgb, #6b7280 25%, var(--crm-border));
  background: linear-gradient(180deg, color-mix(in srgb, #6b7280 4%, #fff) 0%, #fff 100%);
  opacity: 0.85;
}
.lead-onboarding-hero.is-archived::before { background: #6b7280; }

.lead-onboarding-hero .lead-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.lead-onboarding-hero-title h2 {
  font-size: 18px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: -0.01em;
  margin: 2px 0 0;
  word-break: break-all;
}
.lead-onboarding-hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--crm-muted-strong);
}
.lead-onboarding-hero-status-row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  max-width: 360px;
  text-align: right;
}
.lead-onboarding-hero-hint {
  font-size: 12.5px;
  color: var(--crm-muted-strong);
  line-height: 1.5;
}
.lead-onboarding-hero-empty {
  display: flex;
  justify-content: flex-start;
}
.lead-onboarding-hero-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lead-onboarding-hero-channel {
  margin: 0;
  font-size: 12px;
  color: var(--crm-muted-strong);
}
.lead-onboarding-hero-channel code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  padding: 2px 6px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--crm-brand) 6%, #fff);
  border: 1px solid var(--crm-border);
  color: var(--crm-text);
}
.lead-onboarding-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
@media (max-width: 720px) {
  .lead-onboarding-hero-status-row {
    align-items: flex-start;
    text-align: left;
    max-width: none;
  }
}

.call-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.lead-file-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border: 1px dashed var(--crm-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--crm-brand) 2%, #fff);
  padding: 12px;
}

.lead-file-upload input {
  flex: 1 1 220px;
}

@media (max-width: 960px) {
  .lead-summary-facts,
  .lead-kpi-grid,
  .lead-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-workspace-grid {
    grid-template-columns: 1fr;
  }

  .lead-side-column {
    position: static;
  }
}

@media (max-width: 760px) {
  .lead-summary-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .lead-quick-actions {
    justify-content: flex-start;
    min-width: 0;
    max-width: none;
  }

  .lead-summary-facts,
  .lead-kpi-grid,
  .lead-info-grid,
  .lead-action-form {
    grid-template-columns: 1fr;
  }
}

.pill-x {
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 800;
  margin-left: 6px;
  padding: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filters.seven {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
}

.filters input,
.filters select {
  min-height: 40px;
  min-width: 220px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  color: var(--crm-text);
  font-size: 14px;
}

.leads-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.leads-main-filters {
  flex: 0 1 auto;
  margin: 0;
}

.leads-main-filters input[name="search"] {
  min-width: 260px;
}

.campaign-status-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #f1f5f9;
  padding: 4px;
}

.campaign-status-switch a {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--crm-muted-strong);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.campaign-status-switch button {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--crm-muted-strong);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.campaign-status-switch a.is-active {
  color: #fff;
  box-shadow: 0 8px 24px rgb(15 23 42 / 14%);
}

.campaign-status-switch button.is-active {
  color: #fff;
  box-shadow: 0 8px 24px rgb(15 23 42 / 14%);
}

.verify-tab-switch {
  position: relative;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 0;
  padding: 0;
  background: #f3f4f6;
  overflow: hidden;
  --verify-tab-index: 0;
}

.verify-tab-switch::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  width: calc(100% / 3);
  border-radius: 11px;
  background: #2563eb;
  box-shadow: 0 8px 24px rgb(15 23 42 / 14%);
  transform: translateX(calc(var(--verify-tab-index) * 100%));
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.verify-tab-switch-lists {
  --verify-tab-index: 0;
}

.verify-tab-switch-manual {
  --verify-tab-index: 1;
}

.verify-tab-switch-automatic {
  --verify-tab-index: 2;
}

.verify-tab-switch button {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 44px;
  border-radius: 11px;
  background: transparent;
}

.verify-tab-switch button.is-active {
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.campaign-status-switch-scheduled {
  background: #eff6ff;
}

.campaign-status-switch-scheduled a.is-active {
  background: #2563eb;
}

.campaign-status-switch-scheduled button.is-active {
  background: #2563eb;
}

.campaign-status-switch-draft_sync {
  background: #f5f3ff;
}

.campaign-status-switch-draft_sync a.is-active {
  background: #7c3aed;
}

.campaign-status-switch-sent {
  background: #ecfdf5;
}

.campaign-status-switch-sent a.is-active {
  background: #059669;
}

.campaign-status-switch-archived {
  background: #f1f5f9;
}

.campaign-status-switch-archived a.is-active {
  background: #475569;
}

.campaign-table-loading-frame {
  position: relative;
  min-height: 180px;
}

.campaign-table-content {
  transition:
    filter 160ms ease,
    opacity 160ms ease;
}

.campaign-table-content.is-loading {
  pointer-events: none;
  filter: blur(2px);
  opacity: 0.55;
  user-select: none;
}

.campaign-table-loading-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgb(255 255 255 / 36%);
}

.campaign-table-loading-overlay .loading-spinner {
  width: 28px;
  height: 28px;
  border-width: 3px;
}

.copy-button {
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: #fff;
  color: var(--crm-muted-strong);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.copy-button:hover {
  background: #f8fafc;
}

.copy-button.is-primary-action {
  border-color: color-mix(in srgb, var(--crm-brand) 55%, var(--crm-border));
  background: color-mix(in srgb, var(--crm-brand) 10%, #fff);
  color: var(--crm-brand);
}

.workflow-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workflow-strip span,
.workflow-strip button {
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  background: #fff;
  padding: 7px 11px;
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 800;
}

.workflow-strip button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.workflow-strip button small {
  color: var(--crm-muted);
  font-size: 11px;
}

.workflow-strip span.is-current,
.workflow-strip button.is-current {
  border-color: color-mix(in srgb, var(--crm-brand) 35%, var(--crm-border));
  background: color-mix(in srgb, var(--crm-brand) 8%, #fff);
  color: var(--crm-brand);
}

.copyable-id {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copyable-id button {
  border: 1px solid var(--crm-border);
  border-radius: 6px;
  background: #fff;
  color: var(--crm-muted-strong);
  padding: 4px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.copyable-id button:hover {
  background: #f8fafc;
}

.copyable-id span {
  color: #047857;
  font-size: 12px;
}

.telephony-free-call {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.telephony-free-call input {
  width: min(360px, 100%);
  min-height: 42px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  color: var(--crm-text);
  padding: 0 14px;
  font: inherit;
}

.telephony-free-call input:focus {
  border-color: color-mix(in srgb, var(--crm-brand) 60%, var(--crm-border));
  outline: 2px solid color-mix(in srgb, var(--crm-brand) 24%, transparent);
  outline-offset: 2px;
}

.telephony-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.telephony-summary-card {
  display: grid;
  gap: 6px;
  min-height: 104px;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: #fff;
  padding: 14px 16px;
  box-shadow: var(--crm-shadow-soft);
}

.telephony-summary-card span {
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.telephony-summary-card strong {
  color: var(--crm-text);
  font-size: 30px;
  line-height: 1;
}

.telephony-summary-card small {
  color: var(--crm-muted);
  font-size: 13px;
}

.telephony-line-table {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
}

.telephony-line-table table {
  width: 100%;
  min-width: 780px;
  border: 0;
}

.telephony-line-table th,
.telephony-line-table td {
  padding: 12px 14px;
}

.telephony-line-table tr.is-selected td {
  background: color-mix(in srgb, var(--crm-brand) 5%, #fff);
}

.telephony-line-table tr.is-selected td:first-child {
  box-shadow: inset 4px 0 0 var(--crm-brand);
}

.telephony-line-name {
  display: grid;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--crm-text);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.telephony-line-name span {
  color: var(--crm-text);
  font-weight: 850;
}

.telephony-line-name small {
  color: var(--crm-muted);
  font-size: 12px;
}

.telephony-status-stack,
.telephony-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
}

.telephony-actions .button {
  min-height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}

.telephony-user-cell {
  display: grid;
  gap: 4px;
}

.telephony-user-cell span {
  color: var(--crm-muted);
  font-size: 12px;
}

.telephony-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.telephony-detail-grid > div {
  display: grid;
  gap: 5px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--crm-brand) 3%, #fff);
  padding: 13px 14px;
}

.telephony-detail-grid span {
  color: var(--crm-muted-strong);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.telephony-detail-grid strong {
  color: var(--crm-text);
  font-size: 16px;
}

.telephony-detail-grid small {
  color: var(--crm-muted);
}

.is-muted-row td {
  color: var(--crm-muted);
}

.telephony-member-lines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.telephony-member-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  padding: 16px;
}

.telephony-member-lines.compact .telephony-member-card {
  grid-template-columns: 1fr;
}

.telephony-member-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--crm-brand) 10%, #fff);
  color: var(--crm-brand);
}

.telephony-member-card span {
  color: var(--crm-muted-strong);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.telephony-member-card strong {
  display: block;
  margin-top: 4px;
  color: var(--crm-text);
  font-size: 17px;
}

.telephony-member-card p {
  margin: 4px 0 0;
  color: var(--crm-muted);
}

.telephony-member-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.telephony-linkus-credentials {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  border: 1px solid color-mix(in srgb, var(--crm-brand) 16%, var(--crm-border));
  border-radius: 14px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--crm-brand) 6%, #fff), #fff 58%);
  padding: 16px;
}

.telephony-linkus-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.telephony-linkus-head > div {
  display: grid;
  gap: 3px;
}

.telephony-linkus-head span {
  color: var(--crm-muted-strong);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.telephony-linkus-head p {
  margin: 0;
  color: var(--crm-muted);
  font-size: 13px;
}

.telephony-linkus-credentials dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.telephony-linkus-credentials dl.telephony-linkus-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.telephony-linkus-credentials div {
  min-width: 0;
}

.telephony-linkus-grid > div {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 76px;
  border: 1px solid color-mix(in srgb, var(--crm-border) 78%, transparent);
  border-radius: 12px;
  background: rgb(255 255 255 / 0.86);
  padding: 12px;
}

.telephony-linkus-credentials dt {
  margin: 0 0 2px;
  color: var(--crm-muted-strong);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.telephony-linkus-credentials dd {
  margin: 0;
  color: var(--crm-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.telephony-linkus-credentials .button {
  width: fit-content;
}

.secret-empty {
  color: var(--crm-muted);
  font-family: var(--crm-font-body, ui-sans-serif, system-ui, sans-serif);
  font-size: 13px;
}

.secret-credential {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  letter-spacing: 0;
  text-transform: none;
}

.secret-credential code {
  min-width: 112px;
  border-radius: 8px;
  background: #f8fafc;
  padding: 5px 8px;
  color: var(--crm-text);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  overflow-wrap: anywhere;
}

.secret-credential button {
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: #fff;
  color: var(--crm-muted-strong);
  cursor: pointer;
  font-family: var(--crm-font-body, ui-sans-serif, system-ui, sans-serif);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 5px 8px;
  text-transform: none;
}

.secret-credential button:hover {
  border-color: color-mix(in srgb, var(--crm-brand) 35%, var(--crm-border));
  color: var(--crm-brand);
}

.telephony-modal-backdrop {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(15 23 42 / 0.44);
  padding: 24px;
}

.telephony-modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--crm-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 80px rgb(15 23 42 / 0.24);
  padding: 22px;
}

.telephony-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.telephony-modal-header h2 {
  margin: 0;
  color: var(--crm-text);
}

.telephony-modal-header p {
  margin: 4px 0 0;
}

.telephony-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

@media (max-width: 720px) {
  .telephony-modal-actions {
    flex-direction: column-reverse;
  }
}

.telephony-user-email {
  display: block;
  margin-top: 4px;
}

.telephony-line-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.telephony-line-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--crm-border);
  border-radius: 14px;
  background: #fff;
  color: var(--crm-text);
  cursor: pointer;
  padding: 16px;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.telephony-line-card:hover,
.telephony-line-card.is-selected {
  border-color: color-mix(in srgb, var(--crm-brand) 42%, var(--crm-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--crm-brand) 10%, transparent);
}

.communications-tabs {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 4px;
}

.communications-tabs button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--crm-muted-strong);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}

.communications-tabs button.is-active {
  background: #fff;
  color: var(--crm-text);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
}

.communications-action-grid,
.communications-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.communications-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.communications-panel-heading h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.communications-form-grid {
  display: grid;
  gap: 10px;
}

.communications-form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.communications-form-grid input,
.communications-form-grid select,
.communications-form-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: #fff;
  color: var(--crm-text);
  font: inherit;
  padding: 10px 12px;
}

.communications-form-grid textarea {
  resize: vertical;
}

.communications-form-grid-wide {
  margin-top: 10px;
}

.communications-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.communications-inline-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.communications-message-cell {
  max-width: 360px;
  white-space: normal;
}

.workflow-placeholder {
  display: grid;
  max-width: 760px;
  gap: 12px;
}

.workflow-placeholder span {
  color: var(--crm-brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workflow-placeholder h2 {
  margin: 0;
  color: var(--crm-text);
  font-size: 24px;
  letter-spacing: 0;
}

.workflow-placeholder p {
  max-width: 680px;
  margin: 0;
  color: var(--crm-muted-strong);
  font-size: 15px;
  line-height: 1.55;
}

.workflow-placeholder .button {
  justify-self: start;
  margin-top: 8px;
}

@media (max-width: 960px) {
  .communications-action-grid,
  .communications-overview-grid,
  .communications-form-grid.two {
    grid-template-columns: 1fr;
  }
}

.telephony-provider-label {
  color: var(--crm-brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.telephony-line-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--crm-muted);
  font-size: 12px;
}

.telephony-extension-cell {
  display: flex;
  min-width: 280px;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.telephony-extension-cell label {
  display: grid;
  flex: 1 1 96px;
  gap: 4px;
  color: var(--crm-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.telephony-extension-cell input,
.telephony-extension-cell select {
  min-height: 34px;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: #fff;
  color: var(--crm-text);
  padding: 0 8px;
}

.telephony-extension-cell button {
  flex: 0 0 auto;
}

.table-wrap {
  overflow-x: auto;
}

.bulk-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--crm-muted-strong);
  font-size: 13px;
  font-weight: 750;
  padding: 10px 12px;
}

.select-cell {
  width: 42px;
  text-align: center;
}

.select-cell input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--crm-brand);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--crm-font-size-body, 14px);
}

th {
  color: var(--crm-muted);
  font-family: var(--crm-font-heading, var(--crm-font-body, inherit));
  font-size: var(--crm-font-size-caption, 12px);
  font-weight: var(--crm-font-weight-label, 700);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

th,
td {
  border-bottom: 1px solid var(--crm-border);
  padding: 12px;
  vertical-align: top;
}

tbody tr:hover {
  background: #fafafa;
}

.inline-edit-row td {
  background: color-mix(in srgb, var(--crm-brand) 4%, #fff);
  padding: 16px;
}

.inline-edit-row form {
  margin: 0;
}

td a {
  font-weight: 700;
}

.table-cell-link {
  display: block;
  min-height: 100%;
  padding: 12px;
  margin: -12px;
  font-weight: 400;
}

.table-cell-link.strong {
  font-weight: 700;
}

.table-cell-link.muted {
  color: var(--crm-muted-strong);
  font-weight: 400;
}

.campaign-template-cell-button {
  display: block;
  width: calc(100% + 24px);
  min-height: 100%;
  margin: -12px;
  border: 0;
  background: transparent;
  color: var(--crm-brand);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 12px;
  text-align: left;
}

.campaign-template-cell-button:hover {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.campaign-name-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.campaign-platform-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #f4f4f5;
  color: #52525b;
  font-size: 10px;
  font-weight: 750;
  box-shadow: inset 0 0 0 1px #e4e4e7;
}

.row-delete-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.row-delete-action button {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  background: #fff1f2;
  color: #9f1239;
}

.row-delete-action button:hover {
  background: #ffe4e6;
}

.row-delete-action button:disabled {
  opacity: 0.6;
}

.row-delete-action svg {
  width: 16px;
  height: 16px;
}

.row-delete-action p {
  max-width: 180px;
  margin: 0;
  color: #be123c;
  font-size: 11px;
  text-align: right;
}

.trash-button {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  background: #fff1f2;
  color: #9f1239;
}

.trash-button svg {
  width: 16px;
  height: 16px;
}

.contact-list-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-list-actions > p {
  max-width: 280px;
  margin: 0;
  color: #be123c;
  font-size: 11px;
}

.sync-summary {
  margin: 6px 0 0;
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 400;
}

.leads-order-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
  margin-top: 0;
}

.leads-order-row select,
.leads-pagination select {
  min-height: 36px;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: #fff;
  color: var(--crm-text);
  padding: 0 10px;
  font-size: 14px;
}

.archive-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid #86efac;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  padding: 4px;
  font-size: 12px;
  font-weight: 750;
}

.archive-toggle span {
  border-radius: 999px;
  padding: 6px 9px;
}

.archive-toggle span:first-child,
.archive-toggle.is-archived span:last-child {
  background: #059669;
  color: #fff;
}

.archive-toggle.is-archived {
  border-color: #d4d4d8;
  background: #f4f4f5;
  color: #71717a;
}

.archive-toggle.is-archived span:first-child {
  background: transparent;
  color: #71717a;
}

.leads-table {
  min-width: 1280px;
  border-collapse: separate;
  border-spacing: 0;
}

.leads-table td,
.leads-table th {
  padding: 16px 12px;
  vertical-align: top;
}

.leads-table thead th {
  background: var(--crm-surface);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--crm-muted-strong);
  border-bottom: 1px solid var(--crm-border);
}

/* Row shapes — zebra alternating + visible border-left state indicator.
 * The left border is the loudest signal: rows that need action carry a
 * red 3px bar, others stay neutral. Inspired by Stitch's per-card status
 * but applied as a row-level visual hook. */
.leads-table tbody tr {
  position: relative;
  transition: background 140ms ease, box-shadow 200ms ease;
  background: #ffffff;
}

.leads-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--crm-surface) 60%, #fff);
}

.leads-table tbody tr > td:first-of-type {
  /* Reserve a slot for the colored left bar so it never moves layout. */
  border-left: 3px solid transparent;
}

/* Auto-detect rows needing action: presence of the .is-missing pill in
 * any descendant cell paints the left bar red. CSS-only, no JS hook
 * needed. Uses :has() — Chrome / Safari / Firefox 121+. */
.leads-table tbody tr:has(.lead-linked-resource-status.is-missing) > td:first-of-type {
  border-left-color: #dc2626;
}

.leads-table tbody tr:not(.is-selected-row):hover {
  background: color-mix(in srgb, var(--crm-brand) 5%, #fff);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--crm-brand) 22%, transparent),
    0 8px 20px -12px rgba(15, 23, 42, 0.22);
}

.leads-table tbody tr > td {
  border-top: 1px solid color-mix(in srgb, var(--crm-border) 55%, transparent);
}

.leads-table tbody tr:first-child > td {
  border-top: 0;
}

.lead-telegram-cell,
.lead-linked-resource-cell {
  display: grid;
  gap: 6px;
  width: 158px;
  max-width: 100%;
}

/* Status pill — colored dot + label. Bigger and louder than before so it
 * reads at a glance across a wide table. Pulse on missing draws the eye
 * to "needs action" rows during scroll. */
.lead-linked-resource-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1.5px solid var(--crm-border);
  border-radius: 999px;
  padding: 6px 12px 6px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.005em;
}

.lead-linked-resource-status::before {
  content: "";
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
}

.lead-linked-resource-status.is-ready {
  background: color-mix(in srgb, #16a34a 8%, #fff);
  border-color: color-mix(in srgb, #16a34a 22%, var(--crm-border));
  color: #15803d;
}

.lead-linked-resource-status.is-missing {
  background: color-mix(in srgb, #dc2626 8%, #fff);
  border-color: color-mix(in srgb, #dc2626 24%, var(--crm-border));
  color: #b91c1c;
}

.lead-linked-resource-status.is-missing::before {
  /* Quiet attention-getter on rows that need action. ~2 pulses per second,
   * very low contrast so it does not feel spammy when scrolling through. */
  animation: lead-status-pulse 1.6s ease-in-out infinite;
}

@keyframes lead-status-pulse {
  0%, 100% { box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 20%, transparent); }
  50%      { box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 10%, transparent); }
}

/* Optional third state for "provisioning / pending Core" — neutral amber.
 * Currently used in copy via class names defined in TSX; left here for
 * future use without an extra commit. */
.lead-linked-resource-status.is-pending {
  background: color-mix(in srgb, #f59e0b 10%, #fff);
  border-color: color-mix(in srgb, #f59e0b 28%, var(--crm-border));
  color: #b45309;
}

/* Secondary status line inside the Onboarding cell — used to expose the
 * Telegram support state without giving it its own column. The Telegram
 * lifecycle is owned by Volqan Core as part of the onboarding, so it
 * belongs nested under the onboarding pill, not as a sibling. */
.lead-linked-resource-substatus {
  display: inline-block;
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0;
}

.lead-linked-resource-substatus.is-ready {
  color: #15803d;
}

.lead-linked-resource-substatus.is-pending {
  color: #b45309;
}

/* External links chips inside the contact cell — small, dense, click opens
 * the external system (Intercom conversation, Telegram chat, etc.) in a
 * new tab. Auto-captured by the CRM (e.g. Intercom webhook) or added
 * manually by the operator from the lead detail page. */
.lead-external-links-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

/* Source / context chips — Intercom, Telegram, custom links. Neutral by
 * default so they don't compete with the primary action; brand color only
 * appears on hover. Same dense pill shape; just calmer. */
.lead-external-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: 10.5px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--crm-border);
  color: var(--crm-muted-strong);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
  white-space: nowrap;
}

.lead-external-link-chip:hover {
  background: color-mix(in srgb, var(--crm-brand) 8%, #fff);
  border-color: color-mix(in srgb, var(--crm-brand) 38%, var(--crm-border));
  color: var(--crm-brand);
  transform: translateY(-1px);
}

.lead-external-link-chip.muted {
  background: var(--crm-surface);
  border-color: var(--crm-border);
  color: var(--crm-muted-strong);
}

.lead-external-link-chip.muted:hover {
  background: #fff;
  color: var(--crm-text);
}

/* Strip rendered at the foot of the lead summary panel that lists every
 * external link (Telegram, Slack, custom URLs) attached to the lead plus
 * an in-place "+ link" button. Mirrors the lead-external-links-inline
 * region on the leads list row so the operator gets the same affordance
 * in the detail view. */
.lead-external-links-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-top: 1px solid var(--crm-border);
  background: color-mix(in srgb, var(--crm-surface) 70%, #fff);
  flex-wrap: wrap;
}
.lead-external-links-strip-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--crm-muted-strong);
}
.lead-external-links-strip .lead-external-links-inline {
  margin-top: 0;
  flex: 1 1 auto;
}
.lead-external-links-empty {
  font-size: 12px;
  color: var(--crm-muted-strong);
  font-style: italic;
}

.lead-telegram-cell strong {
  display: block;
  color: var(--crm-text);
  font-size: 13px;
  line-height: 1.25;
}

.lead-telegram-dialog-body {
  display: grid;
  gap: 14px;
  padding: 20px 22px 22px;
}

.lead-telegram-dialog-body p {
  margin: 0;
  color: var(--crm-muted-strong);
  line-height: 1.45;
}

.lead-telegram-dialog-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lead-telegram-invite-box,
.lead-telegram-intercom-box {
  border: 1px solid color-mix(in srgb, var(--modal-accent) 22%, var(--crm-border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--modal-accent) 6%, #fff);
  padding: 14px;
}

.lead-telegram-invite-box {
  display: grid;
  gap: 6px;
}

.lead-telegram-invite-box span {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lead-telegram-invite-box a {
  color: var(--modal-accent);
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.lead-telegram-invite-box a:hover {
  text-decoration: underline;
}

.modal-onboarding {
  --modal-accent: #c2410c;
}

.lead-telegram-intercom-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
}

.lead-telegram-sms-box {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  border: 1px solid color-mix(in srgb, #16a34a 24%, var(--crm-border));
  border-radius: 14px;
  background: color-mix(in srgb, #16a34a 6%, #fff);
  padding: 14px;
}

.lead-telegram-sms-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.lead-telegram-sms-box .modal-title-row {
  gap: 10px;
}

.lead-telegram-sms-box .sms-mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, #16a34a 24%, #fff);
  border-radius: 10px;
  background: color-mix(in srgb, #16a34a 10%, #fff);
  color: #047857;
}

.lead-telegram-sms-box .modal-title-row > div strong,
.lead-telegram-sms-box .modal-title-row > div span {
  display: block;
}

.lead-telegram-sms-box .modal-title-row > div strong {
  color: var(--crm-text);
}

.lead-telegram-sms-box .modal-title-row > div span {
  color: var(--crm-muted);
  font-size: 13px;
}

.lead-telegram-sms-box .copy-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.lead-telegram-sms-editor {
  display: grid;
  gap: 8px;
}

.lead-telegram-sms-editor > span {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead-telegram-sms-editor textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  border: 1px solid color-mix(in srgb, #16a34a 26%, var(--crm-border));
  border-radius: 12px;
  background: #fff;
  color: var(--crm-text);
  font: inherit;
  line-height: 1.45;
  padding: 10px 12px;
}

.lead-telegram-sms-editor textarea:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px color-mix(in srgb, #16a34a 16%, transparent);
  outline: none;
}

.lead-telegram-sms-editor > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--crm-muted);
  font-size: 12px;
}

.lead-telegram-sms-editor > div span:first-child {
  color: #047857;
  font-weight: 800;
}

.lead-telegram-intercom-box .modal-title-row {
  gap: 10px;
}

.lead-telegram-intercom-box .intercom-mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid;
  border-color: color-mix(in srgb, #1f8ded 24%, #fff);
  border-radius: 10px;
  background: color-mix(in srgb, #1f8ded 8%, #fff);
  color: #1269b0;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  text-transform: lowercase;
}

.lead-telegram-intercom-box .modal-title-row > div strong,
.lead-telegram-intercom-box .modal-title-row > div span {
  display: block;
}

.lead-telegram-intercom-box .modal-title-row > div strong {
  color: var(--crm-text);
}

.lead-telegram-intercom-box .modal-title-row > div span {
  color: var(--crm-muted);
  font-size: 13px;
}

.lead-telegram-intercom-box .copy-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.modal-sms .form-grid {
  padding: 20px 22px 22px;
}

.modal-sms .form-grid .field {
  margin: 0;
}

.lead-platform-chip {
  display: inline-flex;
  min-width: 56px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--crm-border);
  border-radius: 9px;
  background: #fff;
  color: #3f3f46;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 650;
}

.lead-temp-icon {
  width: 20px;
  height: 20px;
}

/* Intercom origin banner shown at the top of the lead detail page when
 * the lead was created from an Intercom webhook. Makes the link to the
 * originating conversation impossible to miss. */
.lead-origin-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--crm-brand) 6%, #fff), #fff);
  border: 1px solid color-mix(in srgb, var(--crm-brand) 22%, var(--crm-border));
  border-left: 4px solid var(--crm-brand);
  border-radius: 12px;
}

.lead-origin-banner-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: color-mix(in srgb, var(--crm-brand) 14%, #fff);
  color: var(--crm-brand);
}

.lead-origin-banner-body {
  flex: 1 1 auto;
  min-width: 0;
}

.lead-origin-banner-eyebrow {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--crm-brand) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--crm-brand) 28%, var(--crm-border));
  color: var(--crm-brand);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lead-origin-banner-body p {
  margin: 6px 0 0;
  color: var(--crm-text);
  font-size: 13px;
}

.lead-origin-banner-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

/* Avatar circle in the leads list — Intercom-inspired. Shows the first
 * letter of the business / lead name. When the lead originated from an
 * Intercom webhook, the avatar gets a small chat-bubble accent ring so
 * the operator sees at a glance which leads came from there. */
.lead-name-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lead-name-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.lead-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: color-mix(in srgb, var(--crm-brand) 14%, #fff);
  border: 1px solid color-mix(in srgb, var(--crm-brand) 25%, var(--crm-border));
  color: var(--crm-brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.lead-avatar.from-intercom {
  background: color-mix(in srgb, #2563eb 12%, #fff);
  border-color: #2563eb;
  color: #2563eb;
  box-shadow: 0 0 0 2px color-mix(in srgb, #2563eb 18%, transparent);
}

/* Prominent Intercom button next to the lead name. Stands out so the
 * operator clicks "Abrir en Intercom" without hunting through chips. */
.lead-intercom-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 5px 10px 5px 9px;
  background: #2563eb;
  border: 1px solid #2563eb;
  border-radius: 7px;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background 140ms ease, transform 140ms ease;
}

.lead-intercom-link:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.lead-intercom-link svg:last-child {
  opacity: 0.75;
}

/* Lead name column — primary text anchor of each row. The TSX renders:
 *   <span>{fullName}</span>          → big primary line
 *   <small>{sourceCode}</small>       → muted uppercase pill (source like
 *                                       intercom_webhook / public_api)
 *   <em>Archived</em>                 → only when row is archived
 */
.lead-name-link {
  display: block;
  border-radius: 7px;
  text-decoration: none;
}

.lead-name-link span {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.25;
}

/* Source-code pill — `public_api`, `intercom_webhook`, etc. Reads like a
 * tag, not loose text. */
.lead-name-link small {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 9px;
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  color: var(--crm-muted-strong);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

/* Archived indicator (only renders when lead is archived). */
.lead-name-link em {
  display: inline-block;
  margin-top: 6px;
  margin-left: 4px;
  padding: 3px 9px;
  background: color-mix(in srgb, #94a3b8 14%, #fff);
  border: 1px solid color-mix(in srgb, #94a3b8 32%, var(--crm-border));
  border-radius: 999px;
  color: #475569;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.lead-business-link {
  display: inline-flex;
  max-width: 220px;
  color: #18181b;
  font-size: 15px;
  font-weight: 760;
  line-height: 1.25;
}

.lead-business-link:hover {
  color: var(--crm-primary);
}

.lead-contact-cell {
  display: grid;
  gap: 4px;
  min-width: 180px;
  color: #18181b;
  font-size: 13px;
  line-height: 1.25;
}

.lead-contact-cell span {
  overflow-wrap: anywhere;
}

.lead-contact-cell em {
  color: var(--crm-muted-strong);
  font-style: normal;
}

.lead-date-cell {
  display: inline-flex;
  max-width: 150px;
  color: #3f4656;
  font-size: 13px;
  line-height: 1.25;
}

.lead-status-pill {
  --status-color: #64748b;
  display: inline-flex;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--status-color) 34%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--status-color) 12%, white);
  color: color-mix(in srgb, var(--status-color) 78%, #111827);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.lead-empty-cell {
  color: var(--crm-muted-strong);
  font-size: 12px;
}

.lead-tag-preview {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 460px;
}

.lead-tag-preview span {
  border: 1px solid;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 650;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading-row h2,
.section-heading-row h3 {
  margin: 0;
}

.lead-detail-tag-groups {
  display: grid;
  gap: 12px;
}

.lead-detail-tag-group {
  display: grid;
  gap: 6px;
}

.lead-detail-tag-group-title {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.lead-tag-chip,
.lead-tag-add-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.lead-tag-chip.is-removable button {
  display: inline-flex;
  width: 17px;
  height: 17px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgb(0 0 0 / 12%);
  color: inherit;
  font-size: 11px;
  font-weight: 900;
}

.lead-tag-chip.is-removable button:hover:not(:disabled) {
  background: rgb(0 0 0 / 22%);
}

.lead-tag-add-chip {
  cursor: pointer;
}

.lead-tag-add-chip:hover:not(:disabled) {
  filter: brightness(0.97);
}

.lead-tags-modal {
  width: min(760px, 100%);
}

.lead-tags-modal .modal-heading p {
  margin: 3px 0 0;
  color: var(--crm-muted-strong);
  font-size: 13px;
}

.lead-tags-modal-body {
  display: grid;
  max-height: min(68vh, 720px);
  overflow-y: auto;
  gap: 12px;
  padding-right: 4px;
}

.lead-tag-category-card {
  border: 1px solid;
  border-radius: 12px;
  background: #fff;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.lead-tag-category-card:not(.is-open) {
  cursor: pointer;
}

.lead-tag-category-header {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 11px 12px;
  text-align: left;
}

.lead-tag-category-header span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.lead-tag-category-header strong {
  font-size: 14px;
}

.lead-tag-category-header small {
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 650;
}

.lead-tag-category-header svg {
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}

.lead-tag-category-header svg.is-open {
  transform: rotate(180deg);
}

.lead-tag-category-preview,
.lead-tag-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lead-tag-category-preview {
  padding: 0 12px 12px;
}

.lead-tag-category-content {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.lead-tag-card-divider {
  height: 1px;
  background: var(--crm-border);
}

.last-interaction-cell {
  display: grid;
  gap: 2px;
}

.last-interaction-cell strong {
  color: #18181b;
  font-size: 14px;
}

.last-interaction-cell span {
  color: var(--crm-muted-strong);
  font-size: 12px;
}

.waiting-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 750;
}

.waiting-badge.ours {
  border-color: #fecdd3;
  background: #ffe4e6;
  color: #be123c;
}

.waiting-badge.client {
  border-color: #e4e4e7;
  background: #f4f4f5;
  color: #3f3f46;
}

.assigned-chip {
  display: inline-flex;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #3f3f46;
  padding: 4px 8px;
  font-size: 14px;
}

.is-archived-row {
  opacity: 0.78;
}

.leads-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  border-top: 1px solid var(--crm-border);
  padding-top: 12px;
}

.confirm-modal {
  width: min(672px, 100%);
  border: 1px solid var(--crm-border);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 24px 80px rgb(15 23 42 / 24%);
}

.modal-heading p {
  margin: 4px 0 0;
  color: var(--crm-muted-strong);
  font-size: 14px;
}

.choice-stack {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.choice-stack label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.choice-stack input {
  margin-top: 3px;
  accent-color: var(--crm-brand);
}

.warning-note {
  border: 1px solid #fcd34d;
  border-radius: 10px;
  background: #fffbeb;
  color: #92400e;
  padding: 10px 12px;
  font-size: 14px;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.food-type-select {
  position: relative;
  min-width: 220px;
}

.food-type-select-trigger {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  color: var(--crm-text);
  padding: 0 12px;
  font-size: 14px;
}

.food-type-select-trigger span:first-child {
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.food-type-select-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  width: min(360px, 84vw);
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  box-shadow: 0 18px 40px rgb(15 23 42 / 16%);
}

.food-type-select-menu > input {
  width: 100%;
  min-height: 34px;
  margin-bottom: 8px;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  padding: 0 8px;
  font-size: 14px;
}

.food-type-select-options {
  max-height: 224px;
  overflow-y: auto;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  padding: 4px;
}

.food-type-select-options label {
  display: flex;
  cursor: pointer;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 14px;
}

.food-type-select-options label:hover {
  background: #fafafa;
}

.food-type-select-options input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  accent-color: var(--crm-brand);
  border-radius: 4px;
  padding: 0;
}

.food-type-select-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.food-type-select-actions button {
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: #fff;
  padding: 5px 9px;
  font-size: 12px;
}

.badge,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #e4e4e7;
  color: #18181b;
  font-size: 12px;
  font-weight: 750;
}

.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.85;
}

.badge.sent,
.badge.synced,
.badge.hot,
.badge.is-ok {
  background: #dcfce7;
  color: #14532d;
  box-shadow: inset 0 0 0 1px #86efac;
}

.badge.is-info {
  background: #dbeafe;
  color: #1e3a8a;
  box-shadow: inset 0 0 0 1px #93c5fd;
}

.badge.error,
.badge.cold,
.badge.is-danger {
  background: #ffe4e6;
  color: #881337;
  box-shadow: inset 0 0 0 1px #fda4af;
}

.badge.scheduled,
.badge.warm,
.badge.is-pending {
  background: #fef3c7;
  color: #78350f;
  box-shadow: inset 0 0 0 1px #fcd34d;
}

.badge.is-muted {
  background: #f1f5f9;
  color: #475569;
  box-shadow: inset 0 0 0 1px #cbd5e1;
}

.badge.status-published {
  background: #dcfce7;
  color: #166534;
  box-shadow: inset 0 0 0 1px #86efac;
}

.badge.status-paused {
  background: #fef3c7;
  color: #b45309;
  box-shadow: inset 0 0 0 1px #fbbf24;
}

.badge.status-archived {
  background: #f3e8ff;
  color: #6b21a8;
  box-shadow: inset 0 0 0 1px #d8b4fe;
}

.badge.status-draft {
  background: #e0e7ff;
  color: #3730a3;
  box-shadow: inset 0 0 0 1px #c7d2fe;
}

.badge.status-scheduled {
  background: #dbeafe;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.badge.status-failed,
.badge.status-error {
  background: #fee2e2;
  color: #991b1b;
  box-shadow: inset 0 0 0 1px #fecaca;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-inline: 24px;
  color: var(--crm-muted-strong);
  font-size: 14px;
}

.pagination-row .form-actions {
  margin-top: 0;
}

.pagination-row.compact-row {
  margin: 14px 0 0;
}

.code-block {
  max-height: 320px;
  overflow: auto;
  margin: 12px 0 0;
  border-radius: 8px;
  background: #0f172a;
  color: #f8fafc;
  padding: 14px;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.docs-guide-stack {
  display: grid;
  gap: 18px;
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.settings-card-head h2 {
  margin: 0;
}

.settings-card-head p {
  margin: 4px 0 0;
}

.settings-card-head .button {
  flex: 0 0 auto;
}

.settings-inline-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  border: 1px solid color-mix(in srgb, var(--crm-brand) 18%, var(--crm-border));
  border-radius: 14px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--crm-brand) 4%, #fff);
}

.settings-inline-help div {
  display: grid;
  gap: 3px;
}

.settings-inline-help strong {
  font-weight: 900;
}

.settings-inline-help span {
  color: var(--crm-muted-strong);
}

.settings-inline-help .button {
  flex: 0 0 auto;
}

.docs-guide-kv {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(0, 1fr);
  gap: 10px 16px;
  align-items: start;
}

.docs-guide-kv span {
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.docs-guide-kv strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.docs-guide-list {
  margin: 0;
  padding-left: 20px;
  color: var(--crm-muted-strong);
  line-height: 1.55;
}

.docs-guide-list li + li {
  margin-top: 8px;
}

.docs-step-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.docs-step-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.docs-step-list span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--crm-brand) 10%, #fff);
  color: var(--crm-brand);
  font-size: 13px;
  font-weight: 900;
}

.docs-step-list p {
  margin: 3px 0 0;
  color: var(--crm-muted-strong);
  line-height: 1.45;
}

.docs-token-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}

.docs-token-reveal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  border: 1px solid color-mix(in srgb, var(--crm-brand) 35%, var(--crm-border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--crm-brand) 7%, #fff);
  padding: 14px;
}

.docs-token-reveal strong {
  display: block;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.docs-token-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.docs-token-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.docs-token-row p {
  margin: 4px 0 0;
}

.danger-text {
  color: var(--crm-danger);
  font-size: 13px;
  font-weight: 750;
}

.docs-code-block {
  overflow: auto;
  margin: 14px 0 0;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--crm-brand) 4%, white);
  padding: 16px;
}

.docs-code-block code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
}

.docs-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.docs-tool-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
}

.docs-tool-card strong {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.docs-tool-card span {
  color: var(--crm-muted-strong);
  font-size: 13px;
  line-height: 1.4;
}

.docs-client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.docs-client-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
}

.docs-client-card h3 {
  margin: 0;
  font-size: 15px;
}

.docs-client-card p {
  margin: 0;
  color: var(--crm-muted-strong);
  line-height: 1.45;
}

@media (max-width: 760px) {
  .docs-guide-kv {
    grid-template-columns: 1fr;
  }

  .docs-token-form,
  .docs-token-row,
  .docs-token-reveal {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .docs-token-row,
  .docs-token-reveal {
    display: grid;
  }
}

.filter-spec-accordion > summary {
  display: grid;
  gap: 4px;
  cursor: pointer;
  list-style-position: inside;
}

.filter-spec-accordion > summary span {
  color: var(--crm-text);
  font-size: 18px;
  font-weight: 800;
}

.filter-spec-accordion > summary small {
  color: var(--crm-muted-strong);
  font-size: 13px;
}

.json-tree {
  max-height: 520px;
  overflow: auto;
  margin-top: 14px;
  border: 1px solid #1e293b;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.json-node {
  margin: 2px 0;
}

.json-node > summary {
  cursor: pointer;
  color: #cbd5e1;
}

.json-children {
  margin-left: 18px;
  border-left: 1px solid rgb(148 163 184 / 28%);
  padding-left: 12px;
}

.json-leaf {
  display: flex;
  gap: 8px;
  margin: 2px 0;
}

.json-key {
  color: #93c5fd;
}

.json-key::after {
  content: ":";
  color: #64748b;
}

.json-kind {
  margin-left: 8px;
  color: #94a3b8;
}

.json-string {
  color: #86efac;
}

.json-primitive {
  color: #fcd34d;
}

.json-null {
  color: #fca5a5;
}

.success-message {
  margin: 0 24px 16px;
  color: #047857;
  font-size: 14px;
  font-weight: 750;
}

.error-text {
  margin: 4px 0 0;
  color: #be123c;
  font-size: 12px;
}

.compact-table table th,
.compact-table table td {
  padding-block: 8px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-create-form input[type="color"] {
  min-width: 56px;
  padding: 4px;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-inline: 24px;
}

.platform-card {
  border: 1px solid var(--crm-border);
  border-radius: 16px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
}

.platform-card:hover {
  border-color: #a1a1aa;
}

.platform-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.platform-card-head strong {
  font-size: 18px;
}

.platform-card-head span {
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--crm-muted-strong);
  font-size: 12px;
}

.swatch-row {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.swatch-row span {
  width: 28px;
  height: 28px;
  border: 1px solid var(--crm-border);
  border-radius: 999px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--crm-muted-strong);
  font-weight: 700;
}

.checkbox-fieldset {
  min-width: 0;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  padding: 10px 12px;
}

.checkbox-fieldset legend {
  padding: 0 4px;
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.markdown-doc {
  display: grid;
  gap: 12px;
  color: var(--crm-text);
  line-height: 1.6;
}

.markdown-doc h1,
.markdown-doc h2,
.markdown-doc h3 {
  margin: 12px 0 0;
  letter-spacing: 0;
}

.markdown-doc h1 {
  font-size: 24px;
}

.markdown-doc h2 {
  font-size: 18px;
}

.markdown-doc h3 {
  font-size: 15px;
}

.markdown-doc p,
.markdown-doc ul,
.markdown-doc ol {
  margin: 0;
  max-width: 980px;
  color: var(--crm-muted-strong);
  font-size: 14px;
}

.markdown-doc ul,
.markdown-doc ol {
  display: grid;
  gap: 7px;
  padding-left: 20px;
}

.markdown-doc code {
  border-radius: 6px;
  background: #f1f5f9;
  padding: 2px 5px;
  color: #0f172a;
  font-size: 0.92em;
}

.markdown-doc a {
  color: var(--crm-brand);
  font-weight: 700;
  text-decoration: underline;
}

/* ===== Help center index ===== */

.help-index-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px;
  border-color: color-mix(in srgb, var(--crm-brand) 20%, var(--crm-border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--crm-brand) 8%, #fff), #fff 58%);
}

.help-index-hero > div:first-child {
  display: grid;
  gap: 6px;
  max-width: 820px;
}

.help-index-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-bottom: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--crm-brand) 12%, #fff);
  color: var(--crm-brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.help-index-hero h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.005em;
}

.help-index-hero p {
  margin: 0;
  color: var(--crm-muted-strong);
  font-size: 14px;
  line-height: 1.55;
}

.help-index-quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.help-index-quick {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--crm-border);
  background: #fff;
  color: var(--crm-text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.help-index-quick:hover {
  border-color: var(--crm-brand);
  background: color-mix(in srgb, var(--crm-brand) 6%, #fff);
}

.help-index-section {
  display: grid;
  gap: 10px;
}

.help-index-section-title {
  margin: 4px 0 0;
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.help-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.help-article-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 16px 18px;
  border: 1px solid var(--crm-border);
  border-radius: 14px;
  background: #fff;
  color: var(--crm-text);
  text-decoration: none;
  box-shadow: var(--crm-elev-1);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.help-article-card:hover {
  border-color: var(--crm-brand);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgb(15 23 42 / 7%);
}

.help-article-card-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--crm-brand) 10%, #fff);
  color: var(--crm-brand);
}

.help-article-card-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.help-article-card-body strong {
  font-size: 14.5px;
  font-weight: 750;
  color: var(--crm-text);
}

.help-article-card-body span {
  color: var(--crm-muted-strong);
  font-size: 13px;
  line-height: 1.45;
}

.help-article-card-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--crm-muted-strong);
}

.help-article-card:hover .help-article-card-arrow {
  color: var(--crm-brand);
  background: color-mix(in srgb, var(--crm-brand) 8%, #fff);
}

.help-index-extras {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 12px;
}

.help-index-extra {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.help-index-extra-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--crm-brand) 10%, #fff);
  color: var(--crm-brand);
}

.help-index-extra strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.phone-help-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border-color: color-mix(in srgb, var(--crm-brand) 20%, var(--crm-border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--crm-brand) 7%, #fff), #fff 62%);
}

.phone-help-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--crm-brand) 12%, #fff);
  color: var(--crm-brand);
}

.phone-help-hero h2 {
  margin: 0 0 4px;
  font-size: 20px;
  letter-spacing: 0;
}

.phone-help-hero p {
  margin: 0;
  color: var(--crm-muted-strong);
  font-size: 14px;
  line-height: 1.5;
}

.help-index-extra p {
  margin: 0;
  color: var(--crm-muted-strong);
  font-size: 13px;
  line-height: 1.45;
}

.help-index-extra-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--crm-brand);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

/* ===== Help article view ===== */

.help-article {
  display: grid;
  gap: 16px;
  max-width: 920px;
  margin: 0 auto;
}

.help-article-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}

.help-article-back:hover {
  color: var(--crm-brand);
}

.help-article-header {
  display: grid;
  gap: 8px;
}

.help-article-category {
  width: fit-content;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--crm-brand) 10%, #fff);
  color: var(--crm-brand);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.help-article-header h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.help-article-header p {
  margin: 0;
  max-width: 720px;
  color: var(--crm-muted-strong);
  font-size: 15px;
  line-height: 1.55;
}

.help-article-body {
  padding: 28px 32px;
}

.help-article-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--crm-muted-strong);
  font-size: 13px;
}

.help-center-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-color: color-mix(in srgb, var(--crm-brand) 20%, var(--crm-border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--crm-brand) 8%, #fff), #fff 58%);
  padding: 22px 24px;
}

.help-center-hero > div:first-child {
  display: grid;
  gap: 8px;
  max-width: 820px;
}

.help-center-kicker {
  width: fit-content;
  border-radius: 999px;
  background: #fff;
  color: var(--crm-brand);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.help-center-hero h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.help-center-hero p {
  margin: 0;
  color: var(--crm-muted-strong);
  font-size: 14px;
  line-height: 1.55;
}

.help-center-quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.help-center-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.help-center-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  border: 1px solid color-mix(in srgb, var(--crm-border) 75%, transparent);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  color: var(--crm-text);
  box-shadow: var(--crm-elev-1);
  text-decoration: none;
}

.help-center-card svg {
  color: var(--crm-brand);
}

.help-center-card strong {
  font-size: 15px;
}

.help-center-card span {
  color: var(--crm-muted-strong);
  font-size: 13px;
  line-height: 1.45;
}

.help-center-card:hover {
  border-color: color-mix(in srgb, var(--crm-brand) 45%, var(--crm-border));
  background: color-mix(in srgb, var(--crm-brand) 4%, #fff);
}

.help-center-user-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.help-center-workflow-panel {
  display: grid;
  gap: 18px;
}

.help-center-workflow-heading {
  display: grid;
  gap: 8px;
  max-width: 920px;
}

.help-center-workflow-heading h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.help-center-workflow-heading p {
  margin: 0;
  color: var(--crm-muted-strong);
  font-size: 14px;
  line-height: 1.55;
}

.help-center-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.help-center-flow > div {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 112px;
  border: 1px solid color-mix(in srgb, var(--crm-border) 76%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--crm-brand) 3%, #fff);
  padding: 14px;
}

.help-center-flow strong {
  font-size: 13px;
}

.help-center-flow span {
  color: var(--crm-muted-strong);
  font-size: 12.5px;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .help-center-grid,
  .help-center-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .phone-help-hero {
    grid-template-columns: 1fr;
  }

  .help-center-hero,
  .help-center-user-tools {
    grid-template-columns: 1fr;
  }

  .help-center-hero {
    display: grid;
  }

  .help-center-quick-actions {
    justify-content: flex-start;
  }

  .help-center-grid,
  .help-center-flow {
    grid-template-columns: 1fr;
  }
}

.md-code {
  overflow: hidden;
  border: 1px solid #27272a;
  border-radius: 12px;
  background: #09090b;
}

.md-code p {
  border-bottom: 1px solid #27272a;
  padding: 6px 12px;
  color: #d4d4d8;
  font-size: 12px;
  text-transform: uppercase;
}

.md-code pre {
  margin: 0;
  overflow-x: auto;
  padding: 14px;
  color: #f4f4f5;
  font-size: 13px;
}

.md-code code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.api-doc-frame {
  width: 100%;
  min-height: 70vh;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
}

.map-toolbar-panel {
  padding: 12px;
}

.map-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.7fr) minmax(240px, 1fr) minmax(240px, 1fr) minmax(170px, auto);
  align-items: end;
  gap: 10px;
}

.map-field,
.map-select-filter {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.crm-modal-backdrop {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(15 23 42 / 46%);
  padding: 20px;
}

.crm-modal {
  width: min(640px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--crm-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 90px rgb(15 23 42 / 30%);
}

.crm-action-modal {
  --modal-accent: var(--crm-brand);
  --modal-accent-soft: color-mix(in srgb, var(--modal-accent) 10%, #fff);
  --modal-accent-border: color-mix(in srgb, var(--modal-accent) 28%, var(--crm-border));
  overflow: hidden;
  border-color: var(--modal-accent-border);
  border-radius: 20px;
  background:
    linear-gradient(180deg, var(--modal-accent-soft) 0, #fff 150px),
    #fff;
}

.crm-action-modal.modal-call {
  --modal-accent: #059669;
}

.crm-action-modal.modal-email {
  --modal-accent: #0284c7;
}

.crm-action-modal.modal-sms {
  --modal-accent: #334155;
}

.crm-action-modal.modal-telegram {
  --modal-accent: #7c3aed;
}

.crm-action-modal.modal-whatsapp {
  --modal-accent: #059669;
}

.crm-action-modal.modal-qleber {
  --modal-accent: #7c3aed;
  width: min(760px, 100%);
}

.crm-modal-header,
.crm-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
}

.crm-modal-header {
  border-bottom: 1px solid color-mix(in srgb, var(--modal-accent, var(--crm-border)) 18%, var(--crm-border));
}

.crm-modal-header h2 {
  margin: 0;
  font-size: 22px;
}

.crm-action-modal .crm-modal-header {
  padding: 22px 22px 18px;
}

.modal-title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.modal-title-row > div {
  min-width: 0;
}

.modal-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--modal-accent) 30%, #fff);
  border-radius: 14px;
  background: color-mix(in srgb, var(--modal-accent) 12%, #fff);
  color: var(--modal-accent);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--modal-accent) 16%, transparent);
}

.crm-action-modal .eyebrow {
  color: var(--modal-accent);
}

.crm-action-modal .icon-button {
  width: 36px;
  height: 36px;
  border-color: var(--modal-accent-border);
  border-radius: 12px;
  background: rgb(255 255 255 / 0.76);
  color: var(--modal-accent);
}

.crm-action-modal .icon-button:hover:not(:disabled) {
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--modal-accent) 10%, transparent);
}

.crm-action-modal .button:not(.secondary):not(.danger) {
  border-color: var(--modal-accent);
  background: var(--modal-accent);
  color: #fff;
}

.crm-action-modal .button:not(.secondary):not(.danger):hover:not(:disabled) {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--modal-accent) 14%, transparent);
}

.crm-modal-actions {
  justify-content: flex-end;
  border-top: 1px solid color-mix(in srgb, var(--modal-accent, var(--crm-border)) 14%, var(--crm-border));
  background: color-mix(in srgb, var(--modal-accent, var(--crm-brand)) 4%, #fff);
}

.qleber-wizard-action {
  border-color: #c4b5fd;
  color: #5b21b6;
}

.qleber-wizard-body {
  display: grid;
  gap: 16px;
  padding: 20px 22px;
}

.qleber-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 86px auto;
  gap: 12px;
  align-items: end;
}

.qleber-search-form .button {
  min-height: 44px;
}

.qleber-candidate-list {
  display: grid;
  gap: 10px;
}

.qleber-candidate-card {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--crm-border);
  border-radius: 14px;
  background: #fff;
  color: var(--crm-text);
  text-align: left;
  cursor: pointer;
}

.qleber-candidate-card:hover,
.qleber-candidate-card.selected {
  border-color: #a78bfa;
  background: #faf5ff;
}

.qleber-candidate-card strong,
.qleber-candidate-card small {
  display: block;
}

.qleber-candidate-card small {
  margin-top: 4px;
  color: var(--crm-muted);
}

.qleber-candidate-radio {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 2px solid #c4b5fd;
  border-radius: 999px;
  background: #fff;
}

.qleber-candidate-card.selected .qleber-candidate-radio {
  border: 5px solid #7c3aed;
}

.qleber-empty-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px dashed #c4b5fd;
  border-radius: 14px;
  color: var(--crm-muted);
}

.qleber-result-box {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #86efac;
  border-radius: 14px;
  background: #f0fdf4;
}

.qleber-result-box p,
.qleber-result-box ul {
  margin: 0;
}

.qleber-result-box ul {
  display: grid;
  gap: 6px;
  padding-left: 18px;
}

.qleber-section-label {
  display: block;
  margin-bottom: 6px;
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 840px) {
  .qleber-search-form {
    grid-template-columns: 1fr;
  }

  .qleber-country-field {
    max-width: 120px;
  }
}

.call-picker-modal {
  padding: 0;
}

.call-picker-target {
  display: grid;
  gap: 4px;
  margin: 18px 22px;
  padding: 16px 18px;
  border: 1px solid var(--modal-accent-border);
  border-radius: 16px;
  background: var(--modal-accent-soft);
}

.call-picker-target span,
.call-line-option small {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.call-picker-target strong {
  font-size: 20px;
  color: var(--modal-accent);
}

.call-line-options {
  display: grid;
  gap: 10px;
  padding: 0 22px 22px;
}

.call-line-option {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--crm-border);
  border-radius: 16px;
  background: #fff;
  color: var(--crm-text);
  padding: 15px 16px;
  text-align: left;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.call-line-option.selected {
  border-color: color-mix(in srgb, var(--modal-accent) 55%, var(--crm-border));
  background: color-mix(in srgb, var(--modal-accent) 7%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--modal-accent) 12%, transparent);
}

.call-line-option.is-disabled {
  opacity: 0.66;
}

.call-line-option span {
  display: grid;
  gap: 4px;
}

.call-picker-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 22px 22px;
  padding: 12px 14px;
  border: 1px solid var(--modal-accent-border);
  border-radius: 14px;
  background: var(--modal-accent-soft);
  color: var(--crm-text);
}

.call-picker-progress strong {
  font-size: 13px;
}

.call-picker-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid color-mix(in srgb, var(--modal-accent) 20%, var(--crm-border));
  border-top-color: var(--modal-accent);
  border-radius: 999px;
  animation: crm-spin 0.8s linear infinite;
}

@keyframes crm-spin {
  to {
    transform: rotate(360deg);
  }
}

.call-picker-warning {
  margin: -4px 22px 22px;
  color: #b91c1c;
  font-weight: 800;
}

.field-help {
  display: block;
  margin-top: 6px;
  color: var(--crm-muted);
  font-size: 12px;
  line-height: 1.35;
}

.map-field > span,
.map-select-filter > span {
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.map-filter-grid input,
.map-filter-grid select,
.map-select-trigger {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: #fff;
  color: var(--crm-text);
  padding: 0 12px;
  font-size: 14px;
}

.map-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.map-select-trigger::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.65;
}

.map-select-trigger > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-select-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  width: min(420px, 90vw);
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 46px rgb(15 23 42 / 14%);
}

.map-select-menu label {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--crm-border);
  padding: 9px 11px;
  color: var(--crm-text);
  font-size: 13px;
}

.map-select-menu label:last-child {
  border-bottom: 0;
}

.map-select-menu label:hover {
  background: color-mix(in srgb, var(--crm-brand) 7%, white);
}

.map-select-menu input {
  width: 14px;
  height: 14px;
  accent-color: var(--crm-brand);
}

.map-select-menu span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-select-menu p {
  margin: 0;
  padding: 12px;
  color: var(--crm-muted);
  font-size: 13px;
}

.map-filter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.map-filter-actions .button {
  min-height: 42px;
  border-radius: 10px;
  padding-inline: 12px;
}

.map-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.map-status {
  color: var(--crm-muted-strong);
  font-size: 13px;
  font-weight: 650;
}

.map-shell {
  height: calc(100vh - 250px);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  margin-inline: 24px;
  margin-bottom: 24px;
}

.map-canvas {
  width: 100%;
  height: 100%;
}

.map-modal {
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
}

.map-modal-body {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.map-modal-section {
  display: grid;
  gap: 10px;
}

.map-modal-section h4 {
  margin: 0;
  color: var(--crm-text);
  font-size: 14px;
  font-weight: 800;
}

.map-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-drill-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: #fff;
  color: var(--crm-text);
  padding: 0 12px;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.map-drill-button:hover {
  background: #f8fafc;
}

.map-option-list {
  display: grid;
  max-height: 380px;
  overflow: auto;
  margin-top: 14px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

.map-option-list.tall {
  max-height: 430px;
  margin-top: 0;
}

.map-option-list label {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border-radius: 8px;
  color: var(--crm-text);
  padding: 8px 9px;
  font-size: 13px;
}

.map-option-list label:hover {
  background: color-mix(in srgb, var(--crm-brand) 7%, white);
}

.map-option-list input {
  width: 14px;
  height: 14px;
  accent-color: var(--crm-brand);
}

.map-option-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0 0 0 2px;
}

.multi-filter {
  position: relative;
  min-width: 220px;
}

.multi-filter-button {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  color: var(--crm-text);
  padding: 0 12px;
  text-align: left;
}

.multi-filter-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  width: min(340px, 80vw);
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgb(15 23 42 / 16%);
  padding: 8px;
}

.multi-filter-menu label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 7px 8px;
  color: var(--crm-muted-strong);
  font-size: 13px;
}

.multi-filter-menu label:hover {
  background: #f8fafc;
}

.multi-filter-menu em {
  color: var(--crm-muted);
  font-style: normal;
}

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination-links a,
.pagination-links button {
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: #fff;
  color: var(--crm-text);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
}

.pagination-links a:hover,
.pagination-links button:hover {
  border-color: #a1a1aa;
  background: #f8fafc;
}

.pagination-links a.is-active,
.pagination-links button.is-active {
  border-color: #18181b;
  background: #18181b;
  color: #fff;
}

.pagination-links a.is-disabled,
.pagination-links button:disabled {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.48;
}

.pagination-ellipsis {
  display: inline-flex;
  min-width: 24px;
  align-items: center;
  justify-content: center;
  color: var(--crm-muted);
  font-weight: 800;
}

.contact-list-type-screen {
  display: grid;
  min-height: calc(100vh - 250px);
  place-items: center;
  padding: 24px 0;
}

.contact-list-type-grid {
  display: grid;
  width: min(100%, 1120px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.contact-list-type-card {
  display: grid;
  min-height: 240px;
  align-content: center;
  gap: 14px;
  border: 1px solid var(--crm-border);
  border-radius: 16px;
  background: #fff;
  padding: 34px;
  color: var(--crm-text);
  box-shadow: 0 14px 40px rgb(15 23 42 / 7%);
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.contact-list-type-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--crm-brand) 44%, var(--crm-border));
  box-shadow: 0 18px 50px rgb(15 23 42 / 12%);
}

.contact-list-type-card-ai {
  background:
    radial-gradient(circle at 88% 14%, color-mix(in srgb, var(--crm-brand) 18%, transparent), transparent 34%),
    linear-gradient(135deg, #fff, color-mix(in srgb, var(--crm-brand) 6%, #fff));
}

.contact-list-type-card-ai .contact-list-type-icon {
  background: color-mix(in srgb, var(--crm-brand) 16%, white);
  color: var(--crm-brand);
}

.contact-list-type-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--crm-brand) 12%, white);
  color: var(--crm-text);
}

.contact-list-type-card strong {
  font-size: 30px;
  line-height: 1.05;
}

.contact-list-type-card p {
  max-width: 360px;
  margin: 0;
  color: var(--crm-muted-strong);
  line-height: 1.55;
}

.contact-list-contacts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.contact-list-contacts-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.inline-filters {
  margin: 0;
}

.contact-selection-actions {
  margin-top: 14px;
}

.contact-nested-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
  border-top: 1px solid var(--crm-border);
  padding-top: 16px;
}

.nested-filter-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.nested-filter-row select,
.nested-filter-row input {
  width: 100%;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
  color: var(--crm-text);
  font-size: 13px;
}

.contact-filter-actions {
  grid-column: 1 / -1;
}

.table-loading-message {
  margin: 16px 0 4px;
  text-align: center;
}

.contact-list-create-panel {
  position: sticky;
  top: 22px;
}

.contact-list-create-panel h2 {
  margin: 0 0 6px;
}

.selected-contact-list {
  display: flex;
  max-height: 190px;
  overflow: auto;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px;
}

.selected-contact-list span {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #fff;
  padding: 5px 8px 5px 10px;
  color: var(--crm-text);
  font-size: 12px;
}

.selected-contact-list button {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  background: #fff;
  color: var(--crm-muted-strong);
  font-size: 11px;
  line-height: 1;
}

.selected-contact-list em {
  align-self: center;
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-style: normal;
}

.contact-list-create-button {
  width: 100%;
  margin-top: 14px;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-inline: 24px;
}

.system-card {
  border: 1px solid var(--crm-border);
  border-radius: 16px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.system-card:hover {
  border-color: #a1a1aa;
  box-shadow: 0 8px 24px rgb(15 23 42 / 8%);
}

.system-card p {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0;
}

.system-card span {
  display: block;
  margin-top: 4px;
  color: var(--crm-muted-strong);
  font-size: 14px;
}

.system-card strong {
  display: block;
  margin-top: 16px;
  color: var(--crm-brand);
  font-size: 14px;
}

.login {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background:
    radial-gradient(circle at 20% 10%, rgb(31 141 101 / 10%), transparent 32%),
    radial-gradient(circle at 78% 20%, rgb(31 141 101 / 8%), transparent 36%),
    var(--crm-bg);
  padding: 24px;
}

.login-shell {
  display: grid;
  width: min(1160px, calc(100vw - 48px));
  min-height: 560px;
  grid-template-columns: 0.95fr 1.15fr;
  overflow: hidden;
  border-radius: 40px;
  background: #fff;
  box-shadow: 0 30px 90px rgb(15 23 42 / 18%);
}

.login-side {
  display: flex;
  align-items: flex-end;
  background: linear-gradient(160deg, var(--crm-brand) 0%, color-mix(in srgb, var(--crm-brand) 82%, black) 52%, color-mix(in srgb, var(--crm-brand) 54%, #405a6c) 100%);
  color: var(--crm-main-text, #fff);
  padding: 72px 52px;
}

.login-side-kicker,
.login-kicker {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.login-logo {
  display: block;
  max-width: 210px;
  max-height: 44px;
  object-fit: contain;
  object-position: left center;
}

.login-brand-chip {
  margin-top: 14px;
  background: rgb(255 255 255 / 14%);
  border-color: rgb(255 255 255 / 28%);
  color: rgb(255 255 255 / 86%);
}

.login-side-kicker {
  color: rgb(255 255 255 / 82%);
}

.login-side h2 {
  max-width: 430px;
  margin: 26px 0 24px;
  font-size: 39px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.16;
}

.login-side p:last-child {
  margin: 0;
  color: rgb(255 255 255 / 82%);
  font-size: 16px;
}

.login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 56px;
}

.login-kicker {
  color: var(--crm-muted-strong);
}

.login-form h1 {
  margin: 14px 0 34px;
  color: var(--crm-text);
  font-size: 38px;
  font-family: var(--crm-font-heading, inherit);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
}

.login-field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.login-field span {
  display: block;
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-height: 58px;
  border: 1px solid color-mix(in srgb, var(--crm-border) 72%, #64748b);
  border-radius: 14px;
  background: #fff;
  padding: 0 16px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 90%), 0 1px 2px rgb(15 23 42 / 7%);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-input-wrap:has(svg) {
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
}

.login-input-wrap:focus-within {
  border-color: color-mix(in srgb, var(--crm-brand) 78%, white);
  background: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--crm-brand) 18%, transparent), inset 0 1px 0 rgb(255 255 255 / 90%);
}

.login-input-wrap svg {
  width: 20px;
  height: 20px;
  color: var(--crm-muted-strong);
  opacity: 0.78;
}

.login-input-wrap:focus-within svg {
  color: var(--crm-brand);
  opacity: 1;
}

.login-field input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--crm-text);
  -webkit-text-fill-color: var(--crm-text);
  caret-color: var(--crm-brand);
  font-family: var(--crm-font-body, var(--crm-font-family, inherit));
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  outline: 0;
  padding: 0;
}

.login-field input[type="password"] {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.login-field input::placeholder {
  color: color-mix(in srgb, var(--crm-muted) 82%, white);
  -webkit-text-fill-color: color-mix(in srgb, var(--crm-muted) 82%, white);
  opacity: 1;
}

.login-field input:disabled {
  color: color-mix(in srgb, var(--crm-muted-strong) 88%, #111827);
  -webkit-text-fill-color: color-mix(in srgb, var(--crm-muted-strong) 88%, #111827);
  opacity: 1;
}

.login-error {
  margin: -4px 0 20px;
  color: var(--crm-danger);
  font-size: 14px;
}

.login-success {
  margin: -4px 0 20px;
  color: #047857;
  font-size: 14px;
  font-weight: 700;
}

.login-submit {
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--crm-brand) 94%, white), var(--crm-brand));
  color: var(--crm-main-text, #fff);
  font-size: 15px;
  font-weight: 750;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--crm-brand) 22%, transparent), inset 0 1px 0 rgb(255 255 255 / 22%);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px color-mix(in srgb, var(--crm-brand) 26%, transparent), inset 0 1px 0 rgb(255 255 255 / 22%);
}

.login-submit:disabled {
  transform: none;
  opacity: 0.62;
}

.login-help {
  margin: 34px 0 0;
  color: var(--crm-muted-strong);
  font-size: 14px;
  text-align: center;
}

.landing-pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.landing-page-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.landing-page-card-head,
.landing-page-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.landing-page-card code {
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.landing-page-card h2 {
  color: #18181b;
  font-size: 18px;
  line-height: 1.25;
  margin: 0;
}

.landing-page-card p {
  color: var(--crm-muted);
  line-height: 1.5;
  margin: 0;
}

.landing-page-card-meta {
  color: var(--crm-muted-strong);
  font-size: 12px;
}

.creative-workbench {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.creative-workbench h2,
.creative-card h2,
.panel > h2 {
  margin: 0 0 14px;
  color: var(--crm-text);
  font-size: 16px;
  font-weight: 750;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
  border: 0;
  padding: 0;
}

.preset-grid legend {
  margin-bottom: 8px;
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preset-card {
  display: grid;
  gap: 6px;
  min-height: 116px;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  cursor: pointer;
}

.preset-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.preset-card strong {
  color: var(--crm-text);
  font-size: 14px;
}

.preset-card span {
  color: var(--crm-muted-strong);
  font-size: 12px;
  line-height: 1.45;
}

.preset-card.is-active {
  border-color: color-mix(in srgb, var(--crm-brand) 62%, var(--crm-border));
  background: color-mix(in srgb, var(--crm-brand) 7%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crm-brand) 30%, transparent);
}

.creative-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.creative-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 8px 24px rgb(15 23 42 / 5%);
}

.creative-card img,
.creative-card video,
.creative-card-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  border: 1px solid color-mix(in srgb, var(--crm-border) 75%, transparent);
  border-radius: 10px;
  object-fit: cover;
}

.creative-card-media {
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--crm-brand) 8%, #f8fafc);
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.creative-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.25;
}

.creative-card p,
.table-subtext {
  margin: 4px 0 0;
  color: var(--crm-muted-strong);
  font-size: 12px;
  line-height: 1.4;
}

.creative-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.creative-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 700;
}

.creative-card .form-actions {
  margin-top: 14px;
}

.ad-campaign-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

/* "Hoy" row has 4 cards instead of 5 (no CTR — too noisy day-of when
 * impressions are still trickling in). Stretch them across the same
 * width as the 7d row so the visual rhythm matches. */
.ad-campaign-summary-today {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0;
}

.ad-campaign-stat {
  padding: 16px 18px;
}

/* Today's cost panel — most-watched KPI; subtle brand tint so the eye
 * lands on it first. Same density as the others, just colored. */
.ad-campaign-stat--accent {
  background: color-mix(in srgb, var(--crm-brand) 6%, #fff);
  border-color: color-mix(in srgb, var(--crm-brand) 28%, var(--crm-border));
}

.ad-campaign-stat--accent strong {
  color: var(--crm-brand);
}

.ad-campaign-stat span {
  display: block;
  color: var(--crm-muted-strong);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-campaign-stat strong {
  display: block;
  margin-top: 8px;
  color: var(--crm-text);
  font-size: 28px;
  line-height: 1;
}

.ad-campaign-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.ad-campaign-heading h2 {
  margin: 0;
}

.ad-campaign-filter-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  background: var(--crm-surface);
  padding: 4px;
}

.ad-campaign-filter-tabs button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--crm-muted-strong);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.ad-campaign-filter-tabs button.is-active {
  background: #fff;
  color: var(--crm-text);
  box-shadow: 0 1px 5px rgb(15 23 42 / 10%);
}

.ad-campaign-table th {
  white-space: nowrap;
}

.ad-campaign-name,
.ad-provider-cell,
.date-range {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ad-campaign-name strong,
.ad-provider-cell strong,
.date-range strong {
  color: var(--crm-text);
  font-size: 13px;
  line-height: 1.3;
}

.ad-campaign-name p,
.ad-provider-cell p,
.date-range span {
  margin: 0;
  color: var(--crm-muted-strong);
  font-size: 12px;
  line-height: 1.35;
}

.ad-campaign-name span {
  width: fit-content;
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  background: var(--crm-surface);
  color: var(--crm-muted-strong);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
}

.provider-pill {
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--crm-brand) 32%, var(--crm-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--crm-brand) 8%, #fff);
  color: var(--crm-brand);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 850;
}

.ad-campaign-actions {
  min-width: 210px;
}

/* ===== Cleaner campaigns table ===== */

.ad-campaign-table-clean {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.ad-campaign-table-clean thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--crm-surface, #f7f7f9);
  color: var(--crm-muted-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-bottom: 1px solid var(--crm-border);
}

.ad-campaign-table-clean tbody tr.ad-campaign-row {
  transition: background 120ms ease;
}

.ad-campaign-table-clean tbody tr.ad-campaign-row:hover {
  background: color-mix(in srgb, var(--crm-brand) 4%, transparent);
}

.ad-campaign-table-clean tbody td {
  padding: 14px;
  vertical-align: top;
  border-bottom: 1px solid color-mix(in srgb, var(--crm-border) 65%, transparent);
}

.ad-campaign-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.ad-campaign-name-link {
  color: var(--crm-text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.3;
}

.ad-campaign-name-link:hover {
  color: var(--crm-brand);
  text-decoration: underline;
}

.ad-campaign-name-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
  align-items: center;
}

.ad-campaign-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  background: var(--crm-surface);
  color: var(--crm-muted-strong);
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ad-provider-cell-compact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.ad-provider-account {
  display: inline-block;
  color: var(--crm-text);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}

.ad-provider-account em {
  font-style: normal;
  color: var(--crm-muted-strong);
  font-weight: 500;
}

.ad-budget-cell {
  display: inline-block;
  white-space: nowrap;
  color: var(--crm-text);
  font-size: 13px;
  font-weight: 700;
}

.date-range-compact {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.date-range-compact strong {
  font-size: 12.5px;
  font-weight: 700;
}

.date-range-compact span {
  font-size: 11.5px;
}

.ad-stats-cell-clean {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 110px;
}

.ad-stats-clicks {
  color: var(--crm-text);
  font-size: 13px;
  font-weight: 800;
}

.ad-stats-meta {
  color: var(--crm-muted-strong);
  font-size: 11.5px;
  font-weight: 500;
}

.ad-stats-dash {
  font-size: 16px;
  color: var(--crm-muted);
}

.ad-campaign-actions-clean {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  min-width: 220px;
}

.ad-campaign-actions-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.button-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  border-radius: 7px;
  border: 1px solid var(--crm-border);
  background: #fff;
  color: var(--crm-text);
  text-decoration: none;
  cursor: pointer;
  transition: background 100ms ease, border-color 100ms ease, color 100ms ease;
  white-space: nowrap;
}

.button-mini:hover {
  background: var(--crm-surface);
  border-color: color-mix(in srgb, var(--crm-text) 35%, var(--crm-border));
}

.button-mini.primary {
  background: var(--crm-brand);
  color: #fff;
  border-color: var(--crm-brand);
  padding: 7px 18px;
  font-size: 12.5px;
  box-shadow: 0 1px 3px rgb(15 23 42 / 8%);
}

.button-mini.primary:hover {
  background: color-mix(in srgb, var(--crm-brand) 88%, #000);
  border-color: color-mix(in srgb, var(--crm-brand) 88%, #000);
}

.button-mini.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--crm-muted-strong);
}

.button-mini.ghost:hover {
  background: var(--crm-surface);
  color: var(--crm-text);
}

.button-mini.danger {
  color: #b91c1c;
}

.button-mini.danger:hover {
  background: color-mix(in srgb, #b91c1c 8%, #fff);
  color: #991b1b;
}

.button-mini:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Campaign performance grid — total / coste / hoy / 7d / conversiones.
 * Five cards in a row, two emphasised (primary) with brand-tinted background. */
.campaign-stats-panel {
  margin-bottom: 0;
}

.campaign-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.campaign-stat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--crm-border);
  background: #fff;
}

.campaign-stat-card.primary {
  background: color-mix(in srgb, var(--crm-brand) 8%, #fff);
  border-color: color-mix(in srgb, var(--crm-brand) 22%, var(--crm-border));
}

.campaign-stat-label {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--crm-muted-strong);
}

.campaign-stat-value {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: var(--crm-text);
}

.campaign-stat-value.muted {
  color: var(--crm-muted);
}

.campaign-stat-meta {
  font-size: 11.5px;
  color: var(--crm-muted-strong);
  font-weight: 500;
}

@media (max-width: 980px) {
  .campaign-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Money pill — used wherever Budget / Max CPC needs to pop in a dense list.
 * Visually distinctive so the operator can spot spend at a glance. */
.money-pill {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--crm-brand) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--crm-brand) 22%, var(--crm-border));
  min-width: 78px;
  align-items: flex-start;
  line-height: 1.1;
}

.money-pill .amount {
  color: var(--crm-text);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.money-pill .unit {
  color: var(--crm-muted-strong);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.money-pill.muted {
  background: var(--crm-surface);
  border-color: var(--crm-border);
}

.money-pill.muted .amount {
  color: var(--crm-muted-strong);
  font-weight: 700;
}

/* Stronger variant for campaign budget — the daily spend cap is the single
 * most critical number. Slightly bigger + accent border on left. */
.money-pill.daily-cap {
  border-left-width: 3px;
  border-left-color: var(--crm-brand);
  padding-left: 9px;
}

.money-pill.daily-cap .amount {
  font-size: 15px;
}

.ad-campaign-stat-providers {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 8px;
}

.ad-campaign-stat-providers span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 800;
  color: var(--crm-text);
}

.campaign-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.campaign-detail-grid > div {
  min-width: 0;
}

.campaign-detail-grid strong {
  color: var(--crm-text);
}

.campaign-detail-loading-frame {
  position: relative;
  min-height: 620px;
}

.campaign-detail-loading-content {
  display: grid;
  gap: 16px;
  pointer-events: none;
  filter: blur(8px);
  opacity: 0.74;
  user-select: none;
}

.campaign-detail-loading-overlay {
  position: fixed;
  z-index: 25;
  top: 42vh;
  left: calc(var(--sidebar-width, 250px) + ((100vw - var(--sidebar-width, 250px)) / 2));
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  transform: translate(-50%, -50%);
}

.campaign-detail-loading-overlay .loading-spinner {
  width: 34px;
  height: 34px;
  border-width: 3px;
}

.campaign-detail-skeleton-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.campaign-detail-skeleton-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--crm-border);
}

.campaign-detail-skeleton-preview {
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 360px;
  margin-top: 14px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 28px;
}

.ad-creative-cell {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 260px;
}

.ad-creative-cell img {
  width: 72px;
  height: 72px;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  object-fit: cover;
}

.asset-view-toggle {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  gap: 2px;
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  background: var(--crm-surface);
  padding: 4px;
}

.asset-view-toggle button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--crm-text);
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.asset-view-toggle button.is-active {
  background: #17181d;
  color: #ffffff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.16);
}

.asset-list-table td {
  vertical-align: middle;
}

.asset-list-main {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 360px;
}

.asset-list-main strong {
  display: block;
  margin-bottom: 4px;
}

.asset-list-preview {
  display: block;
  width: 104px;
  height: 104px;
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: #fff;
  padding: 0;
  cursor: pointer;
}

.asset-list-preview img,
.asset-list-preview video,
.asset-list-preview .creative-card-media {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: cover;
}

.creative-card-meta.is-list-meta {
  margin-top: 0;
}

@media (min-width: 1400px) {
  .creative-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  }
}

@media (max-width: 760px) {
  .ad-campaign-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ad-campaign-heading {
    display: grid;
  }

  .campaign-detail-grid {
    grid-template-columns: 1fr;
  }
}

.asset-modal {
  width: min(1180px, 96vw);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid var(--crm-border);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 24px 80px rgb(15 23 42 / 28%);
}

.asset-modal .eyebrow {
  margin: 0 0 4px;
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.asset-modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  margin-top: 16px;
}

.asset-preview-stage {
  display: grid;
  min-height: 540px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background:
    linear-gradient(45deg, #f8fafc 25%, transparent 25%),
    linear-gradient(-45deg, #f8fafc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f8fafc 75%),
    linear-gradient(-45deg, transparent 75%, #f8fafc 75%);
  background-color: #fff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.asset-preview-stage img,
.asset-preview-stage video {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
}

.asset-inspector {
  min-width: 0;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--crm-brand) 3%, #fff);
  padding: 14px;
}

.asset-meta-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.asset-meta-list div {
  min-width: 0;
}

.asset-meta-list dt {
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.asset-meta-list dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: var(--crm-text);
  font-size: 13px;
  font-weight: 650;
}

.asset-description {
  margin: 0 0 14px;
  color: var(--crm-muted-strong);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.creative-variant-row + .creative-variant-row {
  margin-top: 8px;
  border-top: 1px solid var(--crm-border);
  padding-top: 8px;
}

.prompt-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.prompt-preview {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: #0f172a;
  padding: 14px;
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.prompt-preview.compact {
  max-width: min(720px, 58vw);
  max-height: 240px;
  margin-top: 8px;
}

.prompt-history {
  margin-top: 8px;
}

.prompt-history summary {
  cursor: pointer;
  color: var(--crm-brand);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .assistant-grid,
  .assistant-grid.four {
    grid-template-columns: 1fr;
  }

  .asset-modal-layout {
    grid-template-columns: 1fr;
  }

  .asset-preview-stage {
    min-height: 360px;
  }
}

.asset-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.generated-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.assistant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.assistant-generate-panel {
  grid-column: 1 / -1;
  max-width: 960px;
}

.assistant-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.assistant-answer {
  max-width: 920px;
  color: var(--crm-text);
  font-size: 16px;
  line-height: 1.55;
}

.assistant-list-block {
  min-width: 0;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.assistant-list-block h3,
.assistant-rationale strong {
  display: block;
  margin-bottom: 10px;
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.assistant-list-block ul,
.assistant-rationale ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--crm-muted-strong);
  font-size: 14px;
  line-height: 1.45;
}

.assistant-rationale {
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--crm-brand) 4%, #fff);
  padding: 14px;
}

.campaign-analysis-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.campaign-analysis-form .form-actions {
  margin: 0;
}

.campaign-analysis-result {
  margin-top: 18px;
}

.proposal-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.proposal-card {
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.proposal-card-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.proposal-card h3 {
  margin: 0 0 6px;
  color: var(--crm-text);
  font-size: 16px;
}

.proposal-card p {
  margin: 0;
  color: var(--crm-muted-strong);
  font-size: 13px;
  line-height: 1.45;
}

.proposal-meta,
.proposal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.proposal-meta {
  justify-content: flex-end;
  min-width: 220px;
}

.proposal-meta span,
.proposal-actions span {
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  background: var(--crm-surface);
  color: var(--crm-muted-strong);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
}

.proposal-action-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  background: #fff;
  color: var(--crm-text);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-transform: none;
  cursor: pointer;
}

.proposal-action-button:hover {
  border-color: color-mix(in srgb, var(--crm-brand) 45%, var(--crm-border));
  background: color-mix(in srgb, var(--crm-brand) 6%, #fff);
  color: var(--crm-brand);
}

.proposal-target {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  color: var(--crm-muted-strong);
  font-size: 12px;
}

.proposal-target strong,
.proposal-actions strong {
  color: var(--crm-text);
}

.proposal-impact {
  margin-top: 10px !important;
}

.proposal-rationale {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--crm-muted-strong);
  font-size: 13px;
  line-height: 1.45;
}

.proposal-actions {
  align-items: center;
  margin-top: 12px;
}

.proposal-preview-modal {
  width: min(760px, 100%);
}

.proposal-preview-body {
  display: grid;
  gap: 14px;
}

.proposal-preview-summary {
  border: 1px solid color-mix(in srgb, var(--crm-brand) 20%, var(--crm-border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--crm-brand) 5%, #fff);
  padding: 14px;
}

.proposal-preview-summary span {
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.proposal-preview-summary h4 {
  margin: 5px 0 6px;
  color: var(--crm-text);
  font-size: 18px;
}

.proposal-preview-summary p,
.proposal-preview-block p {
  margin: 0;
  color: var(--crm-muted-strong);
  line-height: 1.5;
}

.proposal-preview-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.proposal-preview-details div {
  min-width: 0;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  padding: 10px;
}

.proposal-preview-details dt {
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.proposal-preview-details dd {
  overflow-wrap: anywhere;
  margin: 5px 0 0;
  color: var(--crm-text);
  font-weight: 750;
}

.proposal-preview-block {
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  padding: 12px;
}

.proposal-preview-block strong {
  display: block;
  margin-bottom: 6px;
}

.proposal-preview-block pre {
  overflow: auto;
  margin: 0;
  border-radius: 8px;
  background: var(--crm-surface);
  padding: 10px;
  color: var(--crm-muted-strong);
  font-size: 12px;
}

.proposal-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(120px, 1fr));
  gap: 12px;
}

@media (max-width: 760px) {
  .campaign-analysis-form,
  .proposal-card-header,
  .proposal-preview-details,
  .proposal-edit-grid {
    grid-template-columns: 1fr;
  }

  .proposal-card-header {
    display: grid;
  }

  .proposal-meta {
    justify-content: flex-start;
    min-width: 0;
  }
}

.google-search-preview {
  max-width: 760px;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: #fff;
  padding: 18px 20px;
}

.google-search-preview h3 {
  margin: 4px 0 6px;
  color: #1558d6;
  font-family: Arial, sans-serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.25;
}

.google-search-preview p {
  margin: 0;
  color: #3c4043;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.google-search-preview .google-search-url {
  color: #202124;
  font-size: 13px;
}

.asset-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  background: #fff;
  padding: 3px 8px 3px 3px;
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 750;
}

.asset-chip img {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  object-fit: cover;
}

.asset-selector {
  display: grid;
  gap: 12px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.asset-selector-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.asset-selector-summary > div {
  display: grid;
  gap: 3px;
}

.asset-selector-summary strong {
  color: var(--crm-text);
  font-size: 15px;
  font-weight: 850;
}

.asset-selector-summary span {
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.asset-selected-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.asset-selected-thumb {
  flex: 0 0 auto;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--crm-brand) 2%, #fff);
  padding: 0;
  cursor: pointer;
}

.asset-selected-thumb img,
.asset-selected-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-selected-thumb span,
.asset-selected-more {
  color: var(--crm-muted-strong);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.asset-selected-more {
  align-self: center;
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
}

.asset-picker-backdrop {
  z-index: 120;
  align-items: stretch;
  padding: 24px;
}

.asset-picker-modal {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(1680px, 100%);
  height: min(920px, 100%);
  border: 1px solid var(--crm-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 90px rgb(15 23 42 / 30%);
  overflow: hidden;
}

.asset-picker-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--crm-border);
}

.asset-picker-header h3 {
  margin: 0;
  color: var(--crm-text);
  font-size: 28px;
  line-height: 1.05;
}

.asset-picker-header p {
  margin: 4px 0 0;
  color: var(--crm-muted-strong);
}

.asset-picker-header .eyebrow {
  margin: 0 0 5px;
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.asset-picker-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.asset-picker-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 520px) auto;
  align-items: end;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--crm-border);
  background: color-mix(in srgb, var(--crm-brand) 2%, #fff);
}

.asset-picker-toolbar p {
  margin: 0 0 11px;
  color: var(--crm-muted-strong);
  font-size: 13px;
  font-weight: 800;
}

.asset-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  overflow: auto;
  padding: 22px;
}

.asset-picker-card {
  position: relative;
  display: grid;
  grid-template-rows: 260px auto auto;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--crm-border);
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.asset-picker-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--crm-brand) 45%, var(--crm-border));
  box-shadow: 0 16px 38px rgb(15 23 42 / 10%);
}

.asset-picker-card.is-selected {
  border-color: var(--crm-brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--crm-brand) 14%, transparent);
}

.asset-select-preview,
.asset-picker-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(45deg, #f8fafc 25%, transparent 25%),
    linear-gradient(-45deg, #f8fafc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f8fafc 75%),
    linear-gradient(-45deg, transparent 75%, #f8fafc 75%);
  background-color: #fff;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.asset-picker-preview {
  min-height: 0;
}

.asset-select-preview img,
.asset-select-preview video,
.asset-picker-preview img,
.asset-picker-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-select-placeholder {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.asset-select-body,
.asset-picker-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.asset-select-body strong,
.asset-select-body span,
.asset-select-body small,
.asset-picker-copy strong,
.asset-picker-copy span,
.asset-picker-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-select-body strong,
.asset-picker-copy strong {
  color: var(--crm-text);
  font-size: 14px;
}

.asset-select-body span,
.asset-select-body small,
.asset-picker-copy span,
.asset-picker-copy small {
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.asset-select-check,
.asset-picker-state {
  justify-self: start;
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--crm-muted-strong);
  font-size: 11px;
  font-weight: 850;
}

.asset-select-card.is-selected .asset-select-check,
.asset-picker-card.is-selected .asset-picker-state {
  border-color: color-mix(in srgb, var(--crm-brand) 40%, var(--crm-border));
  background: color-mix(in srgb, var(--crm-brand) 10%, #fff);
  color: var(--crm-brand);
}

.provider-choice {
  border: 0;
  padding: 0;
}

.provider-choice legend {
  margin-bottom: 8px;
  color: var(--crm-muted-strong);
  font-size: 13px;
  font-weight: 800;
}

.provider-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.provider-choice-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
  text-align: left;
  cursor: pointer;
}

.provider-choice-card strong {
  color: var(--crm-text);
  font-size: 14px;
}

.provider-choice-card span {
  color: var(--crm-muted-strong);
  font-size: 12px;
  line-height: 1.4;
}

.provider-choice-card.is-selected {
  border-color: var(--crm-brand);
  background: color-mix(in srgb, var(--crm-brand) 8%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--crm-brand) 12%, transparent);
}

.advanced-panel {
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--crm-brand) 2%, #fff);
  padding: 12px;
}

.advanced-panel summary {
  cursor: pointer;
  color: var(--crm-muted-strong);
  font-size: 13px;
  font-weight: 850;
}

.advanced-panel .form-grid {
  margin-top: 12px;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
}

.icon-button {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: #fff;
  color: var(--crm-text);
  font-size: 18px;
  font-weight: 800;
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--crm-brand);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.campaign-provider-lists,
.delivery-actions {
  margin-top: 18px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 14px;
}

.campaign-send-options {
  display: grid;
  gap: 14px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 14px;
}

.campaign-send-options .section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.campaign-send-options .section-title-row h2 {
  margin: 0;
  color: var(--crm-text);
  font-size: 16px;
}

.campaign-send-options .section-title-row p {
  margin: 4px 0 0;
  color: var(--crm-muted);
  font-size: 13px;
}

.campaign-send-options .section-title-row > strong {
  white-space: nowrap;
  color: var(--crm-brand);
  font-size: 13px;
}

.campaign-list-picker {
  display: grid;
  gap: 8px;
  max-height: 280px;
}

.campaign-list-picker .select-row span {
  display: grid;
  gap: 2px;
}

.campaign-list-picker .select-row small {
  color: var(--crm-muted);
}

.campaign-frequency-panel {
  display: grid;
  gap: 12px;
}

.segmented-control {
  display: inline-flex;
  width: fit-content;
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: #fff;
}

.segmented-control button {
  border: 0;
  background: transparent;
  color: var(--crm-muted-strong);
  font-weight: 750;
  padding: 8px 12px;
}

.segmented-control button.active {
  background: var(--crm-accent-soft);
  color: var(--crm-text);
}

.contact-duplication-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.contact-duplication-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.contact-duplication-toolbar select {
  min-height: 37px;
}

.contact-duplication-results {
  position: relative;
}

.contact-duplication-content {
  transition:
    filter 160ms ease,
    opacity 160ms ease;
}

.contact-duplication-content.is-loading {
  pointer-events: none;
  filter: blur(2px);
  opacity: 0.55;
  user-select: none;
}

.contact-duplication-loading-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: start center;
  padding-top: 80px;
  border-radius: 12px;
  background: rgb(255 255 255 / 34%);
  backdrop-filter: blur(1px);
}

.contact-duplication-loading-overlay .loading-spinner {
  width: 28px;
  height: 28px;
  border-width: 3px;
}

.contact-duplication-group-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-duplication-value {
  max-width: 420px;
  overflow-wrap: anywhere;
}

.contact-duplication-row {
  cursor: pointer;
}

.contact-duplication-row:hover td {
  background: color-mix(in srgb, var(--crm-brand) 5%, #fff);
}

.contact-duplication-row:focus-visible td {
  outline: 2px solid color-mix(in srgb, var(--crm-brand) 55%, transparent);
  outline-offset: -2px;
}

.duplication-status,
.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.duplication-status.is-ok {
  background: #dcfce7;
  color: #14532d;
}

.duplication-status.is-danger {
  background: #ffe4e6;
  color: #881337;
}

.duplication-status.is-warning {
  background: #ffedd5;
  color: #9a3412;
}

.metric-pill {
  background: #f1f5f9;
  color: #334155;
  box-shadow: inset 0 0 0 1px #cbd5e1;
}

.metric-pill.is-linked {
  background: #eef2ff;
  color: #3730a3;
  box-shadow: inset 0 0 0 1px #c7d2fe;
}

.campaign-frequency-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.campaign-frequency-summary > div {
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
}

.campaign-frequency-summary span {
  display: block;
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.campaign-frequency-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--crm-text);
  font-size: 18px;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.scroll-box {
  max-height: 320px;
  overflow: auto;
}

.select-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: #fff;
  color: var(--crm-text);
  padding: 10px 12px;
  text-align: left;
}

.select-row.selected {
  border-color: #86efac;
  background: #f0fdf4;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
}

.toolbar-row input {
  min-width: min(360px, 100%);
  flex: 1;
}

.schedule-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--crm-muted-strong);
  font-size: 14px;
}

.schedule-summary strong {
  color: var(--crm-text);
}

.success-text {
  margin: 10px 0 0;
  color: #047857;
  font-size: 13px;
  font-weight: 750;
}

.pre-error {
  overflow-x: auto;
  white-space: pre-wrap;
}

.copy-button.danger {
  border-color: #fecdd3;
  color: #be123c;
}

.notice-text {
  margin-top: 12px;
  color: #047857;
  font-size: 13px;
  font-weight: 750;
}

.danger-panel {
  border-color: #fecdd3;
  background: #fff1f2;
}

.error-pre {
  overflow-x: auto;
  white-space: pre-wrap;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  color: #9f1239;
  font-size: 12px;
  line-height: 1.55;
}

.table-skeleton {
  display: grid;
  gap: 10px;
}

.table-skeleton span {
  height: 42px;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 45%, #eef2f7 90%);
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.25s linear infinite;
}

.strong-cell {
  color: var(--crm-text);
  font-weight: 850;
}

.breakable-cell {
  display: block;
  max-width: 420px;
  overflow-wrap: anywhere;
  color: var(--crm-muted-strong);
  font-size: 12px;
  line-height: 1.4;
}

.small-cell {
  display: block;
  max-width: 620px;
  font-size: 12px;
  line-height: 1.45;
}

.audience-builder-panel {
  display: grid;
  gap: 16px;
}

.audience-filter-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 1.25fr) minmax(260px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.audience-filter-block {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.audience-food-list,
.audience-campaign-list {
  display: grid;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

.audience-food-list label,
.audience-campaign-list label {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border-radius: 8px;
  padding: 8px 9px;
  color: var(--crm-text);
  font-size: 13px;
}

.audience-campaign-list label {
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
}

.audience-food-list label:hover,
.audience-campaign-list label:hover {
  background: color-mix(in srgb, var(--crm-brand) 7%, white);
}

.audience-food-list input,
.audience-campaign-list input {
  width: 14px;
  height: 14px;
  accent-color: var(--crm-brand);
}

.audience-food-list span,
.audience-campaign-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audience-food-list em {
  color: var(--crm-muted);
  font-style: normal;
  font-size: 12px;
}

.audience-campaign-list strong,
.audience-campaign-list small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audience-campaign-list small {
  margin-top: 2px;
  color: var(--crm-muted);
  font-size: 12px;
}

.audience-city-list {
  display: grid;
  gap: 10px;
}

.audience-question-stack {
  display: grid;
  gap: 12px;
}

.audience-summary {
  margin-top: 0;
}

.audience-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.audience-tabs > button:not(.button) {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  background: #fff;
  color: var(--crm-muted-strong);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 750;
}

.audience-tabs > button.is-active {
  border-color: color-mix(in srgb, var(--crm-brand) 42%, var(--crm-border));
  background: color-mix(in srgb, var(--crm-brand) 11%, white);
  color: var(--crm-text);
}

.audience-table-filter-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
}

.audience-table-filter-actions {
  display: flex;
  gap: 8px;
}

.audience-table-deliveries-filter {
  align-self: stretch;
}

.audience-restaurant-name,
.audience-restaurant-id {
  display: block;
}

.audience-restaurant-id {
  max-width: 300px;
  overflow-wrap: anywhere;
}

.audience-tab-panel[hidden] {
  display: none;
}

.list-builder-map-shell {
  height: calc(100vh - 360px);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  margin-inline: 24px;
  margin-bottom: 24px;
}

.audience-create-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.audience-polygon-remove {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgb(15 23 42 / 18%);
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 8px 24px rgb(15 23 42 / 18%);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.audience-polygon-remove:hover {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.email-template-filters {
  grid-template-columns: minmax(520px, 1fr) minmax(520px, 1fr) auto;
  align-items: end;
}

.email-template-filters .field {
  min-width: 0;
}

.email-template-filters .field:first-child {
  min-width: 520px;
}

.email-template-filters .field:nth-child(2) {
  min-width: 520px;
}

.email-template-status-switch {
  position: relative;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  background: #f3f4f6;
  overflow: hidden;
  --email-template-status-index: 0;
}

.email-template-status-switch::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  width: calc(100% / 4);
  border-radius: 11px;
  background: #2563eb;
  box-shadow: 0 8px 24px rgb(15 23 42 / 14%);
  transform: translateX(calc(var(--email-template-status-index) * 100%));
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.email-template-status-switch-active {
  --email-template-status-index: 0;
}

.email-template-status-switch-draft {
  --email-template-status-index: 1;
}

.email-template-status-switch-archived {
  --email-template-status-index: 2;
}

.email-template-status-switch-all {
  --email-template-status-index: 3;
}

.email-template-status-switch a {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 44px;
  border-radius: 11px;
}

.email-template-status-switch a.is-active {
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.email-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.email-template-loading-frame {
  display: grid;
  gap: 14px;
}

.email-template-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  padding: 16px;
  box-shadow: var(--crm-shadow-card, 0 1px 2px rgb(15 23 42 / 4%));
}

.email-template-card-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.email-template-card-header h2 {
  margin: 0;
  color: var(--crm-text);
  font-size: 16px;
}

.email-template-card-header p,
.email-template-description {
  margin: 2px 0 0;
  color: var(--crm-muted);
  font-size: 13px;
}

.email-template-card-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--crm-brand) 12%, #fff);
  color: var(--crm-brand);
}

.email-template-subject {
  min-height: 42px;
  margin: 0;
  color: var(--crm-text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.email-template-description {
  min-height: 36px;
  line-height: 1.35;
}

.email-template-meta-row,
.email-template-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.email-template-meta-row span {
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 750;
}

.email-template-actions {
  justify-content: space-between;
  border-top: 1px solid var(--crm-border);
  padding-top: 12px;
}

.email-template-table {
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

.email-template-table-wrap {
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 44px rgb(15 23 42 / 6%);
}

.email-template-table-wrap .email-template-table th {
  border-bottom-color: #dbe4ef;
  background: #f8fafc;
  color: #475569;
}

.email-template-table-wrap .email-template-table td {
  background: #fff;
}

.email-template-table-wrap .email-template-table tbody tr:hover td {
  background: #f8fbff;
}

.email-template-name-cell {
  width: 34%;
}

.email-template-name-link {
  display: grid;
  min-height: 100%;
  gap: 4px;
  margin: -12px;
  padding: 12px;
  color: var(--crm-text);
  cursor: pointer;
  font-weight: 850;
  text-decoration: none;
}

.email-template-name-link strong {
  color: var(--crm-text);
  font-weight: 850;
}

.email-template-name-link span {
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.email-template-name-link:hover strong {
  color: #1d4ed8;
}

.email-template-count-cell {
  min-width: 96px;
}

.email-template-count-cell span {
  display: inline-flex;
  min-width: 42px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 15px;
  font-weight: 850;
}

.email-template-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.email-template-table-actions .icon-button {
  text-decoration: none;
}

.email-template-table-actions .icon-button:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.email-template-preview-modal {
  width: min(980px, 100%);
}

.email-template-list-preview-frame {
  min-height: 560px;
  margin-top: 0;
  border-radius: 14px;
}

.email-template-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.email-template-preview-column {
  position: sticky;
  top: 16px;
}

.email-template-category-select {
  position: relative;
  min-width: 0;
}

.email-template-category-trigger {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-md, 12px);
  background: #fff;
  color: var(--crm-text);
  padding: 0 12px;
  font-size: var(--crm-font-size-body, 15px);
  font-weight: 400;
  text-align: left;
}

.email-template-category-trigger span,
.email-template-category-menu button span {
  display: grid;
  min-width: 0;
  gap: 2px;
  color: var(--crm-text);
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.email-template-category-trigger strong,
.email-template-category-menu strong {
  overflow: hidden;
  color: var(--crm-text);
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.email-template-category-trigger small,
.email-template-category-menu small {
  overflow: hidden;
  color: var(--crm-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-template-category-menu small {
  font-size: 10.5px;
  font-weight: 550;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}

.email-template-category-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 18px 50px rgb(15 23 42 / 14%);
}

.email-template-category-menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 9px 10px;
  text-align: left;
}

.email-template-category-menu button:hover,
.email-template-category-menu button.is-selected {
  background: color-mix(in srgb, var(--crm-brand) 10%, #fff);
}

.email-template-category-add-option {
  margin-top: 4px;
  border-top: 1px solid var(--crm-border) !important;
  color: var(--crm-brand);
  font-weight: 850;
}

.email-template-category-add-option span {
  display: inline !important;
  color: var(--crm-brand);
}

.email-template-category-modal {
  width: min(560px, 100%);
}

.email-template-small-textarea {
  min-height: 96px;
}

.email-template-json-textarea {
  min-height: 150px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.email-template-preview-subject {
  display: grid;
  gap: 4px;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  padding: 12px;
  background: #fafafa;
}

.email-template-preview-subject span {
  color: var(--crm-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.email-template-preview-subject strong {
  color: var(--crm-text);
  font-size: 15px;
}

.email-template-variable-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.email-template-variable-list span {
  border-radius: 999px;
  background: #eef2ff;
  color: #312e81;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.email-template-preview-frame {
  width: 100%;
  min-height: 440px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
}

@media (max-width: 900px) {
  .crm-layout {
    grid-template-columns: 1fr;
  }

  .crm-sidebar-desktop {
    display: none;
  }

  .crm-mobile-toggle {
    display: inline-flex;
  }

  .campaign-detail-loading-overlay {
    left: 50vw;
  }

  .stats-grid,
  .stats-grid.three,
  .split-grid,
  .filters.seven,
  .system-grid,
  .map-filter-grid,
  .audience-filter-layout,
  .audience-table-filter-panel,
  .contact-list-type-grid,
  .contact-list-contacts-layout,
  .contact-nested-filters,
  .creative-workbench,
  .campaign-sender-fields,
  .email-template-filters,
  .email-template-grid,
  .email-template-editor-layout {
    grid-template-columns: 1fr;
  }

  .email-template-preview-column {
    position: static;
  }

  .page-header {
    padding-right: 70px;
  }

  .map-shell {
    height: 62vh;
    min-height: 420px;
  }

  .list-builder-map-shell {
    height: 62vh;
    min-height: 420px;
  }

  .contact-list-create-panel {
    position: static;
  }

  .login-shell {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .login-side {
    min-height: 280px;
    padding: 36px;
  }

  .login-side h2 {
    font-size: 32px;
  }

  .login-form {
    padding: 36px;
  }
}

/* =====================================================================
   v2 — Refresh layer for ads, campaigns, creative & social
   ===================================================================== */

:root {
  --crm-surface: #f8fafc;
  --crm-surface-strong: #f1f5f9;
  --crm-divider: #eef2f7;
  --crm-elev-1: 0 1px 2px rgb(15 23 42 / 5%);
  --crm-elev-2: 0 4px 16px rgb(15 23 42 / 6%);
  --crm-radius-sm: 8px;
  --crm-radius-md: 12px;
  --crm-radius-lg: 14px;
}

/* Page header — lose the heavy bar, gain breathing room */
.page-header {
  align-items: flex-start;
  flex-wrap: wrap;
  border-bottom: 0;
  background: transparent;
  padding: 24px 24px 0;
}

.page-header > div:first-child {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.page-header span {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--crm-brand) 10%, #fff);
  color: var(--crm-brand);
  padding: 3px 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
}

.page-header h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-header p {
  max-width: 720px;
  color: var(--crm-muted);
  font-size: 13.5px;
}

.page-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

/* Tighter primary/secondary buttons */
.button {
  min-height: 36px;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  transition: filter 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.button:hover:not(:disabled) {
  filter: brightness(0.97);
}

.button.secondary {
  border-color: color-mix(in srgb, var(--crm-border) 80%, #94a3b8);
  background: #fff;
  color: var(--crm-text);
  box-shadow: var(--crm-elev-1);
}

.button.secondary:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--crm-brand) 50%, var(--crm-border));
  background: color-mix(in srgb, var(--crm-brand) 5%, #fff);
  filter: none;
  color: var(--crm-text);
}

.button:disabled {
  opacity: 0.55;
  filter: none;
}

/* Panel — cleaner, lighter */
.panel {
  border-color: color-mix(in srgb, var(--crm-border) 75%, transparent);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--crm-elev-1);
}

.panel > h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.panel > h2 + .table-subtext,
.panel > h2 + .muted,
.panel > h2 + p {
  margin-top: 0;
  margin-bottom: 14px;
  color: var(--crm-muted);
  font-size: 13px;
}

/* Stats — denser, cleaner */
.stats-grid,
.stats-grid.four,
.ad-campaign-summary {
  gap: 12px;
}

.stats-grid > .panel,
.ad-campaign-summary > .panel {
  padding: 14px 16px;
}

/* Expert audit report — forensic dump of campaign + ads + keywords + extensions. */
.campaign-expert-audit h3 {
  margin: 18px 0 8px;
  font-size: 14px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--crm-border);
  padding-bottom: 4px;
}

.expert-audit-banner {
  background: color-mix(in srgb, var(--crm-brand) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--crm-brand) 22%, var(--crm-border));
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 14px;
  font-size: 13px;
}

.expert-audit-issues {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.expert-audit-issues li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--crm-border);
  background: #fff;
}

.expert-audit-issues li[data-severity="blocker"] {
  background: #fef2f2;
  border-color: #fecaca;
}

.expert-audit-issues li[data-severity="warning"] {
  background: #fffbeb;
  border-color: #fde68a;
}

.expert-audit-issues li[data-severity="info"] {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.expert-audit-issues li > div { display: grid; gap: 2px; }
.expert-audit-issues li strong { font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--crm-text); }
.expert-audit-issues li span { font-size: 13px; }
.expert-audit-issues li em { font-size: 12px; color: var(--crm-muted, #5a6473); font-style: italic; }

.expert-audit-kv {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.expert-audit-kv th {
  text-align: left;
  font-weight: 600;
  color: var(--crm-muted, #5a6473);
  padding: 5px 12px 5px 0;
  vertical-align: top;
  white-space: nowrap;
  width: 1%;
}

.expert-audit-kv td {
  padding: 5px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--crm-border) 60%, transparent);
}

.expert-audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.expert-audit-table th,
.expert-audit-table td {
  text-align: left;
  padding: 5px 8px 5px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--crm-border) 60%, transparent);
  vertical-align: top;
}

.expert-audit-table th {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--crm-muted, #5a6473);
}

.expert-audit-table small {
  color: var(--crm-muted, #5a6473);
  font-size: 10.5px;
}

.expert-audit-ad {
  border: 1px solid var(--crm-border);
  border-radius: 7px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 12.5px;
  display: grid;
  gap: 3px;
}

.expert-audit-ad .muted {
  font-size: 11.5px;
}

/* Inline "N clicks · 7d" chip rendered next to a campaign/ad name in the
   table. Surfaces the most important metric without the user having to scan
   to the dedicated stats column. */
.ad-campaign-name-row,
.ads-table-ad-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ad-inline-clicks {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* Empty-state hint shown when there are campaigns/ads but no stats yet,
   pointing users at the Sync metrics button. */
.ad-stats-empty-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 16px !important;
  background: color-mix(in srgb, var(--crm-brand) 5%, #fff) !important;
  border: 1px dashed color-mix(in srgb, var(--crm-brand) 30%, var(--crm-border)) !important;
}

.ad-stats-empty-hint > div {
  min-width: 0;
  flex: 1 1 320px;
}

.ad-stats-empty-hint strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
}

.ad-stats-empty-hint p {
  margin: 0;
  font-size: 13px;
}

.big-number {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ad-campaign-stat span {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--crm-muted);
}

.ad-campaign-stat strong {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Unified pill tab pattern — applies to workflow-strip, ad-campaign-filter-tabs, audience-tabs */
.workflow-strip {
  gap: 6px;
  margin: 4px 0 4px;
}

.workflow-strip span,
.workflow-strip button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: color-mix(in srgb, var(--crm-border) 80%, transparent);
  border-radius: 999px;
  background: #fff;
  color: var(--crm-muted-strong);
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 650;
  box-shadow: var(--crm-elev-1);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.workflow-strip button small {
  border-radius: 999px;
  background: color-mix(in srgb, var(--crm-text) 6%, transparent);
  color: var(--crm-muted-strong);
  padding: 0 6px;
  min-width: 16px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 800;
}

.workflow-strip button:hover:not(.is-current):not(:disabled) {
  border-color: color-mix(in srgb, var(--crm-brand) 35%, var(--crm-border));
  color: var(--crm-text);
}

.workflow-strip span.is-current,
.workflow-strip button.is-current {
  border-color: color-mix(in srgb, var(--crm-brand) 55%, transparent);
  background: var(--crm-brand);
  color: #fff;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--crm-brand) 28%, transparent);
}

.workflow-strip .is-current small {
  background: rgb(255 255 255 / 22%);
  color: #fff;
}

/* Ad campaign filter tabs — match the same pill family */
.ad-campaign-filter-tabs {
  border-color: color-mix(in srgb, var(--crm-border) 80%, transparent);
  background: #fff;
  padding: 3px;
  box-shadow: var(--crm-elev-1);
}

.ad-campaign-filter-tabs button {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--crm-muted-strong);
}

.ad-campaign-filter-tabs button.is-active {
  background: var(--crm-brand);
  color: #fff;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--crm-brand) 22%, transparent);
}

/* Campaign status switch — softer */
.campaign-status-switch {
  background: #fff;
  border-color: color-mix(in srgb, var(--crm-border) 80%, transparent);
  box-shadow: var(--crm-elev-1);
}

.campaign-status-switch a,
.campaign-status-switch button {
  min-height: 34px;
  font-size: 12.5px;
  font-weight: 650;
}

/* Toolbar bar — search + filters + actions in a single row */
.page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--crm-border) 75%, transparent);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--crm-elev-1);
}

.page-toolbar > form,
.page-toolbar > .filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  align-items: center;
}

.page-toolbar .toolbar-search {
  position: relative;
  flex: 1 1 220px;
  min-width: 200px;
}

.page-toolbar .toolbar-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: var(--crm-surface);
  padding: 0 12px 0 36px;
  color: var(--crm-text);
  font-size: 13.5px;
}

.page-toolbar .toolbar-search input:focus {
  outline: 0;
  border-color: color-mix(in srgb, var(--crm-brand) 55%, var(--crm-border));
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--crm-brand) 15%, transparent);
}

.page-toolbar .toolbar-search svg {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--crm-muted);
  pointer-events: none;
}

.page-toolbar .toolbar-divider {
  width: 1px;
  align-self: stretch;
  background: var(--crm-divider);
}

.page-toolbar .toolbar-actions {
  margin-left: auto;
}

/* Filters chips inside toolbar */
.filters input,
.filters select {
  min-height: 38px;
  min-width: 180px;
  border-radius: 10px;
  background: #fff;
  font-size: 13.5px;
}

.filters input:focus,
.filters select:focus {
  outline: 0;
  border-color: color-mix(in srgb, var(--crm-brand) 55%, var(--crm-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--crm-brand) 15%, transparent);
}

/* Tables — cleaner, more readable */
table {
  font-size: 13px;
}

th {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--crm-muted);
}

th,
td {
  border-bottom: 1px solid var(--crm-divider);
  padding: 12px 14px;
  vertical-align: middle;
}

td strong {
  font-weight: 650;
}

tbody tr:hover {
  background: color-mix(in srgb, var(--crm-brand) 3%, #fff);
}

.table-subtext {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--crm-muted);
  line-height: 1.4;
}

.marketing-subject-preview {
  display: grid;
  gap: 2px;
}

.marketing-subject-preview > span {
  display: block;
  min-width: 0;
}

.ai-email-generator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
}

.ai-email-generator-card {
  display: grid;
  gap: 12px;
  min-height: 190px;
  border: 1px solid var(--crm-border);
  border-radius: 14px;
  background: #fff;
  color: var(--crm-text);
  padding: 24px;
  text-decoration: none;
  box-shadow: var(--crm-elev-1);
}

.ai-email-generator-card:hover {
  border-color: color-mix(in srgb, var(--crm-brand) 45%, var(--crm-border));
  box-shadow: var(--crm-elev-2);
}

.ai-email-generator-card > span,
.ai-chat-heading > span {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--crm-brand) 12%, #fff);
  color: var(--crm-brand);
}

.ai-email-generator-card strong {
  font-size: 22px;
  line-height: 1.15;
}

.ai-email-generator-card p,
.ai-contact-list-explanation,
.ai-assumption-list {
  margin: 0;
  color: var(--crm-muted-strong);
  line-height: 1.45;
}

.ai-contact-list-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.ai-contact-list-stack {
  display: grid;
  gap: 18px;
}

.ai-contact-list-chat,
.ai-contact-list-summary {
  display: grid;
  gap: 16px;
}

.ai-contact-list-chat form {
  position: relative;
}

.ai-quick-prompts {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.ai-quick-prompts button {
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--crm-text);
  padding: 9px 11px;
  text-align: left;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.ai-quick-prompts button:hover {
  border-color: color-mix(in srgb, var(--crm-brand) 40%, var(--crm-border));
  background: #eef6ff;
}

.ai-command-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 4px 0 10px;
  color: var(--crm-muted-strong);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.ai-command-legend strong {
  color: var(--crm-text);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-command-legend code {
  border: 1px solid color-mix(in srgb, var(--crm-brand) 24%, var(--crm-border));
  border-radius: 999px;
  background: #eef6ff;
  color: #1d4ed8;
  padding: 2px 7px;
  font-family: inherit;
  font-weight: 850;
}

.ai-textarea-command-wrap {
  position: relative;
}

.ai-selected-type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ai-selected-type-row button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--crm-brand) 24%, var(--crm-border));
  border-radius: 999px;
  background: #eef6ff;
  color: #1d4ed8;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.ai-type-command-menu {
  position: absolute;
  z-index: 20;
  width: min(380px, calc(100% - 16px));
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--crm-elev-2);
}

.ai-type-command-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--crm-border);
  color: var(--crm-muted-strong);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-type-command-header small {
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.ai-type-command-search {
  padding: 10px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--crm-border) 72%, transparent);
}

.ai-type-command-search input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--crm-border);
  border-radius: 9px;
  padding: 0 10px;
  background: #fff;
  color: var(--crm-text);
  font-size: 13px;
}

.ai-type-command-search input:focus {
  border-color: color-mix(in srgb, var(--crm-brand) 72%, var(--crm-border));
  outline: 2px solid color-mix(in srgb, var(--crm-brand) 14%, transparent);
}

.ai-type-command-options {
  max-height: 240px;
  overflow-y: auto;
}

.ai-type-command-menu button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--crm-border) 70%, transparent);
  background: #fff;
  color: var(--crm-text);
  padding: 10px 12px;
  text-align: left;
}

.ai-type-command-menu button:hover {
  background: #f8fafc;
}

.ai-type-command-menu button span {
  font-weight: 750;
}

.ai-type-command-menu button small,
.ai-type-command-menu p {
  margin: 0;
  color: var(--crm-muted-strong);
}

.ai-type-command-menu p {
  padding: 12px;
}

.ai-preview-loading-frame {
  position: relative;
  overflow: hidden;
}

.ai-preview-loading-content {
  display: grid;
  gap: 16px;
  transition:
    filter 160ms ease,
    opacity 160ms ease;
}

.ai-preview-loading-content.is-loading {
  pointer-events: none;
  filter: blur(2px);
  opacity: 0.55;
  user-select: none;
}

.ai-preview-loading-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: rgb(255 255 255 / 42%);
}

.ai-preview-loading-overlay .loading-spinner {
  width: 30px;
  height: 30px;
  border-width: 3px;
}

.ai-chat-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-chat-heading h2 {
  margin: 0 0 3px;
}

.ai-filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-filter-chip-row span {
  border-radius: 999px;
  background: #eef6ff;
  color: #1d4ed8;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 750;
}

.ai-assumption-list {
  padding-left: 18px;
}

.ai-create-list-button {
  width: 100%;
  justify-content: center;
}

.ai-created-list-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #15803d;
  font-weight: 800;
  text-decoration: none;
}

.ai-preview-table-filter {
  display: grid;
  gap: 6px;
  min-width: min(360px, 100%);
}

.ai-preview-table-filter span {
  color: var(--crm-muted-strong);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-preview-table-filter input {
  min-height: 38px;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: var(--crm-text);
  font-size: 14px;
}

.ai-preview-table-filter input:focus {
  border-color: color-mix(in srgb, var(--crm-brand) 72%, var(--crm-border));
  outline: 2px solid color-mix(in srgb, var(--crm-brand) 14%, transparent);
}

.ai-preview-use-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--crm-muted-strong);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.ai-preview-use-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--crm-brand);
}

.ai-preview-clickable-row {
  cursor: pointer;
  transition:
    background-color 140ms ease,
    box-shadow 140ms ease;
}

tbody tr.ai-preview-clickable-row:hover {
  background: #f8fbff;
}

tbody tr.ai-preview-row-excluded,
tbody tr.ai-preview-row-excluded:hover {
  background: #fff1f2;
}

tbody tr.ai-preview-row-excluded.ai-preview-clickable-row:hover {
  background: #ffe4e6;
}

.ai-preview-row-excluded td {
  color: #9f1239;
}

.ai-preview-row-excluded td:not(:first-child) {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, #9f1239 48%, transparent);
}

.ai-preview-pagination {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border-top: 1px solid var(--crm-border);
  padding-top: 14px;
  color: var(--crm-muted-strong);
  font-size: 14px;
  font-weight: 650;
}

.ai-preview-pagination .pagination-links {
  margin: 0;
}

.ai-pagination-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 980px) {
  .ai-email-generator-grid,
  .ai-contact-list-layout {
    grid-template-columns: 1fr;
  }
}

/* Inline action buttons (`.copy-button`) — used heavily in row-actions */
.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--crm-border) 80%, transparent);
  border-radius: 8px;
  background: #fff;
  color: var(--crm-text);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.copy-button:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--crm-brand) 45%, var(--crm-border));
  background: color-mix(in srgb, var(--crm-brand) 5%, #fff);
  color: var(--crm-text);
}

.copy-button.dark {
  border-color: rgb(255 255 255 / 14%);
  background: rgb(15 23 42 / 58%);
  color: #e5e7eb;
}

.copy-button.dark:hover:not(:disabled) {
  border-color: rgb(96 165 250 / 48%);
  background: rgb(30 41 59 / 72%);
  color: #fff;
}

.copy-button.icon-only {
  width: 34px;
  justify-content: center;
  padding-inline: 0;
}

.copy-button.is-primary-action {
  border-color: color-mix(in srgb, var(--crm-brand) 70%, transparent);
  background: var(--crm-brand);
  color: #fff;
}

.copy-button.is-primary-action:hover:not(:disabled) {
  background: color-mix(in srgb, var(--crm-brand) 92%, black);
  border-color: color-mix(in srgb, var(--crm-brand) 92%, black);
  color: #fff;
}

.google-ads-open-button {
  border-color: #c7d7fe;
  background: #eef4ff;
  color: #174ea6;
}

.google-ads-open-button:hover:not(:disabled) {
  border-color: #4285f4;
  background: #e8f0fe;
  color: #174ea6;
}

.copy-button.danger {
  border-color: #fecaca;
  background: #fff;
  color: #b91c1c;
}

.copy-button.danger:hover:not(:disabled) {
  border-color: #ef4444;
  background: #fef2f2;
  color: #991b1b;
}

.row-actions {
  flex-wrap: wrap;
  gap: 6px;
}

.inline-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 999px;
  animation: platform-boot-spin 0.7s linear infinite;
}

/* Status badges — softer */
.badge {
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.badge::before {
  width: 6px;
  height: 6px;
}

/* Empty state — lighter */
.empty {
  min-height: 180px;
  border-radius: 14px;
  border-style: dashed;
  border-color: color-mix(in srgb, var(--crm-border) 70%, transparent);
  background: var(--crm-surface);
  padding: 32px;
}

.empty strong {
  font-size: 15px;
  font-weight: 700;
}

.empty p {
  font-size: 13px;
  color: var(--crm-muted);
}

/* Inline loading — softer */
.inline-loading {
  border-color: color-mix(in srgb, var(--crm-border) 80%, transparent);
  background: var(--crm-surface);
  font-size: 12.5px;
  font-weight: 600;
}

/* Stat cards mini variant */
.stat-label {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--crm-muted);
}

/* Refresh creative card */
.creative-card {
  padding: 10px;
  border-radius: 14px;
  border-color: color-mix(in srgb, var(--crm-border) 75%, transparent);
  box-shadow: var(--crm-elev-1);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.creative-card:hover {
  border-color: color-mix(in srgb, var(--crm-brand) 40%, var(--crm-border));
  box-shadow: var(--crm-elev-2);
  transform: translateY(-1px);
}

.creative-card strong {
  font-size: 14px;
  font-weight: 650;
}

.creative-card-meta {
  margin-top: 8px;
  gap: 5px;
}

.asset-view-toggle {
  background: #fff;
  box-shadow: var(--crm-elev-1);
}

.asset-view-toggle button {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 650;
}

/* Heading rows */
.panel-heading-row h2,
.ad-campaign-heading h2,
.section-heading h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.ad-campaign-heading {
  align-items: center;
  margin-bottom: 14px;
}

.ad-campaign-heading > div:first-child p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--crm-muted);
}

/* Form fields refresh */
.field span {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--crm-muted);
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  min-height: 40px;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: color-mix(in srgb, var(--crm-brand) 55%, var(--crm-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--crm-brand) 15%, transparent);
}

/* Proposal card refresh */
.proposal-card {
  border-color: color-mix(in srgb, var(--crm-border) 75%, transparent);
  border-radius: 14px;
  box-shadow: var(--crm-elev-1);
}

.proposal-card h3 {
  font-size: 15px;
  font-weight: 700;
}

.keyword-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.keyword-preview span {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--crm-brand) 7%, #fff);
  padding: 5px 8px;
  color: var(--crm-text);
  font-size: 12px;
  font-weight: 650;
}

.targeting-integration-picker {
  display: grid;
  gap: 10px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

.targeting-integration-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.targeting-integration-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.targeting-integration-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--crm-brand) 2%, #fff);
  padding: 9px;
  cursor: pointer;
}

.targeting-integration-option:hover {
  border-color: color-mix(in srgb, var(--crm-brand) 38%, var(--crm-border));
}

.targeting-integration-option input {
  margin-top: 2px;
  accent-color: var(--crm-brand);
}

.targeting-integration-option span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.targeting-integration-option strong,
.targeting-integration-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.targeting-integration-option strong {
  color: var(--crm-text);
  font-size: 13px;
  font-weight: 850;
}

.targeting-integration-option small {
  color: var(--crm-muted-strong);
  font-size: 11px;
  font-weight: 700;
}

.proposal-meta span,
.proposal-actions span {
  font-size: 10.5px;
  letter-spacing: 0.06em;
}

.proposal-action-button {
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
}

/* Soft section dividers inside panels */
.panel + .panel {
  margin-top: 0;
}

/* Compact form-actions spacing inside row-actions context */
.creative-card .form-actions {
  gap: 6px;
  margin-top: 10px;
}

/* Search-input wrapper helper class */
.toolbar-search {
  display: block;
}

/* Inline campaign status switch when inside a page-toolbar */
.page-toolbar .campaign-status-switch {
  flex: 1 1 360px;
  margin-top: 0;
  padding: 3px;
  border-radius: 999px;
  background: var(--crm-surface-strong);
}

.page-toolbar .campaign-status-switch a {
  min-height: 32px;
  border-radius: 999px;
  font-size: 12.5px;
}

.page-toolbar .filters {
  flex: 1 1 280px;
}

.page-toolbar .filters input {
  min-width: 220px;
  background: var(--crm-surface);
}

@media (max-width: 960px) {
  .page-toolbar .campaign-status-switch {
    flex: 1 1 100%;
  }
}

/* Heading tools cluster (filter pills + view toggle) */
.panel-heading-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.ad-campaign-heading {
  flex-wrap: wrap;
}

.ad-campaign-heading > div:first-child {
  min-width: 0;
  flex: 1 1 280px;
}

/* Ad preview cards (Paid Ads — publishing) */
.ad-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.ad-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--crm-border) 75%, transparent);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--crm-elev-1);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.ad-card:hover {
  border-color: color-mix(in srgb, var(--crm-brand) 40%, var(--crm-border));
  box-shadow: var(--crm-elev-2);
  transform: translateY(-1px);
}

.ad-card-preview {
  position: relative;
  display: grid;
  min-height: 180px;
  background:
    linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
    linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f1f5f9 75%),
    linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
  background-color: #fafbfc;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  border-bottom: 1px solid var(--crm-divider);
}

.ad-card-media {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.ad-card-google {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 16px 18px;
  background: #fff;
  border-bottom: 1px solid var(--crm-divider);
}

.ad-card-google-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 4px;
  background: #e8f0fe;
  color: #1a73e8;
  padding: 1px 6px;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.ad-card-google-url {
  margin-top: 2px;
  color: #202124;
  font-family: Arial, sans-serif;
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-card-google-headline {
  margin: 4px 0 4px;
  color: #1558d6;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.25;
}

.ad-card-google-body {
  margin: 0;
  color: #3c4043;
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.ad-card-status {
  position: absolute;
  top: 10px;
  right: 10px;
}

.ad-card-status .badge {
  box-shadow: 0 4px 12px rgb(15 23 42 / 14%);
}

.ad-card-body {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
}

.ad-card-title {
  display: grid;
  gap: 2px;
}

.ad-card-title strong {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
}

.ad-card-title .muted {
  font-size: 11.5px;
  color: var(--crm-muted);
}

.ad-card-headline {
  margin: 0;
  color: var(--crm-text);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.3;
}

.ad-card-text {
  margin: 0;
  color: var(--crm-muted-strong);
  font-size: 12.5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.ad-card-cta {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--crm-brand) 10%, #fff);
  color: var(--crm-brand);
  border: 1px solid color-mix(in srgb, var(--crm-brand) 35%, transparent);
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ad-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin: 4px 0 0;
}

.ad-card-meta div {
  min-width: 0;
}

.ad-card-meta dt {
  color: var(--crm-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-card-meta dd {
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--crm-text);
  font-size: 12.5px;
  font-weight: 600;
}

.ad-card-ids {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--crm-muted);
}

.ad-card-ids:empty {
  display: none;
}

.ad-card .row-actions {
  margin-top: 4px;
}

/* AI button — purple gradient + soft glow, used to enter the AI generator */
.button.ai {
  border: 0;
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 55%, #6366f1 100%);
  color: #fff;
  box-shadow:
    0 8px 22px rgb(124 58 237 / 28%),
    inset 0 1px 0 rgb(255 255 255 / 22%);
}

.button.ai:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow:
    0 10px 28px rgb(124 58 237 / 36%),
    inset 0 1px 0 rgb(255 255 255 / 24%);
}

.button.ai:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 3px rgb(168 85 247 / 30%),
    0 10px 24px rgb(124 58 237 / 30%);
}

.button.ai svg {
  filter: drop-shadow(0 1px 2px rgb(255 255 255 / 35%));
}

.copy-button.ai {
  border-color: color-mix(in srgb, #a855f7 45%, transparent);
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  box-shadow: 0 4px 12px rgb(124 58 237 / 24%);
}

.copy-button.ai:hover:not(:disabled) {
  border-color: transparent;
  background: linear-gradient(135deg, #9333ea, #6d28d9);
  color: #fff;
  filter: brightness(1.04);
}

.copy-button.ai svg {
  flex: 0 0 auto;
}

/* =====================================================================
   AI Ad Generator — beautiful big composer + preview/edit split
   ===================================================================== */

.ad-gen-error {
  margin: 0;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fef2f2;
  color: #991b1b;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
}

.ad-gen-hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--crm-brand) 18%, transparent), transparent 38%),
    radial-gradient(circle at 92% 96%, rgb(99 102 241 / 12%), transparent 42%),
    linear-gradient(180deg, #fff, color-mix(in srgb, var(--crm-brand) 4%, #fff));
  border: 1px solid color-mix(in srgb, var(--crm-brand) 18%, var(--crm-border));
  box-shadow: 0 18px 50px rgb(15 23 42 / 6%);
}

.ad-gen-composer {
  display: grid;
  gap: 22px;
  padding: 32px 32px 28px;
}

.ad-gen-composer-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ad-gen-spark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--crm-brand), color-mix(in srgb, var(--crm-brand) 60%, #6366f1));
  color: #fff;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--crm-brand) 28%, transparent);
}

.ad-gen-composer-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--crm-text);
}

.ad-gen-composer-head p {
  margin: 2px 0 0;
  color: var(--crm-muted);
  font-size: 13.5px;
}

.ad-gen-textarea {
  width: 100%;
  min-height: 140px;
  border: 1px solid color-mix(in srgb, var(--crm-border) 80%, transparent);
  border-radius: 18px;
  background: #fff;
  padding: 18px 20px;
  color: var(--crm-text);
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.45;
  resize: vertical;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 80%), 0 1px 2px rgb(15 23 42 / 4%);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ad-gen-textarea::placeholder {
  color: color-mix(in srgb, var(--crm-muted) 80%, white);
}

.ad-gen-textarea:focus {
  outline: 0;
  border-color: color-mix(in srgb, var(--crm-brand) 55%, var(--crm-border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--crm-brand) 14%, transparent);
}

.ad-gen-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ad-gen-suggestions > span {
  color: var(--crm-muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-gen-chip {
  display: inline-flex;
  align-items: center;
  max-width: 360px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--crm-border) 80%, transparent);
  border-radius: 999px;
  background: rgb(255 255 255 / 70%);
  backdrop-filter: blur(8px);
  color: var(--crm-muted-strong);
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.ad-gen-chip:hover {
  border-color: color-mix(in srgb, var(--crm-brand) 50%, var(--crm-border));
  background: #fff;
  color: var(--crm-text);
}

.ad-gen-config {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--crm-border) 65%, transparent);
  border-radius: 18px;
  background: rgb(255 255 255 / 70%);
  backdrop-filter: blur(10px);
}

.ad-gen-segment {
  display: inline-flex;
  width: fit-content;
  gap: 4px;
  padding: 4px;
  border: 1px solid color-mix(in srgb, var(--crm-border) 70%, transparent);
  border-radius: 999px;
  background: var(--crm-surface-strong);
}

.ad-gen-segment button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--crm-muted-strong);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ad-gen-segment button.is-active {
  background: #fff;
  color: var(--crm-text);
  box-shadow: 0 4px 10px rgb(15 23 42 / 10%);
}

.ad-gen-config-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.ad-gen-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ad-gen-field-grow {
  grid-column: span 2;
}

.ad-gen-field-wide {
  grid-column: 1 / -1;
}

.ad-gen-field > span {
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-gen-field input,
.ad-gen-field select,
.ad-gen-field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid color-mix(in srgb, var(--crm-border) 78%, transparent);
  border-radius: 12px;
  background: #fff;
  padding: 0 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--crm-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ad-gen-field textarea {
  padding: 10px 12px;
  min-height: 96px;
  line-height: 1.5;
  resize: vertical;
}

.ad-gen-field input:focus,
.ad-gen-field select:focus,
.ad-gen-field textarea:focus {
  outline: 0;
  border-color: color-mix(in srgb, var(--crm-brand) 55%, var(--crm-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--crm-brand) 14%, transparent);
}

.ad-gen-new-grid {
  display: grid;
  gap: 14px;
}

.ad-gen-secondary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.ad-gen-budget-block {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, #a855f7 25%, var(--crm-border));
  background:
    radial-gradient(circle at 12% 0%, rgb(168 85 247 / 14%), transparent 55%),
    radial-gradient(circle at 96% 100%, rgb(99 102 241 / 10%), transparent 50%),
    #fff;
  padding: 18px 20px;
  box-shadow: 0 14px 32px rgb(124 58 237 / 8%);
}

.ad-gen-budget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ad-gen-budget-label {
  color: #6b21a8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ad-gen-budget-cadence {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid color-mix(in srgb, #a855f7 25%, var(--crm-border));
  border-radius: 999px;
  background: rgb(255 255 255 / 75%);
  backdrop-filter: blur(6px);
}

.ad-gen-budget-cadence button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6b21a8;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ad-gen-budget-cadence button.is-active {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  box-shadow: 0 6px 14px rgb(124 58 237 / 28%);
}

.ad-gen-budget-input {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ad-gen-budget-input input {
  flex: 1 1 220px;
  min-width: 180px;
  min-height: 72px;
  border: 1px solid color-mix(in srgb, #a855f7 22%, var(--crm-border));
  border-radius: 16px;
  background: #fff;
  padding: 0 18px;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1f1147;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ad-gen-budget-input input::placeholder {
  color: color-mix(in srgb, #a855f7 30%, #cbd5e1);
  font-weight: 700;
}

.ad-gen-budget-input input:focus {
  outline: 0;
  border-color: #a855f7;
  box-shadow: 0 0 0 4px rgb(168 85 247 / 18%);
}

.ad-gen-budget-input select {
  min-height: 56px;
  border: 1px solid color-mix(in srgb, #a855f7 22%, var(--crm-border));
  border-radius: 14px;
  background: #fff;
  padding: 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: #1f1147;
}

.ad-gen-budget-suffix {
  font-size: 15px;
  font-weight: 700;
  color: #6b21a8;
  letter-spacing: 0.01em;
}

.ad-gen-budget-foot {
  margin: 12px 0 0;
  color: var(--crm-muted-strong);
  font-size: 13px;
}

.ad-gen-budget-foot strong {
  color: #6b21a8;
  font-weight: 800;
}

@media (max-width: 720px) {
  .ad-gen-budget-input input {
    font-size: 34px;
    min-height: 60px;
  }
}

/* legacy alias still referenced elsewhere */
.ad-gen-budget {
  display: grid;
  grid-template-columns: 1fr 80px 110px;
  gap: 6px;
}

/* =====================================================================
   Dashboard Ads command-center hero
   ===================================================================== */

.ads-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.9fr);
  gap: 28px;
  overflow: hidden;
  border-radius: 24px;
  padding: 28px 32px;
  color: #fff;
  background:
    radial-gradient(circle at 8% 12%, rgb(168 85 247 / 60%), transparent 50%),
    radial-gradient(circle at 95% 90%, rgb(56 189 248 / 28%), transparent 45%),
    linear-gradient(135deg, #1e1b4b 0%, #4c1d95 45%, #6d28d9 100%);
  box-shadow: 0 24px 60px rgb(76 29 149 / 30%);
  isolation: isolate;
}

.ads-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(135deg, rgb(255 255 255 / 3%) 0 1px, transparent 1px 14px);
  pointer-events: none;
}

.ads-hero-glow {
  position: absolute;
  top: -60px;
  right: -40px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(244 114 182 / 28%), transparent 70%);
  filter: blur(6px);
  z-index: 0;
  pointer-events: none;
}

.ads-hero-body {
  position: relative;
  display: grid;
  gap: 14px;
  align-content: center;
  z-index: 1;
}

.ads-hero-eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgb(255 255 255 / 14%);
  border: 1px solid rgb(255 255 255 / 22%);
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  backdrop-filter: blur(10px);
}

.ads-hero h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.018em;
  max-width: 620px;
}

.ads-hero p {
  margin: 0;
  max-width: 540px;
  color: rgb(255 255 255 / 78%);
  font-size: 14.5px;
  line-height: 1.5;
}

.ads-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.ads-hero-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border-radius: 16px;
  padding: 14px 18px;
  text-decoration: none;
  min-width: 280px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.ads-hero-button.is-primary {
  background: linear-gradient(135deg, #f0abfc 0%, #c084fc 32%, #a855f7 65%, #7c3aed 100%);
  color: #1e1b4b;
  box-shadow:
    0 18px 36px rgb(168 85 247 / 38%),
    inset 0 1px 0 rgb(255 255 255 / 38%);
}

.ads-hero-button.is-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    0 22px 42px rgb(168 85 247 / 46%),
    inset 0 1px 0 rgb(255 255 255 / 40%);
}

.ads-hero-button.is-secondary {
  background: rgb(255 255 255 / 12%);
  color: #fff;
  border: 1px solid rgb(255 255 255 / 24%);
  backdrop-filter: blur(12px);
}

.ads-hero-button.is-secondary:hover {
  transform: translateY(-1px);
  background: rgb(255 255 255 / 18%);
  border-color: rgb(255 255 255 / 38%);
}

.ads-hero-button-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 12px;
  background: rgb(255 255 255 / 28%);
  color: inherit;
}

.ads-hero-button.is-secondary .ads-hero-button-icon {
  background: rgb(255 255 255 / 16%);
}

.ads-hero-button-text {
  display: grid;
  gap: 1px;
  line-height: 1.2;
  text-align: left;
}

.ads-hero-button-text strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.005em;
}

.ads-hero-button-text em {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.78;
}

.ads-hero-button.is-primary .ads-hero-button-text em {
  color: #4c1d95;
  opacity: 0.8;
}

.ads-hero-button > svg:last-child {
  margin-left: auto;
  opacity: 0.7;
}

.ads-hero-preview {
  position: relative;
  display: grid;
  gap: 8px;
  align-content: center;
  border-radius: 18px;
  background: rgb(255 255 255 / 96%);
  color: #1e1b4b;
  padding: 18px 20px;
  box-shadow: 0 20px 40px rgb(15 23 42 / 22%);
  z-index: 1;
  transform: rotate(1.2deg);
  transition: transform 0.3s ease;
}

.ads-hero-preview:hover {
  transform: rotate(0deg);
}

.ads-hero-preview::before {
  content: "";
  position: absolute;
  inset: -6px;
  z-index: -1;
  border-radius: 22px;
  background: linear-gradient(135deg, rgb(244 114 182 / 36%), rgb(168 85 247 / 36%));
  filter: blur(14px);
}

.ads-hero-preview-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  padding: 3px 9px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ads-hero-preview strong {
  font-size: 17px;
  font-weight: 750;
  color: #1558d6;
  line-height: 1.25;
}

.ads-hero-preview p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
  max-width: none;
}

.ads-hero-preview-cta {
  margin-top: 4px;
  color: #6b21a8;
  font-size: 12.5px;
  font-weight: 700;
}

@media (max-width: 960px) {
  .ads-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .ads-hero h2 {
    font-size: 24px;
  }

  .ads-hero-preview {
    transform: none;
  }

.ads-hero-button {
    min-width: 0;
    flex: 1 1 240px;
  }
}

.home-hero {
  display: flex;
  --cf-redeploy-token: 202605151213;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 14px;
  border: 1px solid #d7dee8;
  border-radius: 16px;
  padding: 26px 28px;
  background:
    linear-gradient(135deg, rgb(37 99 235 / 11%), transparent 42%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 18px 40px rgb(15 23 42 / 7%);
}

.home-hero-eyebrow,
.email-analytics-hero span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.home-hero h2,
.email-analytics-hero h2 {
  margin: 0;
  color: #111827;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: 0;
}

.home-hero p,
.email-analytics-hero p {
  max-width: 680px;
  margin: 10px 0 0;
  color: #475569;
  line-height: 1.55;
}

.home-hero-link,
.email-analytics-hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 12px;
  padding: 0 16px;
  color: #ffffff;
  background: #2563eb;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 12px 26px rgb(37 99 235 / 20%);
}

.home-insight-grid,
.email-analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.email-analytics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-insight-card,
.email-analytics-metric {
  display: grid;
  gap: 7px;
  min-height: 170px;
  align-content: start;
  border-radius: 14px;
  background: #ffffff;
}

.home-insight-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: #1d4ed8;
  background: #dbeafe;
}

.home-insight-card p,
.email-analytics-metric p {
  margin: 4px 0 0;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.home-insight-card strong,
.email-analytics-metric strong {
  display: block;
  color: #111827;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

.home-widget-number-loading {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  vertical-align: middle;
}

.home-widget-number-loading .loading-spinner {
  width: 22px;
  height: 22px;
}

.home-insight-card small,
.email-analytics-metric small {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.home-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-action-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 118px;
  border: 1px solid #d7dee8;
  border-radius: 16px;
  padding: 20px;
  color: #111827;
  background: #ffffff;
  text-decoration: none;
  box-shadow: 0 14px 30px rgb(15 23 42 / 6%);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-action-card:hover {
  transform: translateY(-2px);
  border-color: #2563eb;
  box-shadow: 0 18px 38px rgb(15 23 42 / 10%);
}

.home-action-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: #1d4ed8;
}

.home-action-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 17px;
}

.home-action-card small {
  display: block;
  color: #64748b;
  line-height: 1.45;
}

.workflow-megacard {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #d7dee8;
  border-radius: 14px;
  padding: 14px 18px;
  color: #111827;
  text-decoration: none;
  background:
    linear-gradient(135deg, rgb(37 99 235 / 5%), transparent 45%),
    #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.workflow-megacard:hover {
  border-color: #2563eb;
  box-shadow: 0 12px 24px rgb(15 23 42 / 7%);
}

.workflow-megacard-icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: #1d4ed8;
  background: #dbeafe;
}

.workflow-megacard-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workflow-megacard-body strong {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.workflow-megacard-body small {
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

.workflow-megacard-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.home-workflow-panel {
  display: grid;
  gap: 18px;
  border-color: #d7dee8;
  background:
    linear-gradient(135deg, rgb(37 99 235 / 5%), transparent 42%),
    #ffffff;
}

.home-workflow-heading h2 {
  margin: 0;
  color: #111827;
  font-size: 24px;
  letter-spacing: 0;
}

.home-workflow-heading p {
  max-width: 760px;
  margin: 8px 0 0;
  color: #64748b;
  line-height: 1.5;
}

/* ===== Workflow fullscreen flowchart ===== */

.workflow-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow-y: auto;
  padding: 28px 32px 64px;
  color: #f1f5f9;
  background:
    radial-gradient(80% 60% at 50% 0%, rgb(56 189 248 / 18%), transparent 55%),
    radial-gradient(60% 40% at 0% 100%, rgb(124 58 237 / 16%), transparent 60%),
    radial-gradient(60% 40% at 100% 100%, rgb(14 165 233 / 14%), transparent 60%),
    linear-gradient(180deg, #050a1e 0%, #070b21 60%, #04081a 100%);
}

.workflow-fullscreen-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto 28px;
}

.workflow-fullscreen-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgb(56 189 248 / 14%);
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.workflow-fullscreen-header h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #f8fafc;
}

.workflow-fullscreen-header p {
  margin: 10px 0 0;
  max-width: 760px;
  color: rgb(226 232 240 / 75%);
  font-size: 14px;
  line-height: 1.55;
}

.workflow-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 18%);
  background: rgb(255 255 255 / 8%);
  color: #f1f5f9;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.workflow-close:hover {
  background: rgb(255 255 255 / 14%);
  border-color: rgb(255 255 255 / 32%);
  transform: rotate(90deg);
}

.workflow-canvas {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  aspect-ratio: 1280 / 2360;
}

.workflow-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.wf-conn {
  fill: none;
  stroke: rgb(226 232 240 / 35%);
  stroke-width: 2;
  stroke-dasharray: 6 7;
  stroke-linecap: round;
}

.wf-conn--spine {
  stroke-width: 4;
  stroke-dasharray: none;
}

.wf-node {
  position: absolute;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 16px 18px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 8%), rgb(255 255 255 / 4%));
  border: 1px solid rgb(255 255 255 / 14%);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px rgb(2 6 23 / 35%);
}

.wf-node-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wf-node-num {
  color: var(--node-ink, #93c5fd);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.wf-node-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--node-soft, rgb(96 165 250 / 18%));
  color: var(--node-ink, #93c5fd);
}

.wf-node-title {
  font-size: 16px;
  font-weight: 750;
  color: #f8fafc;
}

.wf-node-desc {
  margin: 0;
  color: rgb(226 232 240 / 75%);
  font-size: 12.5px;
  line-height: 1.45;
}

.wf-node--audience   { --node-soft: rgb(96 165 250 / 22%); --node-ink: #93c5fd; }
.wf-node--prep       { --node-soft: rgb(167 139 250 / 22%); --node-ink: #c4b5fd; }
.wf-node--launch     { --node-soft: rgb(251 146 60 / 22%); --node-ink: #fdba74; }
.wf-node--leads      { --node-soft: rgb(45 212 191 / 22%); --node-ink: #5eead4; }
.wf-node--onboarding { --node-soft: rgb(125 211 252 / 22%); --node-ink: #7dd3fc; }

.wf-channel-band {
  position: absolute;
  left: 50%;
  top: 17%;
  transform: translate(-50%, -100%);
  padding: 3px 11px;
  border-radius: 999px;
  background: rgb(15 23 42 / 70%);
  border: 1px solid rgb(255 255 255 / 14%);
  color: rgb(226 232 240 / 70%);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.wf-handoff {
  position: absolute;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgb(16 185 129 / 18%), rgb(45 212 191 / 12%));
  border: 1px solid rgb(52 211 153 / 35%);
  box-shadow: 0 12px 28px rgb(2 6 23 / 30%);
}

.wf-handoff-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgb(52 211 153 / 22%);
  color: #6ee7b7;
}

.wf-handoff-body {
  min-width: 0;
}

.wf-handoff-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #6ee7b7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.wf-handoff strong {
  display: block;
  color: #f1f5f9;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.wf-handoff-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.wf-handoff-rule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgb(52 211 153 / 14%);
  border: 1px solid rgb(52 211 153 / 28%);
  color: #a7f3d0;
  font-size: 11px;
  font-weight: 700;
}

.wf-handoff-rule--alert {
  background: rgb(251 146 60 / 14%);
  border-color: rgb(251 146 60 / 32%);
  color: #fed7aa;
}

.wf-hub-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.wf-hub-rule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgb(52 211 153 / 18%);
  border: 1px solid rgb(52 211 153 / 38%);
  color: #d1fae5;
  font-size: 11px;
  font-weight: 700;
}

.wf-hub-rule--alert {
  background: rgb(251 146 60 / 20%);
  border-color: rgb(251 146 60 / 42%);
  color: #fed7aa;
}

.wf-hub-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.wf-hub-channel {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgb(255 255 255 / 14%);
  border: 1px solid rgb(255 255 255 / 22%);
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 700;
}

.wf-hub-channel em {
  font-style: normal;
  font-weight: 600;
  color: rgb(255 255 255 / 75%);
  font-size: 10.5px;
}

.wf-hub-channel--default {
  background: rgb(255 255 255 / 24%);
  border-color: rgb(255 255 255 / 38%);
}

.wf-decision-inline {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.wf-decision-diamond {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  transform: rotate(45deg);
  background: rgb(251 191 36 / 14%);
  border: 1.5px solid rgb(251 191 36 / 55%);
  box-shadow: 0 4px 12px rgb(0 0 0 / 35%);
  flex: 0 0 auto;
}

.wf-decision-mark {
  transform: rotate(-45deg);
  color: #fcd34d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.wf-decision-text {
  color: rgb(252 211 77 / 90%);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.wf-sub-channels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px dashed rgb(255 255 255 / 12%);
}

.wf-channels-label {
  width: 100%;
  margin-bottom: 4px;
  color: rgb(226 232 240 / 55%);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wf-channel-dot {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 14%);
  background: rgb(255 255 255 / 6%);
  color: rgb(226 232 240 / 30%);
  cursor: help;
}

.wf-channel-dot[data-state="on"] {
  background: rgb(56 189 248 / 24%);
  border-color: rgb(125 211 252 / 50%);
  color: #7dd3fc;
}

.wf-channel-dot[data-state="dim"] {
  background: rgb(251 191 36 / 18%);
  border-color: rgb(251 191 36 / 35%);
  color: #fcd34d;
}

.wf-channel-dot[data-state="dim"]::after {
  content: "?";
  position: absolute;
  right: -3px;
  top: -3px;
  display: inline-grid;
  place-items: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fcd34d;
  color: #0f172a;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.wf-channel-dot[data-state="off"] {
  opacity: 0.5;
}

.wf-channel-dot[data-title]:hover::before {
  content: attr(data-title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 9px;
  border-radius: 7px;
  background: #0f172a;
  border: 1px solid rgb(255 255 255 / 22%);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 6px 14px rgb(0 0 0 / 45%);
}

.wf-milestones {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wf-milestones li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgb(251 191 36 / 14%);
  border: 1px solid rgb(251 191 36 / 32%);
  color: #fef3c7;
  font-size: 11.5px;
  font-weight: 700;
}

.wf-milestones li svg {
  color: #fcd34d;
}

.wf-channel {
  padding: 14px 16px;
}

.wf-channel .wf-node-head {
  justify-content: space-between;
}

.wf-channel-tag {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--ch-soft, rgb(255 255 255 / 10%));
  color: var(--ch-ink, #f1f5f9);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wf-channel--paid-social {
  --node-soft: rgb(236 72 153 / 22%);
  --node-ink: #f9a8d4;
  --ch-soft: rgb(236 72 153 / 22%);
  --ch-ink: #f9a8d4;
}

.wf-channel--paid-ads {
  --node-soft: rgb(251 191 36 / 22%);
  --node-ink: #fcd34d;
  --ch-soft: rgb(251 191 36 / 22%);
  --ch-ink: #fcd34d;
}

.wf-channel--org-social {
  --node-soft: rgb(167 139 250 / 22%);
  --node-ink: #c4b5fd;
  --ch-soft: rgb(167 139 250 / 22%);
  --ch-ink: #c4b5fd;
}

.wf-channel--web {
  --node-soft: rgb(56 189 248 / 22%);
  --node-ink: #7dd3fc;
  --ch-soft: rgb(56 189 248 / 22%);
  --ch-ink: #7dd3fc;
}

.wf-channel--email-out {
  --node-soft: rgb(129 140 248 / 22%);
  --node-ink: #a5b4fc;
  --ch-soft: rgb(129 140 248 / 22%);
  --ch-ink: #a5b4fc;
}

.wf-team {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 4px;
}

.wf-team--block {
  margin-top: auto;
}

.wf-team-row {
  display: flex;
  align-items: center;
}

.wf-persona {
  position: relative;
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  margin-left: -5px;
  border: 2px solid #050a1e;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  box-shadow: 0 1px 4px rgb(0 0 0 / 40%);
  cursor: help;
}

.wf-persona:first-child { margin-left: 0; }

.wf-persona[data-title]:hover {
  z-index: 5;
}

.wf-persona[data-title]:hover::after {
  content: attr(data-title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 9px;
  border-radius: 7px;
  background: #0f172a;
  border: 1px solid rgb(255 255 255 / 22%);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 6px 14px rgb(0 0 0 / 45%);
}

.wf-persona[data-title]:hover::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #0f172a;
  z-index: 10;
  pointer-events: none;
}

.wf-persona--lg {
  width: 36px;
  height: 36px;
  font-size: 12px;
  margin-left: -8px;
  border-color: #0c4a6e;
}

.wf-persona[data-role="data"]       { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.wf-persona[data-role="content"]    { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.wf-persona[data-role="ai"]         { background: linear-gradient(135deg, #f472b6, #db2777); }
.wf-persona[data-role="marketing"]  { background: linear-gradient(135deg, #fb923c, #ea580c); }
.wf-persona[data-role="automation"] { background: linear-gradient(135deg, #fbbf24, #b45309); }
.wf-persona[data-role="sales"]      { background: linear-gradient(135deg, #34d399, #047857); }
.wf-persona[data-role="onboarding"] { background: linear-gradient(135deg, #38bdf8, #0369a1); }
.wf-persona[data-role="support"]    { background: linear-gradient(135deg, #2dd4bf, #0f766e); }

.wf-team-label {
  margin-left: 8px;
  color: rgb(226 232 240 / 70%);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wf-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
}

.wf-channels span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgb(45 212 191 / 14%);
  color: #5eead4;
  font-size: 10.5px;
  font-weight: 700;
}

.wf-spine-label {
  position: absolute;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgb(56 189 248 / 18%);
  border: 1px solid rgb(125 211 252 / 35%);
  color: #7dd3fc;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wf-hub {
  position: absolute;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 26px 30px;
  border-radius: 22px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgb(255 255 255 / 22%), transparent 55%),
    linear-gradient(135deg, #0c4a6e 0%, #0369a1 30%, #0ea5e9 70%, #38bdf8 100%);
  box-shadow:
    0 0 0 1px rgb(125 211 252 / 35%),
    0 30px 60px rgb(2 132 199 / 45%),
    inset 0 1px 0 rgb(255 255 255 / 18%);
}

.wf-floor {
  position: absolute;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 6%), rgb(255 255 255 / 2%));
  border: 1px dashed rgb(255 255 255 / 26%);
}

.wf-floor-header {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.wf-floor-eyebrow {
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.wf-floor-note {
  color: rgb(226 232 240 / 70%);
  font-size: 13px;
  font-weight: 600;
}

.wf-floor-roles {
  display: flex;
  align-items: stretch;
  gap: 14px;
  flex-wrap: wrap;
}

.wf-floor-role {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgb(255 255 255 / 8%);
  border: 1px solid rgb(255 255 255 / 18%);
  color: #f1f5f9;
}

.wf-floor-role-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgb(255 255 255 / 12%);
  color: #f1f5f9;
}

.wf-floor-role strong {
  display: block;
  font-size: 13px;
  font-weight: 750;
  color: #f8fafc;
  line-height: 1.2;
}

.wf-floor-role small {
  display: block;
  margin-top: 2px;
  color: rgb(226 232 240 / 65%);
  font-size: 11px;
  line-height: 1.3;
}

/* Merged "Onboarding + Intercom hub" centerpiece. Replaces the previous
 * pair (small Onboarding node + large Intercom hub). The onboarding is
 * the unit of work; Intercom + Telegram are how the team operates
 * inside it — visually they belong in one box. */
.wf-onboarding-hub {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 26px 24px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgb(125 211 252 / 16%), rgb(56 189 248 / 8%));
  border: 1px solid rgb(125 211 252 / 35%);
  box-shadow: 0 24px 60px -36px rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
}

.wf-onboarding-hub-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wf-onboarding-hub-num {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: 10px;
  background: rgb(125 211 252 / 28%);
  color: #e0f2fe;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.wf-onboarding-hub-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgb(125 211 252 / 22%);
  color: #7dd3fc;
}

.wf-onboarding-hub-title h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.005em;
}

.wf-onboarding-hub-eyebrow {
  display: inline-block;
  margin-top: 2px;
  color: rgb(186 230 253 / 90%);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wf-onboarding-hub-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgb(241 245 249 / 92%);
}

.wf-onboarding-hub-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px;
  background: rgb(15 23 42 / 35%);
  border: 1px solid rgb(125 211 252 / 18%);
  border-radius: 14px;
}

.wf-onboarding-hub-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wf-onboarding-hub-section-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgb(255 255 255 / 14%);
  color: #fff;
}

.wf-onboarding-hub-section h3 {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.35;
}

.wf-onboarding-hub-section p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgb(226 232 240 / 85%);
}

.wf-onboarding-hub-team {
  position: absolute;
  top: 22px;
  right: 26px;
  display: flex;
  gap: 6px;
}

/* In-flow "artefacto vivo" — sits between sub-phases visually distinct
 * from the linear A/B/C/D sub-cards. Used for the Propuesta comercial
 * which lives across pre-venta + alta as a persistent contract surface,
 * not as a step the team executes once. */
.wf-artifact {
  position: absolute;
  display: flex;
  gap: 16px;
  padding: 16px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgb(34 197 94 / 12%), rgb(20 184 166 / 10%));
  border: 1px solid rgb(110 231 183 / 35%);
  border-left: 4px solid #34d399;
  color: #e2e8f0;
  box-shadow: 0 6px 24px -16px rgba(15, 23, 42, 0.4);
}

.wf-artifact-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: rgb(110 231 183 / 22%);
  color: #6ee7b7;
}

.wf-artifact-body {
  min-width: 0;
}

.wf-artifact-eyebrow {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgb(110 231 183 / 20%);
  border: 1px solid rgb(110 231 183 / 35%);
  color: #6ee7b7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wf-artifact-body h3 {
  margin: 6px 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
}

.wf-artifact-body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgb(226 232 240 / 85%);
}

/* Out-of-canvas footnote about the legacy panel.sinqro.com project flow.
 * Renders after the workflow-canvas div as a regular flow element. */
.workflow-legacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 24px 24px;
  padding: 12px 16px;
  background: rgb(15 23 42 / 35%);
  border: 1px solid rgb(226 232 240 / 12%);
  border-left: 3px solid rgb(148 163 184 / 50%);
  border-radius: 10px;
  color: rgb(226 232 240 / 85%);
}

.workflow-legacy-note .workflow-legacy-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: rgb(148 163 184 / 20%);
  color: rgb(226 232 240 / 75%);
}

.workflow-legacy-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.workflow-legacy-note code {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgb(15 23 42 / 60%);
  border: 1px solid rgb(226 232 240 / 15%);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.wf-hub-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgb(255 255 255 / 22%);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 28%);
}

.wf-hub-body {
  min-width: 0;
}

.wf-hub-eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgb(255 255 255 / 22%);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.wf-hub h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.12;
  color: #fff;
  letter-spacing: -0.005em;
}

.wf-hub p {
  margin: 6px 0 0;
  color: rgb(255 255 255 / 90%);
  font-size: 13.5px;
  line-height: 1.55;
}

.wf-hub-team {
  display: flex;
  align-items: center;
}

.wf-sub {
  position: absolute;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: start;
  gap: 28px;
  padding: 20px 24px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 8%), rgb(255 255 255 / 4%));
  border: 1px solid var(--sub-glow, rgb(255 255 255 / 18%));
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 36px rgb(2 6 23 / 40%);
}

.wf-sub::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  background: var(--sub-glow-bg, transparent);
  opacity: 0.55;
}

.wf-sub > * { position: relative; z-index: 1; }

.wf-sub-main {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.wf-sub-aside {
  display: grid;
  gap: 12px;
  align-content: start;
  border-left: 1px dashed rgb(255 255 255 / 14%);
  padding-left: 22px;
  align-self: stretch;
}

.wf-sub-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wf-sub-letter {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: var(--sub-soft);
  color: var(--sub-ink);
  font-size: 13px;
  font-weight: 800;
}

.wf-sub-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--sub-soft);
  color: var(--sub-ink);
}

.wf-sub h3 {
  margin: 0;
  font-size: 17px;
  color: #f8fafc;
  letter-spacing: -0.005em;
}

.wf-sub p {
  margin: 0;
  color: rgb(226 232 240 / 80%);
  font-size: 13px;
  line-height: 1.5;
}

.wf-sub--a {
  --sub-soft: rgb(52 211 153 / 22%);
  --sub-ink: #6ee7b7;
  --sub-glow: rgb(52 211 153 / 35%);
  --sub-glow-bg: radial-gradient(80% 100% at 50% 0%, rgb(52 211 153 / 12%), transparent 70%);
}

.wf-sub--b {
  --sub-soft: rgb(251 191 36 / 22%);
  --sub-ink: #fcd34d;
  --sub-glow: rgb(251 191 36 / 35%);
  --sub-glow-bg: radial-gradient(80% 100% at 50% 0%, rgb(251 191 36 / 12%), transparent 70%);
}

.wf-sub--c {
  --sub-soft: rgb(167 139 250 / 22%);
  --sub-ink: #c4b5fd;
  --sub-glow: rgb(167 139 250 / 35%);
  --sub-glow-bg: radial-gradient(80% 100% at 50% 0%, rgb(167 139 250 / 12%), transparent 70%);
}

.wf-sub--d {
  --sub-soft: rgb(45 212 191 / 22%);
  --sub-ink: #5eead4;
  --sub-glow: rgb(45 212 191 / 35%);
  --sub-glow-bg: radial-gradient(80% 100% at 50% 0%, rgb(45 212 191 / 12%), transparent 70%);
}

.wf-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgb(251 191 36 / 16%);
  border: 1px solid rgb(251 191 36 / 35%);
  color: #fde68a;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.wf-link:hover {
  background: rgb(251 191 36 / 26%);
  border-color: rgb(251 191 36 / 55%);
  color: #fef3c7;
}

.wf-link-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.wf-link--legacy {
  background: rgb(148 163 184 / 16%);
  border-color: rgb(148 163 184 / 36%);
  color: rgb(226 232 240 / 88%);
}

.wf-link--legacy:hover {
  background: rgb(148 163 184 / 24%);
  border-color: rgb(148 163 184 / 52%);
  color: #f1f5f9;
}

.wf-link-tag {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgb(0 0 0 / 22%);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
}

@media (max-width: 980px) {
  .workflow-canvas {
    aspect-ratio: auto;
  }
}

.email-analytics-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid #d7dee8;
  border-radius: 16px;
  padding: 24px 26px;
  background:
    linear-gradient(135deg, rgb(14 165 233 / 10%), transparent 45%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.email-stats-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.email-date-filter {
  position: relative;
}

.email-date-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #0f172a;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 750;
  box-shadow: 0 8px 18px rgb(15 23 42 / 5%);
}

.email-date-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  width: min(720px, calc(100vw - 32px));
  border: 1px solid #d7dee8;
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 24px 60px rgb(15 23 42 / 20%);
}

.email-date-mode {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #94a3b8;
  border-radius: 999px;
  padding: 2px;
}

.email-date-mode button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 5px 16px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.email-date-mode button.is-active {
  background: #2563eb;
  color: #fff;
}

.email-calendar-nav {
  position: absolute;
  top: 70px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.email-calendar-nav button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #2563eb;
  pointer-events: auto;
}

.email-calendar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 22px;
}

.email-calendar-month h3 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 18px;
  text-align: center;
}

.email-calendar-weekdays,
.email-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.email-calendar-weekdays span {
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.email-calendar-days {
  margin-top: 6px;
}

.email-calendar-days button,
.email-calendar-days > span {
  display: grid;
  min-width: 0;
  height: 35px;
  place-items: center;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  font-size: 14px;
}

.email-calendar-days button:hover {
  background: #eff6ff;
}

.email-calendar-days button.is-in-range {
  background: #dbeafe;
  border-color: #bfdbfe;
}

.email-calendar-days button.is-edge {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  font-weight: 800;
}

.email-calendar-days > span {
  border-color: transparent;
}

.email-date-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.email-date-fields label {
  display: grid;
  gap: 6px;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.email-date-fields input {
  min-height: 36px;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  padding: 0 10px;
  color: #111827;
  font-size: 13px;
}

.email-relative-range {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.email-relative-presets {
  display: grid;
  grid-template-columns: 86px repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
}

.email-relative-presets span,
.email-relative-custom span {
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.email-relative-presets button {
  min-height: 34px;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 13px;
  font-weight: 750;
}

.email-relative-presets button.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.email-relative-custom {
  display: grid;
  grid-template-columns: 150px 260px;
  column-gap: 32px;
  row-gap: 8px;
  max-width: 560px;
}

.email-relative-custom label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.email-relative-custom input,
.email-relative-custom select {
  min-height: 36px;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  color: #111827;
  font-size: 13px;
  width: 100%;
}

.email-relative-preview {
  margin: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.email-date-popover-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  margin: 16px -14px -14px;
  border-top: 1px solid #e2e8f0;
  padding: 14px;
}

.email-stats-content {
  position: relative;
  display: grid;
  gap: 16px;
}

.email-stats-content.is-loading > :not(.email-stats-loading-overlay) {
  filter: blur(3px);
  opacity: 0.45;
  pointer-events: none;
}

.email-stats-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  min-height: 260px;
  place-items: center;
  border-radius: 16px;
  background: rgb(248 250 252 / 30%);
  backdrop-filter: blur(1px);
}

.email-stats-loading-overlay .loading-spinner {
  width: 38px;
  height: 38px;
  border-width: 4px;
}

.email-stats-placeholder .email-stat-widget {
  min-height: 132px;
}

.email-stats-placeholder .email-stat-widget .skeleton-number {
  background: linear-gradient(90deg, rgb(255 255 255 / 24%), rgb(255 255 255 / 48%), rgb(255 255 255 / 24%));
  background-size: 240% 100%;
}

.email-stats-placeholder .email-stat-widget .skeleton-line {
  height: 10px;
  background: linear-gradient(90deg, rgb(255 255 255 / 20%), rgb(255 255 255 / 44%), rgb(255 255 255 / 20%));
  background-size: 240% 100%;
}

.email-chart-placeholder-panel,
.email-audience-placeholder-panel {
  overflow: hidden;
}

.email-chart-placeholder {
  position: relative;
  display: grid;
  height: 282px;
  margin: 8px 16px 0 46px;
  align-content: space-around;
}

.email-chart-placeholder span {
  display: block;
  height: 1px;
  border-top: 1px dashed #dbe4ef;
}

.email-chart-placeholder i {
  position: absolute;
  right: 0;
  bottom: 42px;
  left: 0;
  height: 42%;
  border-radius: 999px 999px 0 0;
  background:
    linear-gradient(180deg, rgb(249 115 22 / 16%), rgb(249 115 22 / 3%)),
    linear-gradient(90deg, transparent 0 8%, #f97316 8% 10%, transparent 10% 32%, #22c55e 32% 35%, transparent 35% 62%, #3b82f6 62% 65%, transparent 65%);
  opacity: 0.75;
}

.email-heatmap-placeholder-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  margin-top: 28px;
}

.email-heatmap-placeholder-grid span {
  height: 8px;
  border-radius: 3px;
  background: color-mix(in srgb, #a855f7 42%, #1e293b);
  opacity: 0.75;
}

.email-audience-placeholder-bars {
  display: grid;
  height: 236px;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  margin: 22px 52px 0 56px;
  border-bottom: 1px solid #e2e8f0;
}

.email-audience-placeholder-bars span {
  height: var(--bar-height);
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #fdba74, #fb923c);
  opacity: 0.74;
}

.email-stat-widget-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.email-stat-widget {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  min-height: 132px;
  border: 0;
  color: #fff;
  box-shadow: 0 18px 34px rgb(15 23 42 / 13%);
}

.email-stat-widget::after {
  content: "";
  position: absolute;
  inset: auto 16px 14px auto;
  width: 120px;
  height: 42px;
  opacity: 0.9;
}

.email-stat-widget-blue { background: linear-gradient(135deg, #1d4ed8, #1e3a8a); }
.email-stat-widget-green { background: linear-gradient(135deg, #15803d, #14532d); }
.email-stat-widget-purple { background: linear-gradient(135deg, #7c3aed, #3b0764); }
.email-stat-widget-amber { background: linear-gradient(135deg, #b77900, #713f12); }
.email-stat-widget-cyan { background: linear-gradient(135deg, #0891b2, #155e75); }

.email-stat-widget-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 12px;
  background: rgb(255 255 255 / 16%);
}

.email-stat-widget p {
  margin: 2px 0 8px;
  color: rgb(255 255 255 / 84%);
  font-size: 13px;
  font-weight: 800;
}

.email-stat-widget strong {
  display: block;
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

.email-stat-widget small {
  grid-column: 1 / -1;
  color: rgb(255 255 255 / 76%);
  font-size: 13px;
  font-weight: 700;
}

.email-widget-sparkline {
  position: absolute;
  right: 16px;
  bottom: 12px;
  width: 120px;
  height: 42px;
  fill: none;
}

.email-widget-sparkline polyline {
  stroke: rgb(255 255 255 / 72%);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.email-analytics-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.75fr);
  align-items: stretch;
  gap: 16px;
}

.email-audience-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.email-analytics-split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 16px;
}

.email-analytics-panel h2 {
  margin-bottom: 4px;
}

.email-performance-panel,
.email-heatmap-panel {
  position: relative;
  min-height: 450px;
  height: 450px;
}

.email-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 16px 0 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.email-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.email-chart-legend span::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.email-chart-legend .is-blue::before { background: #3b82f6; }
.email-chart-legend .is-green::before { background: #22c55e; }
.email-chart-legend .is-purple::before { background: #f59e0b; }

.email-performance-chart {
  display: block;
  width: 100%;
  height: 300px;
  max-height: none;
  min-height: 0;
}

.email-performance-chart line {
  stroke: #e2e8f0;
  stroke-dasharray: 5 5;
}

.email-performance-chart .email-chart-hover-line {
  stroke: #94a3b8;
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.email-performance-chart path {
  fill: none;
}

.email-performance-chart .line-delivered,
.email-performance-chart .line-opened,
.email-performance-chart .line-clicks,
.email-performance-chart polyline {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.email-performance-chart .area-delivered {
  fill: url("#email-area-delivered");
}

.email-performance-chart .area-opened {
  fill: url("#email-area-opened");
}

.email-performance-chart .area-clicks {
  fill: url("#email-area-clicks");
}

.email-performance-chart text {
  fill: #64748b;
  font-size: 12px;
  text-anchor: middle;
}

.email-performance-chart .email-chart-y-label {
  fill: #94a3b8;
  font-size: 11px;
  font-weight: 750;
  text-anchor: end;
}

.email-performance-chart .email-chart-y-label.is-right,
.email-audience-chart .email-chart-y-label.is-right {
  text-anchor: start;
}

.line-delivered { stroke: #f59e0b; }
.line-opened { stroke: #2563eb; }
.line-clicks { stroke: #22c55e; }
.dot-delivered { fill: #f59e0b; }
.dot-opened { fill: #2563eb; }
.dot-clicks { fill: #22c55e; }

.email-chart-hit-zone {
  fill: transparent;
  cursor: crosshair;
}

.email-chart-tooltip {
  position: absolute;
  top: 118px;
  z-index: 5;
  display: grid;
  min-width: 210px;
  gap: 7px;
  transform: translateX(-50%);
  border: 1px solid #d7dee8;
  border-radius: 12px;
  background: rgb(255 255 255 / 96%);
  padding: 11px 12px;
  color: #0f172a;
  box-shadow: 0 18px 34px rgb(15 23 42 / 14%);
  pointer-events: none;
}

.email-chart-tooltip strong {
  font-size: 13px;
}

.email-chart-tooltip span {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 750;
}

.email-chart-tooltip i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.email-chart-tooltip b {
  color: #111827;
}

.email-chart-tooltip .is-purple { background: #f59e0b; }
.email-chart-tooltip .is-blue { background: #2563eb; }
.email-chart-tooltip .is-green { background: #22c55e; }

.email-audience-panel {
  position: relative;
  min-height: 410px;
}

.email-audience-legend {
  margin-top: 14px;
}

.email-audience-chart {
  display: block;
  width: 100%;
  height: 318px;
}

.email-audience-chart line {
  stroke: #e2e8f0;
  stroke-dasharray: 5 5;
}

.email-audience-chart polyline {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.email-audience-chart text {
  fill: #64748b;
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
}

.email-audience-chart .email-audience-x-label {
  fill: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-anchor: end;
}

.email-audience-chart .email-chart-y-label {
  fill: #94a3b8;
  font-size: 11px;
  font-weight: 750;
  text-anchor: end;
}

.email-audience-chart .email-audience-bar {
  fill: #f59e0b;
  opacity: 0.82;
}

.email-audience-tooltip {
  top: 106px;
}

.email-audience-map-panel {
  overflow: hidden;
}

.email-audience-map-controls {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #d7dee8;
  border-radius: 12px;
  background: #f8fafc;
  padding: 3px;
}

.email-audience-map-controls button {
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 8px 11px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.email-audience-map-controls button:hover {
  color: #0f172a;
}

.email-audience-map-controls button.is-active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 8px 18px rgb(37 99 235 / 22%);
}

.email-audience-map-wrap {
  position: relative;
  overflow: hidden;
  height: 360px;
  margin-top: 14px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: #eaf1f7;
}

.email-audience-map {
  width: 100%;
  height: 100%;
}

.email-audience-map .maplibregl-canvas {
  outline: none;
}

.email-audience-map-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(248 250 252 / 62%);
  color: #475569;
  font-size: 14px;
  font-weight: 800;
}

.email-audience-map-legend {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  min-width: 220px;
  gap: 6px;
  border: 1px solid rgb(15 23 42 / 10%);
  border-radius: 12px;
  background: rgb(255 255 255 / 92%);
  padding: 10px 12px;
  color: #0f172a;
  box-shadow: 0 16px 34px rgb(15 23 42 / 16%);
}

.email-audience-map-legend strong {
  font-size: 13px;
}

.email-audience-map-legend span {
  color: #475569;
  font-size: 12px;
  font-weight: 750;
}

.email-audience-map-legend i {
  display: block;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--map-color), #be185d);
}

.email-audience-map-placeholder {
  position: relative;
  overflow: hidden;
  height: 360px;
  margin-top: 14px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgb(226 232 240 / 70%), rgb(241 245 249 / 80%)),
    radial-gradient(circle at 42% 46%, rgb(59 130 246 / 22%), transparent 18%);
}

.email-audience-map-placeholder span {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: radial-gradient(circle, rgb(249 115 22 / 48%), rgb(249 115 22 / 10%) 62%, transparent 70%);
}

.email-audience-map-placeholder span:nth-child(3n + 1) {
  background: radial-gradient(circle, rgb(37 99 235 / 42%), rgb(37 99 235 / 9%) 62%, transparent 70%);
}

.email-audience-map-placeholder span:nth-child(3n + 2) {
  background: radial-gradient(circle, rgb(34 197 94 / 38%), rgb(34 197 94 / 8%) 62%, transparent 70%);
}

.email-audience-map-placeholder span:nth-child(1) { left: 42%; top: 34%; }
.email-audience-map-placeholder span:nth-child(2) { left: 47%; top: 46%; }
.email-audience-map-placeholder span:nth-child(3) { left: 38%; top: 50%; }
.email-audience-map-placeholder span:nth-child(4) { left: 54%; top: 28%; }
.email-audience-map-placeholder span:nth-child(5) { left: 32%; top: 60%; }
.email-audience-map-placeholder span:nth-child(6) { left: 58%; top: 55%; }
.email-audience-map-placeholder span:nth-child(7) { left: 44%; top: 18%; }
.email-audience-map-placeholder span:nth-child(8) { left: 50%; top: 64%; }
.email-audience-map-placeholder span:nth-child(9) { left: 35%; top: 26%; }
.email-audience-map-placeholder span:nth-child(10) { left: 62%; top: 42%; }
.email-audience-map-placeholder span:nth-child(11) { left: 27%; top: 42%; }
.email-audience-map-placeholder span:nth-child(12) { left: 68%; top: 30%; }
.email-audience-map-placeholder span:nth-child(13) { left: 40%; top: 72%; }
.email-audience-map-placeholder span:nth-child(14) { left: 56%; top: 72%; }
.email-audience-map-placeholder span:nth-child(15) { left: 24%; top: 66%; }
.email-audience-map-placeholder span:nth-child(16) { left: 70%; top: 62%; }
.email-audience-map-placeholder span:nth-child(17) { left: 48%; top: 24%; }
.email-audience-map-placeholder span:nth-child(18) { left: 60%; top: 18%; }

.email-heatmap-panel {
  min-height: 0;
  background: linear-gradient(135deg, #0f172a, #111827);
  color: #e5e7eb;
}

.email-heatmap-panel .muted,
.email-heatmap-panel h2 {
  color: #e5e7eb;
}

.email-heatmap-days {
  display: grid;
  grid-template-columns: 36px repeat(7, minmax(0, 1fr));
  margin: 12px 0 5px;
  color: rgb(226 232 240 / 76%);
  font-size: 11px;
  font-weight: 800;
}

.email-heatmap-days span {
  text-align: center;
}

.email-heatmap-days::before {
  content: "";
}

.email-heatmap-grid {
  display: grid;
  gap: 2px;
}

.email-heatmap-row {
  display: grid;
  grid-template-columns: 36px repeat(7, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
}

.email-heatmap-row strong {
  color: rgb(226 232 240 / 82%);
  font-size: 10px;
  line-height: 1;
}

.email-heatmap-row button {
  position: relative;
  display: grid;
  min-width: 0;
  height: 8px;
  place-items: center;
  border: 0;
  border-radius: 3px;
  background: color-mix(in srgb, #a855f7 var(--activity-percent), #1e293b);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 4%);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.email-heatmap-row button:hover,
.email-heatmap-row button:focus-visible,
.email-heatmap-row button.is-hovered {
  z-index: 2;
  transform: scale(1.12);
  outline: none;
  box-shadow: 0 0 0 2px rgb(255 255 255 / 28%), 0 8px 18px rgb(0 0 0 / 22%);
}

.email-heatmap-row button span {
  opacity: 0;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.email-heatmap-row button:hover span,
.email-heatmap-row button:focus-visible span,
.email-heatmap-row button.is-hovered span {
  opacity: 1;
}

.email-heatmap-tooltip {
  position: absolute;
  right: 16px;
  bottom: 42px;
  display: grid;
  gap: 3px;
  min-width: 132px;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 10px;
  background: rgb(15 23 42 / 92%);
  padding: 8px 10px;
  color: #e5e7eb;
  box-shadow: 0 18px 34px rgb(0 0 0 / 22%);
  pointer-events: none;
}

.email-heatmap-tooltip strong {
  font-size: 12px;
}

.email-heatmap-tooltip span {
  color: rgb(226 232 240 / 78%);
  font-size: 12px;
  font-weight: 750;
}

.email-heatmap-scale {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  color: rgb(226 232 240 / 76%);
  font-size: 11px;
  font-weight: 700;
}

.email-heatmap-scale i {
  width: 132px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1e293b, #312e81, #6d28d9, #a855f7);
}

.email-funnel {
  display: grid;
  gap: 14px;
}

.email-funnel-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 12px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.email-funnel-row div,
.email-mini-bar {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
}

.email-funnel-row i,
.email-mini-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #0ea5e9);
}

.email-funnel-row strong {
  color: #111827;
  text-align: right;
}

.email-status-bars {
  display: grid;
  gap: 10px;
}

.email-status-bars div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8fafc;
}

.email-status-bars span {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.email-status-bars strong {
  color: #111827;
  font-size: 20px;
}

.email-analytics-table td {
  vertical-align: middle;
}

.email-campaign-parent-row {
  background: #fbfdff;
}

.email-campaign-parent-row td {
  border-top: 1px solid #dbe4f0;
  font-weight: 750;
}

.email-campaign-child-row {
  background: #fff;
}

.email-campaign-child-row td {
  border-top-color: #edf2f7;
}

.email-campaign-name-cell,
.email-campaign-child-cell {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: flex-start;
  gap: 8px;
}

.email-campaign-child-cell {
  padding-left: 22px;
}

.email-campaign-child-cell > span {
  display: block;
  width: 20px;
  height: 28px;
  border-bottom: 1px solid #cbd5e1;
  border-left: 1px solid #cbd5e1;
  border-bottom-left-radius: 8px;
}

.email-campaign-expand-button,
.email-campaign-expand-spacer {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
}

.email-campaign-expand-button {
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  cursor: pointer;
}

.email-campaign-expand-button:hover {
  border-color: #93c5fd;
  color: #2563eb;
}

.email-campaign-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
}

.email-mini-bar {
  width: min(220px, 100%);
  height: 6px;
  margin-top: 8px;
}

@media (max-width: 980px) {
  .home-hero,
  .email-analytics-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-insight-grid,
  .home-actions-grid,
  .email-analytics-grid,
  .email-stat-widget-grid,
  .email-analytics-main-grid,
  .email-audience-grid,
  .email-analytics-split {
    grid-template-columns: 1fr;
  }

  .workflow-megacard {
    grid-template-columns: 1fr;
  }

  .workflow-megacard-cta {
    justify-self: start;
  }

  .workflow-fullscreen {
    padding: 20px 18px 56px;
  }

  .workflow-fullscreen-header h1 {
    font-size: 24px;
  }

  .workflow-fullscreen-header p {
    font-size: 13px;
  }

  .email-stats-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .email-date-popover {
    position: fixed;
    inset: 70px 12px auto;
    width: auto;
  }

  .email-calendar-grid,
  .email-date-fields {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   Bulk action bar + toasts + per-item feedback (ads publishing/drafts)
   ===================================================================== */

.bulk-bar {
  position: sticky;
  top: 8px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 14px 12px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1f1147, #4c1d95 55%, #6d28d9);
  color: #fff;
  box-shadow: 0 16px 36px rgb(76 29 149 / 28%), 0 0 0 1px rgb(255 255 255 / 10%);
  animation: bulk-bar-in 0.22s ease;
}

@keyframes bulk-bar-in {
  from { transform: translateY(-6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.bulk-bar-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 650;
}

.bulk-bar-count {
  display: inline-flex;
  min-width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgb(255 255 255 / 22%);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.bulk-bar-link {
  border: 0;
  background: transparent;
  color: rgb(255 255 255 / 80%);
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.bulk-bar-link:hover { color: #fff; }

.bulk-bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.bulk-bar-actions .copy-button {
  border-color: rgb(255 255 255 / 28%);
  background: rgb(255 255 255 / 10%);
  color: #fff;
  backdrop-filter: blur(8px);
}

.bulk-bar-actions .copy-button:hover:not(:disabled) {
  border-color: rgb(255 255 255 / 55%);
  background: rgb(255 255 255 / 18%);
  color: #fff;
}

.bulk-bar-actions .copy-button.is-primary-action {
  background: linear-gradient(135deg, #f0abfc, #c084fc, #a855f7);
  color: #1e1b4b;
  border-color: transparent;
}

.bulk-bar-actions .copy-button.is-primary-action:hover:not(:disabled) {
  filter: brightness(1.05);
}

.bulk-bar-actions .copy-button.danger {
  background: rgb(254 226 226 / 14%);
  border-color: rgb(254 202 202 / 36%);
  color: #fecaca;
}

.bulk-bar-actions .copy-button.danger:hover:not(:disabled) {
  background: rgb(254 226 226 / 22%);
  color: #fff;
}

.bulk-bar-close {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 999px;
  background: transparent;
  color: rgb(255 255 255 / 78%);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.bulk-bar-close:hover {
  border-color: rgb(255 255 255 / 50%);
  background: rgb(255 255 255 / 12%);
  color: #fff;
}

/* Card / row selection state */
.ad-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.ad-card-check {
  position: relative;
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  flex: 0 0 22px;
  margin-top: 2px;
  cursor: pointer;
}

.ad-card-check input {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ad-card-check input:hover {
  border-color: #a855f7;
}

.ad-card-check input:checked {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border-color: transparent;
  box-shadow: 0 4px 10px rgb(124 58 237 / 28%);
}

.ad-card-check span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.ad-card-check input:checked + span::after {
  content: "✓";
  font-size: 13px;
  font-weight: 900;
}

.ad-card-check input:checked + span {
  opacity: 1;
}

.ad-card-title {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.ad-card {
  position: relative;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.2s ease;
}

.ad-card.is-selected {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgb(168 85 247 / 18%), 0 10px 24px rgb(124 58 237 / 14%);
}

.ad-card.is-pending {
  opacity: 0.82;
  filter: saturate(0.9);
}

.ad-card.is-pending::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgb(168 85 247 / 8%), transparent);
  animation: pending-sweep 1.4s linear infinite;
  pointer-events: none;
}

@keyframes pending-sweep {
  from { background-position: -120% 0; }
  to { background-position: 120% 0; }
}

.ad-card.is-done {
  border-color: #22c55e;
  background: linear-gradient(180deg, rgb(220 252 231 / 60%), #fff 40%);
  animation: done-pulse 1.2s ease-out;
}

@keyframes done-pulse {
  0% { box-shadow: 0 0 0 0 rgb(34 197 94 / 35%); }
  100% { box-shadow: 0 0 0 14px rgb(34 197 94 / 0%); }
}

.ad-card-done {
  position: absolute;
  top: 10px;
  right: 64px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 16px rgb(34 197 94 / 30%);
  animation: done-chip 1.4s ease both;
}

@keyframes done-chip {
  0% { opacity: 0; transform: translateY(-4px) scale(0.9); }
  10% { opacity: 1; transform: translateY(0) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-2px); }
}

/* Table row selection */
tbody tr.is-selected {
  background: color-mix(in srgb, #a855f7 8%, #fff);
  box-shadow: inset 3px 0 0 #a855f7;
}

tbody tr.is-pending {
  opacity: 0.7;
}

tbody tr.is-done {
  background: color-mix(in srgb, #22c55e 10%, #fff);
  animation: row-done 1.4s ease-out;
}

@keyframes row-done {
  0% { background: color-mix(in srgb, #22c55e 22%, #fff); }
  100% { background: color-mix(in srgb, #22c55e 6%, #fff); }
}

.row-done {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
}

.select-cell input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #a855f7;
  cursor: pointer;
}

/* Toast stack */
.toast-stack {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 18px 38px rgb(15 23 42 / 30%);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid rgb(255 255 255 / 8%);
  animation: toast-in 0.22s ease;
}

@keyframes toast-in {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-success {
  background: linear-gradient(135deg, #064e3b, #047857);
  border-color: rgb(167 243 208 / 14%);
}

.toast-error {
  background: linear-gradient(135deg, #7f1d1d, #b91c1c);
  border-color: rgb(254 202 202 / 14%);
}

.toast-info {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  border-color: rgb(191 219 254 / 14%);
}

.toast-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: rgb(255 255 255 / 14%);
  color: #fff;
  flex: 0 0 28px;
}

.toast-text {
  flex: 1;
  line-height: 1.35;
}

.toast-close {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 12%);
  color: rgb(255 255 255 / 75%);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.toast-close:hover {
  background: rgb(255 255 255 / 24%);
  color: #fff;
}

/* Provider logo (Google Ads / Meta Ads) */
.provider-logo {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  gap: 6px;
  line-height: 1;
}

.provider-logo svg {
  display: block;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgb(15 23 42 / 14%), 0 0 0 1px rgb(15 23 42 / 4%);
}

.provider-logo.with-label {
  border-radius: 999px;
  padding: 3px 9px 3px 4px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--crm-border) 80%, transparent);
  font-size: 12px;
  font-weight: 700;
  color: var(--crm-text);
}

.provider-logo.is-google.with-label {
  border-color: color-mix(in srgb, #4285f4 28%, var(--crm-border));
}

.provider-logo.is-meta.with-label {
  border-color: color-mix(in srgb, #a1006b 28%, var(--crm-border));
}

.ad-card-provider,
.provider-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.provider-line .provider-logo,
.ad-card-provider .provider-logo {
  margin-right: 2px;
}

/* Adjust provider-pill (campaigns page) to absorb the logo neatly */
.provider-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.provider-pill .provider-logo svg {
  box-shadow: 0 1px 2px rgb(15 23 42 / 12%);
}

/* =====================================================================
   Ads table — dense but breathable, thumbnail + content layout
   ===================================================================== */

.ads-table-wrap {
  border: 1px solid color-mix(in srgb, var(--crm-border) 75%, transparent);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  margin-top: 4px;
}

.ads-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.ads-table thead {
  background: linear-gradient(180deg, #fbfbfd, #f3f4f8);
}

.ads-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid color-mix(in srgb, var(--crm-border) 80%, transparent);
  background: linear-gradient(180deg, #fbfbfd, #f3f4f8);
  color: var(--crm-muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 14px;
  text-align: left;
  white-space: nowrap;
}

.ads-table tbody tr {
  transition: background 0.15s ease;
}

.ads-table tbody tr + tr td {
  border-top: 1px solid var(--crm-divider);
}

.ads-table td {
  padding: 14px;
  border-bottom: 0;
  vertical-align: middle;
}

.ads-table tbody tr:hover {
  background: color-mix(in srgb, #a855f7 4%, #fff);
}

.ads-table .select-cell {
  width: 44px;
  text-align: center;
  padding-inline: 10px;
}

.ads-table .select-cell input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #a855f7;
  cursor: pointer;
  vertical-align: middle;
}

.ads-table-actions-cell {
  width: 1%;
  white-space: nowrap;
  padding-right: 18px;
}

.ads-table-row-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
}

.ads-table-row-actions .copy-button {
  white-space: nowrap;
}

/* Ad cell — thumbnail + content */
.ads-table-ad {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 280px;
}

.ads-table-thumb {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
    linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f1f5f9 75%),
    linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
  background-color: #fff;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-size: 12px 12px;
  border: 1px solid var(--crm-border);
  display: grid;
  place-items: center;
}

.ads-table-thumb img,
.ads-table-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ads-table-thumb-text {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
}

.ads-table-ad-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ads-table-ad-info strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--crm-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ads-table-ad-headline {
  font-size: 12px;
  color: var(--crm-muted-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}

.ads-table-ad-provider {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--crm-muted);
  font-weight: 600;
  margin-top: 2px;
}

.ads-table-ad-ids {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--crm-muted, #5a6473);
}

.ads-table-ad-ids a {
  color: inherit;
}

.ads-table-ad-ids a:hover {
  color: var(--crm-brand);
}

.ads-table-campaign {
  display: grid;
  gap: 2px;
  min-width: 0;
}

/* Targeting column: keyword set + geo + languages summary. */
.ads-table-targeting {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  max-width: 240px;
}

.ads-table-targeting-row {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 6px;
  align-items: baseline;
  min-width: 0;
}

.ads-table-targeting-row > .muted:first-child {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--crm-muted, #5a6473);
}

.ads-table-targeting-row > strong {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--crm-text, #1f2937);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ads-table-targeting-meta {
  grid-column: 2;
  font-size: 11px;
  color: var(--crm-muted, #5a6473);
  text-transform: lowercase;
  margin-top: -2px;
}

.ads-table-targeting-name {
  grid-column: 2;
  font-size: 11px;
  color: var(--crm-muted, #5a6473);
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ads-table-campaign strong {
  font-size: 13px;
  font-weight: 650;
  color: var(--crm-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.ads-table-campaign span {
  font-size: 11.5px;
  color: var(--crm-muted);
  text-transform: capitalize;
}

.ads-table-run,
.ads-table-budget,
.ads-table-creatives {
  display: grid;
  gap: 2px;
  font-size: 12px;
  white-space: nowrap;
}

.ads-table-run span:first-child,
.ads-table-budget strong,
.ads-table-creatives strong {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--crm-text);
}

.ads-table-run .muted,
.ads-table-budget .muted,
.ads-table-creatives .muted {
  font-size: 11px;
}

/* "Siguiente paso" cell — plain hint, not a chip/button. The previous pill
   styling read as a clickable element (it isn't) and competed with the real
   status badge in the row. */
.ads-table-next {
  display: block;
  font-size: 12px;
  color: var(--crm-muted-strong, #475569);
  line-height: 1.35;
  max-width: 200px;
}

.ads-table-next.muted {
  color: var(--crm-muted, #5a6473);
}

/* Selected / pending / done state for table rows */
.ads-table tbody tr.is-selected {
  background: color-mix(in srgb, #a855f7 7%, #fff);
  box-shadow: inset 3px 0 0 #a855f7;
}

.ads-table tbody tr.is-selected:hover {
  background: color-mix(in srgb, #a855f7 11%, #fff);
}

.ads-table tbody tr.is-pending td {
  opacity: 0.6;
}

.ads-table tbody tr.is-done {
  animation: row-done-soft 1.6s ease-out;
}

@keyframes row-done-soft {
  0% { background: color-mix(in srgb, #22c55e 16%, #fff); }
  100% { background: transparent; }
}

@media (max-width: 1100px) {
  .ads-table-ad-headline {
    max-width: 200px;
  }
}

@media (max-width: 900px) {
  .ads-table thead {
    display: none;
  }

  .ads-table,
  .ads-table tbody,
  .ads-table tr,
  .ads-table td {
    display: block;
    width: 100%;
  }

  .ads-table tbody tr {
    border: 1px solid var(--crm-divider);
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 8px;
  }

  .ads-table tbody tr + tr td {
    border-top: 0;
  }

  .ads-table td {
    padding: 8px;
  }

  .ads-table-actions-cell {
    padding-right: 8px;
  }

  .ads-table .select-cell {
    position: absolute;
    right: 12px;
    width: auto;
    padding: 0;
  }
}

.ad-gen-budget input,
.ad-gen-budget select {
  min-height: 44px;
  border: 1px solid color-mix(in srgb, var(--crm-border) 78%, transparent);
  border-radius: 12px;
  background: #fff;
  padding: 0 10px;
  font-size: 14px;
}

.ad-gen-campaign-card {
  display: grid;
  gap: 4px;
  align-content: center;
  grid-column: 1 / -1;
  border: 1px solid color-mix(in srgb, var(--crm-brand) 30%, var(--crm-border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--crm-brand) 6%, #fff);
  padding: 12px 14px;
}

.ad-gen-campaign-card strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--crm-text);
}

.ad-gen-campaign-card span {
  font-size: 12px;
  color: var(--crm-muted-strong);
}

.ad-gen-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 4px;
}

.ad-gen-cta-hint {
  margin: 0;
  max-width: 540px;
  color: var(--crm-muted-strong);
  font-size: 13px;
}

.ad-gen-cta {
  min-height: 52px;
  padding: 0 24px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--crm-brand), color-mix(in srgb, var(--crm-brand) 60%, #6366f1));
  box-shadow: 0 16px 32px color-mix(in srgb, var(--crm-brand) 26%, transparent);
}

.ad-gen-cta:hover:not(:disabled) {
  filter: brightness(1.04);
}

/* Result split */
.ad-gen-result {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
}

.ad-gen-result-eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--crm-brand) 12%, #fff);
  color: var(--crm-brand);
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ad-gen-result-preview,
.ad-gen-result-edit {
  display: grid;
  gap: 14px;
  min-width: 0;
}

/* ───── AI Assistant: rich editor (multi-headline, multi-description, kw lists) ───── */

.ad-gen-readiness {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.ad-gen-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.ad-gen-pill.is-ok {
  background: color-mix(in srgb, #10b981 12%, transparent);
  border-color: color-mix(in srgb, #10b981 35%, transparent);
  color: #065f46;
}

.ad-gen-pill.is-low {
  background: color-mix(in srgb, #f59e0b 14%, transparent);
  border-color: color-mix(in srgb, #f59e0b 35%, transparent);
  color: #92400e;
}

.ad-gen-multi-block {
  border: 1px solid color-mix(in srgb, var(--crm-border) 75%, transparent);
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

.ad-gen-multi-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}

.ad-gen-multi-head strong {
  font-size: 14px;
}

.ad-gen-multi-head .muted {
  flex: 1;
  font-size: 12px;
  color: var(--crm-text-muted);
}

.ad-gen-multi-row {
  display: grid;
  grid-template-columns: 28px 1fr auto 28px;
  align-items: center;
  gap: 8px;
}

.ad-gen-multi-row textarea {
  resize: vertical;
}

.ad-gen-multi-idx {
  font-size: 11px;
  font-weight: 700;
  color: var(--crm-text-muted);
  text-align: center;
}

.ad-gen-multi-remove {
  background: transparent;
  border: 0;
  font-size: 18px;
  line-height: 1;
  color: var(--crm-text-muted);
  cursor: pointer;
  padding: 0 4px;
}

.ad-gen-multi-remove:hover:not(:disabled) {
  color: #dc2626;
}

.ad-gen-multi-remove:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.ad-gen-collapsible {
  border: 1px solid color-mix(in srgb, var(--crm-border) 75%, transparent);
  border-radius: 14px;
  background: #fff;
  padding: 10px 14px;
  font-size: 13px;
}

.ad-gen-collapsible summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ad-gen-collapsible summary .muted {
  font-size: 12px;
  color: var(--crm-text-muted);
}

.ad-gen-kw-grid {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.ad-gen-kw-row {
  display: grid;
  grid-template-columns: 1fr 110px 28px;
  gap: 8px;
  align-items: center;
}

.ad-gen-kw-row input,
.ad-gen-kw-row select {
  padding: 6px 10px;
}

.ad-gen-suggestion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.ad-gen-suggestion-grid p {
  margin: 4px 0 0;
  font-size: 13px;
}

.ad-gen-preview-card {
  margin: 0;
  box-shadow: 0 18px 44px rgb(15 23 42 / 9%);
}

.ad-gen-rationale {
  border: 1px solid color-mix(in srgb, var(--crm-border) 75%, transparent);
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px;
  font-size: 13px;
}

.ad-gen-rationale summary {
  cursor: pointer;
  color: var(--crm-brand);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ad-gen-rationale ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--crm-muted-strong);
  line-height: 1.5;
}

.ad-gen-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--crm-border) 75%, transparent);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--crm-elev-1);
}

.ad-gen-save-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 1080px) {
  .ad-gen-result {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .ad-gen-composer {
    padding: 22px;
  }

  .ad-gen-composer-head h2 {
    font-size: 20px;
  }

  .ad-gen-textarea {
    font-size: 16px;
    min-height: 120px;
  }

  .ad-gen-budget {
    grid-template-columns: 1fr;
  }

  .ad-gen-field-grow {
    grid-column: span 1;
  }

  .ad-gen-edit-grid {
    grid-template-columns: 1fr;
  }
}

/* Contact action buttons (Call / Email / WhatsApp / Telegram / Onboarding).
   Visually a real button (rounded RECTANGLE, not full pill, with subtle shadow)
   to keep them clearly separate from the status / next-action chips, which use
   border-radius: 999px. The colored fill conveys channel identity at a glance:
   green = phone/whatsapp, blue = email, purple = telegram, orange = onboarding. */
.contact-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-height: 34px;
  max-width: 100%;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--crm-text);
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.contact-action-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.contact-action-button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06) inset;
}

.contact-action-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-action-button svg {
  flex: 0 0 auto;
}

.contact-action-button.is-compact {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
  gap: 6px;
  border-radius: 7px;
}

.contact-action-button.call-action {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.contact-action-button.call-action:hover:not(:disabled) {
  background: #d1fae5;
  border-color: #34d399;
  box-shadow: 0 2px 6px rgb(16 185 129 / 18%);
}

.contact-action-button.email-action {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.contact-action-button.email-action:hover:not(:disabled) {
  background: #dbeafe;
  border-color: #60a5fa;
  box-shadow: 0 2px 6px rgb(59 130 246 / 18%);
}

.contact-action-button.telegram-action {
  background: #ffffff;
  border-color: #cbd5e1;
  color: var(--crm-brand);
}

.contact-action-button.telegram-action:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: 0 2px 6px rgb(37 99 235 / 14%);
}

.contact-action-button.whatsapp-action {
  background: #ecfdf5;
  border-color: #86efac;
  color: #047857;
}

.contact-action-button.whatsapp-action:hover:not(:disabled) {
  background: #d1fae5;
  border-color: #22c55e;
  box-shadow: 0 2px 6px rgb(34 197 94 / 20%);
}

.contact-action-button.onboarding-action {
  background: #ffffff;
  border-color: #cbd5e1;
  color: var(--crm-brand);
}

.contact-action-button.onboarding-action:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: 0 2px 6px rgb(37 99 235 / 14%);
}

.contact-action-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.contact-action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.contact-action-stack.vertical {
  display: grid;
  align-items: start;
}

.lead-info-grid .contact-action-button {
  justify-content: flex-start;
  width: max-content;
  max-width: 100%;
}

.email-action-modal {
  max-width: 560px;
}

.email-action-value {
  display: grid;
  gap: 4px;
  margin: 20px 22px 0;
  padding: 16px 18px;
  border: 1px solid var(--modal-accent-border);
  border-radius: 16px;
  background: var(--modal-accent-soft);
}

.email-action-value span {
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.email-action-value strong {
  overflow-wrap: anywhere;
  color: var(--modal-accent);
  font-size: 17px;
}

.email-action-options {
  display: grid;
  gap: 10px;
  padding: 14px 22px 22px;
}

.whatsapp-template-field {
  display: grid;
  gap: 8px;
  margin: 14px 22px 0;
}

.whatsapp-disabled-state {
  display: grid;
  gap: 12px;
  margin: 18px 22px 0;
  padding: 16px 18px;
  border: 1px solid #fecaca;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff7f7 0%, #fff 100%);
  color: #7f1d1d;
}

.whatsapp-disabled-state div {
  display: grid;
  gap: 5px;
}

.whatsapp-disabled-state strong {
  color: #991b1b;
  font-size: 16px;
  font-weight: 900;
}

.whatsapp-disabled-state span,
.whatsapp-disabled-state small {
  color: #7f1d1d;
  line-height: 1.45;
}

.whatsapp-disabled-state small {
  padding-top: 10px;
  border-top: 1px solid #fee2e2;
  color: #b91c1c;
  font-weight: 750;
}

.whatsapp-template-card {
  display: grid;
  gap: 4px;
  margin: 12px 22px 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--modal-accent) 26%, var(--crm-border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--modal-accent) 7%, #fff);
}

.whatsapp-template-field span,
.whatsapp-template-card span,
.whatsapp-intercom-fallback strong {
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.whatsapp-template-card strong {
  color: var(--modal-accent);
  font-size: 16px;
}

.whatsapp-template-card select {
  width: 100%;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: var(--modal-accent);
  font: inherit;
  font-weight: 800;
}

.whatsapp-template-card select:disabled {
  opacity: 1;
  cursor: default;
}

.whatsapp-template-preview {
  width: 100%;
  border: 1px solid var(--crm-border);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  color: var(--crm-text);
  font: inherit;
  line-height: 1.5;
  white-space: pre-wrap;
}

.whatsapp-template-field small,
.whatsapp-template-card small,
.whatsapp-intercom-fallback small {
  color: var(--crm-muted);
  line-height: 1.4;
}

.whatsapp-send-button {
  min-width: 170px;
}

.whatsapp-intercom-fallback {
  display: grid;
  gap: 4px;
  margin: 10px 22px 0;
  padding-top: 14px;
  border-top: 1px solid var(--crm-border);
}

.whatsapp-fallback-actions {
  padding-top: 12px;
}

.email-action-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  border: 1px solid var(--crm-border);
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
  color: var(--crm-text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.email-action-option:hover {
  border-color: color-mix(in srgb, var(--modal-accent) 55%, var(--crm-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--modal-accent) 11%, transparent);
}

.email-action-option span {
  display: grid;
  gap: 3px;
}

.email-action-option small {
  color: var(--crm-muted);
  font-size: 12px;
}

.platform-users-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.platform-users-section-head h2 {
  margin: 0 0 4px;
}

.platform-users-section-head p {
  margin: 0;
}

.platform-users-add-panel {
  padding-bottom: 22px;
}

.platform-users-add-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(180px, 0.7fr) auto;
  gap: 14px;
  align-items: end;
}

.platform-users-submit {
  display: flex;
  align-items: end;
}

.platform-users-submit .button {
  min-height: 48px;
}

.platform-users-panel {
  overflow: hidden;
}

.platform-users-list {
  display: grid;
  border: 1px solid color-mix(in srgb, var(--crm-border) 84%, transparent);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.platform-user-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) minmax(230px, 0.9fr) minmax(420px, 1.15fr);
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid color-mix(in srgb, var(--crm-border) 75%, transparent);
}

.platform-user-row:last-child {
  border-bottom: 0;
}

.platform-user-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.platform-user-avatar {
  display: inline-flex;
  flex: 0 0 46px;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid color-mix(in srgb, var(--crm-brand) 28%, var(--crm-border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--crm-brand) 10%, #fff);
  color: var(--crm-brand);
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.platform-user-identity {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.platform-user-identity strong,
.platform-user-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-user-identity strong {
  color: var(--crm-text);
  font-size: 15px;
}

.platform-user-identity span {
  color: var(--crm-muted);
  font-size: 13px;
  font-weight: 700;
}

.platform-user-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.platform-user-meta span {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--crm-border) 80%, transparent);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--crm-surface-muted, #f8fafc);
}

.platform-user-meta small,
.platform-user-role-field span {
  color: var(--crm-muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.platform-user-meta strong {
  overflow: hidden;
  color: var(--crm-text);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-user-controls {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 12px;
  align-items: end;
}

.platform-user-role-field {
  display: grid;
  gap: 6px;
}

.platform-user-role-select {
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 800;
}

.platform-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.platform-user-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  padding: 0 13px;
  background: #fff;
  color: var(--crm-text);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.platform-user-action-button:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--crm-brand) 45%, var(--crm-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--crm-brand) 10%, transparent);
}

.platform-user-action-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.platform-user-action-button.is-primary:not(:disabled) {
  border-color: color-mix(in srgb, var(--crm-brand) 42%, var(--crm-border));
  background: color-mix(in srgb, var(--crm-brand) 9%, #fff);
  color: var(--crm-brand);
}

.platform-user-action-button.is-danger {
  border-color: color-mix(in srgb, #ef4444 30%, var(--crm-border));
  color: #b91c1c;
}

.platform-user-action-button.is-danger:hover:not(:disabled) {
  border-color: #ef4444;
  background: #fef2f2;
  box-shadow: 0 0 0 3px rgb(239 68 68 / 10%);
}

.platform-user-password-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: -1px 20px 18px;
  border: 1px solid color-mix(in srgb, var(--crm-brand) 22%, var(--crm-border));
  border-radius: 16px;
  padding: 14px;
  background: color-mix(in srgb, var(--crm-brand) 5%, #fff);
}

.platform-user-password-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

.lead-restaurant-linker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  border: 1px solid color-mix(in srgb, var(--crm-brand) 22%, var(--crm-border));
  border-radius: 14px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--crm-brand) 4%, #fff);
}

.lead-restaurant-linker strong,
.lead-restaurant-linker span {
  display: block;
}

.lead-restaurant-linker strong {
  color: var(--crm-text);
  font-weight: 900;
}

.lead-restaurant-linker span {
  margin-top: 3px;
  color: var(--crm-muted-strong);
  font-size: 13px;
}

.lead-restaurant-linker-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.restaurant-picker-modal {
  width: min(760px, 100%);
}

.restaurant-picker-body {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.restaurant-picker-search {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
}

.restaurant-picker-search:focus-within {
  border-color: color-mix(in srgb, var(--crm-brand) 52%, var(--crm-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--crm-brand) 12%, transparent);
}

.restaurant-picker-search svg {
  color: var(--crm-muted-strong);
}

.restaurant-picker-search input {
  border: 0;
  padding: 12px 0;
  outline: 0;
}

.restaurant-picker-list {
  display: grid;
  gap: 8px;
  min-height: 220px;
  max-height: min(46vh, 480px);
  overflow: auto;
}

.restaurant-picker-result {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--crm-text);
  text-align: left;
  cursor: pointer;
}

.restaurant-picker-result:hover,
.restaurant-picker-result:focus-visible {
  border-color: color-mix(in srgb, var(--crm-brand) 45%, var(--crm-border));
  background: color-mix(in srgb, var(--crm-brand) 5%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--crm-brand) 10%, transparent);
  outline: 0;
}

.restaurant-picker-result strong {
  font-weight: 900;
}

.restaurant-picker-result span,
.restaurant-picker-result small {
  color: var(--crm-muted-strong);
}

.restaurant-picker-result small {
  font-size: 12px;
}

.trello-import-panel {
  display: grid;
  gap: 16px;
}

.trello-import-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.trello-import-grid .field {
  display: grid;
  gap: 7px;
}

.trello-list-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trello-loading-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--crm-brand) 24%, var(--crm-border));
  border-radius: 999px;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--crm-brand) 8%, #fff);
  color: var(--crm-brand);
  font-size: 13px;
  font-weight: 800;
}

.trello-loading-banner svg {
  animation: trello-refresh-spin 0.9s linear infinite;
}

.pill-button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  padding: 0 13px;
  background: #fff;
  color: var(--crm-muted-strong);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.pill-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.pill-button:hover,
.pill-button:focus-visible {
  border-color: color-mix(in srgb, var(--crm-brand) 42%, var(--crm-border));
  color: var(--crm-brand);
  outline: 0;
}

.pill-button.is-active {
  border-color: color-mix(in srgb, var(--crm-brand) 48%, var(--crm-border));
  background: color-mix(in srgb, var(--crm-brand) 10%, #fff);
  color: var(--crm-brand);
}

.trello-card-table tbody tr.is-selected td {
  background: color-mix(in srgb, var(--crm-brand) 5%, #fff);
}

.trello-card-table.is-loading {
  opacity: 0.58;
  pointer-events: none;
}

.trello-card-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

@keyframes trello-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1280px) {
  .platform-user-row {
    grid-template-columns: 1fr;
  }

  .trello-import-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-user-controls {
    grid-template-columns: minmax(160px, 220px) 1fr;
  }

  .platform-user-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .platform-users-add-form,
  .platform-user-password-row,
  .platform-user-controls,
  .platform-user-meta {
    grid-template-columns: 1fr;
  }

  .lead-restaurant-linker {
    align-items: stretch;
    flex-direction: column;
  }

  .lead-restaurant-linker-actions {
    justify-content: flex-start;
  }

  .trello-import-grid {
    grid-template-columns: 1fr;
  }
}
