#paymentTemplates{width:min(1220px,96vw);max-width:96vw;max-height:92vh;padding:0;border:1px solid #dce5ed;border-radius:20px;background:#f6f8fb;color:#2e4253;box-shadow:0 24px 90px #10263844}#paymentTemplates[open]{display:flex;flex-direction:column}#paymentTemplates::backdrop{background:#14263888;backdrop-filter:blur(3px)}#paymentTemplates header{display:flex;gap:20px;justify-content:space-between;padding:26px 28px;background:white;border-bottom:1px solid #dce5ed}#paymentTemplates h2{margin:7px 0 10px;font-size:24px}#paymentTemplates p{font-size:13px;line-height:1.6;color:#748596;margin:0}#paymentTemplates header>button{align-self:start;flex:0 0 36px;width:36px;height:36px;border:1px solid #dce5ed;border-radius:50%;background:white;font-size:24px;cursor:pointer}#paymentTemplates .template-body{display:grid;grid-template-columns:245px minmax(0,1fr);overflow:auto;min-height:250px}#paymentTemplates aside{padding:20px;border-right:1px solid #dce5ed;background:#edf2f6}#paymentTemplates aside>button{width:100%}#paymentTemplates .template-list{display:grid;gap:9px;margin-top:18px}#paymentTemplates .template-list>button{text-align:left;background:white;border:1px solid #dce5ed;padding:13px;border-radius:10px;cursor:pointer;min-width:0;overflow-wrap:anywhere}#paymentTemplates .template-list>button.active{border-color:#6e8ea8;box-shadow:inset 3px 0 #6e8ea8}#paymentTemplates .template-list strong,#paymentTemplates .template-list small{display:block}#paymentTemplates .template-list small{font-size:11px;color:#718596;margin-top:6px}#paymentTemplates main{padding:24px;min-width:0}#paymentTemplates label{display:flex;flex-direction:column;gap:7px;font-size:11px;color:#627b8f;min-width:0}#paymentTemplates input,#paymentTemplates textarea{width:100%;box-sizing:border-box;border:1px solid #d6e0e8;border-radius:8px;padding:11px;background:white;color:#2e4253;font:inherit;font-size:13px;min-width:0}#paymentTemplates .template-meta{display:grid;grid-template-columns:1fr 1fr;gap:14px}#paymentTemplates .template-help{margin:18px 0;font-size:12px}#paymentTemplates .template-rows{display:grid;gap:12px;margin-bottom:14px}#paymentTemplates .template-row{display:grid;grid-template-columns:minmax(150px,2fr) 1fr 90px 90px 30px;gap:9px;align-items:end;padding:14px;background:white;border:1px solid #e0e7ed;border-radius:12px}#paymentTemplates .template-row>button{height:38px;border:0;background:#f8eded;color:#a35656;border-radius:7px;cursor:pointer;font-size:19px}#paymentTemplates .template-generator{margin-top:24px;padding:18px;background:#edf3f8;border-radius:12px}#paymentTemplates h3{font-size:15px;margin:0 0 15px}#paymentTemplates .template-generator>div{display:grid;grid-template-columns:2fr 1fr 1fr 1fr 1fr;gap:10px;margin-bottom:14px}#paymentTemplates .template-apply{display:flex;align-items:end;flex-wrap:wrap;gap:16px;padding-top:24px;margin-top:22px;border-top:1px solid #dce5ed}#paymentTemplates .template-apply>div{width:100%}#paymentTemplates .template-apply small{font-size:11px;color:#718596;width:100%}#paymentTemplates footer{padding:18px 28px;background:white;border-top:1px solid #dce5ed;display:flex;gap:12px;align-items:center;justify-content:space-between}#paymentTemplates footer>div{display:flex;gap:10px}#paymentTemplates .error{color:#ad4848}#paymentTemplates .template-empty,#paymentTemplates .template-loading{padding:30px}.settlement-template-actions{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 20px}
@media(max-width:950px){#paymentTemplates .template-body{grid-template-columns:190px minmax(0,1fr)}#paymentTemplates .template-row{grid-template-columns:1fr 1fr}#paymentTemplates .template-row>label:first-child{grid-column:1/-1}#paymentTemplates .template-generator>div{grid-template-columns:1fr 1fr}}
@media(max-width:650px){#paymentTemplates{width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;border-radius:0}#paymentTemplates .template-body{display:block}#paymentTemplates aside{border:0;border-bottom:1px solid #dce5ed}#paymentTemplates .template-list{display:flex;overflow:auto}#paymentTemplates .template-list>button{flex:0 0 170px}#paymentTemplates main,#paymentTemplates header{padding:18px}#paymentTemplates .template-meta{grid-template-columns:1fr}#paymentTemplates footer{padding:16px;flex-wrap:wrap}#paymentTemplates footer>div{width:100%}#paymentTemplates footer button{flex:1}#paymentTemplates .template-apply>button{width:100%}}

#paymentTemplates [data-start-date]{min-width:190px;min-height:44px;cursor:pointer;color:#173763;font-weight:600}
#paymentTemplates [data-start-date]:focus-visible{outline:3px solid #5385bf;outline-offset:2px}
#paymentTemplates .template-quick,#paymentTemplates .template-groups,#paymentTemplates .template-preview{margin-top:20px;padding:20px;border:1px solid #dce5ed;border-radius:14px;background:#fff}
#paymentTemplates .template-quick{background:#edf3f8;border-color:#cfdeea}#paymentTemplates .template-quick>p,#paymentTemplates .template-groups>p{margin:0 0 15px}#paymentTemplates .template-quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}
#paymentTemplates .template-preview strong{font-size:16px;color:#173763}#paymentTemplates .template-preview p{margin-top:9px}
#paymentTemplates .template-group-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#paymentTemplates .template-group-row{display:flex;align-items:center;justify-content:space-between;gap:15px;border:1px solid #dce5ed;border-radius:10px;padding:11px 13px;background:#f9fbfd}#paymentTemplates .template-group-row>label:first-child{flex-direction:row;align-items:center;gap:8px;font-size:13px;color:#173763}#paymentTemplates .template-group-row input[type=checkbox]{width:20px;height:20px;accent-color:#173763;flex:0 0 20px}#paymentTemplates .template-group-row small{font-size:10px;color:#75869a}#paymentTemplates .template-group-row input[type=date]{min-width:140px;width:160px;cursor:pointer}
#paymentTemplates .template-advanced{margin-top:20px;border:1px solid #dce5ed;border-radius:12px;background:#fff}#paymentTemplates .template-advanced>summary{cursor:pointer;padding:16px 20px;font-size:13px;font-weight:700;color:#173763}#paymentTemplates .template-advanced-body{padding:0 20px 20px}
@media(max-width:850px){#paymentTemplates .template-quick-grid,#paymentTemplates .template-group-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){#paymentTemplates .template-quick-grid,#paymentTemplates .template-group-grid{grid-template-columns:1fr}#paymentTemplates .template-group-row{align-items:flex-start;flex-wrap:wrap}#paymentTemplates .template-group-row input[type=date]{width:100%}}
#paymentTemplates .template-quick{background:#f4f7fc;border-color:#d3e0ef}
#paymentTemplates .template-quick h3{color:#173763}
#paymentTemplates .template-segments{display:grid;gap:9px;margin:18px 0 14px}
#paymentTemplates .template-segments-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#173763;font-size:12px}
#paymentTemplates .template-segments-heading span{font-size:11px;color:#718596}
#paymentTemplates .template-segment{display:grid;grid-template-columns:110px minmax(110px,1fr) minmax(140px,1.4fr) 36px;align-items:end;gap:10px;padding:12px;background:#fff;border:1px solid #dce5ef;border-radius:10px}
#paymentTemplates .template-segment-index{align-self:center;color:#173763;font-size:12px;font-weight:700}
#paymentTemplates .template-segment>button{height:40px;border:1px solid #e0d6d6;border-radius:8px;background:#fff7f7;color:#974547;cursor:pointer;font-size:20px}
#paymentTemplates .template-segment>button:disabled{opacity:.35;cursor:default}
#paymentTemplates .template-quick-note{margin-top:12px!important;font-size:11px!important}
@media(max-width:650px){#paymentTemplates .template-segment{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) 36px}#paymentTemplates .template-segment-index{grid-column:1/-1}#paymentTemplates .template-segments-heading{align-items:flex-start;flex-direction:column;gap:2px}}
