:root{--navy:#102a43;--navy-2:#183b56;--blue:#1677ff;--blue-dark:#0b5ed7;--ink:#172b4d;--muted:#627d98;--line:#d9e2ec;--soft:#f5f8fb;--white:#fff;--green:#0f9d75;--shadow:0 18px 45px rgba(16,42,67,.09)}*{box-sizing:border-box}body{font-family:Lato,sans-serif;color:var(--ink);background:var(--soft);min-height:100vh;display:flex;flex-direction:column}main{flex:1}.app-navbar{background:linear-gradient(120deg,var(--navy),var(--navy-2));padding:1rem 0}.navbar-brand{color:#fff!important;font-size:1.65em;font-weight:900;line-height:1;transition:font-size .5s;text-decoration:none;white-space:nowrap}.navbar-brand h3{margin:.15rem 0 0;font-size:.82rem;font-weight:400;line-height:1.15;letter-spacing:.02em;color:#d9e2ec}.app-navbar .nav-link{color:#d9e2ec}.app-navbar .nav-link:hover{color:#fff}.hero{padding:7rem 0;background:linear-gradient(180deg,#fff 0%,var(--soft) 100%)}.hero h1{font-size:clamp(2.6rem,5vw,4.8rem);font-weight:900;letter-spacing:-.045em;line-height:1.02;max-width:850px}.hero p{font-size:1.25rem;color:var(--muted);max-width:700px;margin:1.6rem 0 2rem}.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:.74rem;font-weight:900;color:var(--blue);margin-bottom:.65rem}.btn{border-radius:.7rem;font-weight:700;padding:.75rem 1.1rem}.btn-primary{background:var(--blue);border-color:var(--blue)}.btn-primary:hover{background:var(--blue-dark)}.preview-card,.panel-card,.auth-card,.feature,.stat-card{background:#fff;border:1px solid rgba(217,226,236,.85);border-radius:1.2rem;box-shadow:var(--shadow)}.preview-card{overflow:hidden;transform:rotate(1.2deg)}.preview-head{padding:1rem 1.2rem;background:var(--navy);display:flex;gap:.5rem}.preview-head span{width:.65rem;height:.65rem;background:#fff;border-radius:50%;opacity:.65}.preview-body{padding:2rem}.metric small,.stat-card span{color:var(--muted);display:block}.metric strong{font-size:3rem}.invoice-row{display:flex;justify-content:space-between;padding:1rem 0;border-top:1px solid var(--line)}.status-ok{color:var(--green);font-weight:700}.section{padding:6rem 0}.section-title{max-width:680px;margin-bottom:2.5rem}.section-title h2,.page-head h1{font-weight:900;letter-spacing:-.03em}.feature{padding:2rem;height:100%}.feature h3{font-size:1.2rem;font-weight:900}.feature p,.muted{color:var(--muted)}.auth-section{padding:5rem 1rem;display:flex;justify-content:center}.auth-card{width:100%;max-width:460px;padding:2.3rem}.auth-card.wide{max-width:650px}.auth-card h1{font-weight:900}.form-control,.form-select{border-radius:.7rem;padding:.8rem 1rem;border-color:var(--line)}.form-control:focus,.form-select:focus{border-color:var(--blue);box-shadow:0 0 0 .2rem rgba(22,119,255,.12)}.form-label{font-weight:700}.form-error{font-size:.85rem;color:#b42318;margin-top:.3rem}.trust-note{margin-top:1.2rem;padding:1rem;background:#f0f7ff;color:var(--muted);border-radius:.7rem;font-size:.9rem}.code-input{text-align:center;letter-spacing:.4em;font-weight:900}.flash-wrap{padding-top:1rem}.app-section{padding:3rem 0 6rem}.page-head{display:flex;justify-content:space-between;align-items:end;gap:2rem;margin-bottom:2rem}.stat-card{padding:1.4rem}.stat-card strong{font-size:2.2rem}.panel-card{overflow:hidden}.panel-head{display:flex;justify-content:space-between;align-items:center;padding:1.3rem 1.5rem;border-bottom:1px solid var(--line)}.panel-head h2,.side-card h2{font-size:1.1rem;font-weight:900;margin:0}.table{margin:0}.table th{font-size:.73rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);border-bottom-color:var(--line);padding:1rem 1.4rem}.table td{padding:1rem 1.4rem;border-bottom-color:#edf2f7}.table a{text-decoration:none;font-weight:700}.empty{text-align:center;color:var(--muted);padding:3rem!important}.status-pill{display:inline-flex;border-radius:99px;background:#eef4fb;color:var(--navy);font-size:.72rem;font-weight:900;padding:.35rem .65rem}.narrow{max-width:900px}.form-card{padding:2rem}.invoice-document{padding:2rem}.invoice-document h3{font-size:1rem;font-weight:900}.totals{margin-left:auto;max-width:360px;display:flex;flex-direction:column;gap:.8rem;padding-top:1rem}.totals span{display:flex;justify-content:space-between}.totals strong{font-size:1.25rem}.side-card{padding:1.5rem}.side-card dl{margin:1.5rem 0 0}.side-card dt{font-size:.72rem;color:var(--muted);text-transform:uppercase}.side-card dd{margin-bottom:1rem}.share-row,.member-row,.audit-row{display:flex;justify-content:space-between;gap:1rem;padding:.9rem 0;border-bottom:1px solid var(--line)}.share-row small,.member-row small,.audit-row small{display:block;color:var(--muted)}.audit-row time{font-size:.8rem;color:var(--muted);white-space:nowrap}footer{background:var(--navy);color:#d9e2ec;padding:2rem 0;font-size:.9rem}footer a{color:#fff}@media(max-width:768px){.hero{padding:4rem 0}.hero h1{font-size:2.7rem}.page-head{align-items:flex-start;flex-direction:column}.auth-section{padding:3rem 1rem}.invoice-document{padding:1.25rem}.table th,.table td{padding:.85rem}.preview-card{transform:none}}

/* Układ dokumentów informacyjnych i ekranów systemowych. */
.legal-copy{line-height:1.75}.legal-copy h2{font-size:1.15rem;font-weight:900;margin-top:2rem}.navbar-toggler{border-color:rgba(255,255,255,.35)}.navbar-toggler-icon{filter:invert(1)}

.category-badge{display:inline-flex;align-items:center;border-radius:99px;background:#eef4fb;color:var(--navy);font-size:.72rem;font-weight:700;padding:.3rem .6rem;margin:.12rem .2rem .12rem 0}.form-text{color:var(--muted)}
.section-soft{background:#eef4f8}.info-box{background:#fff;border:1px solid rgba(217,226,236,.9);border-radius:1rem;padding:1.5rem;box-shadow:0 10px 28px rgba(16,42,67,.06)}.info-box h2{font-size:1.05rem;font-weight:900;margin-bottom:.65rem}.info-box p{color:var(--muted);margin:0;line-height:1.6}.preview-body .invoice-row span{max-width:55%;text-align:right}.export-check{width:1.05rem;height:1.05rem}
.code-area{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;font-size:.86rem;line-height:1.45;white-space:pre}.fa3-separator{display:flex;align-items:center;gap:1rem;color:var(--muted);font-size:.78rem;text-transform:uppercase;letter-spacing:.12em;font-weight:900;margin:1.3rem 0}.fa3-separator:before,.fa3-separator:after{content:"";height:1px;background:var(--line);flex:1}.cert-upload-block{background:#f8fafc;border:1px solid var(--line);border-radius:.85rem;padding:1rem}.cert-upload-block h3{font-size:.9rem;font-weight:900;margin:0 0 .8rem}.credential-status{display:flex;flex-direction:column;gap:.25rem;padding:1rem;border-radius:.8rem;background:#f5f8fb;border:1px solid var(--line)}
.flow-step{display:flex;justify-content:space-between;gap:1rem;padding:1rem 0;border-bottom:1px solid var(--line)}.flow-step:last-child{border-bottom:0}.flow-step span{color:var(--muted);text-align:right}.verified-banner{padding:1rem 1.2rem;border:1px solid #b7e4d4;background:#f0fbf7;border-radius:.9rem;display:flex;flex-direction:column;gap:.25rem}.verified-banner a{font-weight:700}.share-lock{padding:.9rem 1rem;background:#fff7ed;border:1px solid #fed7aa;border-radius:.8rem;font-size:.9rem;color:#9a3412}.smart-note{padding:.75rem 1rem;background:#f0f7ff;border-radius:.75rem;font-size:.9rem}.check-row{display:flex;justify-content:space-between;padding:.8rem 0;border-top:1px solid var(--line)}.check-row.warning strong{color:#b45309}.smart-warning{margin-top:1rem;padding:.8rem 1rem;background:#fff7ed;border:1px solid #fed7aa;border-radius:.75rem;color:#9a3412}

.ksef-sync-status {
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: .85rem;
    background: rgba(248, 250, 252, .92);
}
.sync-counters {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem 1.25rem;
    font-size: .9rem;
}

/* Rejestr faktur: paginacja i gęsty widok inspirowany tabelami ERP/Optimy. */
.invoice-register-container{max-width:1780px;padding-left:clamp(.8rem,2vw,2rem);padding-right:clamp(.8rem,2vw,2rem)}
.invoice-list-controls{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:0 0 .8rem;padding:.65rem .85rem;background:#fff;border:1px solid rgba(217,226,236,.9);border-radius:.85rem;box-shadow:0 7px 20px rgba(16,42,67,.04)}
.invoice-list-summary{display:flex;align-items:baseline;gap:.35rem;font-size:.86rem;color:var(--muted)}.invoice-list-summary strong{color:var(--ink);font-size:.95rem}
.invoice-list-options,.page-size-form,.view-switch{display:flex;align-items:center;gap:.45rem}.page-size-form{margin:0}.page-size-form label{font-size:.8rem;color:var(--muted);font-weight:700;white-space:nowrap}.page-size-form .form-select{width:auto;min-width:72px;padding:.34rem 1.9rem .34rem .55rem;border-radius:.45rem}
.invoice-list-search{flex:1 1 410px;max-width:650px;margin:0}.invoice-list-search .input-group{width:100%}.invoice-sort-link{display:flex;align-items:center;justify-content:space-between;gap:.3rem;color:inherit;text-decoration:none;white-space:nowrap}.invoice-sort-link:hover,.invoice-sort-link.active{color:var(--blue)}.invoice-sort-indicator{font-size:.68rem;opacity:.55}.invoice-sort-link.active .invoice-sort-indicator{opacity:1}.text-end .invoice-sort-link{justify-content:flex-end}
.invoice-register-panel{border-radius:.75rem}.invoice-register-scroll{max-height:calc(100vh - 285px);min-height:180px}
.invoice-table-compact{font-size:.78rem;line-height:1.12;min-width:1250px}.invoice-table-compact thead{position:sticky;top:0;z-index:3}.invoice-table-compact th{background:#edf2f7;padding:.38rem .46rem!important;font-size:.65rem;letter-spacing:.045em;white-space:nowrap;border-right:1px solid #dce5ed;border-bottom:1px solid #cbd7e3!important}.invoice-table-compact td{padding:.26rem .46rem!important;white-space:nowrap;border-right:1px solid #edf2f7;border-bottom:1px solid #e6edf3!important;height:28px;vertical-align:middle}.invoice-table-compact tbody tr:nth-child(even){background:#fbfdff}.invoice-table-compact tbody tr:hover{background:#eef6ff}.invoice-table-compact a{font-weight:700}.invoice-table-compact .compact-lp{width:48px;text-align:right;font-variant-numeric:tabular-nums}.invoice-table-compact .compact-number{max-width:175px;overflow:hidden;text-overflow:ellipsis}.invoice-table-compact .compact-date{width:92px;font-variant-numeric:tabular-nums}.invoice-table-compact .compact-contractor{max-width:285px;overflow:hidden;text-overflow:ellipsis}.invoice-table-compact .compact-nip{width:105px;font-variant-numeric:tabular-nums}.invoice-table-compact .compact-categories{max-width:120px;overflow:hidden;text-overflow:ellipsis;color:#486581}.invoice-table-compact .compact-money{font-variant-numeric:tabular-nums;width:100px}.invoice-table-compact .compact-gross{font-weight:800}.invoice-table-compact .compact-status{padding:.18rem .43rem;font-size:.64rem;white-space:nowrap}.invoice-table-compact .compact-ksef{max-width:235px;overflow:hidden;text-overflow:ellipsis;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;font-size:.7rem}
.invoice-pagination{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:.85rem}.pagination-caption{font-size:.82rem;color:var(--muted)}.invoice-pagination .page-link{color:var(--navy);border-color:var(--line);min-width:32px;text-align:center}.invoice-pagination .page-item.active .page-link{background:var(--blue);border-color:var(--blue);color:#fff}
@media(max-width:768px){.invoice-list-controls{align-items:flex-start;flex-direction:column}.invoice-list-search{flex-basis:auto;max-width:none;width:100%}.invoice-list-options{width:100%;justify-content:space-between;flex-wrap:wrap}.page-size-form{flex-wrap:wrap}.invoice-pagination{align-items:flex-start;flex-direction:column}.invoice-register-scroll{max-height:none}}

/* v0.10.0 — gęsty rejestr eksportu do Optimy */
.compact-register table{font-size:.78rem;white-space:nowrap}
.compact-register th,.compact-register td{padding:.18rem .38rem!important;height:28px;vertical-align:middle}
.compact-register thead th{position:sticky;top:0;z-index:2;background:#f3f6f9}
.compact-register .compact-clip{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.compact-register .text-end{font-variant-numeric:tabular-nums}

/* v0.10.0 — podpowiedzi kontekstowe */
.help-dot{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border:1px solid #9aa8b6;border-radius:50%;background:#fff;color:#36526b;font-size:.75rem;font-weight:800;line-height:1;cursor:help;padding:0;vertical-align:middle}
.help-dot:hover{background:#eef4f8}

/* v0.10.0 — masowe operacje i kategorie pozycji */
.category-x{border:0;background:transparent;color:inherit;font-weight:800;line-height:1;padding:0 .15rem;cursor:pointer}
.category-x:hover{color:#a61b1b}
.btn-xs{font-size:.72rem;line-height:1.1}
.invoice-table-compact input[type="checkbox"]{width:14px;height:14px}

/* v0.10.0 — wybór zakresu synchronizacji */
.sync-days-group{width:185px}
.sync-days-group input{max-width:58px;text-align:center;font-variant-numeric:tabular-nums}
@media(max-width:767px){.sync-days-group{width:170px}}

/* v0.10.0 — FAQ i dokumenty publiczne */
.faq-list{display:grid;gap:12px}
.faq-list details{background:#fff;border:1px solid #d9e2ec;border-radius:10px;overflow:hidden}
.faq-list summary{cursor:pointer;padding:16px 18px;font-weight:750;color:#183b56;list-style:none}
.faq-list summary::-webkit-details-marker{display:none}
.faq-list summary:after{content:"+";float:right;font-size:1.25rem;line-height:1}
.faq-list details[open] summary:after{content:"–"}
.faq-list details>div{padding:0 18px 16px;color:#425466}
.legal-copy h2{margin-top:1.8rem;font-size:1.15rem;font-weight:800;color:#183b56}
.legal-copy h2:first-of-type{margin-top:.5rem}
.legal-copy p{line-height:1.65}

/* v0.10.0 — Optima export */
.optima-export-layout{align-items:flex-start}
.export-settings-card{top:86px;background:#fff;border:1px solid #dbe5ef;border-radius:14px;box-shadow:0 8px 26px rgba(23,50,77,.06);overflow:hidden}
.export-settings-head{padding:16px 16px 12px;border-bottom:1px solid #e8eef4;background:linear-gradient(180deg,#fbfdff 0%,#f6f9fc 100%)}
.export-settings-head h2{font-size:1rem;margin:0 0 4px;font-weight:800;color:#183b56}
.export-settings-head p{font-size:.78rem;line-height:1.35;color:#627d98;margin:0}
.export-settings-body{padding:14px}
.export-field{margin-bottom:14px}
.export-field .form-label{font-size:.78rem;font-weight:750;margin-bottom:5px;color:#334e68}
.export-field .form-control{min-height:36px;border-radius:8px;padding:.4rem .6rem}
.export-field .field-help{font-size:.69rem;line-height:1.35;color:#829ab1;margin-top:5px}
.export-submit{padding-top:2px}
.export-submit .btn{font-size:.82rem;padding:.55rem .65rem;border-radius:8px}
.export-note{margin-top:13px;padding:10px 11px;border-radius:9px;background:#f4f8fc;border:1px solid #e3ebf3;display:grid;gap:3px}
.export-note strong{font-size:.72rem;color:#334e68}
.export-note span{font-size:.68rem;line-height:1.4;color:#627d98}
@media(max-width:1199.98px){.export-settings-card{position:static!important}.export-settings-body{display:grid;grid-template-columns:1fr 1fr;gap:12px}.export-field{margin:0}.export-submit,.export-note{grid-column:1/-1}}
@media(max-width:575.98px){.export-settings-body{grid-template-columns:1fr}}

.security-reward-box{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0}
.security-reward-box>div{border:1px solid #dbe5ef;border-radius:10px;padding:12px;background:#f8fbfe;display:flex;flex-direction:column;gap:3px}
.security-reward-box strong{font-size:.78rem;color:#334e68}
.security-reward-box span{font-size:1.05rem;font-weight:800;color:#183b56}
@media(max-width:575.98px){.security-reward-box{grid-template-columns:1fr}}

/* v0.10.0 — weryfikacja firmy i usuwanie kont */
.unverified-document-mark{margin:0 0 16px;padding:10px 14px;border:2px dashed #b7791f;border-radius:9px;background:#fffaf0;color:#975a16;font-size:.78rem;font-weight:850;letter-spacing:.04em;text-align:center}
.danger-zone{border-color:#f1c0c0!important;background:#fffdfd}

/* v0.10.0 — czytelniejszy eksport do Comarch ERP Optima */
.optima-filterbar{background:#fff;border:1px solid #dbe5ef;border-radius:12px;padding:10px 12px;box-shadow:0 4px 16px rgba(23,50,77,.035)}
.optima-filter-form{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}
.optima-filter-form .filter-field{width:155px}
.optima-filter-form .filter-field-small{width:105px}
.optima-filter-form label{display:block;margin:0 0 4px;font-size:.7rem;font-weight:800;color:#526d82;text-transform:uppercase;letter-spacing:.025em}
.optima-filter-form .form-select{min-height:34px;border-radius:8px;font-size:.78rem}
.optima-filter-form .filter-submit{padding-bottom:1px}
.optima-filter-form .filter-submit .btn{min-height:34px;padding:.38rem .75rem}

.quick-select-panel{display:grid;grid-template-columns:minmax(210px,1.05fr) minmax(460px,2fr);gap:12px;padding:12px;background:#f8fbfd;border:1px solid #dbe5ef;border-radius:12px}
.quick-select-intro{padding:5px 8px;display:flex;flex-direction:column;justify-content:center}
.quick-select-intro strong{font-size:.94rem;color:#183b56}
.quick-select-intro>span{display:block;margin-top:4px;font-size:.72rem;line-height:1.4;color:#627d98}
.quick-months{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.quick-month-block{background:#fff;border:1px solid #e3ebf2;border-radius:10px;padding:9px}
.quick-month-title{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:7px}
.quick-month-title strong{font-size:.73rem;color:#334e68}
.quick-month-title small{font-size:.67rem;color:#829ab1}
.quick-month-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.quick-scope-btn{border:1px solid #c8d6e3;background:#fff;border-radius:8px;padding:7px 9px;display:flex;align-items:center;justify-content:space-between;gap:8px;color:#334e68;font-size:.74rem;transition:.15s ease}
.quick-scope-btn:hover{border-color:#1f78ff;background:#f6faff;color:#0b5ed7}
.quick-scope-btn strong{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:22px;padding:0 6px;border-radius:999px;background:#edf2f7;font-size:.68rem}
.quick-scope-btn.active{border-color:#0d6efd;background:#eaf3ff;color:#0b5ed7;box-shadow:0 0 0 2px rgba(13,110,253,.08)}
.quick-scope-btn.active strong{background:#0d6efd;color:#fff}
.scope-summary{grid-column:1/-1;padding:9px 11px;border-radius:8px;background:#eaf6ee;border:1px solid #bfe2c9;display:flex;align-items:center;gap:10px;flex-wrap:wrap;color:#285943}
.scope-summary strong{font-size:.76rem}
.scope-summary span{font-size:.71rem;color:#49745d}

.selection-status{display:grid;grid-template-columns:1fr auto;align-items:center;gap:2px 8px;margin-bottom:13px;padding:9px 10px;border-radius:9px;background:#f4f8fc;border:1px solid #e0e9f2}
.selection-status span{font-size:.68rem;text-transform:uppercase;letter-spacing:.03em;font-weight:800;color:#627d98}
.selection-status strong{font-size:1.1rem;line-height:1;color:#183b56}
.selection-status small{grid-column:1/-1;font-size:.66rem;line-height:1.35;color:#829ab1}

.register-type{display:inline-block;padding:2px 6px;border-radius:5px;font-size:.67rem;font-weight:700}
.register-type-sales{background:#edf7ee;color:#3b6b44}
.register-type-purchase{background:#eef4fb;color:#3d5f7d}

@media(max-width:1199.98px){
  .quick-select-panel{grid-template-columns:1fr}
  .quick-select-intro{padding:2px}
}
@media(max-width:767.98px){
  .optima-filter-form{display:grid;grid-template-columns:1fr 1fr}
  .optima-filter-form .filter-field,.optima-filter-form .filter-field-small{width:auto}
  .optima-filter-form .filter-submit{grid-column:1/-1}
  .optima-filter-form .filter-submit .btn{width:100%}
  .quick-months{grid-template-columns:1fr}
}
@media(max-width:479.98px){
  .quick-month-actions{grid-template-columns:1fr}
}

.quick-scope-btn{text-decoration:none}.quick-scope-btn:hover{text-decoration:none}

/* v0.10.0 — słownik kategorii */
.category-error-message{margin-top:.35rem;padding:.48rem .65rem;border-radius:.5rem;background:#fff1f0;border:1px solid #f5b7b1;color:#b42318;font-size:.82rem;font-weight:800}
.category-message-error{color:#b42318!important;font-weight:800}
.category-message-success{color:#087f5b!important;font-weight:800}
.category-list-head{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;padding:1rem 1.25rem;border-bottom:1px solid var(--line);background:#fbfdff}
.category-list-head h2{font-size:1rem;font-weight:900;margin:0}
.category-search-box{width:min(100%,330px)}
.category-search-box .form-label{font-size:.72rem;margin-bottom:.3rem;color:var(--muted)}
.category-search-box .form-control{min-height:36px;padding:.45rem .7rem}
.category-search-empty{margin:1rem 1.25rem;padding:.75rem 1rem;border-radius:.65rem;background:#f7f9fb;border:1px dashed #cbd7e3;color:var(--muted);font-size:.86rem}
.category-table td,.category-table th{vertical-align:middle}
@media(max-width:767.98px){.category-list-head{align-items:stretch;flex-direction:column}.category-search-box{width:100%}}

/* v0.10.0 — wyszukiwanie kategorii na fakturze */
.invoice-category-finder{padding:.7rem .8rem;border:1px solid #dce6ef;border-radius:.65rem;background:#f8fbfd}
.invoice-category-finder .form-label{font-size:.76rem;font-weight:800;color:#334e68}
.invoice-category-finder .form-control{background:#fff}
.invoice-category-finder.category-finder-no-match .form-control{border-color:#d92d20;box-shadow:0 0 0 .15rem rgba(217,45,32,.08)}
.invoice-category-finder.category-finder-no-match .form-text{color:#b42318;font-weight:700}

/* v0.10.0 — spójna typografia aplikacji
   Jedna skala dla ekranów roboczych; landing page zachowuje własną dużą typografię. */
:root{
  --type-xs:.72rem;
  --type-sm:.82rem;
  --type-base:.94rem;
  --type-md:1rem;
  --type-lg:1.125rem;
  --type-xl:1.75rem;
}

body{
  font-size:var(--type-base);
  line-height:1.5;
}

/* Nagłówek strony */
.app-section .page-head h1,
.auth-section .page-head h1{
  margin:0;
  font-size:var(--type-xl);
  line-height:1.18;
  font-weight:800;
  letter-spacing:-.018em;
  color:var(--navy);
}
.app-section .page-head .muted,
.app-section .page-head p{
  font-size:var(--type-sm);
  line-height:1.45;
}

/* Mała etykieta sekcji, np. PLIK XML / STATUS / SŁOWNIKI */
.app-section .eyebrow,
.auth-section .eyebrow{
  margin-bottom:.35rem;
  font-size:var(--type-xs);
  line-height:1.2;
  font-weight:800;
  letter-spacing:.11em;
}

/* Nagłówki kart i paneli */
.app-section .panel-card h2,
.app-section .form-card h2,
.app-section .side-card h2,
.app-section .info-box h2,
.app-section .export-settings-head h2,
.auth-section .auth-card h2{
  font-size:var(--type-lg);
  line-height:1.3;
  font-weight:800;
  letter-spacing:-.01em;
}
.app-section .panel-card h3,
.app-section .form-card h3,
.app-section .invoice-document h3,
.app-section .cert-upload-block h3{
  font-size:var(--type-md);
  line-height:1.35;
  font-weight:800;
}

/* Opisy pod nagłówkami */
.export-settings-head p,
.info-box p,
.form-text,
.field-help,
.export-field .field-help,
.export-note span,
.quick-select-intro>span,
.scope-summary span,
.selection-status small{
  font-size:var(--type-sm);
  line-height:1.45;
}

/* Formularze */
.form-label,
.export-field .form-label,
.category-search-box .form-label,
.invoice-category-finder .form-label,
.optima-filter-form label{
  font-size:var(--type-sm);
  line-height:1.3;
  font-weight:700;
  letter-spacing:0;
  text-transform:none;
}
.form-control,
.form-select,
.btn{
  font-size:var(--type-base);
}
.form-control-sm,
.form-select-sm,
.btn-sm{
  font-size:var(--type-sm);
}

/* Tabele */
.table th{
  font-size:var(--type-xs);
  line-height:1.25;
  font-weight:700;
  letter-spacing:.055em;
}
.table td{
  font-size:var(--type-base);
}
.invoice-table-compact,
.compact-register table{
  font-size:var(--type-sm);
}
.invoice-table-compact th{
  font-size:.69rem;
}

/* Statusy, kategorie i małe znaczniki */
.status-pill,
.compact-status,
.register-type,
.category-badge{
  font-size:var(--type-xs);
  line-height:1.2;
  font-weight:700;
}
.status-pill,
.compact-status,
.register-type{
  white-space:nowrap;
}
.status-pill{
  padding:.34rem .62rem;
}
.register-type{
  padding:.28rem .5rem;
}

/* Panel eksportu do Optimy */
.export-settings-head{
  padding:15px 16px 12px;
}
.export-settings-head h2{
  margin:0 0 3px;
}
.export-settings-head p{
  margin:0;
}
.export-note strong,
.selection-status span,
.quick-month-title strong,
.quick-scope-btn,
.scope-summary strong{
  font-size:var(--type-xs);
  line-height:1.3;
  font-weight:700;
}
.selection-status strong{
  font-size:1rem;
  font-weight:800;
}

/* Audyt i drobna meta-informacja */
.audit-row time,
.pagination-caption,
.invoice-list-summary,
.page-size-form label{
  font-size:var(--type-sm);
}

/* Czytelna historia powiadomień */
.notification-history .panel-head p{font-size:var(--type-sm);margin-top:.25rem}
.notification-history-row{display:grid;grid-template-columns:2.6rem minmax(0,1fr) auto;align-items:center;gap:.9rem;padding:1rem 1.25rem;border-bottom:1px solid var(--line)}
.notification-history-row:last-child{border-bottom:0}
.notification-channel{display:flex;align-items:center;justify-content:center;width:2.6rem;height:2.6rem;border-radius:.8rem;background:#eef4fb;color:var(--navy);font-size:.72rem;font-weight:900;letter-spacing:.03em}
.notification-channel-email{background:#eef8f4;color:#087a59;font-size:1rem}
.notification-history-copy{min-width:0}
.notification-history-copy strong{display:block;color:var(--navy);font-size:.95rem}
.notification-history-meta{display:flex;align-items:center;flex-wrap:wrap;gap:.45rem;margin-top:.3rem;color:var(--muted);font-size:var(--type-sm)}
.notification-history-meta a{font-weight:700;text-decoration:none}
.notification-status{padding:.24rem .5rem}
.notification-status-sent{background:#e9f8f1;color:#087a59}
.notification-status-failed{background:#fff0ef;color:#b42318}
.notification-status-pending,.notification-status-sending,.notification-status-retry{background:#fff7e6;color:#935b00}
.notification-history-row time{align-self:start;color:var(--muted);font-size:var(--type-sm);white-space:nowrap}

@media(max-width:575.98px){
  .notification-history-row{grid-template-columns:2.6rem minmax(0,1fr)}
  .notification-history-row time{grid-column:2;white-space:normal}
}

/* Dokumenty informacyjne */
.legal-copy h2{
  font-size:var(--type-lg);
  line-height:1.35;
  font-weight:800;
}
.legal-copy p,
.faq-list details>div{
  font-size:var(--type-base);
  line-height:1.65;
}

@media(max-width:767.98px){
  .app-section .page-head h1,
  .auth-section .page-head h1{
    font-size:1.5rem;
  }
}

/* v0.10.0 — lekka analityka kontrahenta pod fakturą */
.invoice-insights{overflow:hidden}
.invoice-insights-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1.25rem;padding:1.25rem 1.4rem;border-bottom:1px solid var(--line);background:linear-gradient(180deg,#fff 0%,#fbfdff 100%)}
.invoice-insights-head h2{margin:0 0 .3rem;font-size:var(--type-lg);font-weight:800;color:var(--navy)}
.invoice-insights-head p{margin:0;max-width:650px;color:var(--muted);font-size:var(--type-sm)}
.insight-previous-link{min-width:180px;display:flex;flex-direction:column;gap:.15rem;padding:.65rem .8rem;border:1px solid #dce6ef;border-radius:.65rem;background:#fff;text-decoration:none}
.insight-previous-link span{font-size:var(--type-xs);color:var(--muted)}
.insight-previous-link strong{font-size:var(--type-sm);color:var(--blue);font-weight:800}
.insight-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-bottom:1px solid var(--line)}
.insight-metric{padding:1rem 1.15rem;border-right:1px solid var(--line);min-width:0}
.insight-metric:last-child{border-right:0}
.insight-metric>span{display:block;margin-bottom:.3rem;font-size:var(--type-xs);font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.insight-metric strong{display:block;font-size:1.02rem;line-height:1.25;font-weight:800;color:var(--navy);overflow-wrap:anywhere}
.insight-metric small{display:block;margin-top:.3rem;font-size:var(--type-xs);line-height:1.35;color:var(--muted)}
.metric-up{color:#9a6700!important}
.metric-down{color:#087f5b!important}

.insight-chart-wrap{padding:1.15rem 1.4rem}
.insight-chart-title{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:.9rem}
.insight-chart-title>div{display:flex;flex-direction:column;gap:.1rem}
.insight-chart-title strong{font-size:var(--type-sm);font-weight:800;color:var(--navy)}
.insight-chart-title span{font-size:var(--type-xs);color:var(--muted)}
.chart-legend{display:inline-flex!important;align-items:center;gap:.35rem;white-space:nowrap}
.chart-legend i{display:inline-block;width:.65rem;height:.65rem;border-radius:3px;background:#1677ff}

.insight-chart{display:grid;gap:.45rem}
.insight-month-row{display:grid;grid-template-columns:78px minmax(120px,1fr) 145px;align-items:center;gap:.75rem;padding:.35rem .5rem;border-radius:.5rem}
.insight-month-row.current{background:#f3f8ff}
.insight-month-label{display:flex;flex-direction:column;line-height:1.2}
.insight-month-label strong{font-size:var(--type-xs);font-weight:800;color:#334e68}
.insight-month-label span{font-size:.68rem;color:var(--muted)}
.insight-month-value{text-align:right;font-size:var(--type-xs);font-variant-numeric:tabular-nums;color:#334e68;white-space:nowrap}

.insight-progress{width:100%;height:.7rem;border:0;border-radius:999px;overflow:hidden;background:#e8eef5;appearance:none;-webkit-appearance:none}
.insight-progress::-webkit-progress-bar{background:#e8eef5;border-radius:999px}
.insight-progress::-webkit-progress-value{background:#8ba8c5;border-radius:999px}
.insight-progress::-moz-progress-bar{background:#8ba8c5;border-radius:999px}
.insight-month-row.current .insight-progress::-webkit-progress-value{background:#1677ff}
.insight-month-row.current .insight-progress::-moz-progress-bar{background:#1677ff}

.insight-checks{border-top:1px solid var(--line);padding:0 1.4rem 1.1rem}
.insight-checks .check-row{padding:.8rem 0}

@media(max-width:991.98px){
  .insight-metrics{grid-template-columns:1fr 1fr}
  .insight-metric:nth-child(2){border-right:0}
  .insight-metric:nth-child(-n+2){border-bottom:1px solid var(--line)}
}
@media(max-width:575.98px){
  .invoice-insights-head{flex-direction:column}
  .insight-previous-link{width:100%}
  .insight-metrics{grid-template-columns:1fr}
  .insight-metric{border-right:0;border-bottom:1px solid var(--line)}
  .insight-metric:last-child{border-bottom:0}
  .insight-chart-title{flex-direction:column}
  .insight-month-row{grid-template-columns:60px 1fr}
  .insight-month-value{grid-column:2;text-align:left}
}

/* v0.10.0 — płatności i prosty obieg dokumentów */
.form-subsection{padding:1rem;border:1px solid #dce6ef;border-radius:.75rem;background:#f8fbfd}
.payment-card h2,.workflow-card h2{margin:.05rem 0 .8rem;font-size:var(--type-lg);font-weight:800}
.payment-details{display:grid;grid-template-columns:110px 1fr;gap:.45rem .8rem;margin:0 0 1rem}
.payment-details dt{font-size:var(--type-sm);color:var(--muted);font-weight:700}
.payment-details dd{margin:0;font-size:var(--type-sm);color:var(--navy);font-weight:600}
.bank-account{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-variant-numeric:tabular-nums;letter-spacing:.015em}
.workflow-rule-row,.workflow-approval-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.7rem 0;border-bottom:1px solid var(--line)}
.workflow-rule-row>div,.workflow-approval-row>div{display:flex;flex-direction:column;gap:.08rem}
.workflow-rule-row span,.workflow-rule-row small,.workflow-approval-row small{font-size:var(--type-xs);color:var(--muted)}
.workflow-reason{display:inline-block;margin:.1rem .15rem .1rem 0;padding:.25rem .5rem;border-radius:.45rem;background:#f0f5fa;color:#334e68;font-size:var(--type-xs);font-weight:700}
.workflow-history{border-top:1px solid var(--line);padding-top:.75rem}
.workflow-history summary{cursor:pointer;color:var(--navy);font-size:var(--type-sm);font-weight:800}
.workflow-event{display:grid;grid-template-columns:minmax(9rem,.7fr) minmax(12rem,1.5fr);gap:.2rem .8rem;padding:.6rem 0;border-bottom:1px solid var(--line)}
.workflow-event strong,.workflow-event span{font-size:var(--type-xs)}
.workflow-event small{grid-column:1/-1;color:var(--muted);font-size:.72rem}
@media(max-width:575.98px){.workflow-event{grid-template-columns:1fr}}
.status-warning{background:#fff4d6!important;color:#8a5b00!important}
.status-danger{background:#fff0f0!important;color:#b42318!important}
.public-payment{display:grid;gap:.3rem;font-size:var(--type-sm)}
@media(max-width:575.98px){.payment-details{grid-template-columns:1fr}.workflow-rule-row,.workflow-approval-row{align-items:flex-start;flex-direction:column}}


/* v0.10.1 — wspólny styl nowych modułów i czytelne listy mobilne */
.feature-panel{
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
  box-shadow:0 10px 28px rgba(31,58,82,.055);
}
.feature-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1.25rem;
  padding:1.15rem 1.3rem;
  border-bottom:1px solid var(--line);
  background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);
}
.feature-panel-head h2{
  margin:.05rem 0 .3rem;
  font-size:var(--type-lg);
  line-height:1.3;
  font-weight:800;
  color:var(--navy);
}
.feature-panel-head p{
  max-width:760px;
  margin:0;
  font-size:var(--type-sm);
  line-height:1.5;
  color:var(--muted);
}
.feature-panel-badge{
  flex:0 0 auto;
  padding:.4rem .65rem;
  border:1px solid #d5e4f3;
  border-radius:999px;
  background:#f5f9fd;
  color:#46627e;
  font-size:var(--type-xs);
  font-weight:700;
  white-space:nowrap;
}
.feature-link{
  flex:0 0 auto;
  align-self:center;
  font-size:var(--type-sm);
  font-weight:800;
  text-decoration:none;
}
.feature-stat-row{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.feature-stat-row>div{
  padding:.85rem 1.15rem;
  border-right:1px solid var(--line);
}
.feature-stat-row>div:last-child{border-right:0}
.feature-stat-row span{
  display:block;
  margin-bottom:.15rem;
  color:var(--muted);
  font-size:var(--type-xs);
  font-weight:700;
}
.feature-stat-row strong{
  font-size:var(--type-sm);
  font-weight:800;
  color:var(--navy);
}

.workflow-rule-grid{
  display:grid;
  gap:.65rem;
  padding:1rem 1.2rem;
}
.workflow-rule-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.8rem .9rem;
  border:1px solid #dce6ef;
  border-radius:.75rem;
  background:#fff;
}
.workflow-rule-main{min-width:0}
.workflow-rule-meta{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem .8rem;
  margin-top:.35rem;
}
.workflow-rule-meta span{
  color:var(--muted);
  font-size:var(--type-xs);
}
.workflow-builder{
  margin:0 1.2rem 1.2rem;
  padding:1rem;
  border:1px solid #dce6ef;
  border-radius:.85rem;
  background:#f8fbfd;
}
.workflow-builder-head h3{
  margin:0 0 .2rem;
  font-size:var(--type-md);
  font-weight:800;
}
.workflow-builder-head p{
  margin:0 0 .85rem;
  color:var(--muted);
  font-size:var(--type-sm);
}
.soft-note{
  display:flex;
  flex-direction:column;
  gap:.15rem;
  margin:1rem 1.2rem;
  padding:.75rem .9rem;
  border:1px solid #dce6ef;
  border-radius:.7rem;
  background:#f8fbfd;
}
.soft-note strong{font-size:var(--type-sm)}
.soft-note span{font-size:var(--type-sm);color:var(--muted)}
.status-muted{background:#f1f3f5!important;color:#6b7785!important}
.status-success-soft{background:#eaf8f1!important;color:#087f5b!important}
.workflow-help{
  display:flex;
  flex-direction:column;
  gap:.3rem;
  margin:0 0 .65rem;
  padding:.65rem .75rem;
  border:1px solid #dce6ef;
  border-radius:.65rem;
  background:#f8fbfd;
}
.workflow-help span{
  color:var(--muted);
  font-size:var(--type-xs);
  line-height:1.45;
}
.workflow-help a{
  font-size:var(--type-xs);
  font-weight:800;
  text-decoration:none;
}
.approval-actions{
  display:flex;
  justify-content:flex-end;
  gap:.35rem;
}
.money-cell{
  font-variant-numeric:tabular-nums;
  font-weight:700;
}
.payment-table .bank-account{
  font-size:var(--type-sm);
}

/* Desktop/tablet: tabele zachowują normalny układ. */
.responsive-data-table td,
.responsive-data-table th{
  vertical-align:middle;
}

/* Telefon: szeroka tabela staje się listą czytelnych kart zamiast przewijania poziomego. */
@media(max-width:767.98px){
  .invoice-register-container{
    padding-left:12px;
    padding-right:12px;
  }
  .invoice-register-scroll,
  .responsive-data-table{
    overflow:visible!important;
  }
  .responsive-data-table{
    display:block;
    width:100%;
    min-width:0!important;
    margin:0;
  }
  .responsive-data-table thead{
    display:none;
  }
  .responsive-data-table tbody{
    display:grid;
    gap:.7rem;
    width:100%;
  }
  .responsive-data-table tr{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:0;
    width:100%;
    padding:.25rem .85rem;
    border:1px solid var(--line);
    border-radius:14px;
    background:#fff;
    box-shadow:0 4px 14px rgba(31,58,82,.04);
  }
  .responsive-data-table tbody tr:hover{
    background:#fff;
  }
  .responsive-data-table td{
    display:grid;
    grid-template-columns:minmax(92px,34%) minmax(0,66%);
    align-items:start;
    gap:.65rem;
    width:100%;
    min-width:0!important;
    padding:.48rem 0!important;
    border:0!important;
    border-bottom:1px solid #edf1f5!important;
    text-align:left!important;
    white-space:normal!important;
    overflow-wrap:anywhere;
  }
  .responsive-data-table td:last-child{
    border-bottom:0!important;
  }
  .responsive-data-table td::before{
    content:attr(data-label);
    color:var(--muted);
    font-size:.69rem;
    line-height:1.35;
    font-weight:700;
    letter-spacing:.02em;
  }
  .responsive-data-table td.empty{
    display:block;
    text-align:center!important;
  }
  .responsive-data-table td.empty::before{
    display:none;
  }
  .responsive-data-table .compact-lp{
    display:none;
  }
  .responsive-data-table .compact-lp::before{
    display:none;
  }
  .responsive-data-table .category-badge{
    margin-bottom:.2rem;
  }
  .responsive-data-table .status-pill{
    justify-self:start;
  }
  .responsive-data-table .money-cell,
  .responsive-data-table .compact-money{
    font-size:.92rem;
    font-weight:800;
  }
  .responsive-data-table .approval-actions{
    justify-content:flex-start;
    flex-wrap:wrap;
  }
  .responsive-data-table .bank-account{
    font-size:.76rem;
    overflow-wrap:anywhere;
  }
  .invoice-items-display td[data-label="Kategorie pozycji"]{
    grid-template-columns:1fr;
  }
  .invoice-items-display td[data-label="Kategorie pozycji"]::before{
    margin-bottom:.2rem;
  }
  .feature-panel-head{
    flex-direction:column;
    padding:1rem;
  }
  .feature-panel-badge,
  .feature-link{
    align-self:flex-start;
  }
  .feature-stat-row{
    grid-template-columns:1fr;
  }
  .feature-stat-row>div{
    border-right:0;
    border-bottom:1px solid var(--line);
  }
  .feature-stat-row>div:last-child{border-bottom:0}
  .workflow-rule-card{
    align-items:flex-start;
    flex-direction:column;
  }
  .workflow-rule-card form,
  .workflow-rule-card form .btn{
    width:100%;
  }
  .workflow-builder{
    margin:.8rem;
    padding:.85rem;
  }
  .soft-note{
    margin:.8rem;
  }
  .payment-card,
  .workflow-card{
    min-height:0!important;
  }
}

@media(max-width:420px){
  .responsive-data-table td{
    grid-template-columns:82px minmax(0,1fr);
    gap:.5rem;
  }
  .responsive-data-table .btn-sm{
    padding:.35rem .55rem;
  }
}

/* v0.11.32 — czytelniejsze warstwy interfejsu i pełnoszerokie edytory. */
:root{
  --surface:#ffffff;
  --surface-raised:#ffffff;
  --surface-subtle:#f7faff;
  --surface-tint:#eef5fb;
  --line-strong:#c9d8e6;
  --shadow-soft:0 10px 30px rgba(16,42,67,.075);
  --shadow-raised:0 18px 44px rgba(16,42,67,.11);
}
.app-section{
  background:linear-gradient(180deg,#f5f8fb 0%,#eef4f8 100%);
}
.app-section :is(.panel-card,.form-card,.side-card,.feature-panel,.detail-module-card,.info-box,.dashboard-chart-card,.dashboard-action-card,.workflow-builder,.export-settings-card){
  background:var(--surface-raised);
  border:1px solid var(--line-strong);
  box-shadow:var(--shadow-soft);
}
.app-section :is(.panel-card,.form-card,.side-card) + :is(.panel-card,.form-card,.side-card){
  margin-top:1.35rem;
}
.app-section .panel-head,
.app-section .category-list-head{
  background:linear-gradient(180deg,#fbfdff 0%,#f4f8fc 100%);
  border-bottom:1px solid var(--line-strong);
}
.app-section .form-control,
.app-section .form-select{
  background-color:#fff;
  border-color:#cbd9e6;
  box-shadow:inset 0 1px 2px rgba(16,42,67,.025);
}
.app-section .form-control[readonly],
.app-section .form-control.is-readonly{
  background:#edf3f8;
  color:#587189;
}
.category-table tbody tr[data-category-row]:hover td{
  background:#f8fbfe;
}
.category-actions{
  display:flex;
  justify-content:flex-end;
  gap:.45rem;
  flex-wrap:wrap;
}
.category-actions form{margin:0}
.category-editor-row[hidden]{display:none}
.category-editor-row>td{
  padding:0!important;
  background:#edf4fa!important;
  border-top:0;
  border-bottom:1px solid var(--line-strong);
}
.category-editor-shell{
  margin:.8rem 1rem 1.1rem;
  overflow:hidden;
  border:1px solid #bfd0df;
  border-radius:1rem;
  background:#fff;
  box-shadow:0 14px 34px rgba(16,42,67,.10);
}
.category-editor-heading{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:1rem;
  padding:1.1rem 1.25rem;
  background:linear-gradient(135deg,#eef6ff 0%,#f8fbfe 100%);
  border-bottom:1px solid #ccdae7;
}
.category-editor-heading h3{margin:0 0 .2rem!important;font-size:1.1rem!important}
.category-editor-heading p{margin:0;color:var(--muted);font-size:.82rem}
.category-optima-editor{padding:1.15rem 1.25rem 1.25rem}
.category-editor-group{
  padding:1rem;
  border:1px solid #d7e2ec;
  border-radius:.85rem;
  background:#fbfdff;
}
.category-editor-group + .category-editor-group{margin-top:1rem}
.category-editor-group-title{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:1rem;
  margin-bottom:.8rem;
}
.category-editor-group-title strong{color:var(--navy);font-size:.92rem}
.category-editor-group-title span{color:var(--muted);font-size:.75rem;text-align:right}
.category-editor-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:.8rem;
}
.category-editor-grid-main{grid-template-columns:minmax(220px,.8fr) minmax(300px,1.4fr)}
.category-editor-grid .form-label{font-size:.73rem;color:#334e68;margin-bottom:.3rem}
.category-editor-grid .form-control{min-width:0;padding:.62rem .75rem;font-size:.84rem}
.category-editor-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
  padding-top:1rem;
}
.category-editor-footer span{color:var(--muted);font-size:.76rem}

/* Landing hero: krótszy komunikat, bogatszy podgląd procesu. */
.landing-page .hero{padding:6.2rem 0 5.8rem}
.landing-page .hero h1{
  max-width:760px;
  font-size:clamp(2.75rem,4.6vw,4.5rem);
  line-height:1.01;
  letter-spacing:-.048em;
  text-wrap:balance;
}
.landing-page .hero .hero-lead{
  max-width:720px;
  margin:1.35rem 0 1.15rem;
  font-size:1.14rem;
  line-height:1.62;
}
.hero-benefits{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem 1.1rem;
  margin:0 0 1.65rem;
}
.hero-benefits span{
  position:relative;
  padding-left:1.1rem;
  color:#3f5f7a;
  font-size:.82rem;
  font-weight:800;
}
.hero-benefits span::before{
  content:"";
  position:absolute;
  left:0;
  top:.34rem;
  width:.48rem;
  height:.48rem;
  border-radius:50%;
  background:var(--green);
  box-shadow:0 0 0 3px rgba(15,157,117,.11);
}
.hero-preview{transform:rotate(.7deg);box-shadow:0 24px 60px rgba(16,42,67,.15)}
.hero-preview .preview-head{align-items:center}
.hero-preview .preview-head small{margin-left:auto;color:#dce8f2;font-weight:700;font-size:.7rem;letter-spacing:.04em}
.hero-preview .preview-body{padding:1.4rem 1.55rem 1.5rem}
.preview-summary{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}
.preview-summary small,.preview-amount small,.preview-details small{display:block;color:var(--muted);font-size:.7rem;margin-bottom:.18rem}
.preview-summary strong{display:block;color:var(--navy);font-size:1.05rem}
.preview-badge{white-space:nowrap;padding:.38rem .62rem;border-radius:99px;background:#e6f7f1;color:#087f5b;font-size:.67rem;font-weight:900}
.preview-amount{margin:1rem 0;padding:.85rem 1rem;border:1px solid #d8e5f0;border-radius:.75rem;background:#f7fbff}
.preview-amount strong{font-size:1.28rem;color:var(--navy)}
.preview-details{display:grid;grid-template-columns:1fr 1fr;gap:.85rem 1rem}
.preview-details>div{min-width:0;padding-bottom:.65rem;border-bottom:1px solid #e6edf3}
.preview-details b{display:block;overflow:hidden;color:#263f57;font-size:.76rem;text-overflow:ellipsis;white-space:nowrap}
.preview-progress{display:grid;grid-template-columns:repeat(3,1fr);gap:.4rem;margin-top:1rem}
.preview-progress span{position:relative;padding-top:.55rem;border-top:3px solid #d9e3ec;color:var(--muted);font-size:.65rem;font-weight:800;text-align:center}
.preview-progress .is-done{border-color:var(--green);color:#087f5b}
.preview-progress .is-current{border-color:var(--blue);color:var(--blue)}

@media(max-width:1199.98px){
  .category-editor-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:767.98px){
  .app-section :is(.panel-card,.form-card,.side-card) + :is(.panel-card,.form-card,.side-card){margin-top:1rem}
  .category-actions{justify-content:flex-start}
  .category-editor-shell{margin:.55rem}
  .category-editor-heading,.category-editor-footer,.category-editor-group-title{align-items:stretch;flex-direction:column}
  .category-editor-group-title span{text-align:left}
  .category-editor-grid,.category-editor-grid-main{grid-template-columns:1fr}
  .category-editor-footer .btn{width:100%}
  .landing-page .hero{padding:4rem 0}
  .landing-page .hero h1{font-size:2.65rem}
  .preview-details{grid-template-columns:1fr}
}

/* v0.10.2 — dwupoziomowe kategorie i tagi z dodatkowego opisu */
.tag-rule-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.65rem 0;border-bottom:1px solid var(--line)}
.tag-rule-row>div{display:flex;flex-direction:column;gap:.08rem;min-width:0}
.tag-rule-row span,.tag-rule-row small{font-size:var(--type-xs);color:var(--muted)}
.tag-panel{padding:1.25rem 1.4rem}
.tag-panel h2{font-size:var(--type-lg);font-weight:800;margin:.1rem 0 .6rem}
.tag-panel .eyebrow{overflow-wrap:anywhere}
.invoice-category-assignment{display:inline-flex;align-items:center;flex-wrap:wrap;gap:.3rem;color:inherit;text-decoration:none;border-radius:.45rem}
.invoice-category-assignment:hover .category-badge,.invoice-category-assignment:focus-visible .category-badge{border-color:var(--blue);color:var(--blue-dark)}
.invoice-category-assignment.is-compact{color:var(--blue);font-weight:800}
.invoice-category-empty{color:var(--blue);font-weight:700;white-space:nowrap}
.invoice-category-summary{padding-top:.9rem;border-top:1px solid var(--line)}
.invoice-category-current{display:flex;align-items:center;flex-wrap:wrap;gap:.35rem}

@media(max-width:575.98px){
  .tag-panel{padding:1.1rem}
  .tag-panel h2{font-size:1.1rem;line-height:1.3}
}
.additional-description-box{white-space:pre-wrap;padding:.85rem;border:1px solid #dce6ef;border-radius:.7rem;background:#f8fbfd;font-size:var(--type-sm);color:var(--navy)}
.category-table td small{font-size:.72rem}
@media(max-width:767.98px){
  .tag-rule-row{align-items:flex-start;flex-direction:column}
  .tag-rule-row form,.tag-rule-row button{width:100%}
}


/* v0.10.3 — lekkie liczniki w głównym menu */
.nav-link-with-badge{
  display:inline-flex;
  align-items:center;
  gap:.34rem;
}
.nav-count-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:1.22rem;
  height:1.22rem;
  padding:0 .3rem;
  border-radius:999px;
  font-size:.64rem;
  line-height:1;
  font-weight:800;
  font-variant-numeric:tabular-nums;
  box-shadow:0 0 0 1px rgba(255,255,255,.16);
}
.nav-count-new{
  background:rgba(255,255,255,.18);
  color:#fff;
}
.nav-count-action{
  background:#fff;
  color:#173a5e;
}
@media(max-width:991.98px){
  .nav-link-with-badge{
    display:flex;
    width:100%;
    justify-content:space-between;
  }
  .nav-count-badge{
    min-width:1.35rem;
    height:1.35rem;
  }
}

/* v0.10.5 — wybór aktywnego uwierzytelnienia KSeF */
.ksef-active-method{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.72rem .9rem;
  border:1px solid #dce6ef;
  border-radius:.75rem;
  background:#f8fbfd;
}
.ksef-active-method span{font-size:var(--type-sm);color:var(--muted)}
.ksef-active-method strong{font-size:var(--type-sm);color:var(--navy)}

/* v0.10.6 — prosty formularz korekty */
.correction-info{display:flex;flex-direction:column;gap:.2rem;padding:.75rem .9rem;border:1px solid #dce6ef;border-radius:.7rem;background:#f8fbfd}
.correction-info strong{font-size:var(--type-sm);color:var(--navy)}
.correction-info span{font-size:var(--type-sm);line-height:1.5;color:var(--muted)}
.correction-items{display:grid;gap:.8rem;margin-top:1rem}
.correction-item-card{display:grid;grid-template-columns:minmax(0,.9fr) 32px minmax(0,1.5fr);align-items:center;gap:.75rem;padding:.9rem;border:1px solid #dce6ef;border-radius:.8rem;background:#fff}
.correction-before{min-width:0}
.correction-before strong{display:block;font-size:var(--type-sm);margin-bottom:.35rem}
.correction-values{display:flex;flex-direction:column;gap:.15rem;color:var(--muted);font-size:var(--type-xs)}
.correction-arrow{text-align:center;color:#8196aa;font-size:1.15rem;font-weight:800}
.correction-after{min-width:0}
.correction-banner{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem;padding:.75rem .9rem;border:1px solid #f0d7a1;border-radius:.75rem;background:#fff9e8}
.correction-banner strong{display:block;font-size:var(--type-sm);color:#73510d}
.correction-banner span{display:block;margin-top:.15rem;font-size:var(--type-xs);color:#8a6b2d}
.correction-delta-table td,.correction-delta-table th{font-variant-numeric:tabular-nums}
@media(max-width:767.98px){.correction-item-card{grid-template-columns:1fr}.correction-arrow{transform:rotate(90deg)}}

.correction-list-badge{margin-left:.35rem;background:#fff6df!important;color:#805c13!important}


/* v0.10.7 — spójne boksy płatności i obiegu */
.module-guide{
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
  box-shadow:0 10px 26px rgba(31,58,82,.055);
}
.module-guide-main{
  display:flex;
  align-items:flex-start;
  gap:1rem;
  padding:1.1rem 1.2rem .95rem;
}
.module-guide-main h2{
  margin:.05rem 0 .3rem;
  color:var(--navy);
  font-size:var(--type-lg);
  font-weight:800;
}
.module-guide-main p{
  max-width:820px;
  margin:0;
  color:var(--muted);
  font-size:var(--type-sm);
  line-height:1.5;
}
.module-guide-icon,
.detail-module-icon,
.faq-practical-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:42px;
  height:42px;
  border-radius:12px;
  font-size:1.05rem;
  font-weight:900;
}
.module-guide-payment .module-guide-icon,
.detail-module-icon-payment{
  background:#edf6ff;
  color:#1d5f96;
}
.module-guide-workflow .module-guide-icon,
.detail-module-icon-workflow{
  background:#eef8f3;
  color:#267557;
}
.module-guide-steps{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:#fbfdff;
}
.module-guide-steps>div{
  position:relative;
  padding:.9rem 1rem .95rem 3.1rem;
  border-right:1px solid var(--line);
}
.module-guide-steps>div:last-child{border-right:0}
.module-guide-steps>div>span{
  position:absolute;
  left:1rem;
  top:.9rem;
  display:flex;
  align-items:center;
  justify-content:center;
  width:1.45rem;
  height:1.45rem;
  border-radius:50%;
  background:#eaf0f6;
  color:#405c76;
  font-size:.69rem;
  font-weight:900;
}
.module-guide-steps strong{
  display:block;
  margin-bottom:.16rem;
  color:var(--navy);
  font-size:var(--type-sm);
}
.module-guide-steps small{
  display:block;
  color:var(--muted);
  font-size:var(--type-xs);
  line-height:1.42;
}
.module-guide-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.7rem 1.2rem;
  font-size:var(--type-xs);
}
.module-guide-footer span{color:var(--muted)}
.module-guide-footer a{
  font-weight:800;
  text-decoration:none;
  white-space:nowrap;
}

.detail-module-card{
  overflow:hidden;
  padding:0!important;
}
.detail-module-head{
  display:flex;
  align-items:flex-start;
  gap:.85rem;
  padding:1rem 1.05rem .85rem;
  border-bottom:1px solid var(--line);
  background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);
}
.detail-module-head h2{
  margin:.02rem 0 .18rem;
  font-size:var(--type-lg);
  font-weight:800;
}
.detail-module-head p{
  margin:0;
  color:var(--muted);
  font-size:var(--type-xs);
  line-height:1.4;
}
.detail-module-body{padding:.9rem 1.05rem 1rem}
.detail-module-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  flex-wrap:wrap;
}
.detail-help-link{
  color:var(--muted);
  font-size:var(--type-xs);
  font-weight:800;
  text-decoration:none;
}
.detail-help-link:hover{color:var(--navy)}
.detail-module-card .payment-details{
  margin-bottom:.85rem;
}
.detail-module-card .workflow-help{
  margin-bottom:.7rem;
}

.faq-practical-guide{
  margin:1.2rem 0;
  padding:1rem;
  border:1px solid var(--line);
  border-radius:16px;
  background:#f8fbfd;
}
.faq-practical-head h2{
  margin:.05rem 0 .2rem;
  font-size:var(--type-lg);
  font-weight:800;
}
.faq-practical-head p{
  margin:0 0 .8rem;
  color:var(--muted);
  font-size:var(--type-sm);
}
.faq-practical-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.7rem;
}
.faq-practical-card{
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  grid-template-rows:auto auto;
  column-gap:.7rem;
  padding:.8rem;
  border:1px solid #dce6ef;
  border-radius:.75rem;
  background:#fff;
  color:inherit;
  text-decoration:none;
}
.faq-practical-card:hover{
  border-color:#bfd1e2;
  box-shadow:0 6px 16px rgba(31,58,82,.05);
}
.faq-practical-icon{
  grid-row:1/3;
  width:38px;
  height:38px;
  background:#eef4f9;
  color:#3c5f7c;
}
.faq-practical-card strong{
  align-self:end;
  color:var(--navy);
  font-size:var(--type-sm);
}
.faq-practical-card small{
  color:var(--muted);
  font-size:var(--type-xs);
  line-height:1.4;
}

@media(max-width:767.98px){
  .module-guide-main{
    padding:1rem;
  }
  .module-guide-steps{
    grid-template-columns:1fr;
  }
  .module-guide-steps>div{
    border-right:0;
    border-bottom:1px solid var(--line);
  }
  .module-guide-steps>div:last-child{border-bottom:0}
  .module-guide-footer{
    align-items:flex-start;
    flex-direction:column;
    padding:.75rem 1rem;
  }
  .module-guide-footer a{white-space:normal}
  .detail-module-head{
    padding:.9rem;
  }
  .detail-module-body{
    padding:.85rem .9rem .95rem;
  }
  .faq-practical-grid{
    grid-template-columns:1fr;
  }
}


/* v0.10.8 — płatności bankowe i panel zarządczy */
.payment-export-toolbar{
  padding:1rem;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  box-shadow:0 8px 22px rgba(31,58,82,.045);
}
.payment-export-selection{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:.8rem;
}
.payment-export-selection strong{color:var(--navy);font-size:var(--type-md)}
.payment-export-selection span{color:var(--muted);font-size:var(--type-sm)}
.payment-export-controls{
  display:grid;
  grid-template-columns:minmax(260px,1.5fr) minmax(155px,.7fr) auto;
  align-items:end;
  gap:.75rem;
}
.payment-export-controls .form-label{
  margin-bottom:.25rem;
  color:var(--muted);
  font-size:var(--type-xs);
  font-weight:700;
}
.payment-export-button-wrap{padding-bottom:1px}
.payment-export-note{
  margin-top:.65rem;
  padding-top:.65rem;
  border-top:1px solid #edf1f5;
  color:var(--muted);
  font-size:var(--type-xs);
  line-height:1.45;
}
.payment-select-col{width:40px;text-align:center}
.payment-generated{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
}
.payment-generated-check{
  width:1.1rem;
  height:1.1rem;
  margin:0;
  opacity:1!important;
  accent-color:#087f5b;
}
.payment-generated>span:last-child{
  display:flex;
  flex-direction:column;
  gap:.05rem;
}
.payment-generated strong{
  color:#285d4c;
  font-size:var(--type-xs);
}
.payment-generated small{
  color:var(--muted);
  font-size:.67rem;
}

.dashboard-container{max-width:1440px}
.dashboard-head-actions{display:flex;gap:.5rem;flex-wrap:wrap}
.dashboard-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:.8rem;
}
.dashboard-kpi{
  display:flex;
  flex-direction:column;
  min-width:0;
  padding:1rem;
  border:1px solid var(--line);
  border-radius:15px;
  background:#fff;
  color:inherit;
  text-decoration:none;
  box-shadow:0 6px 18px rgba(31,58,82,.035);
}
.dashboard-kpi:hover{border-color:#bfd1e2}
.dashboard-kpi span{
  color:var(--muted);
  font-size:var(--type-xs);
  font-weight:700;
}
.dashboard-kpi strong{
  margin:.3rem 0 .18rem;
  color:var(--navy);
  font-size:clamp(1.25rem,2.2vw,1.75rem);
  line-height:1.15;
  font-variant-numeric:tabular-nums;
}
.dashboard-kpi small{color:var(--muted);font-size:.68rem}
.dashboard-kpi-attention{border-color:#efd8a8;background:#fffdf8}
.dashboard-kpi-attention strong{color:#855e14}

.dashboard-chart-card{padding:1rem 1.05rem}
.dashboard-panel-head{align-items:flex-start}
.dashboard-panel-head h2,
.dashboard-action-card h2{margin:.03rem 0 .15rem;font-size:var(--type-lg);font-weight:800}
.dashboard-panel-head p,
.dashboard-action-card p{margin:0;font-size:var(--type-xs);line-height:1.45}
.chart-legend{display:flex;gap:.8rem;flex-wrap:wrap;font-size:var(--type-xs);color:var(--muted)}
.chart-legend span::before{
  content:"";
  display:inline-block;
  width:.55rem;
  height:.55rem;
  margin-right:.3rem;
  border-radius:2px;
}
.legend-sales::before{background:#4d7da4}
.legend-purchase::before{background:#a5b8c8}

.month-chart{display:grid;gap:.65rem;margin-top:.85rem}
.month-chart-row{
  display:grid;
  grid-template-columns:62px minmax(0,1fr);
  gap:.65rem;
  align-items:center;
}
.month-chart-label{color:var(--muted);font-size:.69rem;font-weight:700}
.month-chart-series{display:grid;gap:.28rem}
.month-chart-series>div{
  display:grid;
  grid-template-columns:minmax(0,1fr) 95px;
  gap:.55rem;
  align-items:center;
}
.month-chart-series span{
  text-align:right;
  color:#53687b;
  font-size:.67rem;
  font-variant-numeric:tabular-nums;
}
.dashboard-progress{
  display:block;
  width:100%;
  height:.58rem;
  border:0;
  border-radius:999px;
  overflow:hidden;
  background:#edf2f6;
  appearance:none;
}
.dashboard-progress::-webkit-progress-bar{background:#edf2f6;border-radius:999px}
.progress-sales::-webkit-progress-value{background:#4d7da4;border-radius:999px}
.progress-purchase::-webkit-progress-value{background:#a5b8c8;border-radius:999px}
.progress-pipeline::-webkit-progress-value{background:#6d91ad;border-radius:999px}
.progress-sales::-moz-progress-bar{background:#4d7da4}
.progress-purchase::-moz-progress-bar{background:#a5b8c8}
.progress-pipeline::-moz-progress-bar{background:#6d91ad}

.pipeline-chart{display:grid;gap:.82rem;margin-top:.9rem}
.pipeline-chart-row{display:grid;gap:.3rem}
.pipeline-chart-top{display:flex;justify-content:space-between;gap:1rem;font-size:var(--type-xs)}
.pipeline-chart-top span{color:var(--muted)}
.pipeline-chart-top strong{color:var(--navy);font-variant-numeric:tabular-nums}
.dashboard-chart-link{
  display:inline-block;
  margin-top:1rem;
  font-size:var(--type-xs);
  font-weight:800;
  text-decoration:none;
}

.dashboard-action-card{padding:1rem 1.05rem}
.dashboard-action-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
}
.dashboard-ksef-state{
  flex:0 0 auto;
  padding:.32rem .55rem;
  border-radius:999px;
  background:#fff3cd;
  color:#80601a;
  font-size:.68rem;
  font-weight:800;
}
.dashboard-ksef-state.is-verified{background:#eaf8f1;color:#087f5b}
.dashboard-sync-grid{display:grid;gap:.55rem;margin-top:.85rem}
.dashboard-sync-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.8rem;
  padding:.7rem .75rem;
  border:1px solid #e2e9ef;
  border-radius:.7rem;
  background:#fbfdff;
}
.dashboard-sync-item>div{display:flex;flex-direction:column;min-width:0}
.dashboard-sync-item strong{font-size:var(--type-sm);color:var(--navy)}
.dashboard-sync-item small{color:var(--muted);font-size:.68rem}
.dashboard-action-links{
  display:flex;
  gap:.8rem;
  flex-wrap:wrap;
  margin-top:.75rem;
  padding-top:.7rem;
  border-top:1px solid #edf1f5;
}
.dashboard-action-links a{font-size:var(--type-xs);font-weight:800;text-decoration:none}
.management-links{display:grid;gap:.45rem;margin-top:.8rem}
.management-links a{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:.75rem;
  padding:.7rem .75rem;
  border:1px solid #e2e9ef;
  border-radius:.7rem;
  color:inherit;
  text-decoration:none;
}
.management-links a:hover{background:#fbfdff;border-color:#cbd9e5}
.management-links span{font-size:var(--type-sm);font-weight:700;color:var(--navy)}
.management-links strong{font-size:var(--type-sm);font-variant-numeric:tabular-nums}

@media(max-width:991.98px){
  .dashboard-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .payment-export-controls{grid-template-columns:1fr 180px}
  .payment-export-button-wrap{grid-column:1/-1}
}
@media(max-width:767.98px){
  .dashboard-head{align-items:flex-start}
  .dashboard-head-actions{width:100%}
  .dashboard-head-actions .btn{flex:1 1 auto}
  .dashboard-kpi-grid{grid-template-columns:1fr 1fr;gap:.55rem}
  .dashboard-kpi{padding:.8rem}
  .dashboard-kpi strong{font-size:1.2rem}
  .month-chart-row{grid-template-columns:54px minmax(0,1fr)}
  .month-chart-series>div{grid-template-columns:minmax(0,1fr) 78px}
  .dashboard-sync-item{align-items:flex-start;flex-direction:column}
  .dashboard-sync-item form,.dashboard-sync-item .btn{width:100%}
  .payment-export-controls{grid-template-columns:1fr}
  .payment-export-button-wrap{grid-column:auto}
  .payment-export-button-wrap .btn{width:100%}
  .payment-export-selection{align-items:flex-start}
  .payment-select-col{width:auto}
}
@media(max-width:430px){
  .dashboard-kpi-grid{grid-template-columns:1fr}
  .month-chart-series>div{grid-template-columns:minmax(0,1fr) 72px}
}


/* v0.11.1 — GUS REGON i szybkie dodawanie kontrahenta */
.gus-lookup-box,
.inline-contractor-panel,
.contractor-gus-quick{
  border:1px solid var(--line);
  border-radius:14px;
  background:#f9fbfd;
}
.gus-lookup-box{padding:1rem}
.gus-lookup-box>div:first-child{
  display:flex;
  flex-direction:column;
  gap:.15rem;
}
.gus-lookup-box strong,
.inline-contractor-head strong,
.contractor-gus-quick strong{color:var(--navy);font-size:var(--type-sm)}
.gus-lookup-box small,
.inline-contractor-head small,
.contractor-gus-quick span{
  color:var(--muted);
  font-size:var(--type-xs);
  line-height:1.45;
}
.gus-lookup-controls{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:.55rem;
  margin-top:.75rem;
}
.gus-lookup-status{
  min-height:1.15rem;
  margin-top:.45rem;
  color:var(--muted);
  font-size:var(--type-xs);
  font-weight:700;
}
.gus-lookup-status.is-success{color:#187653}
.gus-lookup-status.is-error{color:#b63838}
.gus-lookup-status.is-loading{color:#456b8c}
.inline-contractor-panel{padding:.9rem}
.inline-contractor-panel[hidden]{display:none!important}
.inline-contractor-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
}
.inline-contractor-head>div:first-child{
  display:flex;
  flex-direction:column;
  gap:.1rem;
}
.contractor-gus-quick{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.85rem 1rem;
}
.contractor-gus-quick>div{
  display:flex;
  flex-direction:column;
  gap:.1rem;
}
.contractor-gus-quick-form{
  display:flex;
  gap:.45rem;
  min-width:320px;
}
@media(max-width:767.98px){
  .gus-lookup-controls{grid-template-columns:1fr}
  .contractor-gus-quick{align-items:stretch;flex-direction:column}
  .contractor-gus-quick-form{min-width:0;width:100%}
  .contractor-gus-quick-form .form-control{min-width:0}
}


/* v0.11.2 — ostateczna normalizacja nagłówków wszystkich boksów aplikacji.
   Ten blok jest na końcu CSS celowo: usuwa różnice pochodzące ze starszych modułów. */
.app-section{
  --box-title-size:1.125rem;
  --box-subtitle-size:1rem;
  --box-eyebrow-size:.72rem;
}
.app-section .page-head h1{
  margin:0!important;
  font-size:1.75rem!important;
  line-height:1.18!important;
  font-weight:800!important;
  letter-spacing:-.018em!important;
  color:var(--navy)!important;
}
.app-section :is(
  .panel-card,
  .feature-panel,
  .module-guide,
  .detail-module-card,
  .info-box,
  .form-card,
  .side-card,
  .dashboard-chart-card,
  .dashboard-action-card,
  .workflow-builder,
  .inline-contractor-panel,
  .gus-lookup-box,
  .faq-practical-guide,
  .export-settings
) h2{
  margin:0 0 .3rem!important;
  font-size:var(--box-title-size)!important;
  line-height:1.3!important;
  font-weight:800!important;
  letter-spacing:-.01em!important;
  text-transform:none!important;
  color:var(--navy)!important;
}
.app-section :is(
  .panel-card,
  .feature-panel,
  .module-guide,
  .detail-module-card,
  .info-box,
  .form-card,
  .side-card,
  .dashboard-chart-card,
  .dashboard-action-card,
  .workflow-builder,
  .inline-contractor-panel,
  .gus-lookup-box,
  .faq-practical-guide,
  .export-settings
) h3{
  margin:0 0 .25rem!important;
  font-size:var(--box-subtitle-size)!important;
  line-height:1.35!important;
  font-weight:800!important;
  letter-spacing:0!important;
  text-transform:none!important;
  color:var(--navy)!important;
}
.app-section :is(
  .panel-card,
  .feature-panel,
  .module-guide,
  .detail-module-card,
  .info-box,
  .form-card,
  .side-card,
  .dashboard-chart-card,
  .dashboard-action-card,
  .workflow-builder,
  .inline-contractor-panel,
  .gus-lookup-box,
  .faq-practical-guide,
  .export-settings
) .eyebrow{
  display:block!important;
  margin:0 0 .35rem!important;
  font-size:var(--box-eyebrow-size)!important;
  line-height:1.2!important;
  font-weight:800!important;
  letter-spacing:.11em!important;
  text-transform:uppercase!important;
  color:var(--blue)!important;
}
.app-section :is(.panel-head,.feature-panel-head,.detail-module-head,.module-guide-main,.dashboard-action-head,.inline-contractor-head){
  line-height:1.45;
}
.app-section :is(.panel-head,.feature-panel-head,.detail-module-head,.module-guide-main,.dashboard-action-head,.inline-contractor-head) p{
  margin:0!important;
  font-size:var(--type-sm)!important;
  line-height:1.45!important;
  color:var(--muted)!important;
}
@media(max-width:767.98px){
  .app-section .page-head h1{font-size:1.5rem!important}
  .app-section{--box-title-size:1.05rem;--box-subtitle-size:.96rem}
}


/* v0.11.3 — jeden system typografii nagłówków: landing + aplikacja.
   Reguły na końcu pliku są celowo nadrzędne względem starszych lokalnych styli. */
:root{
  --heading-page:1.75rem;
  --heading-section:1.72rem;
  --heading-card:1.05rem;
  --heading-small:.95rem;
  --heading-eyebrow:.70rem;
  --heading-line:1.22;
}

.landing-page .section{
  padding:4.6rem 0;
}
.landing-page .section-title{
  max-width:720px;
  margin-bottom:2rem;
}
.landing-page .section-title h2,
.landing-page .landing-section-title{
  margin:0;
  max-width:760px;
  color:var(--navy);
  font-size:var(--heading-section)!important;
  font-weight:850!important;
  line-height:var(--heading-line)!important;
  letter-spacing:-.018em!important;
}
.landing-page .eyebrow{
  display:block;
  margin:0 0 .48rem!important;
  color:var(--blue)!important;
  font-size:var(--heading-eyebrow)!important;
  font-weight:850!important;
  line-height:1.2!important;
  letter-spacing:.115em!important;
  text-transform:uppercase!important;
}
.landing-page .feature h3,
.landing-page .landing-card-title,
.landing-page .panel-card h3{
  margin:0 0 .45rem!important;
  color:var(--navy)!important;
  font-size:var(--heading-card)!important;
  font-weight:800!important;
  line-height:1.3!important;
  letter-spacing:-.006em!important;
  text-transform:none!important;
}
.landing-page .panel-card.form-card{
  padding:1.35rem 1.45rem;
}
.landing-page .landing-card{
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
}
.landing-page .landing-card p{
  margin-bottom:1rem;
  line-height:1.55;
}
.landing-page .landing-card .btn{
  align-self:flex-start;
  margin-top:auto;
}
.landing-page #optima .panel-card{
  padding:1.25rem 1.4rem;
}
.landing-page .flow-step{
  padding:.72rem 0;
  font-size:.82rem;
}
.landing-page .flow-step strong{
  font-size:.82rem;
}
.landing-page .flow-step span{
  font-size:.78rem;
}
.landing-page .section p.muted{
  font-size:.88rem;
  line-height:1.58;
}
.landing-page .feature{
  padding:1.4rem;
}
.landing-page .feature p{
  margin:0;
  font-size:.86rem;
  line-height:1.55;
}

/* Aplikacja: wszystkie standardowe boksy korzystają z identycznej hierarchii. */
.app-section .page-head h1{
  font-size:var(--heading-page)!important;
  font-weight:850!important;
  line-height:var(--heading-line)!important;
  letter-spacing:-.018em!important;
}
.app-section :is(
  .panel-card,.feature-panel,.module-guide,.detail-module-card,.info-box,.form-card,
  .side-card,.dashboard-chart-card,.dashboard-action-card,.workflow-builder,
  .inline-contractor-panel,.gus-lookup-box,.faq-practical-guide,.export-settings-card,
  .cert-upload-block,.credential-status
) > h2,
.app-section :is(
  .panel-card,.feature-panel,.module-guide,.detail-module-card,.info-box,.form-card,
  .side-card,.dashboard-chart-card,.dashboard-action-card,.workflow-builder,
  .inline-contractor-panel,.gus-lookup-box,.faq-practical-guide,.export-settings-card,
  .cert-upload-block,.credential-status
) :is(.panel-head,.feature-panel-head,.detail-module-head,.module-guide-main,.dashboard-action-head,.inline-contractor-head) h2{
  margin:0 0 .3rem!important;
  color:var(--navy)!important;
  font-size:var(--heading-card)!important;
  font-weight:800!important;
  line-height:1.3!important;
  letter-spacing:-.006em!important;
  text-transform:none!important;
}
.app-section :is(
  .panel-card,.feature-panel,.module-guide,.detail-module-card,.info-box,.form-card,
  .side-card,.dashboard-chart-card,.dashboard-action-card,.workflow-builder,
  .inline-contractor-panel,.gus-lookup-box,.faq-practical-guide,.export-settings-card,
  .cert-upload-block,.credential-status
) h3{
  margin:0 0 .3rem!important;
  color:var(--navy)!important;
  font-size:var(--heading-small)!important;
  font-weight:800!important;
  line-height:1.32!important;
  letter-spacing:0!important;
  text-transform:none!important;
}
.app-section .eyebrow{
  margin:0 0 .45rem!important;
  font-size:var(--heading-eyebrow)!important;
  font-weight:850!important;
  line-height:1.2!important;
  letter-spacing:.115em!important;
}

@media(max-width:767.98px){
  :root{
    --heading-page:1.48rem;
    --heading-section:1.45rem;
    --heading-card:1rem;
    --heading-small:.92rem;
  }
  .landing-page .section{padding:3.4rem 0}
  .landing-page .panel-card.form-card{padding:1.15rem}
}


/* v0.11.6 — pozycje faktury i dyskretny kreator koszt → sprzedaż */
.quiet-invoice-option{
  border:1px dashed #c9d6e2;
  border-radius:10px;
  background:#fbfdff;
  color:var(--muted);
}
.quiet-invoice-option summary{
  cursor:pointer;
  padding:.6rem .8rem;
  font-size:var(--type-xs);
  font-weight:800;
  color:#587189;
}
.quiet-invoice-option>div{
  display:flex;
  gap:.55rem;
  align-items:baseline;
  flex-wrap:wrap;
  padding:0 .8rem .75rem;
  font-size:var(--type-xs);
}
.quiet-invoice-option a{font-weight:800;text-decoration:none}
.quiet-invoice-option span{color:var(--muted)}

.invoice-position-create{
  padding:1rem;
  border:1px solid #dce6ef;
  border-radius:13px;
  background:#f9fbfd;
}
.invoice-position-create-head h2{
  margin:0 0 .15rem!important;
  font-size:var(--heading-card)!important;
}
.invoice-position-create-head p{
  margin:0 0 .9rem;
  color:var(--muted);
  font-size:var(--type-xs);
}
.invoice-position-create-grid{
  display:grid;
  grid-template-columns:minmax(220px,2.3fr) minmax(95px,.7fr) minmax(85px,.6fr) minmax(130px,1fr) minmax(95px,.65fr);
  gap:.65rem;
  align-items:end;
}
.invoice-position-create-grid .form-label{
  margin-bottom:.28rem;
  color:#526d82;
  font-size:var(--type-xs);
}

.invoice-items-editor-panel{padding:1rem!important}
.advanced-section{border-top:4px solid #d8e8f7}.advanced-section h2{margin:.15rem 0 .35rem}.section-kicker{color:#456b8c;font-size:.7rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.advanced-repeat-card{margin-top:1rem;padding:1rem;border:1px solid #d9e5ef;border-radius:.9rem;background:#f8fbfe}.advanced-repeat-card label{display:block;margin-bottom:.25rem;color:#526d82;font-size:.72rem;font-weight:800}.repeat-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.advanced-side{top:1rem}.advanced-note,.advanced-check{display:flex;gap:.65rem;padding:.9rem;border-radius:.8rem;background:#eef6fd;color:#315b7a}.advanced-note{flex-direction:column}.advanced-note span,.advanced-check small{display:block;font-size:.8rem}.advanced-check input{margin-top:.25rem}.fa3-import summary{display:flex;justify-content:space-between;cursor:pointer}.fa3-import summary span{color:var(--muted);font-size:.85rem}
.invoice-items-editor-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:1rem;
  margin-bottom:.8rem;
}
.invoice-items-editor-head h2{
  margin:0 0 .18rem!important;
  font-size:var(--heading-card)!important;
}
.invoice-items-editor-head p{
  margin:0;
  color:var(--muted);
  font-size:var(--type-xs);
}
.invoice-items-editor{
  display:grid;
  gap:.65rem;
}
.invoice-item-editor{
  border:1px solid #dce6ef;
  border-radius:11px;
  background:#fbfdff;
  overflow:hidden;
}
.invoice-item-editor:focus-within{
  border-color:#9dbbd2;
  box-shadow:0 0 0 2px rgba(69,107,140,.06);
}
.invoice-item-editor-top{
  display:flex;
  align-items:center;
  gap:.55rem;
  min-height:34px;
  padding:.38rem .55rem .3rem .7rem;
  border-bottom:1px solid #e7edf2;
  background:#f3f7fa;
}
.invoice-item-number{
  color:#526d82;
  font-size:.69rem;
  font-weight:850;
  letter-spacing:.045em;
  text-transform:uppercase;
}
.invoice-item-source-badge{
  padding:.2rem .42rem;
  border-radius:999px;
  background:#eef5fb;
  color:#315b7a;
  font-size:.66rem;
  font-weight:800;
}
.invoice-item-editor-top .remove-item{margin-left:auto}
.invoice-item-editor-grid{
  display:grid;
  grid-template-columns:minmax(230px,2.3fr) minmax(90px,.7fr) minmax(75px,.6fr) minmax(145px,1fr) minmax(90px,.65fr) minmax(115px,.8fr);
  gap:.55rem;
  align-items:end;
  padding:.72rem;
}
.invoice-editor-field label{
  display:block;
  margin:0 0 .26rem;
  color:#71859a;
  font-size:.66rem;
  font-weight:800;
  letter-spacing:.045em;
  text-transform:uppercase;
}
.invoice-editor-field .form-control,
.invoice-editor-field .form-select{
  min-height:36px;
  padding:.42rem .58rem;
}
.invoice-editor-value{
  min-height:58px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
}
.line-gross-preview{
  display:flex;
  align-items:center;
  min-height:36px;
  color:#18324a;
  font-size:.8rem;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.invoice-item-cost-origin{
  display:flex;
  align-items:center;
  gap:.35rem;
  flex-wrap:wrap;
  padding:.45rem .72rem .55rem;
  border-top:1px dashed #dbe5ed;
  color:#71859a;
  font-size:.67rem;
}
.invoice-item-cost-origin>a{font-weight:800;text-decoration:none}
.invoice-item-cost-origin small{font-size:.67rem}
.origin-separator{color:#b5c2cc}
.draft-cost-summary{
  margin-top:1rem;
  padding-top:.85rem;
  border-top:1px solid var(--line);
}
.draft-cost-summary>div:not(.eyebrow){
  display:flex;
  justify-content:space-between;
  gap:.8rem;
  padding:.28rem 0;
  font-size:var(--type-xs);
}
.draft-cost-summary>div span{color:var(--muted)}
.draft-cost-summary>small{
  display:block;
  margin-top:.45rem;
  color:var(--muted);
  font-size:.67rem;
}

/* Kreator jest dostępny tylko z dodatkowej ścieżki, nie z głównego menu. */
.invoice-cost-builder-container{max-width:1540px}
.cost-builder-layout{
  display:grid;
  grid-template-columns:minmax(350px,.85fr) minmax(620px,1.45fr);
  gap:1rem;
  align-items:start;
}
.cost-source-panel,.cost-target-panel{overflow:visible}
.cost-target-panel{position:sticky;top:82px}
.cost-builder-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:1rem;
  padding:1rem 1.05rem;
  border-bottom:1px solid #e4ebf1;
}
.cost-builder-head h2{margin:0 0 .15rem!important;font-size:var(--heading-card)!important}
.cost-builder-head p{margin:0;color:var(--muted);font-size:var(--type-xs)}
.cost-source-search{width:min(230px,45%)}
.cost-source-list{
  max-height:690px;
  overflow:auto;
  padding:.65rem;
}
.cost-source-invoice{
  margin-bottom:.5rem;
  border:1px solid #dce6ef;
  border-radius:9px;
  background:#fff;
  overflow:hidden;
}
.cost-source-invoice[hidden]{display:none}
.cost-source-invoice summary{
  display:flex;
  justify-content:space-between;
  gap:1rem;
  cursor:pointer;
  padding:.68rem .75rem;
  background:#f8fbfd;
  list-style:none;
}
.cost-source-invoice summary::-webkit-details-marker{display:none}
.cost-source-invoice summary>div{display:flex;flex-direction:column;min-width:0}
.cost-source-invoice summary strong{
  color:#18324a;
  font-size:.77rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.cost-source-invoice summary span,
.cost-source-invoice summary small{
  color:var(--muted);
  font-size:.66rem;
}
.cost-source-items{border-top:1px solid #e6edf2}
.cost-source-item{
  display:grid;
  grid-template-columns:22px minmax(0,1fr) auto;
  gap:.5rem;
  align-items:center;
  margin:0;
  padding:.58rem .68rem;
  border-bottom:1px solid #edf2f6;
  cursor:pointer;
}
.cost-source-item:last-child{border-bottom:0}
.cost-source-item:hover{background:#f7fbff}
.cost-source-item:has(input:checked){background:#eef6ff}
.cost-source-copy{display:flex;flex-direction:column;min-width:0}
.cost-source-copy strong{
  color:#29465f;
  font-size:.73rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.cost-source-copy small{color:var(--muted);font-size:.64rem}
.tax-rate-cell{white-space:nowrap}
.ksef-confirm-reference{display:flex;align-items:center;flex-wrap:wrap;gap:.35rem}
.copy-invoice-number{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border:1px solid #bfd2e2;border-radius:.55rem;background:#f3f8fc;color:#24577d;touch-action:manipulation}
.copy-invoice-number:hover,.copy-invoice-number:focus-visible{background:#e5f1f8;border-color:#7aa9c8;color:#123f61;outline:0;box-shadow:0 0 0 .2rem rgba(75,139,181,.18)}
.copy-invoice-number.is-copied{background:#e8f7ef;border-color:#78b99a;color:#17663f}
.copy-invoice-number svg{width:1.05rem;height:1.05rem;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.copy-invoice-status{min-width:4.8rem;color:#28734d;font-weight:700}
.payment-reminder-form{display:flex;align-items:center;gap:.35rem;min-width:14rem}.payment-reminder-form .form-control{min-width:9.5rem}.payment-table td[data-label="Akcje"]{min-width:12rem}
.cost-source-value{
  color:#29465f;
  font-size:.7rem;
  font-weight:800;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}

.cost-target-settings{
  display:grid;
  grid-template-columns:minmax(220px,1.5fr) minmax(150px,.8fr) minmax(150px,.8fr);
  gap:.65rem;
  padding:.85rem 1rem;
  border-bottom:1px solid #edf2f6;
}
.cost-target-settings .form-label{
  margin-bottom:.28rem;
  color:#60778c;
  font-size:.68rem;
}
.cost-pricing-box{
  margin:.85rem 1rem;
  padding:.7rem .75rem;
  border:1px solid #dce6ef;
  border-radius:9px;
  background:#f8fbfd;
}
.cost-pricing-title>div{display:flex;flex-direction:column}
.cost-pricing-title strong{font-size:.75rem;color:#29465f}
.cost-pricing-title span{font-size:.65rem;color:var(--muted)}
.cost-pricing-controls{
  display:grid;
  grid-template-columns:minmax(220px,1.4fr) minmax(100px,.55fr) auto;
  gap:.45rem;
  margin-top:.55rem;
}
.cost-target-empty{
  margin:1rem;
  padding:2rem 1rem;
  border:1px dashed #cbd8e3;
  border-radius:9px;
  color:#71859a;
  text-align:center;
  font-size:.76rem;
}
.cost-target-lines{
  display:grid;
  gap:.55rem;
  padding:0 1rem .7rem;
  max-height:460px;
  overflow:auto;
}
.cost-target-lines.is-merged{opacity:.45}
.cost-target-line{
  border:1px solid #dce6ef;
  border-radius:9px;
  background:#fff;
  overflow:hidden;
}
.cost-target-origin{
  display:flex;
  justify-content:space-between;
  gap:.7rem;
  padding:.38rem .6rem;
  background:#f5f8fb;
  border-bottom:1px solid #e5edf3;
  color:#587189;
  font-size:.65rem;
}
.cost-target-origin small{color:#71859a}
.cost-target-fields{
  display:grid;
  grid-template-columns:minmax(210px,2fr) minmax(78px,.58fr) minmax(70px,.55fr) minmax(120px,.85fr) minmax(82px,.6fr) 38px;
  gap:.45rem;
  align-items:end;
  padding:.58rem;
}
.cost-target-fields label{
  display:block;
  margin-bottom:.22rem;
  color:#71859a;
  font-size:.62rem;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.cost-target-fields .form-control,
.cost-target-fields .form-select{min-height:33px;padding:.35rem .48rem}
.cost-merge-box{
  margin:.3rem 1rem .75rem;
  padding:.72rem;
  border:1px solid #dce6ef;
  border-radius:9px;
  background:#fcfdfe;
}
.cost-merge-box .form-check{display:flex;gap:.5rem;align-items:flex-start}
.cost-merge-box .form-check-label{display:flex;flex-direction:column}
.cost-merge-box .form-check-label strong{font-size:.73rem;color:#29465f}
.cost-merge-box .form-check-label small{font-size:.64rem;color:var(--muted)}
.cost-merge-fields{
  display:grid;
  grid-template-columns:minmax(220px,1.5fr) minmax(130px,.7fr) minmax(90px,.5fr);
  gap:.55rem;
  margin-top:.65rem;
}
.cost-merge-fields[hidden]{display:none}
.cost-merge-fields .form-label{font-size:.65rem;margin-bottom:.2rem}
.cost-summary-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  border-top:1px solid #dfe8ef;
  border-bottom:1px solid #dfe8ef;
  background:#f8fbfd;
}
.cost-summary-strip>div{padding:.7rem .8rem;border-right:1px solid #e2eaf0}
.cost-summary-strip>div:last-child{border-right:0}
.cost-summary-strip span{display:block;color:#71859a;font-size:.63rem;text-transform:uppercase;letter-spacing:.04em}
.cost-summary-strip strong{display:block;margin-top:.15rem;color:#18324a;font-size:.85rem;font-variant-numeric:tabular-nums}
.cost-summary-strip small{display:block;color:#71859a;font-size:.62rem}
.cost-builder-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
  padding:.85rem 1rem 1rem;
}
.cost-builder-actions>span{font-size:.67rem}

.cost-lineage-card{padding:1rem 1.05rem}
.cost-lineage-head{
  display:flex;
  justify-content:space-between;
  gap:1rem;
  align-items:flex-start;
}
.cost-lineage-head h2{margin:0 0 .15rem!important;font-size:var(--heading-card)!important}
.cost-lineage-head p{margin:0;color:var(--muted);font-size:var(--type-xs)}
.cost-lineage-metrics{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:.55rem;
  margin-top:.8rem;
}
.cost-lineage-metrics>div{
  padding:.65rem .7rem;
  border:1px solid #e2eaf0;
  border-radius:8px;
  background:#f9fbfd;
}
.cost-lineage-metrics span{display:block;color:#71859a;font-size:.64rem;text-transform:uppercase}
.cost-lineage-metrics strong{display:block;margin-top:.15rem;color:#18324a;font-size:.86rem}
.cost-lineage-metrics small{font-size:.62rem;color:#71859a}
.cost-lineage-sources{
  display:flex;
  align-items:center;
  gap:.25rem;
  flex-wrap:wrap;
  margin-top:.7rem;
}
.cost-lineage-sources>span:first-child{font-size:.68rem;color:#71859a}

@media(max-width:1199.98px){
  .cost-builder-layout{grid-template-columns:1fr}
  .cost-target-panel{position:static}
  .cost-source-list{max-height:460px}
}
@media(max-width:991.98px){
  .invoice-position-create-grid{grid-template-columns:2fr 1fr 1fr}
  .position-field-name{grid-column:1/-1}
  .invoice-item-editor-grid{grid-template-columns:minmax(220px,2fr) repeat(2,minmax(90px,1fr))}
  .invoice-editor-name{grid-column:1/-1}
  .cost-target-settings{grid-template-columns:1fr 1fr}
  .cost-target-settings>div:first-child{grid-column:1/-1}
  .cost-target-fields{grid-template-columns:2fr 1fr 1fr}
  .cost-target-name{grid-column:1/-1}
  .cost-target-fields .target-remove{grid-column:3;justify-self:end}
}
@media(max-width:767.98px){
  .invoice-position-create-grid{grid-template-columns:1fr 1fr}
  .position-field-name{grid-column:1/-1}
  .invoice-item-editor-grid{grid-template-columns:1fr 1fr}
  .invoice-editor-name{grid-column:1/-1}
  .invoice-editor-value{min-height:auto}
  .cost-builder-head{flex-direction:column}
  .cost-source-search{width:100%}
  .cost-target-settings,.cost-pricing-controls,.cost-merge-fields{grid-template-columns:1fr}
  .cost-target-settings>div:first-child{grid-column:auto}
  .cost-target-fields{grid-template-columns:1fr 1fr}
  .cost-target-name{grid-column:1/-1}
  .cost-target-fields .target-remove{grid-column:2;justify-self:end}
  .cost-summary-strip,.cost-lineage-metrics{grid-template-columns:1fr 1fr}
  .cost-builder-actions{align-items:stretch;flex-direction:column}
  .cost-builder-actions .btn{width:100%}
}
@media(max-width:450px){
  .invoice-position-create-grid,.invoice-item-editor-grid,.cost-target-fields,.cost-summary-strip,.cost-lineage-metrics{grid-template-columns:1fr}
  .cost-target-name,.invoice-editor-name{grid-column:auto}
  .cost-target-fields .target-remove{grid-column:auto;justify-self:end}
}

/* v0.11.9 — kreator koszt → sprzedaż: CSP-safe UI, wyszukiwanie pozycji i kontrahent inline */
.cost-source-search-wrap{
  width:min(310px,52%);
  display:flex;
  flex-direction:column;
  gap:.22rem;
}
.cost-source-search-wrap .cost-source-search{width:100%}
.cost-source-search-wrap small{
  color:var(--muted);
  font-size:.62rem;
  line-height:1.35;
}
.cost-source-item[hidden]{display:none}
.cost-source-no-results{
  margin:.2rem .65rem .75rem;
  padding:.7rem .75rem;
  border:1px dashed #cad8e4;
  border-radius:9px;
  background:#fbfdff;
  color:var(--muted);
  font-size:.72rem;
}
.cost-contractor-field{grid-column:1/-1}
.cost-contractor-field .inline-contractor-panel{
  width:100%;
  margin-bottom:.15rem;
}
.cost-target-settings{
  grid-template-columns:minmax(180px,1fr) minmax(180px,1fr);
}
.cost-pricing-message{
  min-height:1.05rem;
  margin-top:.38rem;
  font-size:.66rem;
  font-weight:700;
}
.cost-pricing-message.is-success{color:#087f5b}
.cost-pricing-message.is-error{color:#b42318}

/* v0.11.15 — przyjazne strony błędów */
.error-section{min-height:62vh;padding:5rem 1rem;display:flex;align-items:center;justify-content:center}
.error-card{position:relative;width:100%;max-width:560px;padding:3rem;background:linear-gradient(145deg,#fff 0%,#f7fbff 100%);border:1px solid rgba(217,226,236,.95);border-radius:1.4rem;box-shadow:var(--shadow);overflow:hidden}
.error-card:after{content:"";position:absolute;width:180px;height:180px;right:-70px;top:-70px;border-radius:50%;background:rgba(22,119,255,.07)}
.error-code{position:relative;z-index:1;display:inline-flex;margin-bottom:1.2rem;padding:.45rem .75rem;border-radius:999px;background:#eaf3ff;color:var(--blue-dark);font-size:.78rem;font-weight:900;letter-spacing:.12em}
.error-card h1{position:relative;z-index:1;margin-bottom:1rem;font-weight:900;letter-spacing:-.035em}
.error-card p{position:relative;z-index:1;margin-bottom:1.7rem;color:var(--muted);font-size:1.05rem;line-height:1.65}
.error-card .btn{position:relative;z-index:1;min-width:190px}
@media(max-width:576px){.error-section{padding:3rem 1rem}.error-card{padding:2rem}.error-card .btn{width:100%}}

@media(max-width:767.98px){
  .cost-source-search-wrap{width:100%}
  .cost-target-settings{grid-template-columns:1fr}
  .cost-contractor-field{grid-column:auto}
  .cost-contractor-field .inline-contractor-panel{padding:.75rem}
  .cost-pricing-controls{grid-template-columns:1fr}
  .cost-pricing-controls .btn{width:100%}
}


/* v0.11.11 — bardziej kompaktowa nawigacja */
.app-navbar .navbar-nav{font-size:.88rem}
.app-navbar .nav-link{padding-left:.55rem;padding-right:.55rem}
.app-navbar .dropdown-menu{border:0;border-radius:.75rem;box-shadow:0 12px 30px rgba(10,35,60,.16);padding:.4rem}
.app-navbar .dropdown-item{display:flex;align-items:center;justify-content:space-between;gap:.75rem;border-radius:.5rem;padding:.5rem .65rem;font-size:.86rem}
.app-navbar .dropdown-item:hover,.app-navbar .dropdown-item:focus{background:#f2f7fb}
.dropdown-count{display:inline-flex;align-items:center;justify-content:center;min-width:1.3rem;height:1.3rem;padding:0 .3rem;border-radius:999px;background:#eaf2fa;color:#244d73;font-size:.66rem;font-weight:800}
@media(max-width:991.98px){
  .app-navbar .navbar-nav{font-size:.94rem}
  .app-navbar .dropdown-menu{box-shadow:none;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);margin:.15rem 0 .45rem;padding:.25rem}
  .app-navbar .dropdown-item{color:#e8eef5}
  .app-navbar .dropdown-item:hover,.app-navbar .dropdown-item:focus{color:#fff;background:rgba(255,255,255,.08)}
  .dropdown-count{background:rgba(255,255,255,.16);color:#fff}
}

/* Końcowe zabezpieczenie układu edytora przed regułami mobilnej tabeli. */
.category-table .category-editor-row:not([hidden]){display:table-row}
.category-table .category-editor-row>td{display:table-cell!important;width:100%!important}
@media(max-width:767.98px){
  .category-table .category-editor-row:not([hidden]){display:block}
  .category-table .category-editor-row>td{display:block!important;grid-template-columns:1fr!important}
  .category-table .category-editor-row>td::before{display:none!important}
}
/* Dyskretne zgłoszenia kontekstowe — jeden przycisk zamiast kolejnej pozycji menu. */
.feedback-trigger {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 1035;
  width: auto;
  height: 2.75rem;
  border: 1px solid #cbd8e7;
  border-radius: 999px;
  color: #17406f;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 24px rgba(24, 55, 90, .14);
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .85rem .3rem .42rem;
}
.feedback-trigger-icon { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: #edf5ff; }
.feedback-trigger-label { font-size: .76rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.feedback-trigger:hover, .feedback-trigger:focus-visible {
  color: #fff;
  background: var(--bs-primary);
  border-color: var(--bs-primary);
}
.feedback-panel { --bs-offcanvas-width: min(25rem, 94vw); }
.feedback-panel .offcanvas-header { align-items: flex-start; border-bottom: 1px solid #e5edf5; }
.feedback-panel .form-check { margin: 0; }
.feedback-privacy { color: #66788c; font-size: .82rem; line-height: 1.45; }
@media (max-width: 767.98px) {
  .feedback-trigger { right: .75rem; bottom: .75rem; height: 2.5rem; padding-right: .7rem; }
}
.recent-invoice-numbers { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .45rem; color: #60758d; font-size: .78rem; }
.recent-invoice-numbers code { border: 1px solid #dbe6f1; border-radius: 999px; background: #f7fafc; color: #183d69; padding: .12rem .42rem; font-size: .75rem; }
.cost-recent-numbers { grid-column: 1 / -1; }

/* v0.11.40 — spójne podsumowania faktur, dane banku i prywatność. */
.invoice-live-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;padding:1rem;border:1px solid #d8e5f1;border-radius:1rem;background:#f7fafc}
.invoice-live-summary>div{display:flex;flex-direction:column;gap:.2rem;padding:.15rem .4rem;color:#60758d}
.invoice-live-summary strong{color:#183d69;font-size:1.05rem}
.invoice-live-summary .summary-gross{border-left:2px solid #b7d2ee;padding-left:1rem}.invoice-live-summary .summary-gross strong{font-size:1.25rem;color:#0d6efd}
.invoice-live-summary-vertical{grid-template-columns:1fr}.invoice-live-summary-vertical .summary-gross{border-left:0;border-top:2px solid #b7d2ee;padding:.75rem .4rem 0}
.bank-account-required label:after{content:" *";color:#527a9c}.bank-lookup-status{min-height:1.25rem}
.footer-link-button{border:0;background:transparent;color:inherit;padding:0;text-decoration:underline;font:inherit}
.cookie-notice{position:fixed;z-index:1060;left:50%;bottom:1rem;transform:translateX(-50%);width:min(980px,calc(100% - 2rem));display:flex;align-items:center;justify-content:space-between;gap:1.5rem;padding:1.1rem 1.25rem;border:1px solid #ccdbea;border-radius:1rem;background:#fff;box-shadow:0 16px 48px rgba(19,48,80,.2)}
.cookie-notice[hidden]{display:none}.cookie-notice p{margin:.25rem 0;color:#536b84;line-height:1.45}.cookie-notice a{font-size:.82rem}.cookie-notice-actions{display:flex;gap:.5rem;flex-wrap:wrap;justify-content:flex-end;flex:0 0 auto}
.cookie-dialog{width:min(620px,calc(100% - 2rem));padding:0;border:0;border-radius:1rem;box-shadow:0 24px 70px rgba(12,35,62,.32)}.cookie-dialog::backdrop{background:rgba(13,32,54,.52)}
.cookie-dialog form{padding:1.35rem}.cookie-dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;border-bottom:1px solid #e3ebf3;margin:-.1rem 0 1rem;padding-bottom:1rem}
.cookie-choice{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem;border:1px solid #dce7f1;border-radius:.8rem;margin:.75rem 0}.cookie-choice label,.cookie-choice>div{display:flex;flex-direction:column;gap:.2rem}.cookie-choice small{color:#60758d}.cookie-always-on{white-space:nowrap;padding:.3rem .55rem;border-radius:999px;background:#edf3f8;color:#365673;font-size:.75rem;font-weight:700}.cookie-dialog-actions{display:flex;justify-content:flex-end;gap:.5rem;margin-top:1.25rem}
@media(max-width:767.98px){.invoice-live-summary{grid-template-columns:1fr}.invoice-live-summary .summary-gross{border-left:0;border-top:2px solid #b7d2ee;padding:.75rem .4rem 0}.cookie-notice{align-items:stretch;flex-direction:column}.cookie-notice-actions{justify-content:stretch}.cookie-notice-actions .btn{flex:1 1 auto}.cookie-dialog-actions .btn{flex:1}}

/* v0.11.50 — spokojne, wspólne wyróżnienie pól obowiązkowych. */
:root{
  --required-field-bg:#edf4fa;
  --required-field-border:#a9bfd3;
  --required-field-focus:#f3f8fc;
}
.form-control:required:not(:disabled):not([readonly]):not(.is-invalid),
.form-select:required:not(:disabled):not(.is-invalid),
.form-control[aria-required="true"]:not(:disabled):not([readonly]):not(.is-invalid),
.form-select[aria-required="true"]:not(:disabled):not(.is-invalid){
  background-color:var(--required-field-bg);
  border-color:var(--required-field-border);
  box-shadow:inset 0 1px 2px rgba(16,42,67,.04);
  transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.form-control:required:not(:disabled):not([readonly]):not(.is-invalid):focus,
.form-select:required:not(:disabled):not(.is-invalid):focus,
.form-control[aria-required="true"]:not(:disabled):not([readonly]):not(.is-invalid):focus,
.form-select[aria-required="true"]:not(:disabled):not(.is-invalid):focus{
  background-color:var(--required-field-focus);
  border-color:var(--blue);
  box-shadow:0 0 0 .2rem rgba(22,119,255,.12);
}
.form-check-input:required:not(:checked):not(:disabled):not(.is-invalid),
.form-check-input[aria-required="true"]:not(:checked):not(:disabled):not(.is-invalid){
  background-color:var(--required-field-bg);
  border-color:#94b2cd;
  box-shadow:0 0 0 .16rem rgba(115,154,190,.1);
}
@media(prefers-reduced-motion:reduce){
  .form-control:required,.form-select:required,
  .form-control[aria-required="true"],.form-select[aria-required="true"]{transition:none}
}

/* v0.11.51 — zwarty stan krytycznych usług wyłącznie w panelu platformy. */
.service-health-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.service-health-grid>div{padding:.8rem 1rem;border:1px solid #dce7f1;border-radius:.8rem;background:#f7fafc}
.service-status-open{background:#fff0ee;color:#9b2c20}
.service-status-recovered{background:#eaf8f2;color:#18775a}
@media(max-width:991.98px){.service-health-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:575.98px){.service-health-grid{grid-template-columns:1fr}}

/* v0.11.52 — czytelne rozdzielenie jednorazowej i stałej puli SMS. */
.sms-limit-admin{display:flex;flex-direction:column;align-items:flex-start;gap:.45rem;min-width:12rem}
.sms-limit-admin small{display:block;color:var(--muted);font-size:.7rem;white-space:nowrap}
.sms-limit-action{display:flex;flex-direction:column;align-items:center;gap:.15rem}

/* v0.11.53 — czytelna, osobna ścieżka zakładania konta. */
.registration-section{padding:4.5rem 0}
.registration-intro{padding:2.25rem;border:1px solid #d9e6f1;border-radius:1.25rem;background:linear-gradient(145deg,#f7fbff 0%,#eef7f4 100%)}
.registration-intro h1{max-width:12ch;margin:.55rem 0 1rem;color:#10294a;font-size:clamp(2rem,4vw,3.25rem);line-height:1.08}
.registration-lead{max-width:42rem;color:#536b84;font-size:1.08rem;line-height:1.65}
.registration-benefits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.85rem;margin-top:1.5rem}
.registration-benefit{display:flex;gap:.75rem;padding:1rem;border:1px solid rgba(169,191,211,.65);border-radius:.85rem;background:rgba(255,255,255,.72)}
.registration-benefit>span{display:grid;flex:0 0 1.7rem;height:1.7rem;place-items:center;border-radius:50%;background:#e5f6ee;color:#18775a;font-weight:800}
.registration-benefit strong{display:block;color:#183d69}
.registration-benefit p{margin:.25rem 0 0;color:#60758d;font-size:.86rem;line-height:1.45}
.registration-card{display:flex;flex-direction:column;justify-content:center;max-width:none}
.registration-login{margin:1rem 0 0;text-align:center;color:#60758d;font-size:.9rem}
.registration-login a{font-weight:700}
@media(max-width:767.98px){.registration-section{padding:2rem 0}.registration-intro{padding:1.35rem}.registration-benefits{grid-template-columns:1fr}}
/* Guided first-run experience. Demo data lives only in the signed user session. */
.onboarding-container{max-width:1180px}.onboarding-intro{max-width:760px;margin:0 auto 2.25rem}.onboarding-intro h1{margin:.35rem 0 .75rem}.onboarding-intro>p{font-size:1.08rem}.onboarding-languages{display:flex;justify-content:center;gap:.4rem;margin-top:1rem}.onboarding-languages a{padding:.28rem .58rem;border:1px solid #d6e3ef;border-radius:999px;text-decoration:none;font-weight:700;color:#587086}.onboarding-languages a.active{background:#e7f2ff;color:#126dc2;border-color:#9bc6ed}.onboarding-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.15rem}.onboarding-choice{position:relative;display:flex;flex-direction:column;min-height:340px;padding:1.55rem;border:1px solid #d4e2ed;border-radius:24px;background:#fff;box-shadow:0 16px 40px rgba(35,75,110,.08);overflow:hidden}.onboarding-choice:before{content:"";position:absolute;inset:0 0 auto;height:7px;background:#d8ebfb}.onboarding-choice-demo:before{background:#b9ddcf}.onboarding-choice-ksef:before{background:#b7d9fa}.onboarding-choice-invoice:before{background:#ddd2f2}.onboarding-choice-number{position:absolute;right:1.25rem;top:1.15rem;font-size:2.4rem;font-weight:800;color:#e3ebf2}.onboarding-choice-icon{width:54px;height:54px;display:grid;place-items:center;border-radius:17px;background:#edf6fc;color:#176cae;font-size:1.8rem;font-weight:800;margin:.45rem 0 1.15rem}.onboarding-choice-demo .onboarding-choice-icon{background:#e8f5ef;color:#26815c}.onboarding-choice-invoice .onboarding-choice-icon{background:#f0ebf9;color:#7953a8}.onboarding-choice h2{font-size:1.25rem;line-height:1.25}.onboarding-choice p{color:#60758a;line-height:1.6;flex:1}.onboarding-progress-card{margin-top:1.4rem;padding:1.25rem 1.5rem;display:flex;align-items:center;justify-content:space-between;gap:2rem}.onboarding-progress-card h2{font-size:1.15rem;margin:0}.onboarding-progress{display:flex;flex-wrap:wrap;gap:.65rem}.onboarding-progress span,.demo-progress span{padding:.5rem .75rem;border-radius:999px;background:#f3f6f9;color:#6f8292;font-size:.87rem}.onboarding-progress .done,.demo-progress .done{background:#e4f5ed;color:#237553}.demo-banner{display:flex;justify-content:space-between;align-items:center;gap:1rem;background:#fff4d8;border:1px solid #f0d590;color:#705718;border-radius:16px;padding:.85rem 1rem;margin-bottom:1.5rem}.demo-progress{display:flex;gap:.55rem;flex-wrap:wrap}.demo-document-card,.demo-side-card{padding:1.5rem;height:100%}.demo-invoice-summary{display:grid;grid-template-columns:1fr 1fr;gap:1rem;background:#f6f9fc;border-radius:16px;padding:1rem;margin:1rem 0 1.25rem}.demo-invoice-summary small,.demo-invoice-summary strong{display:block}.demo-invoice-summary small{color:#718497;margin-bottom:.2rem}.demo-actions{display:flex;gap:.65rem;flex-wrap:wrap}.demo-export-preview{display:grid;gap:.35rem;margin-top:1rem;padding:.85rem;border-radius:12px;background:#f3f7fb;font-size:.85rem}.demo-complete{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:1.25rem;padding:1.2rem 1.4rem;border-radius:18px;background:#e7f7ef;color:#206d50}.ksef-guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.ksef-guide-grid article{position:relative;padding:1.35rem 1.35rem 1.35rem 4.5rem;border:1px solid #d8e4ee;border-radius:20px;background:#fff}.ksef-guide-grid article>span{position:absolute;left:1.25rem;top:1.25rem;width:42px;height:42px;display:grid;place-items:center;border-radius:14px;background:#e6f2fc;color:#176eaf;font-weight:800}.ksef-guide-grid h2{font-size:1.1rem}.ksef-guide-grid p{color:#617589;margin:0;line-height:1.55}.ksef-guide-action{margin-top:1rem;padding:1.25rem 1.4rem;display:flex;align-items:center;justify-content:space-between;gap:1.5rem}
@media(max-width:991px){.onboarding-choice-grid{grid-template-columns:1fr}.onboarding-choice{min-height:0}.onboarding-progress-card,.ksef-guide-action{align-items:flex-start;flex-direction:column}.ksef-guide-grid{grid-template-columns:1fr}}
@media(max-width:575px){.onboarding-choice{padding:1.25rem}.demo-banner,.demo-complete{align-items:flex-start;flex-direction:column}.demo-invoice-summary{grid-template-columns:1fr}.demo-actions{display:grid}.demo-actions form,.demo-actions button{width:100%}.ksef-guide-grid article{padding:1.15rem}.ksef-guide-grid article>span{position:static;margin-bottom:.75rem}}
.activation-funnel{display:grid;grid-template-columns:repeat(7,minmax(110px,1fr));gap:1px;background:#dfe8ef;border-top:1px solid #dfe8ef}.activation-step{display:grid;gap:.25rem;padding:1rem;background:#fff}.activation-step span{font-size:.78rem;color:#65798b;min-height:2.4em}.activation-step strong{font-size:1.55rem}.activation-step small{color:#7d8e9b}.activation-step progress{width:100%;height:6px;accent-color:#2b80c9}@media(max-width:1100px){.activation-funnel{grid-template-columns:repeat(4,1fr)}}@media(max-width:650px){.activation-funnel{grid-template-columns:repeat(2,1fr)}}
