:root{
    --navy:#212851;
    --navy-2:#303965;
    --navy-3:#131936;
    --orange:#f19201;
    --orange-2:#ec6f22;
    --white:#ffffff;
    --bg:#f4f6f8;
    --panel:#ffffff;
    --text:#1e2630;
    --muted:#718079;
    --line:#dce3df;
    --line-soft:#edf1ef;
    --success:#159653;
    --success-soft:#e9f7ef;
    --danger:#c53943;
    --danger-soft:#fcebed;
    --warning:#b86800;
    --warning-soft:#fff3df;
    --sidebar:244px;
    --topbar:72px;
    --radius:14px;
    --shadow:0 5px 18px rgba(33,40,81,.055);
}
*{box-sizing:border-box}
html{font-family:Inter,Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}
body{margin:0;min-height:100vh;background:var(--bg);color:var(--text)}
a{color:var(--navy);text-decoration:none}
a:hover{text-decoration:none}
button,input,select,textarea{font:inherit}
svg{display:block}

/* APP SHELL */
.app-shell{min-height:100vh}
.app-sidebar{position:fixed;left:0;top:0;bottom:0;width:var(--sidebar);background:var(--white);border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:40;overflow-y:auto}
.sidebar-brand{height:var(--topbar);display:flex;align-items:center;gap:11px;padding:9px 20px;border-bottom:1px solid var(--line)}
.sidebar-brand>a{display:flex;align-items:center;flex:0 0 42px;width:42px;height:42px;overflow:hidden;border-radius:9px;background:#fff}
.sidebar-brand img{width:100%;height:100%;object-fit:cover;object-position:50% 12%}
.sidebar-brand-copy{min-width:0;display:flex;flex-direction:column;line-height:1.18}
.sidebar-brand-copy strong{font-size:17px;letter-spacing:.02em;color:var(--navy)}
.sidebar-brand-copy span{font-size:10px;color:var(--muted);margin-top:4px;white-space:nowrap}
.sidebar-nav{padding:27px 9px 20px;flex:1}
.sidebar-section-label{font-size:10px;font-weight:900;letter-spacing:.15em;text-transform:uppercase;color:#91a099;padding:0 12px 10px}
.sidebar-section-spaced{margin-top:19px}
.sidebar-link{display:flex;align-items:center;min-height:47px;gap:12px;padding:10px 13px;margin:2px 0;border-radius:10px;color:#35463e;font-weight:750;font-size:14px;transition:background .15s ease,color .15s ease}
.sidebar-link:hover{background:#fff5e9;color:var(--navy)}
.sidebar-link.is-active{background:#fff0df;color:var(--orange-2)}
.sidebar-icon{width:21px;height:21px;display:flex;align-items:center;justify-content:center;flex:0 0 21px}
.sidebar-icon svg{width:20px;height:20px}
.sidebar-link-label{flex:1;min-width:0}
.sidebar-badge{min-width:22px;height:22px;padding:0 6px;border-radius:99px;display:inline-flex;align-items:center;justify-content:center;background:var(--orange-2);color:#fff;font-size:11px;font-weight:900}
.sidebar-footer{border-top:1px solid var(--line);padding:20px;color:#8a9791;font-size:10px;line-height:1.5}
.sidebar-status{display:flex;align-items:center;gap:5px;color:#526259;margin-bottom:5px}
.status-dot{width:8px;height:8px;border-radius:50%;background:#26b467;box-shadow:0 0 0 3px rgba(38,180,103,.10);display:inline-block;flex:0 0 8px}
.app-workspace{min-height:100vh;margin-left:var(--sidebar);display:flex;flex-direction:column}
.app-topbar{height:var(--topbar);background:rgba(255,255,255,.97);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:30;backdrop-filter:blur(8px)}
.topbar-left,.topbar-account{display:flex;align-items:center}
.topbar-status{display:flex;align-items:center;gap:8px;color:#5c6963;font-size:12px}
.topbar-account{gap:18px}
.topbar-user{text-align:right;line-height:1.15;max-width:280px}
.topbar-user strong{display:block;color:var(--navy);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar-user span{display:block;color:#78867f;font-size:10px;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar-logout-form{margin:0;padding-left:16px;border-left:1px solid var(--line)}
.topbar-logout,.topbar-save-access{height:38px;border:1px solid var(--line);background:#fff;color:#65746d;border-radius:10px;display:flex;align-items:center;justify-content:center;cursor:pointer;text-decoration:none}
.topbar-logout{width:38px;flex:0 0 38px}
.topbar-save-access{width:auto;min-width:0;padding:0 13px;flex:0 0 auto;font-size:12px;font-weight:800;line-height:1;white-space:nowrap}
.topbar-logout svg{width:19px;height:19px}
.topbar-logout:hover,.topbar-save-access:hover{border-color:#f4b26c;background:#fff7ef;color:var(--orange-2)}
.sidebar-toggle-control{position:absolute;opacity:0;pointer-events:none}
.sidebar-toggle{display:none;width:39px;height:39px;border:1px solid var(--line);background:#fff;color:var(--navy);border-radius:10px;margin-right:12px;align-items:center;justify-content:center;cursor:pointer}
.sidebar-toggle svg{width:20px;height:20px}
.sidebar-overlay{display:none}

/* MAIN CONTENT */
.app-main{width:100%;max-width:1500px;margin:0 auto;padding:31px 34px 56px}
.kicker{font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.14em;color:var(--orange-2);margin-bottom:7px}
h1{font-size:29px;line-height:1.1;color:#101d19;margin:0 0 16px;letter-spacing:-.025em}
h2{font-size:17px;line-height:1.25;color:#1d2c26;margin:0 0 10px}
h3{color:var(--navy)}
p{line-height:1.55}
.muted{color:var(--muted)}
.page-lead{margin:-4px 0 0;color:var(--muted);font-size:13px}
.page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:23px}
.page-header .actions{margin-top:2px}

.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}
.grid.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.stat{min-height:130px;padding:22px 22px 18px;border-radius:var(--radius);background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);display:flex;align-items:flex-start;justify-content:space-between;gap:15px}
.stat-copy{min-width:0}
.stat-label{display:block;color:#68766f;font-size:12px;margin-bottom:10px}
.stat strong{display:block;color:#0f2119;font-size:31px;line-height:1;font-weight:850;letter-spacing:-.04em}
.stat small{display:block;color:#97a39e;font-size:10px;margin-top:9px;line-height:1.3}
.stat-icon{width:44px;height:44px;border-radius:11px;background:#fff1e4;color:var(--orange-2);display:flex;align-items:center;justify-content:center;flex:0 0 44px}
.stat-icon svg{width:22px;height:22px}
.stat-icon.is-success{background:var(--success-soft);color:var(--success)}

.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:23px}
.dashboard-main-card{min-height:208px}
.section{margin-top:21px}
.two-col{display:grid;grid-template-columns:1.15fr .85fr;gap:17px}
.dashboard-stack{display:grid;gap:17px}
.quick-start{margin-top:21px;border-top:1px solid var(--line-soft);padding-top:20px}
.quick-start-title{font-weight:800;color:#25352e;font-size:14px;margin-bottom:4px}
.quick-start-subtitle{font-size:11px;color:#87958f;margin-bottom:14px}
.quick-action-list{display:grid;gap:9px}
.quick-action{min-height:42px;border:1px solid #e7c8ac;border-radius:10px;display:flex;align-items:center;justify-content:space-between;padding:9px 13px;color:#73502d;font-size:12px;font-weight:750;background:#fff}
.quick-action:hover{background:#fff8f1;border-color:#ed9d53}
.quick-action svg{width:17px;height:17px;color:var(--orange-2)}

.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid transparent;border-radius:10px;padding:10px 15px;font-weight:800;font-size:12px;cursor:pointer;background:var(--navy);color:#fff;text-decoration:none;min-height:42px;line-height:1.2}
.btn:hover{text-decoration:none;filter:brightness(.985)}
.btn-primary{background:var(--orange-2);border-color:var(--orange-2)}
.btn-primary:hover{background:#dc6119}
.btn-secondary{background:var(--navy);border-color:var(--navy)}
.btn-light{background:#fff;color:var(--navy);border-color:#d5ded9}
.btn-light:hover{background:#f8faf9;border-color:#bdcbc4}
.btn-danger{background:var(--danger);border-color:var(--danger)}

label{display:block;font-weight:750;color:#26362f;margin:0 0 6px;font-size:12px}
input,select,textarea{width:100%;border:1px solid #cfd8d3;border-radius:10px;background:#fff;color:var(--text);padding:11px 12px;outline:none;min-height:42px}
input:focus,select:focus,textarea:focus{border-color:var(--orange);box-shadow:0 0 0 3px rgba(241,146,1,.13)}
.form-row{margin-bottom:15px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.help{font-size:11px;color:var(--muted);margin-top:5px;line-height:1.45}

.alert{padding:12px 14px;border-radius:10px;margin:0 0 17px;border:1px solid transparent;font-size:12px;line-height:1.5}
.alert-info{background:#f1f3f9;border-color:#d4d9e8;color:var(--navy)}
.alert-success{background:var(--success-soft);border-color:#bde3cc;color:#126b3e}
.alert-warning{background:var(--warning-soft);border-color:#f1d5a4;color:#855000}
.alert-danger{background:var(--danger-soft);border-color:#efbcc1;color:#8f2028}

.table-wrap{overflow:auto;background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
table{width:100%;border-collapse:collapse;min-width:700px}
th,td{padding:13px 15px;border-bottom:1px solid var(--line-soft);text-align:left;vertical-align:top;font-size:12px}
th{background:#f8faf9;color:#526159;font-size:10px;text-transform:uppercase;letter-spacing:.06em;font-weight:850}
tr:last-child td{border-bottom:0}
tbody tr:hover{background:#fcfdfc}
.pill{display:inline-flex;padding:5px 9px;border-radius:999px;background:#eef1ef;color:#43524a;font-size:10px;font-weight:800}
.pill-success{background:#e7f6ee;color:#176d42}
.pill-warning{background:#fff0d8;color:#8a5200}
.pill-danger{background:#fdebed;color:#92222b}

.notification{border-left:4px solid var(--navy);padding:15px 16px;background:#fff;border-radius:11px;border-top:1px solid var(--line);border-right:1px solid var(--line);border-bottom:1px solid var(--line);margin-bottom:11px;min-width:0;max-width:100%;overflow:hidden}
.notification strong,.notification p,.notification .muted{display:block;min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:break-word}
.notification p{white-space:pre-wrap}
.notification a{max-width:100%;overflow-wrap:anywhere;word-break:break-word}
.notification.warning{border-left-color:var(--orange)}
.notification.danger{border-left-color:var(--danger)}
.notification.success{border-left-color:var(--success)}
.notification.unread{box-shadow:var(--shadow)}

/* AUTH / INSTALL */
.auth-layout{background:#f4f6fa}
.auth-main{max-width:560px;margin:0 auto;padding:42px 18px}
.auth-card{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 10px 32px rgba(33,40,81,.08);padding:24px}
.auth-logo{width:290px;max-width:82%;margin:0 auto 20px;display:block}
.login-security{border-left:4px solid var(--orange);padding-left:12px;margin-top:18px;color:var(--muted);font-size:11px;line-height:1.55}
.code-box{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;background:#f2f3f7;border:1px dashed #aeb4c6;border-radius:10px;padding:12px;word-break:break-all}
.footer{text-align:center;color:var(--muted);font-size:10px;padding:24px 16px}

@media(max-width:1150px){
    .grid.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){
    :root{--topbar:64px}
    .app-sidebar{transform:translateX(-102%);transition:transform .22s ease;box-shadow:12px 0 34px rgba(20,28,45,.18)}
    .sidebar-toggle-control:checked ~ .app-sidebar{transform:translateX(0)}
    .sidebar-overlay{position:fixed;inset:0;background:rgba(12,18,29,.40);border:0;z-index:35;cursor:pointer}
    .sidebar-toggle-control:checked ~ .sidebar-overlay{display:block}
    .app-workspace{margin-left:0}
    .app-topbar{padding:0 16px}
    .sidebar-toggle{display:flex}
    .app-main{padding:24px 18px 48px}
    .two-col{grid-template-columns:1fr}
    .topbar-status{display:none}
}
@media(max-width:620px){
    .app-main{padding:20px 12px 42px}
    .grid,.grid.grid-4{grid-template-columns:1fr}
    .form-grid{grid-template-columns:1fr}
    .page-header{display:block}
    .page-header .actions{margin-top:14px}
    .topbar-account{gap:8px}
    .topbar-user{max-width:150px}
    .topbar-user strong{font-size:11px}
    .topbar-user span{font-size:9px}
    .topbar-logout-form{padding-left:8px}
    .auth-card,.card{padding:18px}
    h1{font-size:25px}
}
@media(max-width:390px){
    .topbar-user{max-width:112px}
    .btn{width:100%}
    .actions .btn{width:100%}
    .stat{min-height:118px}
}


/* PATCH 2 — ORGANIZATION CONTEXT */
.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}
.status-dot-warning{background:var(--orange);box-shadow:0 0 0 3px rgba(241,146,1,.12)}
.topbar-org-context{display:flex;align-items:center;min-width:0}
.org-switch-form{display:flex;align-items:center;gap:8px;margin:0}
.org-switch-form select{width:auto;min-width:210px;max-width:330px;min-height:36px;padding:7px 34px 7px 10px;border-radius:9px;font-size:11px;color:var(--navy);font-weight:750;background:#fff}
.topbar-org-single{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--navy);font-weight:800;max-width:330px}
.topbar-org-single span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.btn-sm{min-height:34px;padding:7px 11px;font-size:10px;border-radius:8px}
.table-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.stat-word{font-size:20px!important;letter-spacing:-.02em!important;margin-top:4px}
.form-grid-address{grid-template-columns:.55fr 1.15fr .4fr}
.feature-list{display:grid;gap:8px;margin:15px 0}
.feature-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line-soft);font-size:12px;font-weight:750;color:#34443d}
.feature-row:last-child{border-bottom:0}
.org-feature-head{margin:8px 0 12px}
@media(max-width:900px){
    .topbar-org-context{max-width:52vw}
    .org-switch-form select{min-width:130px;max-width:230px}
}
@media(max-width:620px){
    .topbar-org-context{max-width:46vw}
    .org-switch-form .btn{min-width:34px;width:auto;padding:7px 8px;font-size:9px}
    .org-switch-form select{min-width:100px;max-width:155px}
    .form-grid-address{grid-template-columns:1fr}
}
@media(max-width:390px){
    .topbar-org-context{max-width:42vw}
    .org-switch-form select{min-width:90px;max-width:135px;font-size:10px}
}


/* PATCH 3 — GUS / REGON */
.gus-nip-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:stretch}
.gus-lookup-btn{white-space:nowrap}
.gus-lookup-btn:disabled,.btn:disabled{opacity:.52;cursor:not-allowed;filter:none}
.settings-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:18px}
.settings-card-head h2{margin-bottom:7px}
.check-row{display:flex;align-items:center;gap:9px;margin:0 0 16px;font-weight:650}
.check-row input{width:18px;height:18px;min-height:18px;flex:0 0 18px}
.diagnostic-list{display:grid;gap:0;margin:14px 0 16px;border-top:1px solid var(--line-soft)}
.diagnostic-list>div{display:flex;justify-content:space-between;gap:12px;padding:11px 0;border-bottom:1px solid var(--line-soft);font-size:12px}
.diagnostic-list strong{color:var(--navy)}
.alert a{color:inherit;font-weight:850;text-decoration:underline}
@media(max-width:620px){
    .gus-nip-row{grid-template-columns:1fr}
    .gus-lookup-btn{width:100%}
    .settings-card-head{display:block}
    .settings-card-head .pill{margin-top:8px}
}

/* PATCH 8 — centralny komponent telefonu UE, wzorowany na KDRIVER. */
.szodo-phone-control{display:grid;grid-template-columns:minmax(165px,.85fr) minmax(0,1.15fr);gap:10px;align-items:stretch;min-width:0}
.szodo-phone-control select,.szodo-phone-control input{min-width:0;min-height:42px;height:42px}
.szodo-phone-control select{font-weight:750;color:var(--navy)}
@media(max-width:430px){
    .szodo-phone-control{grid-template-columns:minmax(135px,.9fr) minmax(0,1.1fr);gap:8px}
    .szodo-phone-control select{font-size:11px;padding-left:9px;padding-right:24px}
}
@media(max-width:340px){
    .szodo-phone-control{grid-template-columns:1fr}
}

/* PATCH 9 — Cloudflare Turnstile + centralna poczta SMTP */
.settings-row-spaced{margin-top:20px}
.settings-secondary-action{margin-top:14px}
.smtp-settings-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:15px}
.turnstile-login-box{display:flex;align-items:center;justify-content:flex-start;min-height:72px;margin:6px 0 16px;padding:10px 0;overflow:hidden}
@media(max-width:620px){
    .smtp-settings-grid{grid-template-columns:1fr}
    .turnstile-login-box{justify-content:center}
}

/* SZODO poprawka 10 — abonamenty */
.subscription-feature-fieldset{border:1px solid var(--border);border-radius:14px;padding:14px 16px;margin:12px 0 16px}.subscription-feature-fieldset legend{font-weight:800;padding:0 6px}.subscription-feature-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px}.subscription-feature-check{display:flex;gap:8px;align-items:flex-start;font-weight:600}.subscription-feature-check input{margin-top:3px}.subscription-plan-active{margin:10px 0 16px}.subscription-plan-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.subscription-plan-card.is-archived{opacity:.66}.subscription-plan-head,.subscription-org-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.subscription-plan-head h3{margin:0}.subscription-meta-row{display:flex;gap:18px;flex-wrap:wrap;margin:12px 0}.subscription-plan-features{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}.subscription-editor{margin:14px 0}.subscription-editor summary,.subscription-org-history summary{cursor:pointer;font-weight:800;color:var(--navy)}.subscription-card-actions{margin-top:12px}.subscription-org-card{border-left:4px solid var(--orange)}.subscription-assign-form{margin-top:16px;padding-top:16px;border-top:1px solid var(--border)}.subscription-org-history{margin-top:16px}.subscription-org-history .table-wrap{margin-top:10px}
@media(max-width:800px){.subscription-plan-grid,.subscription-feature-grid{grid-template-columns:1fr}.subscription-plan-head,.subscription-org-head{flex-direction:column}.subscription-meta-row{flex-direction:column;gap:6px}}

/* SZODO poprawka 11 — centralny moduł faktur */
.invoice-settings-grid{align-items:start}
.invoice-seller-lookup-form{margin-bottom:18px;padding-bottom:18px;border-bottom:1px solid var(--border,#dfe3ea)}
.inline-field-action{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
.section-head{display:flex;gap:16px;align-items:center;justify-content:space-between;margin-bottom:12px}
.invoice-search{display:flex;gap:8px;align-items:center;max-width:480px;width:100%}
.invoice-search input{min-width:0;flex:1}
.invoice-view{padding:28px}
.invoice-view.is-void{opacity:.78}
.invoice-view-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;padding-bottom:18px;border-bottom:4px solid #f19201}
.invoice-brand{font-weight:900;font-size:32px;letter-spacing:-1.5px;color:#212851}
.invoice-title-block{text-align:right;display:grid;gap:4px}
.invoice-title-block span{font-weight:800;font-size:14px;color:#5d6574}
.invoice-title-block strong{font-size:20px;color:#212851}
.invoice-title-block em{font-style:normal;font-weight:800;color:#ec6f22}
.invoice-party-grid{display:grid;grid-template-columns:1fr 1fr;gap:26px;padding:24px 0}
.invoice-party-grid h3{margin:4px 0 8px}
.invoice-party-grid p{margin:0;line-height:1.55}
.invoice-meta-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 24px}
.invoice-meta-grid>div{background:#f6f7fa;border:1px solid #e1e5ec;border-radius:10px;padding:12px}
.invoice-meta-grid span,.invoice-payment-box span{display:block;font-size:12px;color:#6b7280;margin-bottom:5px}
.invoice-meta-grid strong{font-size:14px;color:#212851}
.invoice-items table{min-width:850px}
.invoice-items tfoot th{background:#f8f9fb}
.invoice-payment-box{margin-top:24px;display:grid;grid-template-columns:1fr 2fr 1fr;gap:12px;background:#212851;color:#fff;border-radius:12px;padding:18px}
.invoice-payment-box strong{display:block;color:#fff}
.invoice-payment-box small{display:block;margin-top:4px;color:#d8dcea}
@media(max-width:800px){
 .inline-field-action{grid-template-columns:1fr}.inline-field-action .btn{width:100%}
 .section-head{align-items:stretch;flex-direction:column}.invoice-search{max-width:none}
 .invoice-view{padding:18px}.invoice-view-head{flex-direction:column}.invoice-title-block{text-align:left}
 .invoice-party-grid{grid-template-columns:1fr}.invoice-meta-grid{grid-template-columns:1fr 1fr}
 .invoice-payment-box{grid-template-columns:1fr}
}
@media(max-width:430px){.invoice-meta-grid{grid-template-columns:1fr}}

/* SZODO 0.2.2 — KSeF */
.ksef-test-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.ksef-test-actions form{margin:0}.ksef-prod-toggle{margin:16px 0}.ksef-prod-send-form{margin-top:18px;padding-top:16px;border-top:1px solid var(--line,#d9dee8)}.ksef-prod-send-form .btn{margin-top:10px}.ksef-number-box{margin:16px 0;padding:14px 16px;border:1px solid #d9dee8;border-radius:12px;background:#f8fafc}.ksef-number-box span{display:block;font-size:12px;color:#667085;margin-bottom:5px}.ksef-number-box strong{font-size:14px;overflow-wrap:anywhere}.ksef-invoice-card .actions{align-items:center}
@media (max-width:640px){.ksef-test-actions{display:grid;grid-template-columns:1fr}.ksef-test-actions .btn{width:100%}.ksef-prod-send-form .btn{width:100%}}

/* SZODO v0.3.0 — konfigurator organizacji */
.setup-progress-card{margin-bottom:18px}.setup-progress-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.setup-progress-head>div{display:flex;align-items:center;gap:12px}.setup-progress-head>div span{font-weight:800;color:var(--orange,#f36f21)}.setup-progress-track{height:10px;border-radius:999px;background:#edf0f5;overflow:hidden}.setup-progress-track>span{display:block;height:100%;min-width:0;background:linear-gradient(90deg,#f36f21,#f59a0a);border-radius:999px}.setup-step-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-top:16px}.setup-step-link{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid #e3e6ee;border-radius:12px;text-decoration:none;color:#4b5268;font-size:13px;font-weight:700;background:#fff}.setup-step-link span{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#f3f4f8;color:#212851;font-weight:900}.setup-step-link.is-active{border-color:#f36f21;background:#fff6ef;color:#212851}.setup-step-link.is-active span{background:#f36f21;color:#fff}.setup-question-card{max-width:960px}.setup-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px 20px}.setup-field{margin:0}.setup-field label{min-height:42px}.setup-form-actions{margin-top:22px}.setup-plan-list{display:grid;gap:12px}.setup-plan-item{display:grid;grid-template-columns:8px 1fr auto;gap:14px;align-items:start;padding:16px;border:1px solid #e4e7ee;border-radius:14px;background:#fff}.setup-plan-marker{width:8px;height:100%;min-height:58px;border-radius:999px;background:#f59a0a}.setup-plan-item.priority-high .setup-plan-marker{background:#c94444}.setup-plan-copy strong{display:block;color:#17213e;margin-bottom:5px}.setup-plan-copy p{margin:0 0 6px;color:#555d70;line-height:1.45}.setup-plan-copy small{color:#788093}.setup-complete-form{margin-top:18px}.setup-card-progress{display:flex;align-items:baseline;gap:10px;margin-bottom:10px}.setup-card-progress strong{font-size:26px;color:#212851}.setup-card-progress span{color:#667085}.setup-summary-layout{align-items:start}
@media(max-width:900px){.setup-step-nav{grid-template-columns:1fr}.setup-fields{grid-template-columns:1fr}.setup-plan-item{grid-template-columns:6px 1fr}.setup-plan-item>.pill{grid-column:2;justify-self:start}}

/* SZODO v0.4.0 — Data Vault */
.vault-mode-list{display:grid;gap:12px;margin:18px 0}.vault-mode-option{display:flex;gap:12px;align-items:flex-start;border:1px solid var(--border);border-radius:14px;padding:14px;background:#fff;cursor:pointer}.vault-mode-option:hover{border-color:#f19201}.vault-mode-option.is-disabled{opacity:.58;cursor:not-allowed;background:#f7f8fa}.vault-mode-radio{padding-top:3px}.vault-mode-copy{display:grid;gap:4px}.vault-mode-copy strong{color:#212851}.vault-mode-copy span{color:#4d5668;line-height:1.45}.vault-mode-copy small{color:#7b8493}.section-actions{margin-top:16px;display:flex;gap:10px;flex-wrap:wrap}.section-actions form{margin:0}

/* SZODO v0.5.0 — Dokumentacja i Biblioteka */
.document-placeholder-list{display:grid;gap:8px;margin-top:14px}.document-placeholder-list>div{display:grid;grid-template-columns:minmax(150px,220px) 1fr;gap:12px;align-items:center;padding:9px 10px;border:1px solid var(--border);border-radius:10px;background:#fff}.document-placeholder-list code{font-weight:800;color:var(--navy);font-size:12px}.document-preview{background:#fff;border:1px solid var(--border);border-radius:12px;padding:22px;line-height:1.65;color:var(--text)}.document-preview h1{font-size:24px;margin:0 0 18px;color:var(--navy)}.document-preview h2{font-size:20px;margin:22px 0 12px;color:var(--navy)}.document-preview h3{font-size:17px;margin:18px 0 10px}.document-preview p{margin:0 0 12px}.document-preview ul{margin:0 0 14px;padding-left:24px}.document-preview-compact{max-height:620px;overflow:auto}.document-create-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end}.document-create-row select{width:100%}.document-publish-form{margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.document-action-stack{display:grid;gap:10px}.document-action-stack form,.inline-form{margin:0}.inline-form{display:inline-block;margin-left:12px}.document-editor-card textarea{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;line-height:1.5}.btn-sm{padding:7px 10px;font-size:12px}
@media(max-width:720px){.document-placeholder-list>div{grid-template-columns:1fr}.document-create-row{grid-template-columns:1fr}.inline-form{display:block;margin:10px 0 0}.document-preview{padding:16px}.document-preview h1{font-size:21px}.document-preview h2{font-size:18px}}

/* SZODO v0.6.0 — Pracownicy i współpracownicy */
.employee-summary-grid{margin-bottom:18px}.employee-layout{align-items:start}.employee-filter-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 16px}.employee-filter-tabs a{display:inline-flex;padding:8px 11px;border:1px solid var(--line);border-radius:999px;background:#fff;color:#58645e;font-size:11px;font-weight:800}.employee-filter-tabs a.is-active{background:#fff4e9;border-color:#f19201;color:#8a4b00}.employee-card-list{display:grid;gap:10px}.employee-list-card{display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:12px;align-items:center;padding:13px;border:1px solid var(--line);border-radius:12px;background:#fff;color:inherit;text-decoration:none}.employee-list-card:hover{border-color:#f0a15a;background:#fffaf5}.employee-avatar{width:46px;height:46px;border-radius:12px;display:grid;place-items:center;background:#212851;color:#fff;font-weight:900;font-size:14px}.employee-list-copy{min-width:0}.employee-list-copy strong,.employee-list-copy span,.employee-list-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.employee-list-copy strong{color:#212851}.employee-list-copy span{font-size:12px;margin-top:3px}.employee-list-copy small{font-size:10px;color:var(--muted);margin-top:4px}.employee-extra-fields{border:1px solid var(--line);border-radius:12px;margin:8px 0 16px;background:#fafbfc}.employee-extra-fields summary{padding:12px 14px;cursor:pointer;font-weight:850;color:#212851}.employee-extra-body{padding:0 14px 14px}.employee-checklist-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.employee-checklist-head h2{margin-bottom:4px}.employee-task-list{display:grid;gap:8px;margin-top:14px}.employee-task-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--line-soft);border-radius:10px;background:#fff}.employee-task-row strong,.employee-task-row small{display:block}.employee-task-row small{margin-top:4px;color:var(--muted);font-size:10px}.employee-task-row form{margin:0;flex:0 0 auto}
@media(max-width:720px){.employee-list-card{grid-template-columns:42px minmax(0,1fr)}.employee-list-card>.pill{grid-column:2;justify-self:start}.employee-task-row{align-items:flex-start;flex-direction:column}.employee-task-row form,.employee-task-row .btn{width:100%}}

/* SZODO v0.7.0 — Upoważnienia */
.authorization-layout{align-items:start}
.authorization-summary-grid .stat-word{font-size:1.15rem;line-height:1.15}
.authorization-fieldset{border:1px solid var(--border,#dfe3ea);border-radius:12px;padding:14px 16px;margin:0 0 16px;background:#fff}
.authorization-fieldset legend{font-weight:800;color:#212851;padding:0 8px}
.authorization-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px}
.authorization-check-grid .check-row{display:flex;gap:9px;align-items:flex-start;font-weight:600;color:#303744;padding:7px 0}
.authorization-check-grid .check-row input{margin-top:2px;flex:0 0 auto}
.authorization-filter-tabs{flex-wrap:wrap}
@media (max-width:720px){.authorization-check-grid{grid-template-columns:1fr}.authorization-fieldset{padding:12px}.authorization-summary-grid{grid-template-columns:1fr 1fr}}
@media (max-width:430px){.authorization-summary-grid{grid-template-columns:1fr}}

/* SZODO v0.8.0 — Szkolenia / e-learning */
.training-content{max-width:900px;line-height:1.7;color:var(--text,#202533)}
.training-content h1,.training-content h2,.training-content h3{color:#212851;margin:1.4em 0 .55em}
.training-content h1{font-size:1.6rem}.training-content h2{font-size:1.3rem}.training-content h3{font-size:1.08rem}
.training-content p{margin:.65em 0}.training-content ul{padding-left:1.4rem}.training-content li{margin:.35em 0}
.training-question-editor{display:grid;gap:12px;margin:14px 0 18px}
.training-question{border:1px solid #dfe3eb;border-radius:12px;background:#fff;overflow:hidden}
.training-question summary{cursor:pointer;font-weight:700;padding:14px 16px;color:#212851;background:#f8f9fc}
.training-question-body{padding:16px}
.training-quiz{display:grid;gap:16px;margin:16px 0 20px}
.training-quiz-question{border:1px solid #dfe3eb;border-radius:14px;padding:16px;background:#fff}
.training-quiz-question legend{font-weight:800;color:#212851;padding:0 8px}
.training-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
a.training-card{text-decoration:none;color:inherit;transition:transform .15s ease,box-shadow .15s ease}
a.training-card:hover{transform:translateY(-2px)}
.training-card-top,.training-card-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.training-card-meta{font-size:.86rem;color:#6c7383;margin-top:18px}
.training-certificate-card{border-top:4px solid #f19201}
@media(max-width:600px){.training-question-body{padding:12px}.training-card-grid{grid-template-columns:1fr}.training-content{font-size:.96rem}}

/* SZODO v0.9 — identyfikatory pracownicze */
.identifier-layout{align-items:start}.identifier-status-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.id-card-mini{font-size:12px;letter-spacing:.04em}.employee-id-preview{max-width:520px;aspect-ratio:1.585/1;border:1px solid var(--border,#d9dee8);border-radius:18px;overflow:hidden;background:#fff;box-shadow:0 12px 28px rgba(33,40,81,.10)}.employee-id-brand{height:25%;background:#212851;border-bottom:6px solid #ec6f22;color:#fff;padding:14px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px}.employee-id-brand strong{font-size:28px;letter-spacing:-.04em}.employee-id-brand span{font-size:10px;font-weight:800;letter-spacing:.08em}.employee-id-body{height:64%;display:grid;grid-template-columns:26% 1fr 24%;gap:14px;align-items:center;padding:14px 18px}.employee-id-photo{width:100%;aspect-ratio:4/5;object-fit:cover;border-radius:10px;border:1px solid #dfe3eb}.employee-id-photo-placeholder{display:grid;place-items:center;background:#eef0f5;color:#777;font-size:9px;font-weight:800}.employee-id-copy{min-width:0;display:grid;gap:4px}.employee-id-copy strong{font-size:18px;color:#212851}.employee-id-copy span{font-size:12px;font-weight:800}.employee-id-copy small{font-size:10px;color:#697080}.employee-id-copy b{margin-top:8px;font-size:10px;color:#212851}.employee-id-qr svg{display:block;width:100%;height:auto;background:#fff}.employee-id-qr rect{fill:#111}.employee-id-org{height:11%;display:flex;align-items:center;padding:0 18px;font-size:9px;font-weight:800;color:#212851;background:#f7f8fa;border-top:1px solid #eceef3}.identifier-detail-layout{align-items:start}@media(max-width:760px){.employee-id-preview{max-width:100%}.employee-id-brand{padding:10px 12px}.employee-id-brand strong{font-size:22px}.employee-id-body{padding:10px 12px;gap:9px}.employee-id-copy strong{font-size:14px}.identifier-status-actions>*{width:100%}.identifier-status-actions .btn{width:100%}}

/* SZODO v0.10.0 — Sprzęt i mienie */
.asset-layout,.asset-detail-layout{align-items:start}
.asset-search-form{display:flex;gap:10px;align-items:end;margin:14px 0}
.asset-search-form input{flex:1}
.asset-avatar svg{width:24px;height:24px}
.asset-security-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px;margin:12px 0 16px}
.asset-status-actions{display:flex;flex-wrap:wrap;gap:8px}
@media (max-width:720px){.asset-search-form{align-items:stretch;flex-direction:column}.asset-security-checks{grid-template-columns:1fr}.asset-status-actions{flex-direction:column}.asset-status-actions .inline-form,.asset-status-actions .btn{width:100%}}


/* Etap 11 — Budynki i pomieszczenia */
.location-layout{align-items:start}.location-avatar,.room-avatar{color:var(--navy)}
.location-security-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 18px;margin:14px 0}
.location-security-summary{display:grid;gap:8px}.location-security-summary>div{display:flex;justify-content:space-between;gap:14px;padding:9px 0;border-bottom:1px solid var(--border)}
.location-security-summary>div:last-child{border-bottom:0}.location-security-summary strong{color:var(--navy)}
@media(max-width:700px){.location-security-grid{grid-template-columns:1fr}}


/* SZODO v0.12.0 — Klucze i kontrola dostępu */
.access-layout,.access-item-layout{align-items:start}
.access-avatar{background:#fff4e9;color:#212851;border:1px solid #f3c08a}
.access-avatar svg{width:24px;height:24px}
.access-scope-list{display:grid;gap:8px;margin:12px 0}
.access-scope-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--line-soft);border-radius:10px;background:#fff}
.access-scope-row strong,.access-scope-row small{display:block}
.access-scope-row small{margin-top:3px;color:var(--muted);font-size:10px}
.access-scope-row form{margin:0;flex:0 0 auto}
.access-add-scope{margin-top:14px;padding-top:14px;border-top:1px solid var(--line-soft)}
@media(max-width:720px){
    .access-scope-row{align-items:flex-start;flex-direction:column}
    .access-scope-row form,.access-scope-row .btn{width:100%}
}

/* PATCH 35 — WWW */
.web-contractor-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(170px,230px);gap:12px;align-items:center}
.web-contractor-row select{min-width:0}
@media(max-width:620px){.web-contractor-row{grid-template-columns:1fr}.web-contractor-row select{width:100%}}

/* SZODO 42 — Raporty przekrojowe */
.report-form-span{grid-column:1/-1}.report-check-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 16px;margin-top:10px}.report-check-grid .check-row{margin:0;padding:7px 0}.report-metric{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--line)}.report-metric:last-child{border-bottom:0}.report-metric strong{font-size:18px;color:var(--navy)}
@media(max-width:900px){.report-check-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.report-check-grid{grid-template-columns:1fr}.report-form-span{grid-column:auto}.report-metric{align-items:flex-start}}


/* Etap 26 / poprawka 43 — rozdzielenie stref i Panel Pracownika */
.login-home-link{margin:-.25rem 0 .75rem}.login-home-link a{color:var(--muted,#667085);text-decoration:none;font-size:.86rem;font-weight:700}.employee-portal-hero{background:linear-gradient(135deg,#212851,#151a3d);color:#fff;border-radius:20px;padding:28px;margin:0 0 22px;box-shadow:0 18px 44px rgba(33,40,81,.18)}.employee-portal-eyebrow{display:block;color:#ffb75c;font-weight:900;text-transform:uppercase;letter-spacing:.08em;font-size:.74rem}.employee-portal-hero h2{font-size:clamp(1.55rem,3vw,2.25rem);margin:8px 0 7px}.employee-portal-hero p{max-width:820px;color:#dfe3f2;margin:0;line-height:1.55}.employee-progress{height:10px;border-radius:99px;background:rgba(255,255,255,.12);overflow:hidden;margin-top:20px}.employee-progress span{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#f28b24,#ffb75c)}.employee-action-list{display:grid;gap:10px}.employee-action-item{display:flex;align-items:center;justify-content:space-between;gap:16px;text-decoration:none;color:inherit;border:1px solid var(--border,#e2e7f0);border-radius:12px;padding:14px}.employee-action-item:hover{border-color:#f28b24}.employee-action-item span,.employee-action-item small{display:block}.employee-action-item small{margin-top:4px;color:var(--muted,#667085)}.employee-action-item b{color:#212851;white-space:nowrap}.employee-check-list{display:grid;gap:11px}.employee-check-list>div{display:flex;align-items:flex-start;gap:9px;padding:11px 0;border-bottom:1px solid var(--border,#e2e7f0)}.employee-check-list>div:last-child{border-bottom:0}.employee-data{display:grid;grid-template-columns:140px 1fr;gap:8px 12px;margin:0}.employee-data dt{color:var(--muted,#667085)}.employee-data dd{margin:0;font-weight:700}.employee-mini-list{display:grid;gap:10px}.employee-mini-list>div{padding:10px 0;border-bottom:1px solid var(--border,#e2e7f0)}.employee-mini-list>div:last-child{border-bottom:0}.employee-mini-list strong,.employee-mini-list small{display:block}.employee-mini-list small{color:var(--muted,#667085);margin-top:3px}@media(max-width:700px){.employee-portal-hero{padding:22px 18px;border-radius:16px}.employee-data{grid-template-columns:1fr}.employee-data dd{padding-bottom:7px}.employee-action-item{align-items:flex-start;flex-direction:column}.employee-action-item b{align-self:flex-end}}


/* Poprawka 44 — jawna bramka serwisowa administratora platformy */
.service-access-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 18px;background:#fff3cd;border-bottom:1px solid #e6c75a;color:#4b3b00;position:sticky;top:0;z-index:30}.service-access-active{border:2px solid #e6a700;background:#fffaf0}.service-access-active .actions{display:flex;gap:8px;flex-wrap:wrap}.btn-danger{background:#a61b1b;color:#fff;border-color:#a61b1b}.btn-danger:hover{background:#861616;border-color:#861616}@media(max-width:700px){.service-access-banner{align-items:flex-start;flex-direction:column;padding:10px 14px}.service-access-banner .btn{width:100%;justify-content:center}}

/* v46 — indywidualne linki dostępu */
.kv-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:15px 0 18px}
.kv-grid>div{background:#f8faf9;border:1px solid var(--line-soft);border-radius:10px;padding:12px}
.kv-grid span{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.05em;margin-bottom:5px}
.kv-grid strong{display:block;color:var(--navy);font-size:12px;word-break:break-word}
@media(max-width:760px){.kv-grid{grid-template-columns:1fr 1fr}}
@media(max-width:430px){.kv-grid{grid-template-columns:1fr}}

.access-link-code{margin-top:8px}

/* PATCH 51 — QR podczas konfiguracji 2FA */
.totp-setup-grid{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:18px;margin:20px 0 18px;align-items:start}
.totp-qr-card,.totp-manual-card{border:1px solid var(--line);border-radius:14px;background:#fff;padding:18px}
.totp-qr-card h2,.totp-manual-card h2{font-size:16px;margin:0 0 14px;color:var(--navy)}
.totp-qr{width:min(100%,260px);aspect-ratio:1;margin:0 auto 12px;padding:8px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 6px 20px rgba(33,40,81,.06)}
.totp-qr svg{display:block;width:100%;height:100%}
.totp-qr-help{text-align:center;line-height:1.55}
.totp-key-row{margin-bottom:12px}
.totp-secret-warning{margin:12px 0 0;font-size:11px;line-height:1.5}
@media(max-width:620px){
    .totp-setup-grid{grid-template-columns:1fr;gap:14px}
    .totp-qr-card,.totp-manual-card{padding:15px}
    .totp-qr{width:min(100%,240px)}
}

/* PATCH 54 — prywatny branding organizacji, wzorzec KKomis. */
.topbar-org-context{gap:10px}
.topbar-org-brand{display:flex;align-items:center;justify-content:flex-start;min-width:0;max-width:220px;height:50px;overflow:hidden}
.topbar-org-brand img{display:block;width:auto;height:auto;max-height:44px;max-width:220px;object-fit:contain;object-position:left center}
.topbar-org-logo-placeholder{display:inline-flex;align-items:center;justify-content:center;min-height:34px;max-width:220px;padding:7px 11px;border:1px dashed #b9c2ca;border-radius:9px;background:#fff;color:var(--navy);font-size:11px;font-weight:800;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar-org-logo-placeholder:hover{border-color:var(--orange);color:var(--orange)}
.organization-logo-preview{display:flex;align-items:center;justify-content:flex-start;min-height:92px;margin:14px 0 8px;padding:14px;border:1px solid var(--line-soft);border-radius:12px;background:#fff;overflow:hidden}
.organization-logo-preview img{display:block;width:auto;height:auto;max-width:100%;max-height:120px;object-fit:contain;object-position:left center}
.organization-logo-empty{margin:14px 0;padding:14px;border:1px dashed #c7d0d7;border-radius:12px;background:#fafbfc;color:var(--muted);font-size:12px;font-weight:650}
.organization-logo-form{margin-top:14px}
.organization-logo-remove-form{margin-top:10px}
.organization-logo-form input[type=file]{padding:8px;background:#fff}
@media(max-width:900px){
    .topbar-org-brand{max-width:170px}
    .topbar-org-brand img{max-width:170px}
    .topbar-org-logo-placeholder{max-width:170px}
}
@media(max-width:620px){
    .topbar-org-context{gap:7px}
    .topbar-org-brand{max-width:120px;height:46px}
    .topbar-org-brand img{max-height:38px;max-width:120px}
    .topbar-org-logo-placeholder{max-width:120px;min-height:32px;padding:6px 8px;font-size:9px}
}
@media(max-width:390px){
    .topbar-org-brand{max-width:92px}
    .topbar-org-brand img{max-width:92px;max-height:34px}
    .topbar-org-logo-placeholder{max-width:92px;font-size:0}
    .topbar-org-logo-placeholder::after{content:'Dodaj logo';font-size:9px}
}

/* PATCH 55 — logo organizacji dostępne bezpośrednio w topbarze, niezależnie od abonamentu. */
.topbar-org-logo-upload{display:flex;align-items:center;gap:7px;min-width:0;margin:0}
.topbar-org-logo-upload .topbar-org-logo-file{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}
.topbar-org-logo-upload .topbar-org-logo-placeholder{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;min-width:150px;max-width:220px;height:48px;padding:7px 12px;line-height:1.05;cursor:pointer}
.topbar-org-logo-placeholder-main{display:block;font-size:11px;font-weight:850;white-space:nowrap}
.topbar-org-logo-placeholder-sub{display:block;margin-top:4px;font-size:8px;font-weight:650;color:var(--muted);letter-spacing:.02em;white-space:nowrap}
.topbar-org-logo-upload.is-uploading .topbar-org-logo-placeholder{opacity:.6;pointer-events:none}
.topbar-org-brand[href]{cursor:pointer;text-decoration:none;border-radius:8px}
.topbar-org-brand[href]:focus-visible,.topbar-org-logo-placeholder:focus-within{outline:2px solid var(--orange);outline-offset:2px}
@media(max-width:620px){
    .topbar-org-logo-upload .topbar-org-logo-placeholder{min-width:105px;max-width:120px;height:42px;padding:6px 8px}
    .topbar-org-logo-placeholder-main{font-size:9px}
    .topbar-org-logo-placeholder-sub{font-size:7px}
}
@media(max-width:390px){
    .topbar-org-logo-upload .topbar-org-logo-placeholder{min-width:86px;max-width:92px}
    .topbar-org-logo-placeholder-sub{display:none}
}
.topbar-org-logo-upload .topbar-org-logo-placeholder::after{content:none!important}
.topbar-org-logo-upload:focus-within .topbar-org-logo-placeholder{outline:2px solid var(--orange);outline-offset:2px}

/* PATCH 58 — Cennik klienta i płatność Przelewy24 TEST */
.client-pricing-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.client-pricing-card{display:flex;flex-direction:column;min-width:0}
.client-pricing-card .subscription-plan-features{flex:1;align-content:flex-start}
.client-plan-action{margin-top:auto;padding-top:8px}
.client-plan-action .btn{width:100%;justify-content:center}
.simple-steps{margin:0;padding-left:20px;color:var(--navy);line-height:1.7}
.simple-steps li+li{margin-top:4px}
.payment-settings-form{display:grid;gap:12px;max-width:820px}
.payment-test-banner{border-left:4px solid var(--orange)}
.payment-order-card,.payment-provider-card{min-width:0}
.detail-list{display:grid;gap:0;border:1px solid var(--line-soft);border-radius:12px;overflow:hidden}
.detail-list>div{display:grid;grid-template-columns:minmax(120px,.8fr) minmax(0,1.2fr);gap:14px;padding:11px 13px;background:#fff;border-bottom:1px solid var(--line-soft)}
.detail-list>div:last-child{border-bottom:0}
.detail-list span{color:var(--muted);font-size:11px;font-weight:700}
.detail-list strong{color:var(--navy);font-size:12px;overflow-wrap:anywhere}
.payment-provider-head{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.payment-provider-head h2{margin:0}.payment-provider-head p{margin:4px 0 0}
.payment-provider-badge{display:inline-flex;align-items:center;justify-content:center;width:58px;height:38px;border-radius:10px;background:#212851;color:#fff;font-weight:900;letter-spacing:.04em}
.payment-test-actions{margin:14px 0 10px}.payment-cancel-form{margin-top:16px}.btn-lg{min-height:48px;padding:12px 18px;font-size:14px}
@media(max-width:1100px){.client-pricing-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.client-pricing-grid{grid-template-columns:1fr}.detail-list>div{grid-template-columns:1fr;gap:3px}.payment-test-actions .btn,.payment-cancel-form .btn{width:100%;justify-content:center}}

/* SZODO 59 — Panel IOD */
.iod-issues{display:grid;gap:10px}.iod-issue,.iod-request{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;border:1px solid var(--border,#dfe3ea);border-radius:12px;background:#fff;min-width:0}.iod-issue>div,.iod-request>div{min-width:0}.iod-issue strong,.iod-request strong{display:block;overflow-wrap:anywhere}.iod-issue small,.iod-request small{display:block;margin-top:4px;color:var(--muted,#667085);overflow-wrap:anywhere}.iod-issue-danger{border-left:4px solid #b42318}.iod-issue-warning{border-left:4px solid #f79009}.iod-issue-success{border-left:4px solid #12b76a}@media(max-width:640px){.iod-issue,.iod-request{align-items:stretch;flex-direction:column}.iod-issue form,.iod-request .actions,.iod-request form{width:100%}.iod-issue .btn,.iod-request .btn{width:100%}}

/* PATCH 62 — kontakt pracownika: e-mail i telefon jeden pod drugim + typ Prywatny/Służbowy. */
.employee-contact-stack{display:grid;gap:16px;margin:2px 0 16px}
.employee-contact-field{margin:0}
.employee-contact-control{display:grid;grid-template-columns:minmax(0,1fr) minmax(140px,180px);gap:10px;align-items:stretch}
.employee-contact-control>input,.employee-contact-control>select{min-width:0;min-height:42px;height:42px}
.employee-contact-control>select{font-weight:800;color:var(--navy)}
.employee-contact-control--phone{grid-template-columns:minmax(0,1fr) minmax(140px,180px)}
.employee-contact-phone{min-width:0}
.employee-contact-phone .szodo-phone-control{width:100%}
.employee-private-contact-help{margin-top:6px}
.employee-private-contact-warning{margin-top:7px;padding:9px 11px;border:1px solid #f1bf87;border-radius:9px;background:#fff5e9;color:#8a4b00;font-size:11px;font-weight:750;line-height:1.45}
@media(max-width:620px){
    .employee-contact-control,.employee-contact-control--phone{grid-template-columns:1fr}
    .employee-contact-control>select{width:100%}
}


/* Poprawka 65 — bezpieczny zapis indywidualnego linku do zakładek. */
.account-bookmark-card{scroll-margin-top:86px}
.bookmark-ready{border:1px solid #ffd3a0;background:#fff8f0;border-radius:12px;padding:15px;color:#4a3a28}
.bookmark-ready>.actions{margin-top:12px}
.bookmark-browser-guide{margin:16px 0;padding:16px;border:1px solid #ffd3a0;background:#fff8f0;border-radius:12px;color:#3f352b;line-height:1.55}
.bookmark-browser-guide strong{display:block;margin-bottom:8px;color:var(--navy)}
.bookmark-browser-guide ul{margin:0;padding-left:20px}
.bookmark-browser-guide li+li{margin-top:6px}
.bookmark-browser-guide kbd{display:inline-block;min-width:26px;padding:2px 6px;border:1px solid #c7cdd2;border-bottom-width:2px;border-radius:5px;background:#fff;color:#20242a;font:700 11px/1.5 system-ui,sans-serif;text-align:center}
@media(max-width:620px){.topbar-save-access{height:36px;padding:0 9px;font-size:11px}.bookmark-ready .btn{width:100%}}

/* SZODO 66 — branding identyfikatorów per organizacja */
.employee-id-preview,
.identifier-header-demo,
.identifier-branding-logo-preview{
  --id-brand-bg:#212851;
  --id-brand-accent:#ec6f22;
  --id-brand-text:#fff;
  --id-brand-footer:#ec6f22;
  --id-brand-footer-text:#212851;
}
.employee-id-preview .employee-id-brand,
.identifier-header-demo .employee-id-brand{
  background:var(--id-brand-bg)!important;
  border-bottom-color:var(--id-brand-accent)!important;
  color:var(--id-brand-text)!important;
}
.employee-id-brand-identity{min-width:0;display:flex;align-items:center;max-width:58%;height:100%}
.employee-id-brand-identity strong{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--id-brand-text)!important;font-size:22px!important;letter-spacing:-.025em!important}
.employee-id-brand-logo{display:block;max-width:100%;max-height:42px;width:auto;height:auto;object-fit:contain;object-position:left center}
.employee-id-brand-label{max-width:40%;text-align:right;line-height:1.2;white-space:normal}
.employee-id-preview .employee-id-org,.identifier-footer-demo{background:var(--id-brand-footer)!important;color:var(--id-brand-footer-text)!important;border-top-color:var(--id-brand-footer)!important}
.identifier-branding-source{margin:10px 0 0}
.identifier-branding-settings{margin-top:18px}
.identifier-branding-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}
.identifier-branding-grid h3{margin:0 0 8px}
.identifier-branding-logo-preview{min-height:92px;border:1px solid var(--border,#d9dee8);border-radius:14px;background:var(--id-brand-bg);color:var(--id-brand-text);display:flex;align-items:center;justify-content:flex-start;padding:16px 18px;margin:12px 0 8px;overflow:hidden}
.identifier-branding-logo-preview img{display:block;max-width:260px;max-height:58px;width:auto;height:auto;object-fit:contain;object-position:left center}
.identifier-branding-logo-preview strong{font-size:24px;line-height:1.1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;color:var(--id-brand-text)}
.identifier-branding-upload-form{margin-top:16px}
.identifier-branding-remove-form{margin-top:8px}
.identifier-color-grid{display:grid;grid-template-columns:1fr;gap:4px}
.color-input-row{display:grid;grid-template-columns:64px minmax(0,1fr);gap:10px;align-items:center}
.color-input-row input[type=color]{width:64px;height:44px;padding:3px;border:1px solid var(--border,#d9dee8);border-radius:10px;background:#fff;cursor:pointer}
.color-input-row code{font-size:13px;color:var(--muted,#687080);background:#f6f7f9;border:1px solid var(--border,#d9dee8);border-radius:8px;padding:8px 10px}
.identifier-header-demo{margin-top:18px;border-radius:14px;overflow:hidden;border:1px solid var(--border,#d9dee8)}
.identifier-header-demo .employee-id-brand{height:88px;padding:14px 18px}
.identifier-footer-demo{min-height:34px;display:flex;align-items:center;padding:7px 18px;font-size:11px;font-weight:800}
.identifier-inherit-check{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:13px;font-weight:700;color:var(--navy,#212851)}
.identifier-inherit-check input{width:auto;margin:0}
@media(max-width:760px){
  .identifier-branding-grid{grid-template-columns:1fr}
  .employee-id-brand-identity{max-width:55%}
  .employee-id-brand-logo{max-height:34px}
  .employee-id-brand-identity strong{font-size:17px!important}
  .identifier-branding-logo-preview img{max-width:100%;max-height:52px}
}

/* SZODO 69 — ręczne dopasowanie zdjęcia identyfikatora */
.employee-id-photo-frame{width:100%;aspect-ratio:4/5;border-radius:10px;border:1px solid #dfe3eb;overflow:hidden;background:#eef0f5}
.employee-id-photo-svg{display:block;width:100%;height:100%;background:#eef0f5;user-select:none}
.employee-id-photo-svg.is-adjustable{cursor:grab;touch-action:none}
.employee-id-photo-svg.is-dragging{cursor:grabbing}
.employee-id-photo-bg{fill:#eef0f5}
.employee-id-photo-placeholder-text{fill:#777;font-size:9px;font-weight:800;letter-spacing:.04em}
.identifier-photo-adjuster{margin:14px 0;padding:16px;border:1px solid var(--border,#d9dee8);border-radius:14px;background:#f8f9fb;display:grid;gap:14px}
.identifier-photo-adjuster-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.identifier-photo-adjuster-head h3{margin:0 0 4px;font-size:15px;color:#111827}
.identifier-photo-adjuster-head .help{margin:0}
.identifier-photo-adjuster-head output{flex:0 0 auto;min-width:54px;padding:6px 10px;border-radius:999px;background:#fff3e8;color:#c84f00;font-weight:800;text-align:center}
.identifier-photo-control{display:grid;gap:7px}
.identifier-photo-control>label{font-size:12px;font-weight:800;color:#111827}
.identifier-photo-control input[type="range"]{width:100%;accent-color:var(--orange-2,#ec6f22)}
.identifier-photo-range-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:9px}
.identifier-photo-range-row .btn-compact{min-width:42px;padding:8px 12px;font-size:18px;line-height:1}
.identifier-photo-adjust-actions{display:flex;flex-wrap:wrap;gap:8px}
.identifier-photo-adjust-actions .btn{margin:0}
@media(max-width:620px){.identifier-photo-adjuster{padding:13px}.identifier-photo-adjuster-head{align-items:center}.identifier-photo-adjust-actions{display:grid;grid-template-columns:1fr}.identifier-photo-adjust-actions .btn{width:100%}}
body.modal-open{overflow:hidden}.photo-editor-modal[hidden]{display:none!important}.photo-editor-modal{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:24px}.photo-editor-backdrop{position:absolute;inset:0;background:rgba(17,24,39,.62)}.photo-editor-dialog{position:relative;z-index:1;width:min(1120px,96vw);max-height:min(92vh,980px);display:grid;grid-template-rows:auto 1fr auto;gap:16px;padding:18px;border-radius:22px;background:#fff;box-shadow:0 36px 96px rgba(17,24,39,.28)}.photo-editor-head,.photo-editor-foot{display:flex;align-items:center;justify-content:space-between;gap:12px}.photo-editor-head h3{margin:0 0 4px;font-size:22px;color:#111827}.photo-editor-head .help{margin:0}.photo-editor-body{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:16px;min-height:0}.photo-editor-stage-wrap{min-width:0;border:1px solid var(--border,#d9dee8);border-radius:18px;background:#f4f5f8;padding:10px;display:grid}.photo-editor-stage{width:100%;height:auto;max-height:68vh;border-radius:12px;background:#f4f5f8;touch-action:none;cursor:grab}.photo-editor-stage:active{cursor:grabbing}.photo-editor-side{display:grid;gap:12px}.photo-editor-side-section{padding:12px;border:1px solid var(--border,#d9dee8);border-radius:16px;background:#fafbfc;display:grid;gap:8px}.photo-editor-side-section>label{font-size:12px;font-weight:800;color:#111827}.photo-editor-side-section input[type="range"]{width:100%;accent-color:var(--orange-2,#ec6f22)}.photo-editor-actions{display:grid;grid-template-columns:1fr;gap:8px}.photo-editor-preview-card{display:grid;gap:10px}.photo-editor-preview-card strong{font-size:13px;color:#111827}.photo-editor-preview-card canvas{width:100%;height:auto;border:1px solid #d9dee8;border-radius:14px;background:#fff}.photo-editor-foot{justify-content:flex-end}.photo-editor-foot .btn{margin:0}.identifier-photo-adjust-actions .btn[data-photo-open-editor]{border-color:#ec6f22;color:#c84f00;background:#fff7f0}@media(max-width:980px){.photo-editor-dialog{width:min(96vw,880px)}.photo-editor-body{grid-template-columns:1fr}.photo-editor-stage{max-height:52vh}.photo-editor-foot{flex-wrap:wrap}.photo-editor-foot .btn{width:100%}}@media(max-width:620px){.photo-editor-modal{padding:12px}.photo-editor-dialog{padding:14px;border-radius:18px}.photo-editor-head,.photo-editor-foot{display:grid;grid-template-columns:1fr}.photo-editor-head .btn,.photo-editor-foot .btn{width:100%}}
.identifier-card-sides{display:grid;grid-template-columns:1fr;gap:18px}.identifier-side-label{margin:0 0 7px;font-size:12px;font-weight:800;color:#5f6676;text-transform:uppercase;letter-spacing:.08em}.employee-id-preview-back .employee-id-return-body{height:64%;padding:16px 18px;display:flex;flex-direction:column;justify-content:center;gap:5px;color:#212851}.employee-id-preview-back .employee-id-return-body>strong{font-size:16px;letter-spacing:.03em}.employee-id-preview-back .employee-id-return-body>span{font-size:11px;color:#697080}.employee-id-preview-back .employee-id-return-body>b{margin-top:4px;font-size:15px}.employee-id-preview-back .employee-id-return-body>small{font-size:10px;line-height:1.25;color:#3f4657}.employee-id-preview-back .employee-id-org{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media(max-width:760px){.employee-id-preview-back .employee-id-return-body{padding:12px}.employee-id-preview-back .employee-id-return-body>strong{font-size:13px}.employee-id-preview-back .employee-id-return-body>b{font-size:13px}.employee-id-preview-back .employee-id-return-body>small{font-size:9px}}

/* PATCH 78 — centralne Wiadomości + ikona komunikacji w topbarze. */
.topbar-communication{position:relative;width:38px;height:38px;border:1px solid var(--line);background:#fff;color:#65746d;border-radius:10px;display:flex;align-items:center;justify-content:center;cursor:pointer;text-decoration:none;flex:0 0 38px}
.topbar-communication svg{width:19px;height:19px}
.topbar-communication:hover{border-color:#f4b26c;background:#fff7ef;color:var(--orange-2)}
.topbar-communication-badge{position:absolute;right:-6px;top:-7px;min-width:19px;height:19px;padding:0 5px;border-radius:999px;background:var(--danger);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:9px;font-weight:900;line-height:1;border:2px solid #fff;box-sizing:content-box}

.messages-layout{display:grid;grid-template-columns:minmax(270px,.72fr) minmax(0,1.6fr);gap:17px;align-items:start}
.messages-sidebar-panel{padding:0;overflow:hidden;position:sticky;top:calc(var(--topbar) + 18px);max-height:calc(100vh - var(--topbar) - 36px)}
.messages-panel-head{padding:18px 18px 14px;border-bottom:1px solid var(--line-soft)}
.messages-panel-head h2{margin-bottom:4px}
.messages-panel-head .muted{font-size:10px}
.messages-thread-list{overflow:auto;max-height:calc(100vh - var(--topbar) - 120px);padding:7px}
.messages-thread{display:flex;align-items:center;gap:10px;min-width:0;padding:11px 10px;border-radius:10px;color:var(--text);border:1px solid transparent}
.messages-thread:hover{background:#fff8f1;border-color:#f2dcc8}
.messages-thread.is-active{background:#fff0df;border-color:#f2ceb0}
.messages-thread-icon{width:34px;height:34px;flex:0 0 34px;display:flex;align-items:center;justify-content:center;border-radius:9px;background:#f2f4f8;color:var(--navy)}
.messages-thread-icon svg{width:18px;height:18px}
.messages-thread-copy{min-width:0;flex:1;display:flex;flex-direction:column;gap:4px}
.messages-thread-copy strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--navy)}
.messages-thread-copy small{font-size:9px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.messages-unread-badge{min-width:21px;height:21px;padding:0 6px;border-radius:999px;background:var(--orange-2);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:10px;font-weight:900}
.messages-empty-list{padding:24px 15px;color:var(--muted);font-size:11px;text-align:center}
.messages-main-panel{min-width:0}
.messages-new-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}
.messages-new-card{min-height:260px}
.messages-new-card h2{margin-top:12px}
.messages-new-icon{width:44px;height:44px;border-radius:12px;background:#fff1e4;color:var(--orange-2);display:flex;align-items:center;justify-content:center}
.messages-new-icon svg{width:23px;height:23px}
.messages-notification-card{min-height:205px}
.messages-conversation-card{padding:0;overflow:hidden}
.messages-conversation-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:19px 20px;border-bottom:1px solid var(--line-soft)}
.messages-conversation-head h2{margin:0}
.messages-stream{min-height:280px;max-height:58vh;overflow:auto;padding:20px;background:#f8faf9}
.message-row{display:flex;justify-content:flex-start;margin:0 0 12px}
.message-row.is-own{justify-content:flex-end}
.message-bubble{width:min(78%,720px);padding:12px 14px;border:1px solid var(--line);border-radius:13px 13px 13px 4px;background:#fff;box-shadow:0 3px 10px rgba(33,40,81,.035)}
.message-row.is-own .message-bubble{background:#fff0df;border-color:#f2d0ae;border-radius:13px 13px 4px 13px}
.message-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:7px;font-size:9px;color:var(--muted)}
.message-meta strong{font-size:10px;color:var(--navy)}
.message-body{font-size:12px;line-height:1.55;overflow-wrap:anywhere;word-break:break-word}
.messages-compose-form{padding:18px 20px;border-top:1px solid var(--line-soft);background:#fff}
.messages-compose-form textarea{resize:vertical;min-height:100px}
.messages-compose-actions{display:flex;align-items:center;justify-content:space-between;gap:14px}
.messages-compose-actions .help{margin:0;max-width:72%}
.messages-page-header .actions{flex:0 0 auto}

@media(max-width:900px){
    .messages-layout{grid-template-columns:1fr}
    .messages-sidebar-panel{position:static;max-height:none}
    .messages-thread-list{max-height:290px}
    .messages-new-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:620px){
    .messages-new-grid{grid-template-columns:1fr}
    .message-bubble{width:91%}
    .messages-compose-actions{align-items:stretch;flex-direction:column}
    .messages-compose-actions .help{max-width:none}
    .messages-compose-actions .btn{width:100%}
    .topbar-communication{width:36px;height:36px;flex-basis:36px}
}
@media(max-width:430px){
    .topbar-user{display:none}
    .topbar-account{gap:6px}
    .topbar-logout-form{padding-left:6px}
    .messages-stream{padding:13px 10px}
    .message-bubble{width:96%}
}

/* SZODO 80 — Biblioteka IOD i klasyfikacja wzorców */
.iod-template-targeting{margin:22px 0;padding:18px;border:1px solid #dfe5eb;border-radius:16px;background:#f8fafc}
.iod-template-targeting h3{margin-top:0}
.iod-target-group{min-width:0;border:1px solid #e1e6eb;border-radius:12px;padding:12px;background:#fff}
.iod-target-group legend{padding:0 6px;font-weight:800;color:#212851}
.iod-target-group .check-row{margin:7px 0;align-items:flex-start}
.iod-library-copy-list{display:grid;gap:9px;margin-top:12px}
.iod-library-copy-row{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:10px 12px;border:1px solid #e3e7eb;border-radius:12px;background:#fff}
.iod-library-copy-row span{display:grid;gap:2px;min-width:0}
.iod-library-copy-row small{color:#6b7280}
.iod-library-terms{margin-top:18px}
.iod-library-terms .tag-list{display:flex;gap:7px;flex-wrap:wrap;align-items:center}
.iod-library-terms h3{margin:0 0 10px}
@media (max-width:760px){
 .iod-template-targeting{padding:13px}
 .iod-library-copy-row{align-items:flex-start;flex-direction:column}
 .iod-library-copy-row .btn{width:100%}
}
.iod-client-assignment-grid{margin:14px 0 18px}
.iod-client-assignment-grid .check-row{padding:11px 12px;border:1px solid #e1e6eb;border-radius:12px;background:#fff;align-items:flex-start}
.iod-client-assignment-grid .check-row span{display:grid;gap:2px}
.iod-client-assignment-grid .check-row small{color:#6b7280;font-weight:400}

/* SZODO 81 - centralny import PDF i edytor warstwy tekstowej */
.pdf-import-panel{border:1px solid var(--border,#d9dde5);border-radius:14px;padding:16px;margin:16px 0;background:var(--card,#fff)}
.pdf-import-panel .pdf-import-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap}
.pdf-import-meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:10px 0}
.pdf-layout-document{display:grid;gap:18px;align-items:start}
.pdf-layout-page{width:100%;max-width:920px;margin:0 auto;background:#fff;border:1px solid var(--border,#d9dde5);border-radius:10px;overflow:hidden;box-shadow:0 3px 14px rgba(15,23,42,.08)}
.pdf-layout-svg{display:block;width:100%;height:auto;background:#fff}
.pdf-layout-page-label{text-align:center;padding:7px 10px;border-top:1px solid var(--border,#d9dde5);font-size:12px;color:var(--muted,#667085)}
.pdf-layout-text-block,.pdf-layout-editable-block{cursor:default}
.pdf-layout-editable-block{cursor:pointer}
.pdf-layout-hit{fill:transparent;stroke:transparent;stroke-width:2;vector-effect:non-scaling-stroke}
.pdf-layout-editable-block:hover .pdf-layout-hit,.pdf-layout-editable-block.is-selected .pdf-layout-hit{fill:rgba(57,49,133,.07);stroke:#393185}
.pdf-layout-editable-block.has-overflow .pdf-layout-hit{fill:rgba(185,28,28,.08);stroke:#b91c1c}
.pdf-layout-editor-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,.7fr);gap:20px;align-items:start}
.pdf-layout-editor-canvas{padding:12px;overflow:auto}
.pdf-layout-editor-panel{position:sticky;top:18px}
.pdf-editor-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.pdf-layout-overflow-note{margin-top:10px}
.pdf-import-preview{max-height:760px;overflow:auto;padding:10px;background:var(--surface-subtle,#f7f8fa);border-radius:12px}
.pdf-layout-training .pdf-layout-page{max-width:1100px}
@media(max-width:900px){.pdf-layout-editor-grid{grid-template-columns:1fr}.pdf-layout-editor-panel{position:static}.pdf-layout-editor-canvas{padding:6px}.pdf-import-panel{padding:12px}}

/* PDF browser importer — poprawka 82 */
.pdf-browser-import-progress{margin:12px 0 14px;padding:12px 14px;border:1px solid var(--border,#d9dde5);border-radius:12px;background:var(--surface-subtle,#f7f8fa)}
.pdf-browser-import-progress strong{display:block;margin-bottom:8px}
.pdf-browser-import-progress small{display:block;margin-top:7px;line-height:1.45}
.pdf-import-progress-track{height:9px;overflow:hidden;border-radius:999px;background:#e7e9ee}
.pdf-import-progress-track>span{display:block;width:0;height:100%;border-radius:inherit;background:#f36b21;transition:width .2s ease}
.pdf-browser-import-form.is-busy input[type="file"],.pdf-browser-import-form.is-busy [data-pdf-import-submit]{opacity:.65;cursor:wait}
@media(max-width:700px){.pdf-browser-import-progress{padding:10px 11px}}

/* Poprawka 83 — centralne ograniczenie podglądów dokumentów */
.two-col>*,.grid>*,.dashboard-stack>*,.card{min-width:0}
.document-preview,.document-preview-compact,.pdf-import-preview,.pdf-layout-document,.pdf-layout-page,.document-rich-preview,.document-editor-live-preview{max-width:100%;min-width:0;box-sizing:border-box}
.document-preview,.document-preview *,.document-rich-preview,.document-rich-preview *,.document-editor-live-preview,.document-editor-live-preview *{overflow-wrap:anywhere;word-break:normal;max-width:100%;box-sizing:border-box}
.document-preview pre,.document-preview code,.document-rich-preview pre,.document-rich-preview code{white-space:pre-wrap;overflow-wrap:anywhere}
.document-preview img,.document-rich-preview img,.document-editor-live-preview img,.pdf-import-preview img,.pdf-import-preview svg{max-width:100%;height:auto}
.document-preview table,.document-rich-preview table{display:block;max-width:100%;overflow-x:auto}
.pdf-import-preview{overflow-x:hidden;overflow-y:auto}
.pdf-layout-page{overflow:hidden}

/* Centralny edytor blokowy dokumentów */
.document-editor-shell{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(320px,.75fr);gap:20px;align-items:start}
.document-editor-main,.document-editor-side{min-width:0}
.document-editor-sticky{position:sticky;top:16px;max-height:calc(100vh - 32px);overflow:auto}
.document-editor-addbar{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:16px}
.document-editor-add-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.document-editor-sections{display:grid;gap:16px}
.document-editor-section{padding:16px}
.document-editor-section-head{display:flex;justify-content:space-between;gap:12px;align-items:center;padding-bottom:12px;border-bottom:1px solid var(--line);margin-bottom:14px}
.document-editor-section-controls{display:flex;gap:6px;flex-wrap:wrap}
.document-editor-section-head-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap;margin-left:auto}
.document-editor-section-save-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.document-editor-columns{display:grid;gap:14px;min-width:0}
.document-editor-columns.cols-2{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.document-editor-column{min-width:0}
.document-editor-text-toolbar{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:8px;border:1px solid var(--line);border-bottom:0;border-radius:10px 10px 0 0;background:#f7f8fb}
.document-editor-text-toolbar select{width:auto;min-width:116px;padding:7px 9px}
.document-editor-tool{border:1px solid var(--line);background:#fff;border-radius:7px;min-width:34px;height:34px;padding:0 8px;font-weight:800;color:var(--navy);cursor:pointer}
.document-editor-tool:hover{border-color:#b9b7d8;background:#f5f4ff}
.document-editor-richtext{min-height:180px;border:1px solid var(--line);border-radius:0 0 10px 10px;padding:16px;background:#fff;line-height:1.6;outline:none;overflow-wrap:anywhere}
.document-editor-richtext:focus{border-color:#9f9bc7;box-shadow:0 0 0 3px rgba(57,49,133,.09)}
.document-editor-richtext h1,.document-rich-text h1{font-size:26px;line-height:1.2;margin:0 0 16px;color:var(--navy)}
.document-editor-richtext h2,.document-rich-text h2{font-size:21px;line-height:1.25;margin:18px 0 10px;color:var(--navy)}
.document-editor-richtext h3,.document-rich-text h3{font-size:17px;line-height:1.3;margin:16px 0 8px}
.document-editor-richtext p,.document-rich-text p{margin:0 0 12px}
.document-editor-richtext,.document-rich-text{line-height:1.6}
.document-editor-richtext ul,.document-editor-richtext ol,.document-rich-text ul,.document-rich-text ol{padding-left:24px;margin:0 0 12px;list-style-position:outside}
.document-editor-richtext ol,.document-rich-text ol{list-style-type:decimal}
.document-editor-richtext ul,.document-rich-text ul{list-style-type:disc}
.document-editor-richtext li,.document-rich-text li{display:list-item;margin:0 0 4px;padding-left:2px}
.document-editor-richtext li:last-child,.document-rich-text li:last-child{margin-bottom:0}
.align-left{text-align:left}.align-center{text-align:center}.align-right{text-align:right}.align-justify{text-align:justify}
.document-editor-image-box{display:grid;gap:10px}
.document-editor-image-preview,.document-rich-image img{display:block;width:100%;max-height:420px;object-fit:contain;border-radius:10px;background:#f7f8fa}
.document-editor-image-empty,.document-rich-image-placeholder{min-height:180px;display:grid;place-items:center;border:1px dashed #cfd3dc;border-radius:10px;background:#fafbfc;color:var(--muted)}
.document-editor-image-actions{display:flex;gap:8px;flex-wrap:wrap}
.document-editor-separator-edit{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center}
.document-editor-pdf-page .pdf-layout-page{margin:0 auto;max-width:760px}
.document-editor-pdf-actions{display:flex;justify-content:center;margin-top:10px}
.document-editor-live-preview{background:#f7f8fa;border:1px solid var(--line);border-radius:12px;padding:10px;display:grid;gap:12px;overflow:hidden}
.document-editor-preview-pdf .pdf-layout-page{box-shadow:none;border-radius:8px}
.document-editor-save-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}
.document-editor-status{display:block;margin-top:10px}.document-editor-status.is-dirty{color:#a44d00;font-weight:700}
.document-rich-preview{display:grid;gap:18px}
.document-rich-section{display:grid;gap:16px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:20px;overflow:hidden}
.document-rich-text_image,.document-rich-image_text,.document-rich-two_images{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}
.document-rich-image{min-width:0}.document-rich-image.fit-cover img{object-fit:cover;aspect-ratio:4/3}.document-rich-image.fit-contain img{object-fit:contain}
.document-rich-separator{display:flex;align-items:center;gap:12px;margin:6px 0;color:var(--navy);font-weight:800}
.document-rich-separator:before,.document-rich-separator:after{content:"";height:1px;background:var(--line);flex:1}.document-rich-separator span{max-width:70%;text-align:center}

/* Rozbudowany edytor bloków tekstowych PDF */
.pdf-layout-format-toolbar{display:flex;gap:7px;flex-wrap:wrap;align-items:center;margin-bottom:10px;padding:8px;border:1px solid var(--line);border-radius:10px;background:#f7f8fb}
.pdf-layout-format-toolbar label{display:flex;gap:6px;align-items:center;font-size:12px;font-weight:700}.pdf-layout-format-toolbar input[type="number"]{width:78px}.pdf-layout-format-toolbar input[type="color"]{width:42px;height:34px;padding:2px}

@media(max-width:1080px){.document-editor-shell{grid-template-columns:1fr}.document-editor-sticky{position:static;max-height:none}.document-editor-addbar{align-items:flex-start;flex-direction:column}.document-editor-add-actions{justify-content:flex-start}}
@media(max-width:720px){.document-editor-columns.cols-2,.document-rich-text_image,.document-rich-image_text,.document-rich-two_images{grid-template-columns:1fr}.document-editor-separator-edit{grid-template-columns:1fr}.document-editor-save-actions{grid-template-columns:1fr}.document-editor-section-head{align-items:flex-start;flex-direction:column}.document-editor-section-head-actions{width:100%;margin-left:0;justify-content:space-between}.document-editor-section-save-actions{flex:1}.document-editor-section-save-actions .btn{flex:1 1 auto}.document-editor-text-toolbar{position:sticky;top:0;z-index:2}}

/* SZODO 83 — domknięcie podglądów i wejścia do edytora */
.app-main,.app-workspace,.page-header>*,.two-col,.grid,.dashboard-stack{min-width:0}
.document-preview,.training-content,.pdf-import-preview,.document-rich-preview,.document-editor-live-preview{width:100%;overflow-x:hidden}
.document-preview *,.training-content *,.document-rich-preview *,.document-editor-live-preview *{min-width:0;overflow-wrap:anywhere;word-wrap:break-word}
.pdf-layout-document,.pdf-layout-page,.pdf-layout-svg{width:100%;max-width:100%;height:auto}
.document-editor-launch{display:flex;flex-wrap:wrap;gap:9px;align-items:center;margin:12px 0;padding:12px;border:1px solid #f2d4b8;border-radius:12px;background:#fff8f1}
.document-editor-launch .btn{margin:0}
.document-editor-tool:active{transform:translateY(1px)}
.document-editor-richtext[contenteditable="true"]{overflow-x:hidden;white-space:normal}
@media(max-width:720px){.document-editor-launch{display:grid;grid-template-columns:1fr}.document-editor-launch .btn{width:100%}}

/* SZODO 85 — ustawienia PDF, zmienne dokumentów i pełne wyrównanie */
.document-editor-pdf-options{display:grid;gap:10px;margin-bottom:16px;padding:16px}
.document-editor-pdf-options p{margin:4px 0 0}.document-editor-pdf-options .check-row{align-items:flex-start}
.document-editor-variable-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.document-editor-variable-tool{font-size:11px;min-width:auto}
.pdf-layout-format-toolbar select{width:auto;min-width:132px;padding:7px 8px}
.pdf-layout-format-toolbar .document-editor-tool.is-active{background:#eeedf9;border-color:#8e89bd;color:#29216f}
@media(max-width:720px){.document-editor-variable-actions{width:100%}.document-editor-pdf-options{padding:13px}.pdf-layout-format-toolbar label{width:100%;justify-content:space-between}.pdf-layout-format-toolbar select{max-width:190px}}

/* SZODO 86 — modułowy generator dokumentów */
.document-compose-list{display:grid;gap:10px;margin:14px 0 18px}
.document-compose-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;padding:13px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;cursor:pointer}
.document-compose-row:hover{border-color:#bdb9d9;background:#faf9ff}
.document-compose-row input[type="checkbox"]{width:20px;height:20px}
.document-compose-row span{min-width:0}.document-compose-row small{display:block;margin-top:3px;color:var(--muted)}
.document-module-summary{padding-top:14px;padding-bottom:14px}.document-module-summary p{margin:4px 0 0}
@media(max-width:720px){.document-compose-row{grid-template-columns:auto minmax(0,1fr)}.document-compose-row>.pill{grid-column:2;justify-self:start}.document-module-summary .org-feature-head{align-items:flex-start;flex-direction:column}}

/* SZODO 88 — rozszerzone Dane organizacji */
.organization-profile-expanded{grid-column:1/-1}
.org-profile-subsection{margin-top:22px;padding-top:20px;border-top:1px solid var(--border,#dfe3e8)}
.org-profile-subsection>h3,.org-profile-subsection .section-heading h3{margin:0 0 7px}
.org-repeat-list{display:grid;gap:12px;margin-top:12px}
.org-repeat-card{min-width:0;padding:15px;border:1px solid var(--border,#dfe3e8);border-radius:14px;background:var(--surface-soft,#fafbfc)}
.org-repeat-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.org-primary-check{display:flex;align-items:center;gap:8px;margin-top:10px;font-weight:650;color:var(--text,#1f2937)}
.org-primary-check input{width:auto;margin:0}
.org-iod-toggle{margin:8px 0 13px}
.org-conditional-fields[hidden]{display:none!important}
@media(max-width:720px){.org-profile-subsection .section-heading{align-items:flex-start;flex-direction:column}.org-profile-subsection .section-heading .btn{width:100%}.org-repeat-card{padding:12px}}


/* Patch 89 — centralne zmienne danych Karty klienta */
.org-field-label{display:flex!important;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.org-variable-chip{appearance:none;border:1px solid #d8dde5;background:#f7f8fa;color:#394150;border-radius:7px;padding:3px 7px;line-height:1.2;cursor:pointer;max-width:100%;font:inherit}
.org-variable-chip code{font-size:11px;white-space:normal;overflow-wrap:anywhere;color:inherit}
.org-variable-chip:hover,.org-variable-chip:focus-visible{border-color:#f26a21;background:#fff5ed;outline:none}
.org-variable-chip.is-copied{border-color:#1f8f5f;background:#edf9f3;color:#176b48}
.org-check-with-variable{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.org-repeat-card .org-field-label{margin-bottom:5px}
@media(max-width:720px){.org-field-label{align-items:flex-start}.org-variable-chip{width:auto;max-width:100%}}


/* SZODO 90 - centralny slownik zmiennych klienta */
.org-variable-reference-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:13px 15px;margin:12px 0 18px;border:1px solid #d9def0;border-radius:12px;background:#f7f8fd}
.org-variable-reference{margin-top:26px;padding-top:22px;border-top:1px solid #dde2e7}.org-variable-reference-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.org-variable-group{border:1px solid #e0e4e8;border-radius:12px;padding:14px;min-width:0}.org-variable-group h4{margin:0 0 10px}.org-variable-table{display:grid;gap:7px}.org-variable-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid #eef0f2;min-width:0}.org-variable-row:last-child{border-bottom:0}.org-variable-label{display:grid;gap:2px;min-width:0}.org-variable-label span{overflow-wrap:anywhere}.org-variable-no-results{padding:12px 0}
.document-variable-palette{padding:0;overflow:hidden}.document-variable-palette>summary{cursor:pointer;padding:15px 16px;list-style:none}.document-variable-palette>summary::-webkit-details-marker{display:none}.document-variable-palette>summary:after{content:'▾';float:right}.document-variable-palette[open]>summary:after{content:'▴'}.document-variable-palette-body{padding:0 16px 16px;border-top:1px solid #eceef1}.document-variable-list{display:grid;gap:14px;max-height:430px;overflow:auto;padding-right:4px}.document-variable-group{border:1px solid #e0e4e8;border-radius:10px;padding:11px}.document-variable-group h4{margin:0 0 8px}.document-variable-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid #eef0f2}.document-variable-row:last-child{border-bottom:0}.document-variable-copy{display:grid;gap:2px;min-width:0}.document-variable-copy span{overflow-wrap:anywhere}.document-variable-copy code{font-size:11px;overflow-wrap:anywhere}.document-variable-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:820px){.org-variable-reference-groups{grid-template-columns:1fr}.org-variable-reference-toolbar{align-items:stretch}.org-variable-reference-toolbar .btn{width:100%}.document-variable-row{grid-template-columns:1fr}.document-variable-actions{justify-content:flex-start}}

/* SZODO 91 — zapis projektu i jawny kontekst zmiennych */
.document-variable-context-note{margin:12px 0 14px}
.document-editor-save-explainer{display:block;margin-top:10px;line-height:1.45}
#document-editor-status{display:block;margin-top:6px}

/* SZODO 100 — szybka edycja modułów */
.document-module-row-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end;white-space:nowrap}.document-module-row-actions form{margin:0}.document-module-row-actions .btn{width:auto}

.document-editor-toc-card{display:grid;gap:12px;margin-bottom:16px;padding:16px;border:1px solid color-mix(in srgb,var(--primary) 20%,var(--line));background:color-mix(in srgb,var(--primary) 3%,var(--surface))}
.document-editor-toc-card[hidden]{display:none!important}.document-editor-toc-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.document-editor-toc-head p{margin:4px 0 0}.document-editor-toc-list{display:grid;gap:7px}.document-editor-toc-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end;border-bottom:1px dotted var(--line);padding-bottom:5px}.document-editor-toc-row.level-2{padding-left:22px}.document-editor-toc-row.level-3{padding-left:44px}.document-editor-toc-note{display:block;margin-top:6px}.document-editor-preview-toc{border:1px solid var(--line);background:var(--surface);border-radius:10px;padding:16px;margin-bottom:14px}.document-editor-preview-toc h3{margin:0 0 12px}.document-editor-preview-toc-row{display:flex;justify-content:space-between;gap:10px;padding:3px 0;border-bottom:1px dotted var(--line)}.document-editor-preview-toc-row.level-2{padding-left:14px}.document-editor-preview-toc-row.level-3{padding-left:28px}
@media(max-width:720px){.document-editor-toc-head{flex-direction:column}.document-editor-toc-head .btn{width:100%}.document-editor-toc-row{grid-template-columns:1fr}.document-editor-toc-row.level-2{padding-left:14px}.document-editor-toc-row.level-3{padding-left:28px}}

/* CORE 0.38.22 / poprawka 108 — kompaktowy obszar edycji tekstu */
.document-editor-richtext{
  height:clamp(280px,40vh,360px);
  min-height:280px;
  max-height:360px;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
@media(max-width:720px){
  .document-editor-richtext{
    height:280px;
    min-height:240px;
    max-height:280px;
  }
}


/* SZODO 110 — generator i edytor tabel dokumentów */
.document-editor-table-tool{min-width:44px;font-size:18px;line-height:1}
.document-table-dialog{border:0;padding:0;border-radius:18px;box-shadow:0 24px 70px rgba(19,27,45,.28);width:min(720px,calc(100vw - 28px));max-height:calc(100vh - 32px)}
.document-table-dialog::backdrop{background:rgba(10,18,32,.52)}
.document-table-dialog-card{padding:20px;display:grid;gap:18px}
.document-table-dialog-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.document-table-dialog-head p{margin:4px 0 0}
.document-table-dialog-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.document-table-dialog-grid label,.document-table-settings label,.document-table-widths label,.document-table-cell-tools label{display:grid;gap:5px;font-size:12px;font-weight:750;color:var(--navy)}
.document-table-dialog-grid .check-row{align-content:center;display:flex;align-items:center}.document-table-dialog-actions{display:flex;justify-content:flex-end;gap:8px}
.document-table-editor{display:grid;gap:14px}.document-table-settings{display:grid;grid-template-columns:repeat(5,minmax(105px,1fr));gap:10px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#f8f9fb}
.document-table-settings input[type="color"],.document-table-cell-tools input[type="color"]{width:100%;min-width:52px;height:38px;padding:3px}
.document-table-check{display:flex!important;align-items:center;gap:8px!important;align-self:end;padding-bottom:8px}.document-table-check input{width:auto}
.document-table-widths{display:flex;align-items:end;gap:8px;flex-wrap:wrap}.document-table-widths>strong{margin-right:4px}.document-table-widths label{width:82px}.document-table-widths input{padding:7px 8px}
.document-table-cell-tools{display:flex;align-items:end;gap:8px;flex-wrap:wrap}.document-table-cell-tools>.muted{margin-right:auto;align-self:center}.document-table-cell-tools label{width:150px}
.document-table-text-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:9px 10px;border:1px solid var(--line);border-radius:10px;background:#fbfcfe}.document-table-text-tools>strong{font-size:12px;margin-right:6px;color:var(--navy)}.document-table-text-tools .document-editor-tool.is-active{background:var(--navy);color:#fff;border-color:var(--navy)}.document-table-text-tools .document-editor-tool:disabled{opacity:.42;cursor:not-allowed}
.document-table-scroll,.document-rich-table-wrap{overflow-x:auto;max-width:100%;border-radius:10px}.document-editor-table-grid,.document-rich-table-grid{width:100%;border-collapse:collapse;table-layout:fixed;background:#fff}
.document-editor-table-grid th,.document-editor-table-grid td{border:var(--table-border,1px solid #cfd3dc);padding:0;position:relative;min-width:56px}.document-editor-table-grid td.is-selected,.document-editor-table-grid th.is-selected{outline:3px solid rgba(57,49,133,.26);outline-offset:-3px}
.document-editor-table-cell-richtext{display:block;width:100%;min-height:calc(1.35em + var(--table-padding,6px) + var(--table-padding,6px));border:0;border-radius:0;background:transparent;padding:var(--table-padding,6px);font:inherit;line-height:1.35;color:inherit;box-shadow:none;outline:none;overflow-wrap:anywhere;white-space:normal}.document-editor-table-grid th .document-editor-table-cell-richtext{font-weight:800}.document-editor-table-cell-richtext:focus{outline:2px solid rgba(57,49,133,.38);outline-offset:-2px}.document-editor-table-cell-richtext p,.document-rich-table-grid p{margin:0 0 5px}.document-editor-table-cell-richtext p:last-child,.document-rich-table-grid p:last-child{margin-bottom:0}.document-editor-table-cell-richtext ul,.document-editor-table-cell-richtext ol,.document-rich-table-grid ul,.document-rich-table-grid ol{margin:0 0 5px;padding-left:20px;list-style-position:outside}.document-editor-table-cell-richtext ul,.document-rich-table-grid ul{list-style-type:disc}.document-editor-table-cell-richtext ol,.document-rich-table-grid ol{list-style-type:decimal}.document-editor-table-cell-richtext li,.document-rich-table-grid li{display:list-item;margin:0 0 2px}.document-editor-table-cell-richtext li:last-child,.document-rich-table-grid li:last-child{margin-bottom:0}
.document-rich-table{display:block}.document-rich-table-grid th,.document-rich-table-grid td{border-width:var(--table-border-width,1px);border-style:var(--table-border-style,solid);border-color:var(--table-border-color,#cfd3dc);padding:var(--table-cell-padding,6px);white-space:normal;overflow-wrap:anywhere;vertical-align:middle}.document-rich-table-grid th{font-weight:800}
@media(max-width:900px){.document-table-settings{grid-template-columns:repeat(3,minmax(110px,1fr))}}
@media(max-width:720px){.document-table-dialog-grid,.document-table-settings{grid-template-columns:1fr 1fr}.document-table-dialog-actions{display:grid;grid-template-columns:1fr 1fr}.document-table-cell-tools{align-items:stretch}.document-table-cell-tools>*{flex:1 1 140px}.document-table-cell-tools>.muted{flex-basis:100%}.document-table-text-tools>strong{flex-basis:100%}}

/* SZODO 118 — podgląd dokumentu w modalu */
.iod-client-modal.document-editor-preview-modal .iod-client-modal-shell{width:min(1040px,calc(100vw - 32px));max-height:92vh}
.document-editor-preview-modal-body{display:grid;gap:14px}
.document-editor-preview-modal .document-editor-live-preview{padding:16px;background:#f7f8fa}
@media(max-width:720px){.iod-client-modal.document-editor-preview-modal .iod-client-modal-shell{width:calc(100vw - 20px);max-height:94vh}.document-editor-preview-modal .document-editor-live-preview{padding:8px}}

/* SZODO 119 — typografia per sekcja dokumentu */
.document-editor-text-toolbar .document-editor-font-family-select{min-width:148px;max-width:190px}
.document-editor-text-toolbar .document-editor-font-size-input{width:76px;min-width:76px;padding:7px 8px}
.document-editor-richtext.document-custom-font-size h1,.document-rich-text.document-custom-font-size h1{font-size:calc(var(--document-section-font-size) * 1.65)}
.document-editor-richtext.document-custom-font-size h2,.document-rich-text.document-custom-font-size h2{font-size:calc(var(--document-section-font-size) * 1.34)}
.document-editor-richtext.document-custom-font-size h3,.document-rich-text.document-custom-font-size h3{font-size:calc(var(--document-section-font-size) * 1.155)}
@media(max-width:720px){.document-editor-text-toolbar .document-editor-font-family-select{flex:1 1 155px;max-width:none}.document-editor-text-toolbar .document-editor-font-size-input{flex:0 0 82px}}

/* CORE 0.38.34 / poprawka 120 — fundament jednolitego canvasu dokumentu */
.document-editor-canvas-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px 18px;align-items:start}
.document-editor-canvas-insert{display:grid;gap:9px;min-width:0}.document-editor-canvas-primary-actions{display:flex;gap:7px;align-items:center;justify-content:flex-end;flex-wrap:wrap}.document-editor-canvas-toolbar>.document-editor-variable-actions{grid-column:1/-1;padding-top:10px;border-top:1px solid var(--line)}
.document-editor-sections{display:block}
.document-editor-canvas{display:grid;gap:0;padding:20px;overflow:visible;background:#fff}
.document-editor-canvas-empty{padding:34px 18px;text-align:center}
.document-editor-canvas-block{position:relative;min-width:0;padding:10px 8px;border:1px solid transparent;border-radius:10px;transition:border-color .15s ease,background .15s ease}
.document-editor-canvas-block+.document-editor-canvas-block{margin-top:2px}
.document-editor-canvas-block:hover,.document-editor-canvas-block:focus-within{border-color:#e0e3e8;background:#fff}
.document-editor-canvas-block-actions{position:absolute;z-index:5;top:6px;right:7px;display:flex;gap:5px;opacity:0;pointer-events:none;transition:opacity .15s ease}
.document-editor-canvas-block:hover>.document-editor-canvas-block-actions,.document-editor-canvas-block:focus-within>.document-editor-canvas-block-actions{opacity:1;pointer-events:auto}
.document-editor-canvas .document-editor-text-toolbar{padding-right:126px;border-radius:9px;border-bottom:1px solid var(--line);margin-bottom:6px;background:#f9fafc}
.document-editor-canvas .document-editor-richtext{height:auto;min-height:150px;max-height:none;overflow:visible;border:0;border-radius:6px;padding:16px 10px;box-shadow:none;background:#fff;scrollbar-gutter:auto}
.document-editor-canvas .document-editor-richtext:focus{border-color:transparent;box-shadow:inset 0 0 0 2px rgba(57,49,133,.10)}
.document-editor-canvas-table{padding-top:14px;padding-bottom:14px}
.document-table-editor-inline{display:grid;gap:10px;padding:4px 0}
.document-table-text-tools-inline,.document-table-cell-tools-inline{margin:0 2px}
.document-table-scroll-inline{padding:2px;background:#fff}
.document-table-dialog-full{width:min(980px,calc(100vw - 28px))}
.document-table-dialog-grid-full{grid-template-columns:repeat(4,minmax(135px,1fr))}
.document-table-dialog-grid-full input[type="color"]{width:100%;min-width:52px;height:38px;padding:3px}
.document-table-dialog-check{align-self:end;min-height:42px;padding-bottom:8px}
.document-table-dialog-widths{display:grid;gap:9px;padding:13px;border:1px solid var(--line);border-radius:12px;background:#f8f9fb}
.document-table-dialog-widths>[data-table-dialog-widths-grid]{display:grid;grid-template-columns:repeat(5,minmax(92px,1fr));gap:9px}
.document-table-dialog-widths label{display:grid;gap:5px;font-size:12px;font-weight:750;color:var(--navy)}
.document-table-dialog-widths input{padding:7px 8px}
.document-editor-canvas-separator{padding-top:18px;padding-bottom:18px}
.document-editor-canvas-pdf_page{padding:12px 0}
@media(max-width:1080px){.document-editor-canvas-toolbar{grid-template-columns:1fr}.document-editor-canvas-primary-actions{justify-content:flex-start}.document-editor-canvas-toolbar>.document-editor-variable-actions{grid-column:1}.document-table-dialog-grid-full{grid-template-columns:repeat(3,minmax(130px,1fr))}.document-table-dialog-widths>[data-table-dialog-widths-grid]{grid-template-columns:repeat(4,minmax(90px,1fr))}}
@media(max-width:720px){.document-editor-canvas{padding:10px}.document-editor-canvas-block{padding:9px 3px}.document-editor-canvas-block-actions{position:static;opacity:1;pointer-events:auto;justify-content:flex-end;margin:0 0 7px}.document-editor-canvas .document-editor-text-toolbar{padding-right:8px}.document-editor-canvas .document-editor-richtext{min-height:180px;padding:13px 8px}.document-editor-canvas-primary-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.document-editor-canvas-primary-actions .btn{width:100%}.document-table-dialog-grid-full{grid-template-columns:1fr 1fr}.document-table-dialog-widths>[data-table-dialog-widths-grid]{grid-template-columns:1fr 1fr}.document-table-dialog-full{width:calc(100vw - 18px)}.document-table-dialog-card{padding:14px}.document-table-text-tools-inline>strong{flex-basis:auto}}
@media(max-width:460px){.document-table-dialog-grid-full,.document-table-dialog-widths>[data-table-dialog-widths-grid]{grid-template-columns:1fr}.document-editor-canvas-primary-actions{grid-template-columns:1fr}}
.document-editor-canvas .document-editor-text-toolbar,.document-editor-canvas .document-table-text-tools-inline{padding-right:170px}
@media(max-width:720px){.document-editor-canvas .document-editor-text-toolbar,.document-editor-canvas .document-table-text-tools-inline{padding-right:8px}}


/* Etap 60 / poprawka 121 — czysty canvas i kontekstowe narzędzia tabeli */
.document-editor-canvas .document-editor-canvas-block{padding:2px 8px;margin-top:0}
.document-editor-canvas .document-editor-canvas-block+.document-editor-canvas-block{margin-top:0}
.document-editor-canvas .document-editor-richtext{min-height:38px;padding:6px 10px}
.document-editor-canvas .document-editor-text-toolbar{display:none;padding-right:8px;margin-bottom:4px}
.document-editor-canvas .document-editor-canvas-block:focus-within .document-editor-text-toolbar{display:flex}
.document-editor-canvas .document-editor-canvas-table{padding-top:2px;padding-bottom:2px}
.document-table-editor-inline{position:relative;display:block;padding:0}
.document-table-scroll-inline{padding:0;background:#fff}
.document-table-format-panel{display:grid;gap:8px;margin:8px 2px 2px;padding:9px;border:1px solid var(--line);border-radius:10px;background:#f8f9fb}
.document-table-format-panel[hidden]{display:none!important}
.document-table-format-panel .document-table-text-tools-inline,.document-table-format-panel .document-table-cell-tools-inline{margin:0}
.document-table-hide-formatting{margin-left:auto}
.document-table-format-reveal{position:absolute;z-index:6;top:6px;right:6px;opacity:0;pointer-events:none;transition:opacity .15s ease;background:#fff}
.document-table-editor-inline:hover>.document-table-format-reveal,.document-table-editor-inline:focus-within>.document-table-format-reveal{opacity:1;pointer-events:auto}
.document-table-editor-inline.is-formatting-open>.document-table-format-reveal{display:none}
@media(max-width:720px){
  .document-editor-canvas .document-editor-canvas-block{padding:2px 3px}
  .document-editor-canvas .document-editor-richtext{min-height:38px;padding:6px 8px}
  .document-table-format-panel{margin:7px 0 2px;padding:8px}
  .document-table-format-reveal{top:4px;right:4px}
}
.document-table-format-reveal{width:36px;min-width:36px;height:34px;padding:4px 7px;font-size:17px;line-height:1}


/* Etap 60 / poprawka 122 — prawdziwie czysty canvas: narzędzia tabeli poza przepływem dokumentu */
.document-editor-canvas .document-editor-canvas-block{padding-top:0;padding-bottom:0}
.document-editor-canvas .document-editor-richtext{min-height:1.45em;padding-top:2px;padding-bottom:2px}
.document-editor-canvas-table{overflow:visible!important}
.document-editor-canvas-block.is-table-formatting-open{z-index:40}
.document-table-editor-inline{position:relative;z-index:1;overflow:visible}
.document-table-editor-inline.is-formatting-open{z-index:45}
.document-table-format-panel{position:absolute;z-index:60;left:0;right:0;top:calc(100% + 6px);margin:0;padding:10px;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:0 16px 40px rgba(15,23,42,.18)}
.document-table-format-panel[hidden]{display:none!important}
.document-table-format-reveal{z-index:55;box-shadow:0 5px 16px rgba(15,23,42,.14)}
.document-table-scroll-inline{margin:0}
@media(max-width:720px){
  .document-table-format-panel{position:fixed;z-index:120;left:10px;right:10px;top:auto;bottom:10px;max-height:58vh;overflow:auto;padding:10px;border-radius:14px;box-shadow:0 18px 48px rgba(15,23,42,.28)}
  .document-editor-canvas .document-editor-richtext{min-height:1.45em;padding-top:2px;padding-bottom:2px}
}


/* Etap 60 / poprawka 123 — jeden wizualny dokument: sekcje techniczne bez kart */
.document-editor-document-flow{min-width:0}
.document-editor-live-preview.document-editor-document-flow{
  display:block;
  gap:0;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  padding:28px 32px;
  overflow-x:auto;
}
.document-editor-live-preview.document-editor-document-flow .document-rich-section{
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  padding:0;
  margin:0;
  overflow:visible;
}
.document-editor-live-preview.document-editor-document-flow .document-rich-section+.document-rich-section{margin-top:0}
.document-editor-live-preview.document-editor-document-flow .document-rich-text{margin:0;padding:0}
.document-editor-live-preview.document-editor-document-flow .document-rich-text> :first-child{margin-top:0}
.document-editor-live-preview.document-editor-document-flow .document-rich-text> :last-child{margin-bottom:0}
.document-editor-live-preview.document-editor-document-flow .document-rich-table{margin:6px 0}
.document-editor-live-preview.document-editor-document-flow .document-rich-table-wrap{margin:0;border-radius:0}
.document-editor-live-preview.document-editor-document-flow .document-rich-image{margin:6px 0}
.document-editor-live-preview.document-editor-document-flow .document-rich-separator{margin:10px 0}
.document-editor-live-preview.document-editor-document-flow .document-editor-preview-pdf{margin:0}
.document-editor-live-preview.document-editor-document-flow .document-editor-preview-pdf+.document-rich-section,
.document-editor-live-preview.document-editor-document-flow .document-rich-section+.document-editor-preview-pdf{margin-top:0}

/* Canvas używa tych samych zasad wizualnego przepływu. Techniczne bloki pozostają w DOM,
   ale nie tworzą kart, ramek ani odstępów dokumentu. */
.document-editor-sections.document-editor-document-flow .document-editor-canvas{
  display:block;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  padding:24px 28px;
  overflow:visible;
}
.document-editor-sections.document-editor-document-flow .document-editor-canvas-block{
  border:0;
  border-radius:0;
  background:transparent!important;
  box-shadow:none;
  margin:0;
  padding:0;
}
.document-editor-sections.document-editor-document-flow .document-editor-canvas-block:hover,
.document-editor-sections.document-editor-document-flow .document-editor-canvas-block:focus-within{
  border:0;
  background:transparent!important;
}
.document-editor-sections.document-editor-document-flow .document-editor-canvas-block+.document-editor-canvas-block{margin-top:0}
.document-editor-sections.document-editor-document-flow .document-editor-columns{gap:0}
.document-editor-sections.document-editor-document-flow .document-editor-column{min-width:0}
.document-editor-sections.document-editor-document-flow .document-editor-richtext{margin:0;padding:2px 0;min-height:1.35em;border:0;border-radius:0;background:transparent}
.document-editor-sections.document-editor-document-flow .document-editor-canvas-table{margin:6px 0}
.document-editor-sections.document-editor-document-flow .document-table-scroll-inline{margin:0}

@media(max-width:720px){
  .document-editor-live-preview.document-editor-document-flow{padding:16px 14px}
  .document-editor-sections.document-editor-document-flow .document-editor-canvas{padding:16px 12px}
}

/* Etap 60 / poprawka 124 — pełny podgląd tabeli: semantyczny layout + wysokość pustych wierszy */
.document-editor-live-preview.document-editor-document-flow .document-rich-table-wrap{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:visible;
}
.document-editor-live-preview.document-editor-document-flow .document-rich-table-grid{
  display:table;
  max-width:100%;
  overflow:visible;
  border-collapse:collapse;
  table-layout:fixed;
}
.document-editor-live-preview.document-editor-document-flow .document-rich-table-grid tbody{display:table-row-group}
.document-editor-live-preview.document-editor-document-flow .document-rich-table-grid tr{display:table-row}
.document-editor-live-preview.document-editor-document-flow .document-rich-table-grid th,
.document-editor-live-preview.document-editor-document-flow .document-rich-table-grid td{
  /* Tak jak w PDF: pusta komórka zajmuje jeden zwykły wiersz tekstu + padding.
     height dla table-cell działa jako minimum; treść wieloliniowa rozszerza wiersz. */
  height:calc(1.35em + var(--table-cell-padding,6px) + var(--table-cell-padding,6px));
  min-height:0;
  line-height:1.35;
}


/* Etap 60 / poprawka 126 — podgląd tabeli według rzeczywistych metryk dokumentu/PDF.
   Wysokość konkretnego wiersza wylicza renderer JS z rozmiaru czcionki + paddingu;
   reguły 124/125 nie mogą już narzucać 62 px ani sztucznego minimum. */
.document-editor-live-preview.document-editor-document-flow .document-rich-table-grid tr,
.document-editor-live-preview.document-editor-document-flow .document-rich-table-grid th,
.document-editor-live-preview.document-editor-document-flow .document-rich-table-grid td{
  min-height:0;
}
.document-editor-live-preview.document-editor-document-flow .document-rich-table-grid th,
.document-editor-live-preview.document-editor-document-flow .document-rich-table-grid td{
  box-sizing:border-box;
}
.document-editor-live-preview.document-editor-document-flow .document-rich-table-grid p:only-child:empty::before{
  content:'\00a0';
}


/* SZODO 131 — centralne słowniki danych + drag&drop do Zbiorów danych */
.data-registry-tabs{overflow-x:auto;display:flex;flex-wrap:nowrap;gap:6px;padding-bottom:4px}
.data-registry-tabs>a{white-space:nowrap}
.data-dictionary-builder{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.data-dictionary-palette{border:1px solid var(--border,#d8dee6);border-radius:12px;padding:12px;background:#fafbfc;min-width:0}
.data-dictionary-palette h4{margin:0 0 8px}
.data-dictionary-palette-list{display:flex;flex-wrap:wrap;gap:8px;max-height:230px;overflow:auto;align-content:flex-start}
.data-dictionary-item{display:flex;align-items:center;gap:7px;max-width:100%;border:1px solid #d9dee6;border-radius:9px;background:#fff;padding:7px 8px;cursor:grab;box-shadow:0 1px 2px rgba(17,24,39,.04)}
.data-dictionary-item:active{cursor:grabbing}.data-dictionary-item strong{font-size:13px;overflow-wrap:anywhere}.data-dictionary-item code{font-size:11px;white-space:nowrap}
.data-dictionary-item .btn{margin-left:auto}
.data-dictionary-dropzone{border:1px dashed transparent;border-radius:10px;padding:4px;transition:.15s ease}
.data-dictionary-dropzone.is-dragover{border-color:#f97316;background:#fff7ed}
.data-dictionary-selected{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px;min-height:24px}
.data-dictionary-selected-chip{display:inline-flex;align-items:center;gap:5px;border-radius:999px;background:#f1f5f9;padding:4px 8px;font-size:12px;max-width:100%}
.data-dictionary-chip-remove{border:0;background:transparent;cursor:pointer;font-weight:800;line-height:1;padding:0 2px;color:#64748b}
.data-dictionary-chip-remove:hover{color:#b91c1c}
@media(max-width:800px){.data-dictionary-builder{grid-template-columns:1fr}.data-dictionary-palette-list{max-height:180px}}
