@font-face{font-family:"Golos Text";src:url("../fonts/GolosText-Regular.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Golos Text";src:url("../fonts/GolosText-Medium.woff2") format("woff2");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:"Golos Text";src:url("../fonts/GolosText-SemiBold.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:"Golos Text";src:url("../fonts/GolosText-Bold.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"Golos Text";src:url("../fonts/GolosText-ExtraBold.woff2") format("woff2");font-weight:800;font-style:normal;font-display:swap}
:root{color-scheme:light;--bg:#edf3fb;--surface:rgba(255,255,255,.96);--ink:#101828;--ink2:#344054;--muted:#667085;--line:#dce5f0;--line2:#c7d3e3;--blue:#175cd3;--blue-dark:#0f3d91;--green:#107c41;--green2:#0b6635;--green-soft:#e8f7ee;--amber:#b54708;--red:#b42318;--shadow:0 16px 44px rgba(18,46,91,.09);--radius:24px;--focus:0 0 0 4px rgba(23,92,211,.14)}
*{box-sizing:border-box}html{min-width:320px;-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-behavior:smooth}body{margin:0;min-width:320px;min-height:100vh;font-family:"Golos Text",system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:radial-gradient(circle at 8% -10%,rgba(23,92,211,.18),transparent 31%),radial-gradient(circle at 96% 6%,rgba(57,172,255,.11),transparent 25%),linear-gradient(180deg,#f9fbff 0%,var(--bg) 45%,#eaf1fa 100%);padding:clamp(10px,1.2vw,20px)}body.preview-open{overflow:hidden}button,input,select,textarea{font:inherit}button{-webkit-tap-highlight-color:transparent}[hidden]{display:none!important}.app-shell{width:min(1660px,100%);margin:auto}
.hero{position:relative;isolation:isolate;min-height:150px;margin-bottom:16px;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:26px;padding:24px 34px;overflow:hidden;border:1px solid rgba(23,92,211,.16);border-radius:var(--radius);background:linear-gradient(105deg,rgba(255,255,255,.99) 0%,rgba(255,255,255,.97) 47%,rgba(244,249,255,.82) 68%,rgba(237,246,255,.52) 100%);box-shadow:var(--shadow),inset 0 1px 0 #fff}.hero:before{content:"";position:absolute;inset:auto 0 0;height:4px;z-index:5;background:linear-gradient(90deg,rgba(23,92,211,.18),rgba(23,92,211,.7) 45%,rgba(57,172,255,.24))}.hero-brand{position:relative;z-index:4;width:98px;height:98px;display:grid;place-items:center;border-radius:30px;border:1px solid rgba(23,92,211,.12);background:rgba(255,255,255,.94);box-shadow:0 16px 36px rgba(15,61,145,.12),inset 0 1px 0 #fff}.hero-brand:after{content:"";position:absolute;inset:8px;border-radius:24px;border:1px solid rgba(23,92,211,.08)}.hero-brand img{width:82px;height:82px;object-fit:contain}.hero-copy{position:relative;z-index:4;max-width:min(790px,56vw)}.hero h1{margin:0;color:var(--blue-dark);font-size:clamp(46px,4.15vw,68px);font-weight:800;line-height:.96;letter-spacing:-.038em;text-transform:uppercase;text-wrap:balance}.hero p{margin:12px 0 0;color:#465f8e;font-size:clamp(16px,1.15vw,20px);font-weight:500;line-height:1.32;text-wrap:balance}.hero-skyline{position:absolute;z-index:1;inset:0 0 0 auto;width:min(940px,58%);overflow:hidden;pointer-events:none;-webkit-mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.12) 8%,rgba(0,0,0,.72) 29%,#000 53%);mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.12) 8%,rgba(0,0,0,.72) 29%,#000 53%)}.hero-skyline:before{content:"";position:absolute;inset:0;z-index:2;background:linear-gradient(90deg,rgba(255,255,255,.9) 0%,rgba(255,255,255,.42) 24%,rgba(255,255,255,.04) 58%),linear-gradient(180deg,rgba(255,255,255,.22),transparent 45%,rgba(255,255,255,.2))}.hero-skyline img{width:100%;height:100%;display:block;object-fit:cover;object-position:center 54%;opacity:.88;filter:saturate(.96) contrast(.98) brightness(1.04)}
.workspace{display:grid;grid-template-columns:minmax(440px,.86fr) minmax(660px,1.14fr);gap:16px;align-items:start}.panel{min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow),inset 0 1px 0 #fff;backdrop-filter:blur(16px)}.panel-header{min-height:84px;padding:20px 22px 18px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid rgba(220,229,240,.78);background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(250,252,255,.93))}.panel-title-group{min-width:0;display:flex;align-items:center;gap:13px}.panel-title-group h2{margin:0;color:#12213c;font-size:24px;font-weight:700;line-height:1.12;letter-spacing:-.025em}.panel-title-group p{margin:5px 0 0;color:var(--muted);font-size:13px}.panel-icon{width:44px;height:44px;flex:none;display:grid;place-items:center;border-radius:15px}.panel-icon svg{width:31px;height:31px}.panel-icon-blue{color:var(--blue);background:linear-gradient(145deg,#f2f7ff,#e4efff);border:1px solid #d7e6ff}.panel-icon-green{color:var(--green);background:linear-gradient(145deg,#effaf3,#e0f4e8);border:1px solid #d4eddd}
.save-indicator{flex:none;max-width:190px;display:inline-flex;align-items:center;justify-content:flex-end;gap:8px;color:var(--muted);font-size:12px;font-weight:500;text-align:right}.save-dot{width:8px;height:8px;flex:none;border-radius:50%;background:#98a2b3;box-shadow:0 0 0 4px rgba(152,162,179,.12)}.save-indicator[data-state=saving] .save-dot{background:var(--blue);animation:pulse 1.1s infinite}.save-indicator[data-state=saved]{color:#317150}.save-indicator[data-state=saved] .save-dot{background:var(--green)}.save-indicator[data-state=error]{color:var(--red)}.save-indicator[data-state=error] .save-dot{background:var(--red)}@keyframes pulse{50%{opacity:.45;transform:scale(.78)}}
#actForm{padding:20px 22px 22px}.form-section{min-width:0;margin:0 0 18px;padding:18px;border:1px solid #e3eaf3;border-radius:18px;background:radial-gradient(circle at 100% 0,rgba(23,92,211,.045),transparent 33%),linear-gradient(180deg,rgba(252,253,255,.98),rgba(248,251,255,.92))}.form-section-last{margin-bottom:16px}.form-section>legend{max-width:100%;margin:0 0 16px;padding:0 8px 0 0;display:inline-flex;align-items:center;gap:10px}.form-section>legend>span:last-child{display:grid;gap:2px}.form-section legend strong{font-size:15px;font-weight:700}.form-section legend small{color:var(--muted);font-size:11.5px}.section-number{width:30px;height:30px;flex:none;display:grid;place-items:center;border-radius:10px;color:#fff;background:linear-gradient(145deg,#2d72df,#144da7);box-shadow:0 7px 16px rgba(23,92,211,.2);font-size:13px;font-weight:700}.field-grid{display:grid;gap:12px}.two-columns{grid-template-columns:1fr 1fr}.field{min-width:0;margin-bottom:12px}.field:last-child{margin-bottom:0}label,.label-row label{display:block;margin:0 0 7px;color:#26354d;font-size:13px;font-weight:600}.label-row{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}.character-count{margin-bottom:7px;color:#8a94a6;font-size:11.5px}.control-wrap{position:relative}input,select,textarea{width:100%;color:var(--ink);border:1px solid var(--line2);border-radius:12px;background:#fff;box-shadow:inset 0 1px 2px rgba(16,24,40,.018);transition:.16s}input,select{height:46px;padding:0 13px}textarea{min-height:116px;padding:12px 13px;line-height:1.42;resize:vertical}input::placeholder,textarea::placeholder{color:#9aa4b5}input:hover,select:hover,textarea:hover{border-color:#b6c5d9}input:focus,select:focus,textarea:focus{outline:0;border-color:var(--blue);box-shadow:0 0 0 4px rgba(23,92,211,.14)}select{appearance:none;padding-right:44px;cursor:pointer}.select-wrap:after{content:"";position:absolute;top:50%;right:16px;width:8px;height:8px;pointer-events:none;border-right:2px solid #6a7a92;border-bottom:2px solid #6a7a92;transform:translateY(-68%) rotate(45deg)}
.poa-fields{display:none;grid-template-columns:1fr 1fr;gap:0 12px;margin:2px 0 12px;padding:14px;border:1px solid #d9e5f7;border-radius:15px;background:linear-gradient(145deg,#f6f9ff,#eff5ff)}.poa-fields.is-visible{display:grid;animation:reveal .2s both}@keyframes reveal{from{opacity:0;transform:translateY(-4px)}}.poa-heading{grid-column:1/-1;display:flex;align-items:center;gap:10px;margin-bottom:12px;color:#294e84}.poa-heading>div{display:grid;gap:2px}.poa-heading strong{font-size:13px}.poa-heading small{color:#6580a6;font-size:11.5px}.poa-icon{width:34px;height:34px;flex:none;display:grid;place-items:center;border-radius:11px;color:var(--blue);background:#fff;border:1px solid #dbe7f8}.poa-icon svg{width:23px;height:23px}.field-feedback{min-height:16px;margin-top:5px;color:transparent;font-size:11px;font-weight:500;line-height:1.3}.field-feedback:not(:empty),.field-feedback-visible{color:var(--muted)}.field-feedback[data-state=ok]{color:#28714d}.field-feedback[data-state=warn]{color:var(--amber)}.field-feedback[data-state=error]{color:var(--red)}
.amount-grid{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:12px;align-items:stretch;margin-bottom:12px}.amount-field{margin:0}.amount-wrap input{padding-right:45px;font-variant-numeric:tabular-nums}.currency-suffix{position:absolute;top:50%;right:15px;color:#6c7a90;font-size:17px;font-weight:600;transform:translateY(-50%)}.amount-words{min-height:34px;margin-top:7px;color:var(--muted);font-size:11.5px;line-height:1.38}.vat-card{padding:13px 14px;border:1px solid #d4eadb;border-radius:14px;background:radial-gradient(circle at 100% 0,rgba(16,124,65,.12),transparent 44%),linear-gradient(145deg,#f7fcf9,#edf8f1)}.vat-card-top,.vat-amount-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.vat-card-top span,.vat-amount-row span{color:#375746;font-size:12px;font-weight:600}.vat-card-top output{color:var(--green);font-size:23px;font-weight:800}.vat-card>small{display:block;margin-top:5px;color:#688174;font-size:10.5px}.vat-divider{height:1px;margin:10px 0 9px;background:#d8e9de}.vat-amount-row output{color:#254c36;font-size:12px;font-weight:700;text-align:right}
.form-actions{position:relative;z-index:8;display:grid;grid-template-columns:1.15fr .85fr;gap:10px;margin-top:4px}.button{min-height:54px;border:0;border-radius:13px;padding:12px 18px;display:inline-flex;align-items:center;justify-content:center;gap:11px;cursor:pointer;font-size:14px;font-weight:700;letter-spacing:.035em;text-transform:uppercase;transition:.16s}.button svg{width:26px;height:26px;flex:none}.button-primary{color:#fff;background:linear-gradient(180deg,#178b4c,#107c41 48%,#0b6635);box-shadow:0 13px 26px rgba(16,124,65,.24),inset 0 1px 0 rgba(255,255,255,.24)}.button-primary:hover{transform:translateY(-1px);box-shadow:0 16px 30px rgba(16,124,65,.3)}.button-secondary{color:var(--blue-dark);border:1px solid #cbd9ed;background:linear-gradient(180deg,#fff,#f5f8fd);box-shadow:0 6px 20px rgba(18,46,91,.06)}.button-secondary:hover{transform:translateY(-1px);border-color:#aebfda}.button:disabled{cursor:wait;opacity:.75;transform:none}.excel-sheet{fill:rgba(255,255,255,.96)}.excel-fold{fill:none;stroke:rgba(5,79,37,.5);stroke-width:1.7}.excel-tile{fill:#fff}.excel-x{fill:var(--green)}.button-spinner{width:18px;height:18px;display:none;border:2px solid rgba(255,255,255,.36);border-top-color:#fff;border-radius:50%;animation:spin .72s linear infinite}.button-primary.is-loading .excel-icon{display:none}.button-primary.is-loading .button-spinner{display:block}@keyframes spin{to{transform:rotate(360deg)}}.privacy-note{margin-top:12px;display:flex;align-items:center;gap:9px;color:var(--muted);font-size:11.5px;line-height:1.38}.privacy-icon{width:31px;height:31px;flex:none;display:grid;place-items:center;border-radius:11px;color:var(--green);background:var(--green-soft)}.privacy-icon svg{width:23px;height:23px}
.preview-panel{position:sticky;top:16px;display:flex;flex-direction:column;height:min(1060px,calc(100vh - 32px));min-height:680px}.preview-toolbar,.modal-toolbar{display:flex;align-items:center;gap:6px}.tool-button,.modal-close{height:38px;min-width:38px;border:1px solid #d6e0ed;border-radius:11px;display:inline-grid;place-items:center;cursor:pointer;color:#48617f;background:linear-gradient(180deg,#fff,#f4f7fb);transition:.15s}.tool-button:hover,.modal-close:hover{color:var(--blue);border-color:#b7c9e2;background:#edf4ff;transform:translateY(-1px)}.tool-button svg,.modal-close svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.tool-button-fit{min-width:82px;padding:0 10px;font-size:11px;font-weight:600}.preview-stage{position:relative;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable both-edges;background:radial-gradient(circle at 50% 0,rgba(255,255,255,.62),transparent 34%),linear-gradient(180deg,#edf3fb,#e4ecf6)}.preview-center{min-width:100%;min-height:100%;width:max-content;height:max-content;display:grid;place-items:center;padding:18px}.preview-shell{width:558px;height:750px;overflow:hidden;border-radius:3px;background:#fff;box-shadow:0 18px 48px rgba(18,46,91,.2),0 0 0 1px rgba(52,64,84,.07);transition:width .16s,height .16s}.preview-shell canvas{width:100%;height:100%;display:block;background:#fff}.mobile-preview-button{display:none}.preview-footer{min-height:50px;padding:11px 18px;display:flex;align-items:center;justify-content:space-between;gap:14px;color:var(--muted);border-top:1px solid var(--line);background:#fff;font-size:11.5px}.preview-legend,.preview-health{display:inline-flex;align-items:center;gap:7px}.legend-dot{width:8px;height:8px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px rgba(16,124,65,.1)}.preview-health{justify-content:flex-end;text-align:right;font-weight:500}.preview-health[data-state=ok]{color:#28714d}.preview-health[data-state=warn]{color:var(--amber)}.preview-health[data-state=error]{color:var(--red)}
.site-footer{min-height:72px;padding:16px 8px 4px;display:flex;align-items:center;justify-content:space-between;gap:18px;color:#67768c;font-size:12.5px;font-weight:500;line-height:1.38}.footer-item{display:flex;align-items:center;gap:10px}.footer-badge{width:34px;height:34px;flex:none;display:grid;place-items:center;border-radius:12px;color:var(--blue);background:#eaf2ff;font-size:17px;font-weight:700}.footer-heart{color:#e35d7a;background:#fff0f4}
.preview-modal{position:fixed;z-index:1000;inset:0;padding:max(14px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));display:grid;place-items:center}.preview-modal-backdrop{position:absolute;inset:0;background:rgba(5,17,38,.72);backdrop-filter:blur(10px)}.preview-modal-card{position:relative;z-index:1;width:min(1180px,100%);height:min(940px,100%);overflow:hidden;display:flex;flex-direction:column;border:1px solid rgba(255,255,255,.32);border-radius:22px;background:#f6f9fd;box-shadow:0 28px 70px rgba(18,46,91,.28)}.preview-modal-header{min-height:76px;padding:15px 18px 14px 22px;display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid var(--line);background:#fff}.preview-modal-header h2{margin:0;font-size:20px}.preview-modal-header p{margin:4px 0 0;color:var(--muted);font-size:12px}.preview-stage-modal{min-height:0}.preview-stage-modal .preview-center{padding:24px}
.toast{position:fixed;z-index:1200;right:max(18px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));max-width:min(420px,calc(100vw - 36px));min-height:54px;padding:10px;display:flex;align-items:center;gap:10px;color:#24324a;border:1px solid #d7e1ed;border-radius:15px;background:rgba(255,255,255,.97);box-shadow:0 20px 50px rgba(18,46,91,.22);backdrop-filter:blur(16px)}.toast-icon{width:31px;height:31px;flex:none;display:grid;place-items:center;border-radius:10px;color:var(--green);background:var(--green-soft)}.toast-icon:before{content:"✓";font-size:17px;font-weight:700}.toast[data-tone=warn] .toast-icon{color:var(--amber);background:#fff4e8}.toast[data-tone=warn] .toast-icon:before{content:"!"}.toast[data-tone=error] .toast-icon{color:var(--red);background:#fff0ef}.toast[data-tone=error] .toast-icon:before{content:"×"}.toast-message{min-width:0;flex:1;font-size:13px;font-weight:500}.toast-action{padding:8px 10px;border:0;border-radius:9px;cursor:pointer;color:var(--blue);background:#eaf2ff;font-size:12px;font-weight:700}.toast-close{width:29px;height:29px;border:0;border-radius:9px;cursor:pointer;color:#7c8798;background:transparent;font-size:20px}
@media(max-width:1379px){.app-shell{width:min(1240px,100%)}.hero{min-height:138px;padding:21px 27px}.hero-brand{width:86px;height:86px}.hero-brand img{width:73px;height:73px}.hero h1{font-size:clamp(42px,4.3vw,58px)}.hero-skyline{width:min(720px,55%)}.workspace{grid-template-columns:minmax(400px,.9fr) minmax(570px,1.1fr)}.preview-panel{height:min(940px,calc(100vh - 28px))}}
@media(max-width:1179px){.app-shell{width:min(940px,100%)}.hero{min-height:128px;gap:20px;padding:18px 22px}.hero-brand{width:78px;height:78px}.hero-brand img{width:67px;height:67px}.hero-copy{max-width:68vw}.hero h1{font-size:clamp(38px,5.3vw,52px)}.hero p{font-size:16px}.hero-skyline{width:55%;opacity:.7}.workspace{grid-template-columns:1fr;gap:14px}.preview-panel{position:relative;top:auto;height:820px;min-height:680px}}
@media(max-width:699px){body{padding:8px;padding-bottom:calc(10px + env(safe-area-inset-bottom))}.hero{min-height:124px;grid-template-columns:58px 1fr;gap:12px;padding:13px 14px 51px;border-radius:18px}.hero-brand{width:58px;height:58px;border-radius:18px;align-self:start}.hero-brand:after{inset:5px;border-radius:14px}.hero-brand img{width:50px;height:50px}.hero-copy{max-width:none;align-self:start}.hero h1{font-size:clamp(25px,8.2vw,35px);line-height:1;letter-spacing:-.026em}.hero p{margin-top:6px;font-size:12.5px}.hero-skyline{top:auto;left:0;right:0;bottom:0;width:100%;height:49px;opacity:.78;-webkit-mask-image:linear-gradient(180deg,transparent,rgba(0,0,0,.72) 36%,#000);mask-image:linear-gradient(180deg,transparent,rgba(0,0,0,.72) 36%,#000)}.panel{border-radius:18px}.panel-header{min-height:74px;padding:15px 14px;align-items:flex-start}.panel-title-group{gap:10px}.panel-title-group h2{font-size:20px}.panel-title-group p{display:none}.panel-icon{width:39px;height:39px}.panel-icon svg{width:28px;height:28px}.save-indicator{max-width:128px;margin-top:4px;font-size:10.5px}#actForm{padding:14px}.form-section{margin-bottom:13px;padding:13px;border-radius:15px}.form-section>legend{margin-bottom:13px}.form-section legend strong{font-size:14px}.form-section legend small{font-size:10.5px}.section-number{width:28px;height:28px}.two-columns,.poa-fields,.amount-grid,.form-actions{grid-template-columns:1fr}.poa-fields{padding:12px}.field,.amount-grid{margin-bottom:10px}label,.label-row label{font-size:12.5px}input,select,textarea{font-size:16px}input,select{height:44px}textarea{min-height:108px}.form-actions{position:sticky;bottom:max(8px,env(safe-area-inset-bottom));padding:8px;margin:2px -5px 0;border:1px solid rgba(207,220,235,.86);border-radius:15px;background:rgba(250,252,255,.94);box-shadow:0 12px 32px rgba(18,46,91,.16);backdrop-filter:blur(16px)}.button{min-height:50px;font-size:13px}.preview-panel{height:auto;min-height:0}.preview-toolbar{display:none}.preview-stage{height:390px;flex:none;overflow:hidden}.preview-center{padding:10px}.mobile-preview-button{position:absolute;left:50%;bottom:15px;display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:10px 14px;border:1px solid rgba(255,255,255,.74);border-radius:12px;color:#fff;background:rgba(15,61,145,.9);box-shadow:0 12px 24px rgba(15,61,145,.26);transform:translateX(-50%);white-space:nowrap;font-size:12px;font-weight:600}.mobile-preview-button svg{width:18px;height:18px;fill:currentColor}.preview-footer{min-height:56px;padding:10px 13px;flex-direction:column;align-items:flex-start;gap:5px}.preview-health{justify-content:flex-start;text-align:left}.site-footer{padding:14px 4px 6px;flex-direction:column;align-items:flex-start;gap:10px;font-size:11.5px}.preview-modal{padding:0}.preview-modal-card{width:100%;height:100%;border:0;border-radius:0}.preview-modal-header{min-height:70px;padding:max(12px,env(safe-area-inset-top)) 12px 11px}.preview-modal-header h2{font-size:16px}.preview-modal-header p{display:none}.modal-toolbar{gap:4px}.tool-button,.modal-close{height:36px;min-width:36px}.tool-button-fit{min-width:72px;padding:0 8px;font-size:10.5px}.preview-stage-modal .preview-center{padding:14px}.toast{right:10px;bottom:max(10px,env(safe-area-inset-bottom));max-width:calc(100vw - 20px)}}
@media(max-width:390px){.hero{grid-template-columns:52px 1fr;padding-inline:11px}.hero-brand{width:52px;height:52px}.hero-brand img{width:45px;height:45px}.hero h1{font-size:24px}.hero p{font-size:11.7px}.panel-header{padding-inline:12px}#actForm{padding:12px}.form-section{padding:11px}.button{padding-inline:12px}.preview-stage{height:355px}}
@media(max-height:760px) and (min-width:1180px){.preview-panel{min-height:620px;height:calc(100vh - 24px)}.panel-header{min-height:74px;padding-block:16px 14px}.preview-footer{min-height:44px;padding-block:8px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}

/* v2.4: рабочая плотность, проверка данных и безопасные действия */
.hero{min-height:126px;padding:19px 28px;gap:22px}.hero-brand{width:82px;height:82px;border-radius:25px}.hero-brand:after{border-radius:19px}.hero-brand img{width:70px;height:70px}.hero h1{font-size:clamp(40px,3.8vw,58px)}.hero p{margin-top:9px}.panel-header{min-height:76px;padding:17px 19px 15px}#actForm{padding:16px 18px 18px}.form-section{margin-bottom:14px;padding:15px}.form-section>legend{margin-bottom:13px}.field{margin-bottom:10px}.field-grid{gap:10px}.form-actions{grid-template-columns:1fr;margin-top:2px}.button-preview-mobile{display:none}.form-utility-actions{display:flex;justify-content:flex-end;margin-top:9px}.reset-link{min-height:36px;padding:6px 8px;border:0;border-radius:9px;display:inline-flex;align-items:center;gap:7px;cursor:pointer;color:#66758a;background:transparent;font-size:12px;font-weight:600}.reset-link:hover{color:var(--red);background:#fff1f0}.reset-link svg{width:20px;height:20px}.validation-summary{margin:0 0 12px;padding:12px 14px;border:1px solid #f0b9b5;border-radius:13px;color:#8d2923;background:#fff6f5;font-size:12px;line-height:1.4}.validation-summary strong{display:block;margin-bottom:5px;font-size:13px}.validation-summary ul{margin:0;padding-left:18px}.validation-summary button{padding:1px 3px;border:0;cursor:pointer;color:inherit;background:transparent;text-decoration:underline;text-underline-offset:2px;font:inherit;text-align:left}input[aria-invalid=true],select[aria-invalid=true],textarea[aria-invalid=true]{border-color:#d6453d;background:#fffafa;box-shadow:0 0 0 3px rgba(214,69,61,.1)}.field-validation{min-height:0;margin-top:5px;color:var(--red);font-size:11px;font-weight:600;line-height:1.3}.field-validation:empty{display:none}.preview-stage-modal{touch-action:pan-x pan-y}.footer-runtime{color:#426b54}.runtime-dot{width:8px;height:8px;flex:none;border-radius:50%;background:#98a2b3;box-shadow:0 0 0 4px rgba(152,162,179,.12)}.footer-runtime[data-state=ready] .runtime-dot{background:var(--green);box-shadow:0 0 0 4px rgba(16,124,65,.1)}.footer-runtime[data-state=update]{color:var(--blue)}.footer-runtime[data-state=update] .runtime-dot{background:var(--blue)}.footer-runtime[data-state=error]{color:var(--amber)}.footer-runtime[data-state=error] .runtime-dot{background:var(--amber)}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.confirm-modal{position:fixed;z-index:1300;inset:0;padding:18px;display:grid;place-items:center}.confirm-backdrop{position:absolute;inset:0;background:rgba(5,17,38,.58);backdrop-filter:blur(7px)}.confirm-card{position:relative;z-index:1;width:min(430px,100%);padding:23px;border:1px solid rgba(255,255,255,.4);border-radius:19px;background:#fff;box-shadow:0 26px 70px rgba(18,46,91,.3)}.confirm-card h2{margin:0 0 8px;color:#12213c;font-size:21px}.confirm-card p{margin:0;color:var(--muted);font-size:13px;line-height:1.5}.confirm-actions{margin-top:19px;display:grid;grid-template-columns:1fr 1fr;gap:9px}.button-danger{color:#fff;background:linear-gradient(180deg,#df5149,#c93f38);box-shadow:0 10px 22px rgba(201,63,56,.22)}
@media(max-width:1179px){.hero{min-height:112px;padding:16px 20px}.hero-brand{width:72px;height:72px}.hero-brand img{width:62px;height:62px}.hero h1{font-size:clamp(36px,5vw,48px)}.preview-panel{height:min(780px,calc(100vh - 24px));min-height:600px}}
@media(max-width:699px){body{padding-bottom:calc(8px + env(safe-area-inset-bottom))}.hero{min-height:112px;padding:12px 13px 43px}.panel-header{min-height:70px;padding:13px}.save-indicator{max-width:118px}#actForm{padding:12px}.form-section{padding:12px;margin-bottom:11px}.form-section legend small{display:none}.two-columns,.poa-fields,.amount-grid{grid-template-columns:1fr}.form-actions{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);bottom:max(6px,env(safe-area-inset-bottom));padding:6px;margin-inline:-3px}.button-preview-mobile{display:inline-flex;color:var(--blue-dark);border:1px solid #bfd0e8;background:linear-gradient(180deg,#fff,#edf4fc);box-shadow:0 6px 18px rgba(18,46,91,.09)}.button-preview-mobile svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}.form-utility-actions{justify-content:center;margin-top:7px}.reset-link{min-height:40px}.preview-panel{height:auto;min-height:0}.preview-stage{height:330px}.mobile-preview-button{bottom:12px}.site-footer{display:grid;grid-template-columns:1fr;gap:9px}.footer-runtime{order:3}.confirm-card{padding:20px}.confirm-actions{grid-template-columns:1fr}.confirm-actions .button-secondary{order:2}.validation-summary{padding:11px 12px}}
@media(max-width:390px){.form-actions{grid-template-columns:1fr}.button-preview-mobile{min-height:44px}.preview-stage{height:300px}}

/* v2.5: повторное использование данных, управляемое хранение и безопасные заголовки Safari */
.semantic-legend{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.section-heading{max-width:100%;margin:0 0 13px;display:inline-flex;align-items:center;gap:10px}.section-heading>span:last-child{display:grid;gap:2px}.section-heading strong{font-size:15px;font-weight:700}.section-heading small{color:var(--muted);font-size:11.5px}.work-tools{margin:0 0 14px;border:1px solid #d8e4f4;border-radius:15px;background:linear-gradient(145deg,#f8fbff,#f0f6ff)}.work-tools summary{min-height:48px;padding:11px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;color:#24456f;font-size:13px;font-weight:700}.work-tools summary::-webkit-details-marker{display:none}.work-tools summary:after{content:"";width:8px;height:8px;flex:none;border-right:2px solid #6680a4;border-bottom:2px solid #6680a4;transform:rotate(45deg) translateY(-2px);transition:.16s}.work-tools[open] summary:after{transform:rotate(225deg) translate(-2px,-2px)}.work-tools summary span{flex:1}.work-tools summary small{color:#6a7e9b;font-size:11px;font-weight:500}.work-tools-body{padding:0 14px 14px;border-top:1px solid #dbe6f4}.draft-row{padding-top:13px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:9px}.draft-select-field{margin:0}.compact-actions,.quick-actions{display:flex;flex-wrap:wrap;gap:7px}.mini-button{min-height:36px;padding:7px 10px;border:1px solid #c8d7ea;border-radius:10px;cursor:pointer;color:#355173;background:#fff;font-size:11px;font-weight:700;transition:.15s}.mini-button:hover{color:var(--blue-dark);border-color:#aebfda;background:#f5f9ff}.mini-button:focus-visible{outline:0;box-shadow:var(--focus)}.mini-button:disabled{cursor:not-allowed;opacity:.48}.mini-button-primary{color:#fff;border-color:#175cd3;background:#175cd3}.mini-button-primary:hover{color:#fff;border-color:#0f4fb9;background:#0f4fb9}.mini-button-danger{color:#9b332c}.tool-help{margin:7px 0 10px;color:#718096;font-size:10.5px;line-height:1.35}.storage-row{margin-top:11px;padding-top:10px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #dbe6f4;color:#5e718e;font-size:10.5px}.toggle-label{margin:0;display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-size:11px}.toggle-label input{width:17px;height:17px;margin:0;accent-color:var(--blue)}.reuse-row{margin:0 0 10px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px}.reuse-row .field{margin:0}.reuse-row .mini-button{min-height:46px}.service-reuse-row{grid-template-columns:minmax(0,1fr) auto auto}.semantic-hint{min-height:0;margin-top:4px;color:var(--amber);font-size:10.5px;line-height:1.3}.semantic-hint:empty{display:none}.modal-field{margin-top:14px}.confirm-card .modal-field+.modal-field{margin-top:10px}.confirm-card .button-primary{box-shadow:none}.confirm-card .button{min-height:46px;font-size:12px}.confirm-card select{height:46px}
@media(max-width:699px){.section-heading{margin-bottom:12px}.section-heading strong{font-size:14px}.section-heading small{display:none}.work-tools summary{padding-inline:12px}.work-tools summary small{max-width:44%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.work-tools-body{padding-inline:11px}.draft-row,.reuse-row,.service-reuse-row{grid-template-columns:1fr}.compact-actions,.quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.quick-actions .mini-button:first-child{grid-column:1/-1}.reuse-row .mini-button{min-height:38px}.storage-row{align-items:flex-start;flex-direction:column}.modal-field input,.modal-field select{font-size:16px}}

/* v2.6: searchable libraries, executor signers and portable backups */
.searchable-input{padding-right:34px;background:#fff linear-gradient(90deg,transparent calc(100% - 34px),#f6f9fd calc(100% - 34px))}.searchable-input::-webkit-search-cancel-button{cursor:pointer}.poa-reuse-row{grid-column:1/-1;grid-template-columns:1fr}.poa-save-button{grid-column:1/-1;justify-self:end;margin-top:-5px}.backup-actions{margin-top:9px;padding-top:9px;display:grid;grid-template-columns:1fr 1fr;gap:7px;border-top:1px solid #dbe6f4}.backup-actions .mini-button{width:100%}
@media(max-width:699px){.poa-save-button{width:100%;justify-self:stretch;margin-top:0}.backup-actions{grid-template-columns:1fr}.searchable-input{font-size:16px}}

/* v2.7: собственные светлые списки и управление сохраненными записями */
.library-picker{position:relative;color-scheme:light}.library-options{position:absolute;z-index:80;top:calc(100% + 6px);left:0;right:0;max-height:238px;padding:5px;overflow:auto;border:1px solid #c8d7ea;border-radius:12px;color:#172b4d;background:#fff;box-shadow:0 18px 42px rgba(18,46,91,.2);overscroll-behavior:contain}.library-options[hidden]{display:none}.library-option{width:100%;min-height:42px;padding:9px 10px;border:0;border-radius:8px;display:block;cursor:pointer;color:#172b4d;background:#fff;text-align:left;font:inherit}.library-option:hover,.library-option[data-active=true]{color:#0f3d91;background:#edf4ff}.library-option-primary{display:block;overflow:hidden;text-overflow:ellipsis;color:inherit;font-size:12px;font-weight:700;line-height:1.35}.library-option-secondary{display:block;margin-top:2px;overflow:hidden;text-overflow:ellipsis;color:#667085;font-size:10.5px;line-height:1.35}.library-empty{padding:12px 10px;color:#667085;font-size:11px;line-height:1.4}.library-actions{display:flex;align-items:center;gap:6px}.library-actions .mini-button{white-space:nowrap}.service-reuse-row{grid-template-columns:minmax(0,1fr) auto}.poa-save-button.library-actions{display:flex}.searchable-input[aria-expanded=true]{border-color:#8eadd7;box-shadow:var(--focus)}
@media(prefers-color-scheme:dark){.library-options,.library-option{color:#172b4d;background:#fff}.library-option:hover,.library-option[data-active=true]{color:#0f3d91;background:#edf4ff}.library-option-secondary,.library-empty{color:#667085}}
@media(max-width:699px){.library-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.library-actions .mini-button{min-width:0;padding-inline:5px;white-space:normal;line-height:1.2}.service-reuse-row{grid-template-columns:1fr}.library-options{max-height:210px}.poa-save-button.library-actions{display:grid}}

/* v2.8: единый выбор исполнителя, компактный Full HD и стабильная мобильная отрисовка */
.hero-skyline img{object-position:center 49%}
.field,.field-grid,.field-grid>*,.two-columns>*,.reuse-row,.reuse-row>*,.control-wrap,.library-picker,.executor-picker{min-width:0}
input[type=date]{display:block;width:100%;min-width:0;max-width:100%}
.executor-picker{position:relative}.executor-native{position:absolute!important;width:1px!important;height:1px!important;min-width:1px!important;padding:0!important;border:0!important;opacity:0;pointer-events:none}.executor-trigger{width:100%;min-width:0;min-height:46px;padding:7px 13px;border:1px solid var(--line2);border-radius:12px;display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;color:var(--ink);background:#fff;font:inherit;text-align:left;transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease}.executor-trigger:hover{border-color:#9cb7dd;background:#fbfdff}.executor-trigger:focus-visible,.executor-trigger[aria-expanded=true]{outline:0;border-color:var(--blue);box-shadow:var(--focus)}.executor-trigger-copy{min-width:0;display:grid}.executor-trigger-copy strong{overflow:visible;color:var(--ink);font-size:14px;font-weight:600;line-height:1.25;text-overflow:clip;white-space:normal}.executor-trigger .ui-icon{width:18px;flex:0 0 18px;color:#55718f;transition:transform .18s ease}.executor-trigger[aria-expanded=true] .ui-icon{transform:rotate(180deg)}.executor-options{z-index:90;top:calc(100% + 6px);right:0;left:0}.executor-options .library-option[aria-selected=true]{color:var(--blue-dark);background:#edf5ff}.executor-options .library-option strong{font-size:12px;line-height:1.35;white-space:normal}
.settings-select-picker{width:100%}.settings-select-picker .executor-options{min-width:100%}.executor-trigger:disabled{cursor:not-allowed;opacity:.48;background:#f6f8fb}
.mini-button-with-icon{display:inline-flex;align-items:center;justify-content:center;gap:6px}.mini-button-with-icon .ui-pictogram{width:18px;height:18px;flex:none}
.preview-tool-icon{width:20px;height:20px;display:block;object-fit:contain}
@media(min-width:1180px){.app-shell{width:min(1660px,100%)}.workspace{grid-template-columns:minmax(500px,.9fr) minmax(620px,1.1fr);gap:10px}}
@media(min-width:700px) and (max-height:1150px){body{padding:8px 10px}.hero{min-height:82px;margin-bottom:9px;padding:9px 16px;gap:13px;border-radius:18px}.hero-brand{width:58px;height:58px;border-radius:18px}.hero-brand:after{inset:5px;border-radius:14px}.hero-brand img{width:50px;height:50px}.hero h1{font-size:clamp(32px,3vw,44px)}.hero p{margin-top:4px;font-size:13px}.panel{border-radius:18px}.panel-header{min-height:60px;padding:9px 13px}.panel-title-group h2{font-size:19px}.panel-title-group p{margin-top:2px;font-size:11px}.panel-icon{width:36px;height:36px;border-radius:12px}#actForm{padding:9px 11px 11px}.work-tools{margin-bottom:8px;border-radius:12px}.work-tools summary{min-height:38px;padding:7px 10px;font-size:11.5px}.form-section{margin-bottom:8px;padding:9px 10px;border-radius:13px}.section-heading{margin-bottom:7px;gap:7px}.section-heading strong{font-size:13.5px}.section-heading small{font-size:10px}.section-number{width:25px;height:25px;font-size:11px}.field{margin-bottom:6px}.field-grid{gap:7px}label,.label-row label{margin-bottom:3px;font-size:12px}input,select,textarea{border-radius:9px;font-size:13px}input,select{height:36px;padding:0 10px}textarea{min-height:72px;padding:8px 10px;line-height:1.3}.executor-trigger{min-height:36px;padding:6px 10px;border-radius:9px}.executor-trigger-copy strong{font-size:13px}.reuse-row{margin-bottom:6px;gap:5px}.reuse-row .mini-button{min-height:36px}.mini-button{min-height:32px;padding:5px 7px;border-radius:8px;font-size:9.5px}.library-actions{gap:4px}.amount-grid{grid-template-columns:minmax(0,1fr) 190px;gap:7px;margin-bottom:6px}.amount-words{min-height:0;margin-top:3px;font-size:9.5px}.vat-card{padding:8px 9px;border-radius:10px}.vat-card-top output{font-size:18px}.vat-card>small{margin-top:2px;font-size:9px}.vat-divider{margin:6px 0}.form-actions{gap:7px}.button{min-height:42px;padding:8px 13px;font-size:11.5px}.form-utility-actions{margin-top:4px}.reset-link{min-height:30px;font-size:10px}.privacy-note{margin-top:5px;font-size:9.5px}.privacy-icon{width:25px;height:25px}.preview-panel{top:8px;height:calc(100vh - 16px);min-height:600px}.site-footer{min-height:52px;padding:8px 5px 2px;font-size:10.5px}}
@media(max-width:699px){body{background:#edf3fb}.hero,.panel,.form-section,.preview-stage,.form-actions,.toast,.pwa-install-dialog,.preview-modal{-webkit-backdrop-filter:none;backdrop-filter:none}.panel{background:#fff}.form-section{background:#f8fbff}.hero-skyline{-webkit-mask-image:none;mask-image:none;opacity:.28}.hero-skyline:before{background:rgba(255,255,255,.4)}.form-actions{position:static;background:#fff}.preview-stage{background:#e8eff8}.executor-trigger{min-height:44px}.executor-trigger-copy strong{font-size:16px}.executor-trigger-copy small{font-size:10px}}

/* Единая система пиктограмм: сетка 24 px, контур 1.8 px, скругленные окончания */
.ui-icon{width:24px;height:24px;flex:none;display:block;overflow:visible;fill:none!important;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.panel-icon .ui-icon{width:24px;height:24px}.poa-icon .ui-icon{width:21px;height:21px}.button .ui-icon{width:23px;height:23px}.reset-link .ui-icon{width:19px;height:19px}.privacy-icon .ui-icon{width:20px;height:20px}.executor-trigger .ui-icon{width:18px;height:18px}.footer-install .ui-icon{width:20px;height:20px}.footer-heart .ui-icon{width:19px;height:19px}.pwa-dialog-close .ui-icon,.toast-close .ui-icon,.modal-close .ui-icon{width:20px;height:20px}.mobile-preview-button .ui-icon{width:18px;height:18px;fill:none!important}.toast-icon:before{content:none!important}.toast-icon .ui-icon{display:none;width:20px;height:20px}.toast:not([data-tone]) .toast-success,.toast[data-tone=success] .toast-success,.toast[data-tone=ok] .toast-success{display:block}.toast[data-tone=warn] .toast-warn{display:block}.toast[data-tone=error] .toast-error{display:block}
.ui-pictogram{width:32px;height:32px;display:block;object-fit:contain}.panel-icon .ui-pictogram{width:33px;height:33px}.poa-icon .ui-pictogram{width:28px;height:28px}.privacy-icon .ui-pictogram{width:25px;height:25px}.ui-pictogram-button{width:22px;height:22px}.ui-pictogram-excel{width:29px;height:29px}.mobile-preview-button .ui-pictogram{width:21px;height:21px}

/* v2.9: профессиональная плотная система интерфейса */
:root{--bg:#eef3f8;--surface:#fff;--ink:#132238;--ink2:#304158;--muted:#65748a;--line:#dbe4ee;--line2:#c5d2e1;--shadow:0 10px 28px rgba(28,54,88,.075);--radius:18px;--focus:0 0 0 3px rgba(23,92,211,.13)}
body{padding:9px 10px;background:linear-gradient(180deg,#f7f9fc 0,#edf3f8 42%,#eaf0f6 100%)}
.app-shell{width:min(1720px,100%)}
.hero{min-height:84px;margin-bottom:9px;padding:8px 18px;gap:13px;border-color:#d6e2ef;border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(28,54,88,.07)}
.hero:before{height:3px;background:linear-gradient(90deg,#175cd3,#2f80ed 54%,#74b8ef)}
.hero-brand{width:60px;height:60px;border-radius:17px;box-shadow:0 7px 18px rgba(15,61,145,.11)}
.hero-brand:after{inset:5px;border-radius:13px}.hero-brand img{width:52px;height:52px;border-radius:22%}
.hero-copy{max-width:min(690px,54vw)}.hero h1{font-size:clamp(32px,3.15vw,48px);line-height:1;letter-spacing:-.032em}.hero p{margin-top:4px;font-size:13px;line-height:1.28}
.hero-skyline{inset:0;width:100%;-webkit-mask-image:none;mask-image:none;opacity:.96}.hero-skyline:before{background:linear-gradient(90deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,.94) 36%,rgba(255,255,255,.25) 61%,rgba(255,255,255,.04) 100%)}.hero-skyline img{object-fit:fill;object-position:center;opacity:1;filter:none}
.workspace{grid-template-columns:minmax(510px,.92fr) minmax(620px,1.08fr);gap:9px}
.panel{border-color:#d9e2ec;border-radius:16px;background:#fff;box-shadow:var(--shadow);-webkit-backdrop-filter:none;backdrop-filter:none}
.panel-header{min-height:61px;padding:9px 13px;border-bottom-color:#e2e8f0;background:#fff}.panel-title-group{gap:9px}.panel-title-group h2{font-size:19px;line-height:1.1;letter-spacing:-.02em}.panel-title-group p{margin-top:2px;font-size:11px}.panel-icon{width:36px;height:36px;border-radius:11px}.panel-icon-blue,.panel-icon-green{background:#f2f6fb;box-shadow:none}.save-indicator{max-width:160px;gap:6px;font-size:11px}.save-dot{width:7px;height:7px;box-shadow:0 0 0 3px rgba(152,162,179,.11)}
#actForm{padding:7px 10px 9px}.work-tools{margin-bottom:5px;border-color:#d7e2ee;border-radius:11px;background:#f5f8fc}.work-tools summary{min-height:37px;padding:5px 9px;color:#23456f;font-size:12px}.work-tools-summary{min-width:0;display:flex;align-items:baseline;gap:8px}.work-tools-summary strong{font-size:12px}.work-tools-summary em{overflow:hidden;color:#718198;font-size:10px;font-style:normal;font-weight:500;text-overflow:ellipsis;white-space:nowrap}.work-tools summary small{font-size:10px}
.work-tools-body{padding:0 9px 9px}.draft-row{padding-top:8px;gap:6px}.tool-help{margin:4px 0 6px}.compact-actions,.quick-actions{gap:5px}.backup-actions{margin-top:6px;padding-top:6px;gap:5px}.storage-row{margin-top:7px;padding-top:7px}
.form-section{margin-bottom:5px;padding:7px 10px;border-color:#e0e7ef;border-radius:12px;background:#f8fafc}.form-section-last{margin-bottom:5px}.section-heading{margin-bottom:5px;gap:7px}.section-heading>span:last-child{gap:0}.section-heading strong{font-size:14px;line-height:1.15}.section-heading small{font-size:10px;line-height:1.2}.section-number{width:25px;height:25px;border-radius:8px;box-shadow:none;font-size:11.5px}
.field-grid{gap:6px}.field-grid>.field{margin-bottom:0}.field{margin-bottom:6px}label,.label-row label{margin-bottom:3px;color:#2d3e55;font-size:13px;font-weight:600;line-height:1.22}.label-row{gap:8px}.character-count{margin-bottom:3px;font-size:10px}
.act-core-grid{display:grid;grid-template-columns:minmax(260px,1.7fr) minmax(145px,.78fr) minmax(170px,1fr);gap:6px}.act-core-grid>.field,.customer-details-grid>.field,.service-finance-grid>.field{margin-bottom:0}.customer-details-grid{margin-bottom:6px;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr) minmax(0,1fr);gap:5px 6px}.service-finance-grid{display:grid;grid-template-columns:minmax(210px,.86fr) minmax(360px,1.54fr);gap:6px;align-items:start}
input,select,textarea{border-radius:9px;font-size:14px;box-shadow:none}input,select{height:38px;padding:0 10px}textarea{min-height:68px;padding:8px 10px;line-height:1.32}input:focus,select:focus,textarea:focus{box-shadow:var(--focus)}
input[type=date]{height:38px;padding-top:0;padding-bottom:0;line-height:1;color-scheme:light}
input[type=date]::-webkit-date-and-time-value{min-height:100%;margin:0;display:flex;align-items:center;text-align:left}
input[type=date]::-webkit-datetime-edit{height:100%;padding:0;display:flex;align-items:center}
input[type=date]::-webkit-calendar-picker-indicator{align-self:center;margin:0}
.executor-trigger{min-height:38px;padding:5px 10px;border-radius:9px}.executor-trigger-copy strong{font-size:14px;line-height:1.25}
.reuse-row{margin-bottom:6px;gap:5px}.reuse-row .mini-button{min-height:38px}.library-actions{gap:4px}.mini-button{min-height:32px;padding:5px 7px;border-radius:8px;font-size:10px}.searchable-input{padding-right:32px}.library-options{top:calc(100% + 4px);border-radius:10px}.library-option{min-height:38px;padding:7px 8px}.library-option-primary,.executor-options .library-option strong{font-size:14px;font-weight:400}
.poa-fields{gap:0 7px;margin:1px 0 7px;padding:8px;border-radius:10px;background:#f2f6fc}.poa-heading{gap:7px;margin-bottom:7px}.poa-heading strong{font-size:12px}.poa-heading small{font-size:10px}.poa-icon{width:29px;height:29px;border-radius:9px}.poa-save-button{margin-top:-2px}
.poa-fields.is-visible{animation:none}
.field-feedback{min-height:0;margin-top:3px;font-size:10px}.field-feedback:empty{display:none}.field-feedback-visible{min-height:13px}.semantic-hint{margin-top:2px;font-size:10px}
.amount-grid{grid-template-columns:minmax(0,1fr) 150px;gap:6px;margin-bottom:0}.amount-words{min-height:13px;margin-top:3px;font-size:10px;line-height:1.3}.vat-card{padding:7px 9px;border-radius:9px;background:#f1f8f4}.vat-card-top span,.vat-amount-row span{font-size:11px}.vat-card-top output{font-size:18px}.vat-divider{margin:5px 0}.vat-amount-row output{font-size:11px}
.form-actions{gap:6px;margin-top:1px}.button{min-height:42px;padding:8px 13px;border-radius:10px;font-size:12px;letter-spacing:.025em}.button-primary{box-shadow:0 7px 16px rgba(16,124,65,.18)}.form-utility-actions{margin-top:3px}.reset-link{min-height:29px;padding:4px 7px;font-size:10.5px}.privacy-note{margin-top:4px;gap:7px;font-size:10px}.privacy-icon{width:26px;height:26px;border-radius:8px}
.preview-panel{top:9px;height:calc(100vh - 18px);min-height:610px}.preview-footer{min-height:44px;padding:8px 13px;font-size:10.5px}.site-footer{min-height:48px;padding:7px 4px 1px;font-size:10.5px}.footer-badge{width:28px;height:28px;border-radius:9px;font-size:14px}

@media(min-width:1180px){.app-shell{width:min(1720px,100%)}.workspace{grid-template-columns:minmax(510px,.92fr) minmax(620px,1.08fr);gap:9px}}
@media(max-width:1179px){.hero{min-height:84px;padding:10px 15px}.hero-brand{width:56px;height:56px}.hero-brand img{width:48px;height:48px}.hero h1{font-size:clamp(30px,4.5vw,42px)}.workspace{grid-template-columns:1fr}.preview-panel{position:relative;top:auto;height:720px;min-height:560px}}
@media(max-width:699px){
  body{padding:5px 6px calc(7px + env(safe-area-inset-bottom));background:#edf2f7}
  .hero{min-height:88px;margin-bottom:6px;padding:8px 10px;grid-template-columns:48px minmax(0,1fr);gap:9px;border-radius:13px}.hero-brand{width:48px;height:48px;border-radius:13px}.hero-brand:after{inset:4px;border-radius:10px}.hero-brand img{width:42px;height:42px}.hero-copy{max-width:none}.hero h1{font-size:clamp(24px,7.1vw,30px);line-height:.98}.hero p{margin-top:3px;font-size:11px;line-height:1.2}.hero-skyline{opacity:.48}.hero-skyline:before{background:linear-gradient(90deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,.92) 54%,rgba(255,255,255,.38) 78%,rgba(255,255,255,.12))}
  .panel{border-radius:13px}.panel-header{min-height:56px;padding:8px 9px;align-items:center}.panel-title-group{gap:7px}.panel-title-group h2{font-size:17px}.panel-icon{width:32px;height:32px;border-radius:9px}.panel-icon .ui-icon{width:21px;height:21px}.save-indicator{max-width:112px;margin-top:0;font-size:9.5px}
  #actForm{padding:7px}.work-tools{margin-bottom:6px}.work-tools summary{min-height:38px;padding:5px 8px}.work-tools-summary{display:grid;gap:0}.work-tools-summary strong{font-size:11.5px}.work-tools-summary em{font-size:9.5px}.work-tools summary small{max-width:36%;font-size:9.5px}
  .form-section{margin-bottom:6px;padding:8px;border-radius:11px}.section-heading{margin-bottom:6px}.section-heading strong{font-size:14px}.section-number{width:25px;height:25px}
  .field{margin-bottom:5px}.field-grid{gap:5px}.two-columns:not(.compact-pair),.poa-fields,.amount-grid,.service-finance-grid{grid-template-columns:1fr}.compact-pair{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px}.act-core-grid{grid-template-columns:1fr 1fr;gap:5px}.field-executor{grid-column:1/-1}.customer-details-grid{grid-template-columns:1fr 1fr;gap:5px}.field-customer,.field-customer-position,.field-customer-name,.field-customer-basis{grid-column:1/-1}
  label,.label-row label{margin-bottom:3px;font-size:14px;line-height:1.18}.character-count{font-size:10.5px}
  input,select,textarea{font-size:16px}input,select{height:42px;padding:0 10px}textarea{min-height:82px;padding:8px 10px}.executor-trigger{min-height:42px;padding:5px 10px}.executor-trigger-copy strong{font-size:16px}.reuse-row{margin-bottom:5px}.reuse-row .mini-button{min-height:34px}.library-actions{gap:4px}.library-actions .mini-button{min-height:34px;padding:4px;font-size:10.5px}.library-option-primary,.executor-options .library-option strong{font-size:16px;font-weight:400}.field-feedback-visible{min-height:12px}.amount-grid{gap:5px}.amount-words{min-height:12px}.vat-card{padding:7px 9px}
  input[type=date]{height:42px;min-height:42px;line-height:42px;padding-block:0}
  input[type=date]::-webkit-date-and-time-value{height:42px;min-height:42px;line-height:42px}
  input[type=date]::-webkit-datetime-edit{height:42px;min-height:42px;line-height:42px}
  .form-actions{grid-template-columns:minmax(0,1.18fr) minmax(0,.82fr);position:static;padding:0;margin:0;border:0;background:transparent;box-shadow:none}.button{min-height:43px;font-size:11.5px}.form-utility-actions{margin-top:2px}.reset-link{min-height:30px}.privacy-note{margin-top:3px}
  .preview-panel{height:auto;min-height:0}.preview-stage{height:290px}.preview-footer{min-height:50px;padding:8px 10px}.site-footer{padding:8px 3px 3px;gap:7px;font-size:10.5px}
}
@media(max-width:359px){.compact-pair,.act-core-grid,.customer-details-grid{grid-template-columns:1fr}.field-executor,.field-customer,.field-customer-position,.field-customer-name,.field-customer-basis{grid-column:auto}.hero h1{font-size:23px}.work-tools-summary em{display:none}.form-actions{grid-template-columns:1fr}}

/* v2.9.1: containment and balanced typography candidate */
fieldset{min-inline-size:0}
input,select,textarea,.executor-trigger,.mini-button,.button{max-width:100%;min-width:0}
.act-core-grid,.customer-details-grid,.contract-core-grid,.service-finance-grid,.amount-grid{min-width:0}
.act-core-grid>*,.customer-details-grid>*,.contract-core-grid>*,.service-finance-grid>*,.amount-grid>*{min-width:0}

.workspace{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.panel-title-group h2{font-weight:600}
.section-heading strong{font-weight:600}
label,.label-row label{color:#3d4e63;font-size:13px;font-weight:400}
.executor-trigger-copy strong{font-size:13.5px;font-weight:500}
.work-tools summary{font-weight:500}.work-tools-summary strong,.button{font-weight:600}.mini-button,.library-option-primary,.executor-options .library-option strong{font-weight:500}
.vat-card-top span,.vat-amount-row span{font-weight:500}
.vat-card-top output,.vat-amount-row output{font-weight:600}

.act-core-grid{grid-template-columns:minmax(0,1.55fr) minmax(0,.72fr) minmax(0,1fr)}
.customer-details-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.contract-core-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.76fr) minmax(0,1.08fr);gap:6px;margin-bottom:6px}
.contract-core-grid>.field{margin-bottom:0}
.service-finance-grid{grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr)}
.amount-grid{grid-template-columns:minmax(0,1fr) minmax(128px,.72fr)}

input[type=date]{display:block;width:100%;min-width:0;max-width:100%;overflow:hidden;-webkit-appearance:none;appearance:none}
input[type=date]::-webkit-date-and-time-value{width:100%;min-width:0;overflow:hidden}
input[type=date]::-webkit-datetime-edit{min-width:0;overflow:hidden}

.site-footer{display:grid;grid-template-columns:auto auto minmax(180px,1fr) auto;align-items:center}
.footer-runtime{justify-self:center}
.footer-care{justify-self:end}
.footer-privacy{grid-column:1/-1;justify-self:center;margin:0;padding-top:7px;color:#69788d;font-size:10.5px}
.footer-privacy .privacy-icon{width:25px;height:25px;background:#edf6f1}

.hero-skyline{inset:0;width:100%;opacity:1;-webkit-mask-image:none;mask-image:none}
.hero-skyline:before{background:linear-gradient(90deg,rgba(255,255,255,1) 0%,rgba(255,255,255,.98) 30%,rgba(255,255,255,.83) 43%,rgba(255,255,255,.18) 63%,rgba(255,255,255,0) 78%)}
.hero-skyline img{width:100%;height:100%;object-fit:cover;object-position:center 50%;opacity:1;filter:none}

@media(min-width:700px){
  input,select{height:36px}
  input[type=date]{height:36px}
  input[type=date]::-webkit-date-and-time-value,input[type=date]::-webkit-datetime-edit{height:36px;min-height:36px;line-height:36px}
  .executor-trigger{min-height:36px}
  textarea{min-height:56px}
}

@media(min-width:1180px) and (max-width:1499px){
  .workspace{grid-template-columns:minmax(0,1.04fr) minmax(0,.96fr)}
  .act-core-grid{grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr)}
  .field-executor{grid-column:1/-1}
  .service-finance-grid{grid-template-columns:1fr}
}

@media(max-width:1179px){
  .workspace{grid-template-columns:1fr}
}

@media(max-width:699px){
  .act-core-grid,.customer-details-grid,.contract-core-grid,.service-finance-grid,.amount-grid{grid-template-columns:1fr}
  .field-executor,.field-customer,.field-customer-position,.field-customer-name,.field-customer-basis{grid-column:auto}
  label,.label-row label{font-size:14px;font-weight:400}
  .section-heading strong{font-weight:600}
  .executor-trigger-copy strong{font-size:16px;font-weight:500}
  input[type=date]{width:100%;min-width:0;max-width:100%;-webkit-appearance:none;appearance:none}
  .site-footer{grid-template-columns:1fr;align-items:start}
  .footer-runtime,.footer-care,.footer-privacy{justify-self:start}
  .footer-privacy{grid-column:1;padding-top:3px}
}

/* v2.9.2: equal panels, inline retention choice and one-line footer */
.retention-picker{display:flex;align-items:center;gap:6px;white-space:nowrap}
.retention-picker>label{margin:0;color:#5e718e;font-size:10.5px}
.retention-picker .control-wrap{width:112px}
.retention-picker select{height:30px;padding:0 28px 0 9px;border-radius:8px;font-size:10.5px}
.act-core-grid{grid-template-columns:1fr}
.act-service-grid{display:grid;grid-template-columns:minmax(0,.84fr) minmax(0,.72fr) minmax(0,1.44fr);gap:6px;margin-bottom:6px}
.act-service-grid>.field{margin-bottom:0}
.poa-fields{margin-top:6px}
.service-entry-group{margin-bottom:6px;padding:7px 8px;border:1px solid #dbe5f1;border-radius:10px;background:#fbfdff}
.service-entry-title{margin-bottom:5px;color:#344054;font-size:12px;font-weight:500}
.service-entry-group .field-wide{margin-bottom:0}
.amount-words:empty{display:none}

.work-tools .draft-row{align-items:center}
.work-tools .draft-select-field .control-wrap,.retention-picker .control-wrap{min-width:0}
.work-tools .settings-select-picker .executor-trigger{border-color:#c7d3e3}
.work-tools summary,.work-tools-summary strong{font-size:14px}.work-tools summary small{font-size:12px}.work-tools .tool-help{font-size:12px}.work-tools .mini-button{font-size:12px}.work-tools .toggle-label,.work-tools .retention-picker>label{font-size:13px}
.save-indicator{max-width:none;white-space:nowrap}.save-indicator #saveStatusText{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.retention-picker .control-wrap{width:132px}
.retention-picker>label{font-size:11px}

.form-actions{grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:6px}
.button-reset{color:#8d2923;border:1px solid #efc8c4;background:#fff7f6;box-shadow:none}
.button-reset:hover{color:#751f1a;border-color:#e5aaa4;background:#fff0ee}

.site-footer{grid-template-columns:auto auto auto minmax(280px,1fr) auto;gap:12px}
.footer-version{grid-column:1}.footer-install{grid-column:2}.footer-runtime{grid-column:3;justify-self:start}.footer-privacy{grid-column:4;justify-self:center;margin:0;padding:0}.footer-care{grid-column:5;justify-self:end}

@media(min-width:1180px){
  .workspace{align-items:stretch}
  .preview-panel{position:sticky;top:9px;height:auto;min-height:0;align-self:stretch}
}

@media(min-width:700px){.poa-reuse-row{grid-template-columns:minmax(0,1fr) auto}}

@media(max-width:699px){
  .act-service-grid{grid-template-columns:1fr}
  .work-tools .settings-select-picker .executor-trigger-copy strong{font-size:16px}
  .work-tools summary,.work-tools-summary strong{font-size:14px}.work-tools .mini-button,.work-tools .tool-help{font-size:12px}.work-tools .toggle-label,.work-tools .retention-picker>label{font-size:14px}
  .save-indicator{max-width:112px}
  .storage-row{gap:7px}.retention-picker{width:100%;justify-content:space-between}.retention-picker .control-wrap{width:126px}
  .site-footer{grid-template-columns:1fr}.footer-version,.footer-install,.footer-runtime,.footer-privacy,.footer-care{grid-column:1;justify-self:start}
}
.backup-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
.quick-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.quick-actions .mini-button{width:100%;min-width:0;white-space:normal}
@media(max-width:699px){.quick-actions,.backup-actions{grid-template-columns:1fr}.quick-actions .mini-button:first-child{grid-column:auto}}

/* Controls sharing a row have one touch target height. */
.draft-row .executor-trigger,.draft-row .compact-actions .mini-button{height:36px;min-height:36px}
.work-tools .draft-row{align-items:stretch}
.draft-row .draft-select-field,.draft-row .compact-actions{height:36px}
.draft-row .compact-actions{flex-wrap:nowrap;align-items:stretch}
.save-indicator[data-state=dirty]{color:#946015}.save-indicator[data-state=dirty] .save-dot{background:#e4a044;box-shadow:0 0 0 3px rgba(228,160,68,.14)}
.quick-actions .mini-button,.backup-actions .mini-button{height:auto;min-height:42px;padding:4px 8px;font-size:13px;line-height:1.2}
.reuse-row .searchable-input,.reuse-row .library-actions .mini-button{height:36px;min-height:36px}
@media(max-width:699px){
  .quick-actions .mini-button,.backup-actions .mini-button{min-height:42px;font-size:14px}
  .draft-row .executor-trigger,.draft-row .compact-actions .mini-button,
  .reuse-row .searchable-input,.reuse-row .library-actions .mini-button{height:42px;min-height:42px}
  .draft-row .draft-select-field{height:42px}
  .draft-row .compact-actions{height:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
}

.field-customer-basis{position:relative}
.field-customer-basis:focus-within{z-index:2}
.field-customer-basis .case-hint{display:none;position:absolute;top:calc(100% + 5px);right:0;z-index:2;width:max-content;max-width:100%;padding:5px 8px;border:1px solid #c8d9f2;border-radius:8px;background:#eef5ff;color:#315782;font-size:12px;line-height:1.25;box-shadow:0 5px 12px rgba(24,66,119,.09);pointer-events:none}
.field-customer-basis #customerBasis:focus + .case-hint{display:block}
/* Keep the skyline inside the compact mobile header, behind a readable fade. */
@media(max-width:699px){
  .hero{min-height:102px;grid-template-columns:48px minmax(0,1fr);gap:9px;padding:9px 10px;align-items:center}
  .hero-brand{align-self:center}
  .hero-copy{padding:0}
  .hero h1{font-size:clamp(24px,7.1vw,30px);line-height:1}
  .hero p{margin-top:5px;line-height:1.25}
  .hero-skyline{position:absolute;inset:0 0 0 auto;grid-column:auto;width:72%;height:100%;margin:0;opacity:1;overflow:hidden}
  .hero-skyline:before{background:linear-gradient(90deg,#fff 0%,rgba(255,255,255,.96) 20%,rgba(255,255,255,.60) 48%,rgba(255,255,255,.12) 78%,transparent 100%)}
  .hero-skyline img{width:280%;max-width:none;height:100%;margin-left:-130%;object-fit:cover;object-position:center 38%}
}
@media(min-width:500px) and (max-width:699px){
  .hero-skyline img{width:200%;margin-left:-80%;object-position:center 44%}
}

/* Desktop art direction: keep the original compact height and crop sky and water. */
@media(min-width:700px){
  .hero{min-height:84px;padding:8px 18px}
  .hero-skyline{inset:0 0 0 auto;width:56%;height:100%}
  .hero-skyline:before{background:linear-gradient(90deg,#fff 0%,rgba(255,255,255,.82) 17%,rgba(255,255,255,.12) 44%,transparent 62%)}
  .hero-skyline img{object-fit:cover;object-position:center 47%}
}
.hero-copy{align-self:center}
#previewStage{contain:size}
@media(min-width:700px) and (max-width:900px){
  .site-footer{grid-template-columns:minmax(0,1fr) auto;gap:6px 12px}
  .footer-version{grid-column:1;grid-row:1}
  .footer-install{grid-column:2;grid-row:1}
  .footer-runtime{grid-column:1;grid-row:2}
  .footer-care{grid-column:2;grid-row:2}
  .footer-privacy{grid-column:1/-1;grid-row:3;justify-self:start}
}
