:root{font-family:Inter,Arial,Helvetica,sans-serif;color:#191d21;background:#f4f5f7;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed}.sidebar{position:fixed;left:0;top:0;bottom:0;width:190px;border-right:1px solid #e1e3e6;background:#fff;display:flex;flex-direction:column;padding:27px 6px 14px;z-index:4}.brand{display:flex;gap:1px;font-size:12px;font-weight:900;margin:0 10px 27px}.brand-red{color:#e31a25}.sidebar nav{display:flex;flex-direction:column;gap:8px}.nav-item{border:0;background:transparent;text-align:left;min-height:46px;padding:0 12px;display:flex;gap:12px;align-items:center;font-size:13px;font-weight:650;border-radius:10px;color:#30353b}.nav-item span{font-size:22px;width:20px;text-align:center;line-height:1}.nav-item:hover{background:#f2f3f4}.nav-item.active{background:#f0f1f2;box-shadow:inset 3px 0 #e11d2c;color:#14171a}.nav-divider{height:1px;background:#eceef0;margin:9px 8px}.signature{margin-top:auto;font-size:10px;color:#959da5;padding:8px}.main{margin-left:190px;min-height:100vh}.content{max-width:1140px;padding:40px 16px 50px;margin:0 auto}.hero{height:250px;background:linear-gradient(90deg,#fff 20%,#fff 42%,#f4f4f4);border:1px solid #e3e4e6;border-radius:22px;position:relative;display:flex;align-items:center;overflow:hidden;box-shadow:0 15px 38px #232c3512}.hero img{position:absolute;right:0;top:0;height:100%;width:54%;object-fit:cover;mask-image:linear-gradient(to right, transparent 0%,black 34%)}.hero-copy{position:relative;z-index:1;padding:40px}.hero small,.eyebrow{font-weight:800;color:#e11c28;letter-spacing:.07em;font-size:12px}.hero h1{font-size:42px;line-height:1.1;letter-spacing:-1.8px;margin:13px 0 8px}.hero p,.page-head p,.editor-heading p{margin:0;color:#818994;font-size:16px}.section-title{font-size:17px;margin:32px 0 17px;font-weight:800;display:flex;align-items:center;gap:12px}.section-title:before{content:'';display:inline-block;background:#e11d2e;width:4px;height:24px;border-radius:2px}.card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.tool-card{background:#fff;border:1px solid #e1e3e6;border-radius:18px;overflow:hidden;box-shadow:0 12px 25px #222a3410}.tool-card>img,.card-photo{height:184px;width:100%;object-fit:cover}.card-photo{position:relative}.card-photo img{height:100%;width:100%;object-fit:cover}.badge{position:absolute;right:16px;top:11px;background:#fff0f0;color:#df1d29;padding:8px 16px;border-radius:20px;font-size:12px;font-weight:700}.card-body{padding:20px}.card-icon{font-size:25px;height:33px}.card-body h3{font-size:20px;margin:9px 0 19px}.card-body button,.template-card button{width:100%;height:52px;border-radius:9px;border:0;font-size:13px;font-weight:750;background:#edf0f2;color:#949da8}.primary,.card-body .primary,.template-card .primary{background:#191d21;color:#fff;border:0;padding:13px 17px;border-radius:9px;font-weight:750}.primary:hover{background:#2d343b}.footer{text-align:right;margin:25px 0;font-size:11px;color:#a5abb1}.doc-card-art{height:184px;background:linear-gradient(125deg,#e8eaec,#f8f9fa);position:relative;display:flex;align-items:center;justify-content:center}.art-paper{width:112px;height:144px;background:white;box-shadow:5px 12px 20px #1d293022;padding:15px 10px;transform:rotate(-8deg);border-top:4px solid #ed1926;display:flex;flex-direction:column;gap:12px}.art-paper strong{font-size:9px;color:#e11d2d}.art-paper b{font-size:12px}.art-paper i{height:9px;background:#e9ebed}.art-fold{position:absolute;right:21%;bottom:29px;background:#e0192a;color:white;padding:10px;border-radius:8px;font-weight:900;font-size:13px}.page-head{display:flex;justify-content:space-between;padding:22px 0 15px}.page-head h1{font-size:35px;margin:10px 0}.template-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.template-card{position:relative;background:#fff;border:1px solid #e1e3e6;border-radius:17px;padding:26px;box-shadow:0 10px 25px #1111110b}.template-icon{display:grid;place-items:center;background:#f4f5f6;border-radius:16px;width:66px;height:66px;font-size:33px}.template-card h3{font-size:21px;margin:18px 0 11px}.template-card p{color:#7a828b;font-size:14px;line-height:1.65;min-height:70px}.pill{position:absolute;right:24px;top:29px;border-radius:50px;background:#e8f7ee;color:#22814d;font-size:11px;padding:7px 12px}.hidden{display:none!important}.editor-heading{display:flex;align-items:end;justify-content:space-between;padding:23px 27px 18px;gap:12px}.editor-heading h1{margin:7px 0;font-size:27px}.editor-heading p{font-size:13px}.back-link,.text-action{border:0;background:none;color:#7b838c;font-size:12px;padding:0;font-weight:700}.back-link:hover,.text-action:hover{color:#e51a29}.dev-label{font-size:11px;color:#b54d54;background:#fff0f0;border-radius:50px;padding:8px 12px;white-space:nowrap}.editor-layout{padding:0 26px 26px;display:grid;grid-template-columns:minmax(300px,40%) minmax(350px,60%);gap:18px;align-items:start}.panel{border-radius:16px;background:white;border:1px solid #e0e3e5;box-shadow:0 12px 28px #1c26300b}.editor-form{padding:19px 21px 23px;max-height:calc(100vh - 158px);overflow-y:auto}.panel-heading{display:flex;justify-content:space-between;align-items:center}.panel-heading h2{font-size:18px}.form-section{border-top:1px solid #e8ebed;margin-top:16px;padding-top:16px}.form-section h3{font-size:14px;margin:0 0 17px}.form-section h3 em{font-style:normal;color:#e62130;margin-right:8px}.form-section label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:700;color:#444c55;margin:0 0 14px}.form-section input{width:100%;padding:12px;background:#fff;border-radius:8px;border:1px solid #dce0e3;outline:none;color:#171a1e;font-size:13px}.form-section input:focus{border-color:#ed3542;box-shadow:0 0 0 3px #ed354213}.form-section input[readonly]{background:#f2f4f5}.help{font-size:12px;color:#929aa2;margin:0 0 16px}.photo-row{display:flex;gap:10px;align-items:center;border:1px solid #e7e9ec;border-radius:10px;padding:10px;margin-bottom:10px}.photo-thumb{height:54px;width:76px;background:#f2f3f5;border-radius:6px;object-fit:cover}.photo-info{flex:1;min-width:0}.photo-info strong{display:block;font-size:12px}.photo-info small{display:block;color:#929aa2;margin:4px 0;font-size:11px}.photo-info input[type=file]{font-size:10px;width:100%;max-width:220px}.photo-info input[type=range]{width:100%;accent-color:#e11d2d}.photo-position{display:none}.photo-position.visible{display:block}.wide{width:100%;margin-top:18px}.preview-panel{position:sticky;top:14px;overflow:hidden;height:calc(100vh - 171px);min-height:620px;display:flex;flex-direction:column}.preview-toolbar{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:13px 17px;border-bottom:1px solid #e4e7e9}.preview-title strong{font-size:14px;display:block}.preview-title small{display:block;color:#9aa1aa;font-size:11px;margin-top:3px}.preview-actions{display:flex;gap:7px;align-items:center}.preview-actions button{background:#f3f4f5;border:1px solid #e2e4e7;border-radius:7px;padding:9px;font-size:11px;font-weight:700}.preview-actions .primary{background:#191d21;color:white}.preview-actions #zoom-value{font-size:11px;min-width:35px;text-align:center}.pdf-stage{background:#dfe2e6;flex:1;overflow:auto;display:flex;align-items:flex-start;justify-content:center;padding:22px}.pdf-stage #pdf-sizer{width:595px;height:842px;flex-shrink:0;transform-origin:top center;box-shadow:0 15px 35px #10181e25;background:#fff}.pdf-stage iframe{border:0;width:595px;height:842px;display:block}.preview-panel.fullscreen{position:fixed;inset:0;width:100%;height:100vh;min-height:0;z-index:15;border:0;border-radius:0}.placeholder-panel{margin-top:30px;padding:40px;background:#fff;border-radius:20px}.placeholder-panel p{color:#6e7781}@media(max-width:1150px){.card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.editor-layout{grid-template-columns:1fr}.editor-form{max-height:none}.preview-panel{position:relative;height:850px;top:0}}@media(max-width:700px){.sidebar{width:60px}.sidebar .brand{font-size:0}.sidebar .brand:before{content:'ED';font-size:14px}.sidebar .nav-item{font-size:0;justify-content:center;padding:0}.sidebar .nav-item span{font-size:23px}.sidebar .signature{display:none}.main{margin-left:60px}.content{padding:20px 12px}.hero{height:210px}.hero-copy{padding:24px}.hero h1{font-size:30px}.card-grid,.template-grid{grid-template-columns:1fr}.editor-layout{padding:0 10px 20px}.editor-heading{padding:15px 12px}.editor-heading h1{font-size:22px}.dev-label{display:none}.preview-toolbar{padding:10px}.preview-actions #fullscreen span{display:none}}

.pdf-stage canvas{display:block;width:595px;height:842px;background:white}.preview-panel.fullscreen .pdf-stage{min-height:0}

.slider-grid{display:grid;grid-template-columns:1fr;gap:8px;margin-top:8px}.slider-grid label{margin:0}.slider-grid label span{display:block;font-size:10px;color:#7f8790;margin-bottom:4px}.photo-row{align-items:flex-start}.photo-thumb{margin-top:2px}.photo-info input[type=file]{max-width:none}.photo-position.visible{display:block;margin-top:8px;padding-top:8px;border-top:1px solid #eceef0}

.photo-row{align-items:flex-start}.photo-info{min-width:0}.photo-info small{line-height:1.5}.photo-thumb:not([src]){visibility:hidden}.reset-photo{background:#fff;border:1px solid #e1e3e6;color:#4a5158;border-radius:7px;font-size:11px;padding:6px 9px;margin-top:6px}.reset-photo:hover{border-color:#e11d2d;color:#e11d2d}.pdf-stage canvas{touch-action:none}

/* Two-page document preview */
.pdf-stage #pdf-sizer{height:auto!important;display:flex;flex-direction:column;gap:18px;background:transparent;box-shadow:none}
.pdf-stage canvas{width:595px;height:842px;flex:none;box-shadow:0 8px 25px #10181e22;background:white}
@media(max-width:700px){.pdf-stage{justify-content:flex-start}}

.form-section select{width:100%;padding:12px;border:1px solid #dce0e3;border-radius:8px;background:#fff;color:#171a1e;font:inherit;font-size:13px}
.caption-label{margin-top:10px!important}.caption-label input{font-size:12px!important;padding:8px!important}
.receipt-row{border:1px solid #e7e9ec;border-radius:10px;padding:12px;margin:9px 0;background:#fbfcfd}.receipt-row strong{display:block;font-size:12px;margin-bottom:12px}.receipt-row label{margin-bottom:10px}.receipt-thumb{display:none;max-height:100px;max-width:100%;border:1px solid #ddd;border-radius:6px;object-fit:contain}

/* Embedded within eoffers: the host owns the single real sidebar. */
body.embedded .sidebar{display:none!important}
body.embedded .main{margin-left:0!important;min-height:0}
body.embedded .content{max-width:none;padding:20px 18px 40px}
body.embedded .editor-heading{padding:20px 18px}
body.embedded .editor-layout{padding:0 18px 24px;grid-template-columns:minmax(290px,40%) minmax(330px,60%)}
body.embedded .editor-form{max-height:none}
body.embedded .preview-panel{height:calc(100vh - 170px);min-height:650px}
body.embedded .preview-panel.fullscreen{position:fixed;inset:0;height:100vh;z-index:100}
@media(max-width:1200px){body.embedded .editor-layout{grid-template-columns:1fr}body.embedded .preview-panel{height:850px}}
@media(max-width:700px){body.embedded .content{padding:16px 10px}body.embedded .editor-layout{padding:0 10px 15px}}

/* Dokumenty: wyrazny reset obok generowania PDF. Izolowany w documents/ */
.document-action-buttons{display:flex;flex-direction:column;gap:10px;margin-top:18px}.document-action-buttons .wide{margin-top:0}.document-action-buttons .reset-button{width:100%;border:1px solid #cdd2d6;background:#f6f7f8;color:#23282d;padding:13px 17px;border-radius:9px;font-weight:750;font-size:13px;cursor:pointer}.document-action-buttons .reset-button:hover{background:#e8eaed;border-color:#aeb5bc}.document-action-buttons .reset-button:focus-visible{outline:3px solid #e31a2555;outline-offset:2px}

/* DEV v1.3: dodatkowy PDF, izolowane style */
#attachment-section .attachment-details{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:10px 12px;border:1px solid #e1e4e8;border-radius:9px;background:#f7f8f9;font-size:12px;overflow-wrap:anywhere}
#attachment-section .attachment-details.hidden{display:none}
#attachment-section .attachment-error{color:#b3261e;font-size:12px;margin:7px 0 0}
#extra-pdf-preview-1,#extra-pdf-preview-2{width:595px;height:845px;background:white;border:1px solid #dadde1;margin:10px 0 16px;display:flex;flex-direction:column}
#extra-pdf-preview-1.hidden,#extra-pdf-preview-2.hidden{display:none}
#extra-pdf-preview-1 .attachment-preview-heading,#extra-pdf-preview-2 .attachment-preview-heading{font-size:12px;font-weight:700;color:#333;padding:9px 12px;background:#f3f4f6;border-bottom:1px solid #e2e3e7}
#extra-pdf-frame-1,#extra-pdf-frame-2{flex:1;width:100%;height:100%;border:0;background:white}

/* DEV v1.4.1: podglad dopasowany do widocznej wysokosci ekranu.
   Wysokosc jest aktualizowana przy przewijaniu i zmianie rozmiaru okna. */
@media (min-width:1151px){
  body:not(.embedded) .preview-panel:not(.fullscreen){
    height:var(--preview-visible-height, calc(100dvh - 24px));
    min-height:320px;max-height:none;
    top:12px;
  }
}
@media (min-width:1201px){
  body.embedded .preview-panel:not(.fullscreen){
    height:var(--preview-visible-height, calc(100dvh - 24px));
    min-height:320px;max-height:none;
    top:12px;
  }
}
.preview-panel .pdf-stage{min-height:0;}
.preview-panel.fullscreen{height:100dvh!important;min-height:0!important;max-height:none!important;}
