.demand-rich-editor{overflow:hidden;border:1px solid var(--border2);border-radius:14px;background:var(--bg);transition:border-color .15s,box-shadow .15s}
.demand-rich-editor:focus-within{border-color:var(--violetborder);box-shadow:0 0 0 3px rgba(139,92,246,.1)}
.demand-format-toolbar{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:8px;border-bottom:1px solid var(--border);background:rgba(255,255,255,.025)}
.demand-format-toolbar>span{width:1px;height:22px;background:var(--border);margin:0 2px}
.demand-format-toolbar button{min-width:34px;min-height:32px;padding:5px 9px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--text2);font:600 11px 'Poppins',sans-serif;cursor:pointer}
.demand-format-toolbar button:hover,.demand-format-toolbar button:focus-visible{outline:none;color:var(--text);background:var(--violetbg);border-color:var(--violetborder)}
.demand-rich-input{min-height:180px;padding:15px 16px;color:var(--text);font:400 13px/1.75 'Poppins',sans-serif;white-space:pre-wrap;overflow-wrap:anywhere;outline:none}
.demand-rich-input:empty::before{content:attr(data-placeholder);color:var(--text4);pointer-events:none}
.demand-rich-input h2,.detail-rich-text h2{margin:4px 0 10px;font:700 21px/1.35 'Poppins',sans-serif;color:var(--text)}
.demand-rich-input h3,.detail-rich-text h3{margin:4px 0 9px;font:600 16px/1.45 'Poppins',sans-serif;color:var(--text)}
.demand-rich-input p,.detail-rich-text p{margin:0 0 10px}.demand-rich-input p:last-child,.detail-rich-text p:last-child{margin-bottom:0}
#modal-demand #d-refs{min-height:135px}
#modal-detail .modal-lg{width:min(1080px,calc(100vw - 36px))}
#modal-detail .dd-grid{grid-template-columns:minmax(0,1fr) 270px}
#modal-detail .detail-rich-text{min-height:90px;font-size:14px;line-height:1.8}
#modal-detail #det-refs.detail-rich-text{min-height:70px}
#modal-detail .detail-editor.refs{min-height:150px}
#modal-detail .demand-rich-input{min-height:240px}
.firewall-action{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.firewall-action svg{width:14px;height:14px}
.page-create[hidden]{display:none!important}
#pg-clients .search-row{flex-wrap:wrap}#client-create{margin-left:auto;white-space:nowrap}
.demand-client-actions{display:flex;align-items:center;gap:8px;min-width:0}.demand-client-actions .page-create{white-space:nowrap}
@media(max-width:900px){#pg-clients .search-row{display:flex}#pg-clients .search-input{flex:1 1 100%}#client-filters{flex:1 1 auto;flex-wrap:wrap!important;min-width:0}#client-create{flex:none;min-height:40px;padding:9px 10px;font-size:11px}#pg-demands .demand-client-actions{width:100%;flex-wrap:nowrap}#pg-demands .demand-client-actions #client-filter-dd{width:auto!important;flex:1;min-width:0!important}#demand-create{flex:none;min-height:40px;padding:9px 10px;font-size:11px}#pg-team .ph-actions{margin-left:auto}}
#pg-sales .sale-row-actions{display:grid;grid-template-columns:repeat(3,36px);align-items:center;justify-content:start;gap:6px;width:120px;min-width:120px;max-width:none}
#pg-sales .sale-row-actions>.btn{width:36px;height:36px;padding:0;display:inline-flex;align-items:center;justify-content:center}
.firewall-toolbar select.fs{appearance:none;color:var(--text2);background:var(--bg2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23b9a5df' stroke-width='1.8'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center;border:1px solid var(--border2);border-radius:12px;padding:11px 36px 11px 13px;font:400 12px 'Poppins',sans-serif;min-height:42px;cursor:pointer;color-scheme:dark}
.firewall-toolbar select.fs:focus-visible{outline:2px solid var(--violet2);outline-offset:2px}
.firewall-row-actions{display:flex;align-items:center;gap:8px}
.firewall-steps{min-width:40px;min-height:40px;justify-content:center}
.firewall-steps svg{width:19px;height:19px}
.firewall-timeline{list-style:none;padding:12px 0 0 12px;margin:0}
.firewall-timeline li{position:relative;display:grid;gap:5px;border-left:1px solid var(--violetborder);padding:0 0 24px 22px;overflow-wrap:anywhere}
.firewall-timeline li:before{content:'';position:absolute;left:-5px;top:5px;width:9px;height:9px;border-radius:50%;background:var(--violet2)}
.firewall-timeline time{font-size:11px;color:var(--text3)}
.firewall-timeline strong{font-size:13px;color:var(--text)}
.firewall-timeline span{font-size:12px;color:var(--text2)}
#modal-firewall-steps{align-items:center;padding:18px}#modal-firewall-steps .modal{border-radius:20px;max-height:calc(100dvh - 36px);background:var(--bg2)}#modal-firewall-steps .m-body{overflow-y:auto}
#pg-sales .ph-actions{display:flex;gap:9px;flex-wrap:wrap}
#pg-sales .ph-actions [hidden]{display:none!important}
@media(max-width:600px){#pg-sales .ph-actions{width:100%;flex-wrap:nowrap;align-items:stretch}#pg-sales .ph-actions .btn{flex:1;min-width:0;padding:10px 6px;font-size:11px;white-space:nowrap}#pg-firewall .firewall-row-actions .firewall-steps{width:42px!important;flex:0 0 42px}}
#modal-firewall-block .modal,#modal-firewall-block .m-body{background:var(--bg2)}
@media(max-width:900px){
 .demand-format-toolbar{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:4px;padding:7px}.demand-format-toolbar button{min-height:36px;padding:6px 5px}.demand-format-toolbar button:nth-of-type(-n+4){grid-column:span 3}.demand-format-toolbar button:nth-of-type(n+5){grid-column:span 4}
 .demand-format-toolbar>span{display:none}.demand-rich-input{min-height:210px;padding:14px}
 #modal-detail .modal-lg{width:100%!important}#modal-detail .dd-grid{display:flex}
 #modal-detail .detail-rich-text{min-height:100px;font-size:13px}#modal-detail .demand-rich-input{min-height:250px}
 #pg-firewall .firewall-table tr{grid-template-columns:1fr 1fr auto}
 #pg-firewall .firewall-table td:nth-child(7){grid-column:1/-1}
 #pg-firewall .firewall-table td:nth-child(7) .btn{width:100%;justify-content:center;min-height:40px}
}
