/* Panel klienta (E6e): wygląd „Opal” — jasne tło, menu z sekcjami, białe karty, gradient marki w nagłówkach i akcentach.
   Mobile-first od 360 px; boczne menu od 960 px. Bez zasobów zewnętrznych (CSP 'self'), krój systemowy.
   Kontrast tekstu ≥ 4.5:1: #202638 i #596276 na #f5f6fa/#ffffff/#eef1f7, biały na przyciskach #0d7377→#4a4db3. */
:root {
    /* marka (strona Damiana Węglarza) */
    --pt-primary: #24cdd5;
    --pt-secondary: #6c6fd4;
    --pt-accent: #5192e1;
    --pt-gradient: linear-gradient(135deg, #24cdd5, #6c6fd4);
    --pt-gradient-soft: linear-gradient(110deg, rgba(36, 205, 213, .2), rgba(108, 111, 212, .22));
    --pt-btn-from: #0d7377;
    --pt-btn-to: #4a4db3;
    --pt-btn-hover-from: #0a5f63;
    --pt-btn-hover-to: #3f42a3;
    --pt-btn-gradient: linear-gradient(135deg, #0d7377, #4a4db3);
    --pt-btn-gradient-hover: linear-gradient(135deg, #0a5f63, #3f42a3);
    /* „Opal” */
    --pt-bg: #f5f6fa;
    --pt-menu: #eef1f7;
    --pt-paper: #ffffff;
    --pt-ink: #202638;
    --pt-muted: #596276;
    --pt-ink-soft: #465166;
    --pt-link: #353b80;
    --pt-link-hover: #292e6c;
    --pt-line: #dce1eb;
    --pt-line-soft: #e2e5ee;
    --pt-field: #858fa3;
    --pt-tint: #f4f5f9;
    --pt-violet-bg: #eeedf9;
    --pt-violet-line: #ccceea;
    --pt-done-ink: #245e4c;
    --pt-done-bg: #e6f4ef;
    --pt-quote-ink: #724c17;
    --pt-quote-bg: #fbefd8;
    --pt-grey-ink: #3b4152;
    --pt-grey-bg: #eceef2;
    --pt-error-ink: #9b1c1c;
    --pt-error-bg: #fdecec;
    --pt-focus: #353b80;
    /* kształt i typografia */
    --pt-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
    --pt-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --pt-radius-ctl: 13px;
    --pt-radius-btn: 14px;
    --pt-radius-card: 24px;
    --pt-shadow-card: 0 8px 24px rgba(36, 45, 78, .035);
    --pt-shadow-lift: 0 24px 65px rgba(52, 58, 101, .07);
    --pt-shadow-glass: 0 16px 40px rgba(59, 67, 113, .08);
    --pt-side-width: 248px;
}

/* --- podstawa --- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font: 15px/1.55 var(--pt-font);
    color: var(--pt-ink);
    background: var(--pt-bg);
    overflow-wrap: break-word;
}
input, button, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
img, svg { max-width: 100%; }
a { color: var(--pt-link); text-underline-offset: 2px; }
a:hover { color: var(--pt-link-hover); }
:focus-visible { outline: 3px solid var(--pt-focus); outline-offset: 3px; }
::placeholder { color: var(--pt-muted); opacity: 1; }
h1 { font-size: 1.75rem; line-height: 1.2; letter-spacing: -.03em; font-weight: 650; margin: 0 0 12px; }
h2 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -.01em; font-weight: 650; margin: 0 0 12px; }
h3 { font-size: 1.02rem; line-height: 1.4; font-weight: 650; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.pt-ico { width: 18px; height: 18px; flex: none; }
.pt-skip { position: absolute; left: -999px; top: 0; z-index: 50; background: var(--pt-paper); color: var(--pt-link); padding: 10px 14px; border-radius: 0 0 12px 0; }
.pt-skip:focus { left: 0; }
.pt-inline { display: inline; margin: 0; }
.pt-muted { color: var(--pt-muted); }
.pt-text { white-space: pre-line; overflow-wrap: anywhere; }
.pt-break { overflow-wrap: anywhere; }
.pt-ref { font-family: var(--pt-mono); font-weight: 650; font-size: .88em; letter-spacing: .01em; }
.pt-eyebrow { font-size: 11px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--pt-muted); margin: 0 0 8px; }
.pt-eyebrow-brand { color: var(--pt-link); }

/* --- nagłówek --- */
.pt-header {
    position: relative;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--pt-line);
}
.pt-header::before { content: ""; display: block; height: 4px; background: var(--pt-gradient); }
.pt-header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; }
.pt-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pt-logo { display: block; width: 75px; height: auto; flex: none; }
.pt-brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.pt-brand-name { font-size: 15px; letter-spacing: -.01em; }
.pt-brand-sub { font-size: 12px; color: var(--pt-muted); }
.pt-user { order: 3; flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; font-size: 13px; }
.pt-user-text { display: flex; flex-wrap: wrap; gap: 0 8px; min-width: 0; }
.pt-user-company { font-weight: 650; overflow-wrap: anywhere; }
.pt-user-name { color: var(--pt-muted); overflow-wrap: anywhere; }
.pt-role { display: inline-block; padding: 3px 10px; border: 1px solid #d8ddec; border-radius: 10px; background: #f1f2fa; color: var(--pt-link); font-size: 12px; font-weight: 650; white-space: nowrap; }
.pt-menu-toggle {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 8px;
    min-width: 44px; min-height: 44px; padding: 0 12px;
    border: 1px solid var(--pt-line); border-radius: var(--pt-radius-ctl);
    background: #f7f8fc; color: var(--pt-link); font-weight: 650;
}
.pt-menu-toggle[aria-expanded="true"] { background: var(--pt-paper); border-color: var(--pt-violet-line); }

/* --- szkielet: menu + treść --- */
.pt-shell { display: block; }
.pt-content { min-width: 0; }
.pt-main { width: 100%; max-width: 1160px; margin: 0 auto; padding: 20px 16px 32px; }
.pt-body-plain .pt-main { max-width: 1120px; padding-top: 28px; }
.pt-footer { max-width: 1160px; margin: 0 auto; padding: 8px 16px 32px; color: var(--pt-muted); font-size: 13px; }
.pt-footer::before { content: ""; display: block; width: 32px; height: 3px; border-radius: 3px; background: var(--pt-gradient); margin-bottom: 10px; }

.pt-side { background: var(--pt-menu); border-bottom: 1px solid var(--pt-line); padding: 14px 12px 18px; }
.pt-js-menu .pt-side { display: none; }
.pt-js-menu .pt-side.pt-side-open { display: block; box-shadow: 0 18px 40px rgba(36, 45, 78, .12); }
.pt-nav-group { margin: 0 0 14px; }
.pt-nav-group:last-child { margin-bottom: 0; }
.pt-nav-section { font-size: 11px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--pt-muted); margin: 0 13px 6px; }
.pt-nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pt-nav-link {
    display: flex; align-items: center; gap: 12px; width: 100%;
    min-height: 46px; padding: 0 13px;
    border: 0; border-radius: var(--pt-radius-ctl); background: transparent;
    color: var(--pt-ink-soft); font-weight: 550; text-decoration: none; text-align: left;
}
.pt-nav-link:hover { background: rgba(255, 255, 255, .7); color: var(--pt-link); }
.pt-nav-link.pt-nav-active { background: var(--pt-paper); color: var(--pt-link); font-weight: 700; box-shadow: 0 3px 12px rgba(66, 71, 117, .05), inset 0 0 0 1px #dfe3ef; }
.pt-nav-cta { margin: 4px 0; justify-content: flex-start; padding-left: 13px; width: 100%; }

.pt-bottom-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid var(--pt-line);
}
.pt-bottom-bar .pt-btn { width: 100%; margin: 0; }
.pt-body-bar { padding-bottom: 84px; }

/* --- szkło (małe powierzchnie), z rezerwą bez rozmycia --- */
.pt-glass { background: rgba(255, 255, 255, .97); border: 1px solid #fff; box-shadow: inset 0 1px 0 #fff, var(--pt-shadow-glass); }
@supports ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) {
    .pt-glass, .pt-bottom-bar { background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
}
@media (prefers-reduced-transparency: reduce) {
    .pt-glass, .pt-bottom-bar { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* --- karty i komunikaty --- */
.pt-card {
    background: var(--pt-paper);
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-radius-card);
    box-shadow: var(--pt-shadow-card);
    padding: 20px 18px;
    margin: 0 0 20px;
    min-width: 0;
}
.pt-card > :last-child { margin-bottom: 0; }
.pt-card-band {
    margin: -20px -18px 18px;
    padding: 18px 18px 16px;
    border-radius: var(--pt-radius-card) var(--pt-radius-card) 0 0;
    background: var(--pt-gradient-soft);
    box-shadow: inset 0 1px 0 #fff;
}
.pt-card-band h2, .pt-card-band h1 { margin-bottom: 0; }
.pt-card-band > p:last-child { margin-bottom: 0; }
.pt-card-flush { padding: 0; overflow: hidden; }
.pt-card-flush > .pt-card-head { padding: 16px 18px; }
.pt-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pt-card-head h2 { margin: 0; }
.pt-card-head .pt-more { margin-left: auto; }
.pt-card-accent { border-color: var(--pt-violet-line); }
.pt-narrow { max-width: 500px; margin-left: auto; margin-right: auto; }
.pt-alert { background: var(--pt-quote-bg); color: var(--pt-quote-ink); border-radius: var(--pt-radius-ctl); padding: 12px 14px; margin: 0 0 14px; }
.pt-alert a { color: var(--pt-quote-ink); font-weight: 650; }
.pt-success { background: var(--pt-done-bg); color: var(--pt-done-ink); border-radius: var(--pt-radius-ctl); padding: 12px 14px; margin: 0 0 14px; }
.pt-note { background: var(--pt-tint); color: var(--pt-ink-soft); border-radius: var(--pt-radius-ctl); padding: 12px 14px; font-size: 13px; margin: 0 0 14px; }
.pt-more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 650; font-size: 14px; }
.pt-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 650; font-size: 14px; margin: -8px 0 8px; }
.pt-back-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; margin: -8px 0 8px; }
.pt-back-row a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; font-size: 14px; }

/* --- nagłówek strony --- */
.pt-page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 20px; }
.pt-page-head h1 { margin: 0; }
.pt-page-head .pt-btn { margin: 0 0 0 auto; }
.pt-page-lead { flex: 1 1 100%; color: var(--pt-muted); margin: 0; }
.pt-count { font-size: .6em; font-weight: 500; color: var(--pt-muted); letter-spacing: 0; }

/* --- przyciski i pola --- */
.pt-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; padding: 0 20px;
    border: 1px solid transparent; border-radius: var(--pt-radius-btn);
    font-weight: 650; line-height: 1.25; text-align: center; text-decoration: none;
    cursor: pointer;
}
.pt-btn-primary {
    background-color: var(--pt-btn-to);
    background-image: var(--pt-btn-gradient);
    border-color: #40458f;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 5px 12px rgba(68, 73, 148, .15);
    margin-top: 12px;
}
.pt-btn-primary:hover, .pt-btn-primary:focus-visible { background-color: var(--pt-btn-hover-to); background-image: var(--pt-btn-gradient-hover); color: #fff; }
.pt-btn-primary[disabled], .pt-btn-primary[disabled]:hover { background: #c9cdd8; border-color: #c9cdd8; color: var(--pt-grey-ink); box-shadow: none; cursor: not-allowed; }
.pt-btn-quiet { background: var(--pt-paper); border-color: var(--pt-field); color: var(--pt-link); }
.pt-btn-quiet:hover { background: #f7f8fc; color: var(--pt-link-hover); border-color: var(--pt-link); }
.pt-btn-quiet[disabled] { color: var(--pt-muted); cursor: not-allowed; }
.pt-btn-large { width: 100%; font-size: 1.02rem; }
.pt-btn-small { min-height: 44px; padding: 0 14px; font-size: 13px; }
.pt-nav .pt-btn-primary, .pt-bottom-bar .pt-btn-primary, .pt-page-head .pt-btn-primary { margin-top: 0; }

label { display: block; font-weight: 650; margin: 18px 0 7px; }
input:where(:not([type=checkbox], [type=radio], [type=file], [type=hidden])), select, textarea {
    display: block; width: 100%; min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--pt-field); border-radius: var(--pt-radius-ctl);
    background: var(--pt-paper); color: var(--pt-ink);
    font-size: 1rem;
}
textarea { min-height: 120px; resize: vertical; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--pt-error-ink); box-shadow: 0 0 0 1px var(--pt-error-ink); }
input[type=file] { display: block; width: 100%; max-width: 100%; padding: 8px 0; color: var(--pt-ink-soft); font-size: 14px; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--pt-btn-to); flex: none; }
.pt-hint { background: #f0f2f8; color: var(--pt-ink-soft); border-radius: var(--pt-radius-ctl); padding: 12px 14px; margin: 10px 0 0; font-size: 13px; }
.pt-field-error { color: var(--pt-error-ink); background: var(--pt-error-bg); border-radius: 10px; padding: 8px 12px; margin: 8px 0 0; font-size: 13px; font-weight: 600; }
.pt-check { display: flex; gap: 10px; align-items: center; font-weight: 400; margin: 10px 0; }
.pt-fieldset { border: 0; margin: 22px 0 0; padding: 0; min-width: 0; }
.pt-fieldset legend { font-weight: 650; padding: 0; margin-bottom: 9px; }
.pt-options { display: flex; flex-wrap: wrap; gap: 9px; }
.pt-options .pt-check { flex: 1 1 140px; margin: 0; min-height: 48px; padding: 0 12px; border: 1px solid var(--pt-field); border-radius: var(--pt-radius-ctl); background: var(--pt-paper); }
.pt-options .pt-check:has(input:checked) { border-color: var(--pt-btn-to); background: #f1f0fb; color: var(--pt-link); font-weight: 650; }
.pt-field-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 18px; }
.pt-files-box { margin-top: 22px; padding: 2px 16px 14px; border: 1px dashed var(--pt-field); border-radius: 15px; background: #f8f9fc; }
.pt-files-box .pt-muted { font-size: 13px; margin: 6px 0 0; }
.pt-safe { background: var(--pt-quote-bg); color: var(--pt-quote-ink); border-radius: 12px; padding: 12px 14px; margin: 10px 0 0; font-size: 13px; }
.pt-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 22px; }
.pt-form-actions .pt-btn { margin-top: 0; }

/* --- statusy --- */
.pt-status {
    display: inline-flex; align-items: center;
    padding: 4px 10px; border-radius: 9px;
    background: var(--pt-violet-bg); color: var(--pt-link);
    font-size: 12px; font-weight: 650; line-height: 1.4; white-space: nowrap;
}
.pt-status-zakonczona { background: var(--pt-done-bg); color: var(--pt-done-ink); }
.pt-status-wycena { background: var(--pt-quote-bg); color: var(--pt-quote-ink); }
.pt-status-zaakceptowana { background: #e3f3f4; color: #0d5c60; }
.pt-status-anulowana, .pt-status-odrzucona, .pt-status-wygasla { background: var(--pt-grey-bg); color: var(--pt-grey-ink); }
.pt-status-text { color: var(--pt-ink-soft); }

/* --- pulpit --- */
.pt-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 20px; }
.pt-tile { margin: 0; background: var(--pt-paper); border: 1px solid var(--pt-line); border-radius: 18px; padding: 13px 14px; box-shadow: var(--pt-shadow-card); min-width: 0; }
.pt-tile-accent { background: #f2f1fc; border-color: #c9cbed; }
.pt-tile-label { display: block; font-size: 12px; font-weight: 650; color: var(--pt-muted); }
.pt-tile-accent .pt-tile-label, .pt-tile-accent .pt-tile-value { color: var(--pt-link); }
.pt-tile-value { display: block; font-size: 28px; font-weight: 600; line-height: 1.15; letter-spacing: -.03em; margin-top: 4px; }
.pt-row.pt-quote-row {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px;
    padding: 16px 0; margin: 0; border-top: 1px solid var(--pt-line-soft);
}
.pt-row.pt-quote-row:first-of-type { border-top: 0; padding-top: 4px; }
.pt-quote-row > a { font-weight: 650; font-size: 1.02rem; line-height: 1.4; }
.pt-quote-row .pt-btn { margin: 0; }

/* --- listy spraw (tabela z „Co teraz”; na telefonie karty) --- */
.pt-row { margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.pt-rows { margin: 0; }
.pt-rows .pt-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: start;
    margin: 0; padding: 14px 0; border-top: 1px solid var(--pt-line-soft);
}
.pt-rows .pt-row:first-child { border-top: 0; }
.pt-rows .pt-row > a { font-weight: 600; min-width: 0; }
.pt-rows .pt-row > .pt-muted, .pt-rows .pt-row > .pt-next { grid-column: 1 / -1; font-size: 13px; }
.pt-next { color: var(--pt-ink-soft); }
.pt-card-flush .pt-rows, .pt-card-flush > .pt-muted, .pt-card-flush > p { padding-left: 18px; padding-right: 18px; }
.pt-card-flush > .pt-muted { padding-bottom: 16px; margin: 0; }
.pt-table-head { display: none; }

.pt-list { display: grid; gap: 10px; }
.pt-list-item {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: start;
    background: var(--pt-paper); border: 1px solid var(--pt-line); border-radius: 18px;
    padding: 14px 16px; color: var(--pt-ink); text-decoration: none; box-shadow: var(--pt-shadow-card);
}
.pt-list-item:hover { border-color: var(--pt-secondary); color: var(--pt-ink); }
.pt-list-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pt-list-main .pt-ref { color: var(--pt-link); }
.pt-list-title { font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.pt-list-item .pt-muted { font-size: 13px; }
.pt-list-item .pt-next { grid-column: 1 / -1; font-size: 13px; }
.pt-list-item-waiting { background: #f8f7fe; border-color: var(--pt-violet-line); }
.pt-pages { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; align-items: center; margin-top: 18px; color: var(--pt-muted); font-size: 14px; }
.pt-pages a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }

.pt-filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 14px; align-items: end; }
.pt-filters label { margin: 12px 0 6px; font-size: 13px; }
.pt-filters .pt-check { margin: 12px 0 0; min-height: 46px; font-size: 14px; font-weight: 400; }
.pt-filters .pt-btn { margin-top: 12px; }
.pt-filters select { min-height: 46px; padding-top: 10px; padding-bottom: 10px; }

/* --- karta sprawy --- */
.pt-ticket-head {
    border-radius: var(--pt-radius-card);
    background: var(--pt-gradient-soft);
    border: 1px solid #cdd4e6;
    box-shadow: inset 0 1px 0 #fff;
    padding: 20px 18px;
    margin: 0 0 20px;
}
.pt-ticket-head h1 { font-size: 1.5rem; max-width: 890px; overflow-wrap: anywhere; }
.pt-ticket-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; }
.pt-ticket-head .pt-status-text { margin: 0 0 12px; }
.pt-ticket-head > :last-child { margin-bottom: 0; }
.pt-ticket-head .pt-alert, .pt-ticket-head .pt-success { background-color: rgba(255, 255, 255, .92); border: 1px solid #fff; }
.pt-ticket-head .pt-alert { background: var(--pt-quote-bg); border-color: #f1dcb3; }
.pt-ticket-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; align-items: start; }
.pt-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0; }
.pt-facts div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; min-width: 0; }
.pt-facts dt { color: var(--pt-muted); font-size: 13px; }
.pt-facts dd { margin: 0; font-weight: 650; min-width: 0; }
.pt-reply { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--pt-line-soft); font-size: 13px; }

.pt-timeline { list-style: none; margin: 0; padding: 0 0 0 6px; }
.pt-tl { position: relative; border-left: 1px solid #cbd0e4; padding: 0 0 22px 20px; min-width: 0; }
.pt-tl:last-child { border-left-color: transparent; padding-bottom: 0; }
.pt-tl::before {
    content: ""; position: absolute; left: -4px; top: 6px;
    width: 7px; height: 7px; border-radius: 50%; background: var(--pt-field);
}
.pt-tl-wycena::before, .pt-tl-zgloszenie::before { left: -5px; width: 9px; height: 9px; background: var(--pt-btn-to); box-shadow: 0 0 0 4px #efedfa; }
.pt-tl-meta { color: var(--pt-muted); font-size: 12px; margin: 0; }
.pt-tl-title { font-weight: 650; margin: 3px 0 6px; overflow-wrap: anywhere; }
.pt-tl .pt-text, .pt-tl .pt-muted { font-size: 14px; }
.pt-summary { margin: 0 0 8px; }
.pt-summary dt { font-weight: 650; margin-top: 8px; font-size: 14px; }
.pt-summary dd { margin: 2px 0 0; color: var(--pt-ink-soft); font-size: 14px; }

/* --- wyceny --- */
.pt-table-wrap { overflow-x: auto; margin: 6px 0 12px; }
.pt-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pt-table th, .pt-table td { text-align: left; padding: 11px 8px 11px 0; border-bottom: 1px solid var(--pt-line); vertical-align: top; overflow-wrap: anywhere; }
.pt-table thead th { color: var(--pt-muted); font-weight: 550; font-size: 13px; padding-top: 6px; padding-bottom: 8px; }
.pt-table tfoot th { font-weight: 550; color: var(--pt-ink-soft); }
.pt-table tfoot tr:last-child th, .pt-table tfoot tr:last-child td { border-bottom: 0; font-size: 1.05rem; color: var(--pt-ink); }
.pt-num { text-align: right; white-space: nowrap; }
.pt-table th.pt-num, .pt-table td.pt-num { text-align: right; padding-right: 0; padding-left: 8px; overflow-wrap: normal; }
.pt-quote-card h3 { font-size: 1.1rem; overflow-wrap: anywhere; }
.pt-quote-card > .pt-ref { margin: 0 0 6px; }
.pt-decision { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; margin-top: 4px; }
.pt-decision .pt-card { margin-bottom: 16px; }
.pt-decision .pt-card h3 { font-size: 1.05rem; }
.pt-decision [data-decision="akceptuj"] { border-color: var(--pt-violet-line); box-shadow: inset 0 3px 0 var(--pt-secondary), var(--pt-shadow-card); }
.pt-decision .pt-check { align-items: flex-start; font-size: 14px; }
.pt-decision .pt-check input { margin-top: 2px; }
.pt-decision label { font-size: 14px; }
.pt-decision textarea { min-height: 80px; }
.pt-section { margin: 0 0 24px; }
.pt-section > h2 { margin-bottom: 14px; }

/* --- zespół --- */
.pt-team-row { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; border-top: 1px solid var(--pt-line-soft); padding: 14px 0; }
.pt-team-row:first-of-type { border-top: 0; padding-top: 4px; }
.pt-team-row > strong { flex: 1 1 100%; }
.pt-team-row .pt-muted { font-size: 13px; overflow-wrap: anywhere; }
.pt-team-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.pt-team-actions .pt-btn { min-height: 44px; padding: 0 14px; font-size: 13px; }
.pt-files { list-style: none; padding: 0; margin: 6px 0; }
.pt-files li { padding: 4px 0; }

/* --- ekrany logowania i hasła (bez menu) --- */
.pt-auth { display: flex; flex-direction: column; gap: 24px; align-items: stretch; }
.pt-auth-card {
    background: var(--pt-paper); border: 1px solid var(--pt-line); border-radius: var(--pt-radius-card);
    box-shadow: var(--pt-shadow-lift), inset 0 1px 0 #fff;
    padding: 24px 20px; min-width: 0;
}
.pt-auth-card h1 { font-size: 1.75rem; }
.pt-auth-card > :last-child { margin-bottom: 0; }
.pt-auth-card .pt-btn-primary { margin-top: 22px; }
.pt-auth-links { border-top: 1px solid var(--pt-line-soft); margin-top: 22px; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 0 18px; font-size: 14px; }
.pt-auth-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }
.pt-forgot { display: flex; justify-content: flex-end; }
.pt-forgot a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 650; }
.pt-auth-hero { min-width: 0; }
.pt-hero-title { font-size: 2.1rem; line-height: 1.1; letter-spacing: -.04em; font-weight: 650; margin: 0 0 14px; overflow-wrap: anywhere; }
.pt-hero-lead { font-size: 1.05rem; line-height: 1.7; color: var(--pt-muted); max-width: 400px; margin: 0; }
.pt-hero-frame { max-width: 465px; margin-top: 26px; padding: 18px; border-radius: 26px; background: linear-gradient(125deg, rgba(36, 205, 213, .3), rgba(108, 111, 212, .28)); border: 1px solid #fff; box-shadow: inset 0 1px 1px #fff; }
.pt-hero-card { border-radius: 18px; padding: 18px 20px; }
.pt-hero-card strong { display: flex; align-items: center; gap: 10px; color: var(--pt-link); }
.pt-hero-card p { margin: 8px 0 0; color: var(--pt-muted); }
.pt-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; list-style: none; margin: 14px 0 0; padding: 0; font-size: 12px; font-weight: 650; color: var(--pt-ink); }
.pt-steps li + li::before { content: "→"; margin-right: 8px; color: var(--pt-link); }
.pt-sign { font-weight: 650; margin: 20px 0 0; }

.pt-panel { background: var(--pt-paper); border: 1px solid var(--pt-line); border-radius: var(--pt-radius-card); box-shadow: var(--pt-shadow-lift); overflow: hidden; margin: 0 0 20px; }
.pt-panel-band { padding: 24px 20px; background: var(--pt-gradient-soft); box-shadow: inset 0 1px 0 #fff; }
.pt-panel-band h1 { font-size: 1.9rem; margin: 0; }
.pt-panel-band p:last-child { margin: 10px 0 0; color: var(--pt-ink-soft); font-size: 1.05rem; }
.pt-panel-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 24px 20px; }
.pt-panel-body h2 { font-size: 1.2rem; }
.pt-panel-body p { color: var(--pt-muted); line-height: 1.75; }
.pt-contact { background: var(--pt-tint); border: 1px solid var(--pt-line); border-radius: 20px; padding: 18px 20px; min-width: 0; }
.pt-contact .pt-eyebrow { margin: 0 0 2px; }
.pt-contact a { display: flex; align-items: center; min-height: 48px; font-weight: 650; font-size: 1.1rem; overflow-wrap: anywhere; }
.pt-contact a[href^="tel:"] { font-size: 1.35rem; text-decoration: none; }
.pt-contact-sep { height: 1px; background: var(--pt-line); margin: 12px 0; }
.pt-icon-badge { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 18px; color: var(--pt-link); margin-bottom: 16px; }
.pt-error-code { font-family: var(--pt-mono); }

/* --- podgląd „Pokaż jak klient” (CRM) --- */
.pt-preview-banner {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
    background: var(--pt-ink); color: #fff;
    border-radius: 18px; padding: 12px 16px; margin: 0 0 20px;
}
.pt-preview-banner a { color: #cfe9ff; font-weight: 650; }
.pt-preview-banner a:hover { color: #fff; }

/* --- drobne uzupełnienia układu --- */
.pt-rows .pt-status, .pt-list-item .pt-status { justify-self: start; }
.pt-body-nav .pt-brand-sub { display: none; }
.pt-nav .pt-inline { display: block; }
.pt-ticket-meta p { margin: 0; }
.pt-card-band .pt-ref { margin: 0 0 6px; }
.pt-card-band h3 { margin: 0; }
.pt-panel .pt-auth-card { border: 0; border-radius: 0; box-shadow: none; }
.pt-narrow-wide { max-width: 970px; margin: 0 auto; }
.pt-small { font-size: 13px; }
.pt-quote-terms { font-size: 13px; }
.pt-new-aside { margin-top: 0; max-width: none; }
.pt-new-aside h2 { margin: 0 0 14px; }
.pt-hero-card .pt-eyebrow { margin: 0 0 8px; color: var(--pt-muted); }
.pt-hero-card .pt-eyebrow-brand { color: var(--pt-link); }
.pt-next-steps { margin: 0; padding-left: 20px; color: var(--pt-ink-soft); font-size: 14px; line-height: 1.6; }
.pt-next-steps li { padding: 0 0 12px 4px; }
.pt-next-steps li:last-child { padding-bottom: 0; }
.pt-next-steps strong { display: block; color: var(--pt-ink); }

/* --- od 720 px --- */
@media (min-width: 720px) {
    body { font-size: 15px; }
    h1 { font-size: 2rem; }
    .pt-header-row { padding: 14px 28px; flex-wrap: nowrap; }
    .pt-body-nav .pt-brand-sub { display: inline; }
    .pt-user { order: 0; flex: 0 1 auto; margin-left: auto; justify-content: flex-end; gap: 12px 16px; }
    .pt-user-text { flex-direction: column; text-align: right; }
    .pt-user-company { font-size: 14px; }
    .pt-user-name { font-size: 12px; }
    .pt-menu-toggle { margin-left: 0; }
    .pt-main { padding: 28px 28px 36px; }
    .pt-footer { padding-left: 28px; padding-right: 28px; }
    .pt-card { padding: 22px 24px; }
    .pt-card-band { margin: -22px -24px 20px; padding: 20px 24px 18px; }
    .pt-card-flush { padding: 0; }
    .pt-card-flush > .pt-card-head, .pt-card-flush .pt-rows, .pt-card-flush > .pt-muted, .pt-card-flush > p { padding-left: 24px; padding-right: 24px; }
    .pt-tiles { grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 14px; margin-bottom: 24px; }
    .pt-tile { border-radius: var(--pt-radius-card); padding: 18px 20px; }
    .pt-tile-value { font-size: 32px; }
    .pt-row.pt-quote-row { grid-template-columns: minmax(0, 1fr) minmax(200px, 260px); align-items: center; column-gap: 22px; }
    .pt-quote-row > .pt-muted { grid-column: 1; }
    .pt-quote-row > .pt-btn { grid-column: 2; grid-row: 1 / span 2; }
    .pt-field-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
    .pt-filters { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
    .pt-filters .pt-field-check, .pt-filters .pt-btn { align-self: end; }
    .pt-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pt-decision { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
    .pt-ticket-head { padding: 24px 26px; }
    .pt-ticket-head h1 { font-size: 1.7rem; }
    .pt-team-row > strong { flex: 0 1 auto; }
    .pt-auth-card { padding: 34px 36px; }
    .pt-hero-title { font-size: 3rem; }
    .pt-panel-band { padding: 32px 36px; }
    .pt-panel-band h1 { font-size: 2.2rem; }
    .pt-panel-body { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; padding: 32px 36px; }

    /* tabela spraw: wiersze w kolumnach z nagłówkiem */
    .pt-table-head {
        display: grid; grid-template-columns: minmax(0, 2.2fr) 140px minmax(0, 1.4fr); gap: 12px;
        padding: 11px 24px; background: var(--pt-tint); color: var(--pt-muted); font-size: 12px; font-weight: 600;
        border-top: 1px solid var(--pt-line-soft); border-bottom: 1px solid var(--pt-line-soft);
    }
    .pt-rows .pt-row { grid-template-columns: minmax(0, 2.2fr) 140px minmax(0, 1.4fr); padding: 16px 0; align-items: start; }
    .pt-rows .pt-row > .pt-muted { grid-column: 1; grid-row: 2; margin-top: -2px; }
    .pt-rows .pt-row > .pt-next { grid-column: 3; grid-row: 1 / span 2; }
    .pt-rows-simple .pt-row { grid-template-columns: minmax(0, 1fr) auto; }
    .pt-rows-simple .pt-row > .pt-muted { grid-column: 1 / -1; }

    .pt-list { gap: 0; background: var(--pt-paper); border: 1px solid var(--pt-line); border-radius: var(--pt-radius-card); box-shadow: var(--pt-shadow-card); overflow: hidden; }
    .pt-list > .pt-table-head { border-top: 0; }
    .pt-list > .pt-muted { padding: 18px 24px; margin: 0; }
    .pt-list-item {
        grid-template-columns: minmax(0, 2.2fr) 140px minmax(0, 1.4fr); gap: 12px;
        border: 0; border-top: 1px solid var(--pt-line-soft); border-radius: 0; box-shadow: none;
        padding: 18px 24px;
    }
    .pt-list-item:first-of-type { border-top: 0; }
    .pt-list-item:hover { background: #fafbfe; }
    .pt-list-item .pt-next { grid-column: 3; }
}

/* --- od 960 px: boczne menu --- */
@media (min-width: 960px) {
    .pt-body-nav .pt-shell { display: grid; grid-template-columns: var(--pt-side-width) minmax(0, 1fr); min-height: calc(100vh - 74px); }
    .pt-side, .pt-js-menu .pt-side { display: block; border-bottom: 0; border-right: 1px solid var(--pt-line); padding: 27px 18px; box-shadow: none; }
    .pt-js-menu .pt-side.pt-side-open { box-shadow: none; }
    .pt-nav-group { margin-bottom: 27px; }
    .pt-menu-toggle { display: none; }
    .pt-bottom-bar { display: none; }
    .pt-body-bar { padding-bottom: 0; }
    .pt-main { padding: 30px 32px 36px; }
    .pt-footer { padding-left: 32px; padding-right: 32px; }
    .pt-ticket-cols { grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr); grid-template-areas: "main side"; }
    .pt-ticket-main { grid-area: main; min-width: 0; }
    .pt-ticket-side { grid-area: side; min-width: 0; }
    .pt-ticket-side .pt-facts { grid-template-columns: minmax(0, 1fr); }
    .pt-auth { flex-direction: row-reverse; align-items: center; gap: 64px; margin-top: 28px; }
    .pt-auth > .pt-auth-card { flex: 1 1 380px; max-width: 465px; }
    .pt-auth > .pt-auth-hero { flex: 1.1 1 380px; }
    .pt-hero-title { font-size: 3.3rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* E6f C2: jeden widoczny przycisk nowego zgłoszenia — przy dolnym pasku (<960 px) przycisk w menu ukryty, także w rozwiniętym
   menu; od 960 px pasek ukryty, przycisk w menu widoczny. Dolny odstęp treści ≥ wysokości paska (z bezpiecznym obszarem). */
.pt-body-bar .pt-nav-cta-item { display: none; }
.pt-body-bar { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 960px) {
    .pt-body-bar .pt-nav-cta-item { display: block; }
    .pt-body-bar { padding-bottom: 0; }
}
/* E6f C2: komunikaty — błąd (czerwony) i informacja; flash panelu i błąd zgłoszenia */
.pt-alert.pt-alert-error { background: var(--pt-error-bg); color: var(--pt-error-ink); border: 1px solid #f3c7c7; }
.pt-alert.pt-alert-error a { color: var(--pt-error-ink); }
.pt-info { background: var(--pt-violet-bg); color: var(--pt-link); border-radius: var(--pt-radius-ctl); padding: 12px 14px; margin: 0 0 14px; }
/* E6f C2: lista wybranych plików (portal.js) */
.pt-file-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.pt-file-item { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; background: var(--pt-paper); border: 1px solid var(--pt-line); border-radius: 12px; font-size: 14px; }
.pt-file-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.pt-file-size { color: var(--pt-muted); font-size: 13px; white-space: nowrap; }
.pt-file-item .pt-btn { margin: 0; }
/* E6f C1: pola hasła — przełącznik „Pokaż hasło” (portal.js; bez JS ukryty) i licznik długości w podpowiedzi; dane na stronie „Konto” */
.pt-pw-toggle {
    display: inline-flex; align-items: center; min-height: 44px; margin: 4px 0 0; padding: 0;
    border: 0; background: none; color: var(--pt-link); font: inherit; font-size: 14px; font-weight: 650; cursor: pointer;
}
.pt-pw-toggle:hover, .pt-pw-toggle:focus-visible { color: var(--pt-link-hover); text-decoration: underline; }
.pt-pw-toggle[hidden] { display: none; }
.pt-hint [data-password-count]:empty { display: none; }
.pt-hint-ok [data-password-count] { color: var(--pt-done-ink); font-weight: 650; }
.pt-account-data { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 18px; margin: 0 0 14px; }
.pt-account-data dt { color: var(--pt-muted); font-size: 13px; margin-top: 10px; }
.pt-account-data dd { margin: 0; font-weight: 650; min-width: 0; }
@media (min-width: 640px) {
    .pt-account-data { grid-template-columns: 180px minmax(0, 1fr); }
    .pt-account-data dt, .pt-account-data dd { margin-top: 10px; }
}
/* E6f A: lista spraw — zakres (Otwarte / Zakończone / Wszystkie) łączony z wyszukiwaniem i filtrami */
.pt-scope { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.pt-scope a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
    border: 1px solid var(--pt-line); border-radius: var(--pt-radius-btn); background: var(--pt-paper); font-size: 14px; font-weight: 650;
}
.pt-scope a[aria-current="page"] { background: var(--pt-violet-bg); border-color: var(--pt-violet-line); color: var(--pt-link-hover); }
/* E6f A: karta — jedno „co teraz”, blok zakończonej sprawy, pliki w jednym wpisie osi, zwinięte wyceny, uwagi klienta */
.pt-ticket-head .pt-alert p { margin: 0; }
.pt-ticket-head .pt-alert p + p { margin-top: 6px; }
.pt-closed { margin: 0 0 20px; }
.pt-closed h2 { margin-top: 0; }
.pt-tl-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; overflow-wrap: anywhere; }
.pt-quote-collapsed > summary { margin: 3px 0 6px; }
.pt-quote-collapsed[open] > summary { margin-bottom: 10px; }
.pt-client-note { margin-top: 10px; }
/* E6f A: trzy decyzje o wycenie — akceptacja na całą szerokość, prośba o zmianę i rezygnacja obok siebie */
@media (min-width: 720px) {
    .pt-decision { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pt-decision [data-decision="akceptuj"] { grid-column: 1 / -1; }
}

/* E6g (D6): „Co się zmieniło względem wersji K−1” na ekranie wyceny decydenta */
.pt-quote-changes { margin-top: 14px; padding-top: 10px; border-top: 1px solid #e5e7eb; }
.pt-quote-changes h2 { font-size: 1rem; margin: 0 0 4px; }
.pt-quote-changes ul { margin: 6px 0; padding-left: 18px; }
.pt-quote-changes li { overflow-wrap: anywhere; }
