/* Dodatkowe komponenty + ciemny motyw (ładowane po style.css) */
:root { --hover: #fafbff; --row-done: #fbfdfb; --chip-text: color-mix(in srgb, var(--c) 70%, black); }
.count { background: var(--surface-3); color: var(--text-2); }
.table tbody tr:hover td, .cal-cell:hover { background: var(--hover); }
tr.done-row td { background: var(--row-done); }
.tg-ev .t, .chip .t { color: var(--chip-text); }

/* zakładki */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--primary); border-color: var(--primary); }
.tabs a .ico { width: 17px; height: 17px; }

/* przełącznik */
.switch { position: relative; display: inline-block; width: 40px; height: 23px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--border-strong); transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-xs); transition: transform .15s; }
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::after { transform: translateX(17px); }
.switch input:focus-visible + span { box-shadow: var(--ring); }

/* załączniki */
.dropzone { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 18px; border: 2px dashed var(--border-strong); border-radius: var(--radius-md); color: var(--muted); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-50); color: var(--text-2); }
.dropzone .ico { color: var(--faint); }
.dropzone.busy { pointer-events: none; opacity: .6; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 14px; }
.att { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); min-width: 0; }
.att-thumb { flex: none; width: 54px; height: 54px; border-radius: 9px; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-file span { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .04em; }
.att-thumb:hover { text-decoration: none; outline: 2px solid var(--primary); }
.att-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.att-name { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-meta { font-size: 11.5px; color: var(--muted); }
.att-pub { color: var(--success); font-weight: 600; }
input[type=file] { font: inherit; color: var(--text-2); max-width: 100%; }
input[type=file]::file-selector-button { margin-right: 10px; height: 34px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: var(--text-2); font: inherit; font-weight: 600; cursor: pointer; }

/* czas pracy */
.work-form { display: grid; grid-template-columns: 150px 110px 150px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.work-form input, .work-form select { box-shadow: none; }
.work-total { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; color: var(--muted); }
.work-total strong { color: var(--text); }
.work-invoice { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--warn-50); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }

/* „Do zafakturowania” w zgłoszeniu */
.inv-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.inv-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.inv-main { min-width: 0; }
.inv-main .sub { display: block; font-size: 12.5px; color: var(--muted); }
.inv-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.inv-form { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--border); }
.inv-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px 150px auto; gap: 8px; align-items: center; }
.inv-form input, .inv-row input { box-shadow: none; }
@media (max-width: 860px) { .inv-row { grid-template-columns: 1fr 1fr !important; } .inv-row input[name="title"], .inv-row input[name="inv_title"] { grid-column: 1 / -1; } }

/* „Do zafakturowania” – kafelek z boku „Pożyczone / Nierozliczone” */
.dash-leaves .card-head { gap: 10px; }
.dash-leaves .dl-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 4px 20px 6px; font-weight: 600; }
.dash-leaves .dl-empty { margin: 0 20px 16px; }
.out-link { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 14px; border-radius: var(--radius); text-decoration: none; color: var(--text); border: 1px solid color-mix(in srgb, #3451e0 30%, transparent); background: color-mix(in srgb, #3451e0 7%, var(--surface)); transition: border-color .15s; }
.out-link:hover { border-color: #3451e0; }
.out-link .nav-badge { position: static; }
.items-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.items-layout > aside { position: sticky; top: 16px; }
.out-card { border-color: color-mix(in srgb, #3451e0 30%, transparent); background: linear-gradient(180deg, color-mix(in srgb, #3451e0 6%, var(--surface)), var(--surface) 60%); }
.out-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.out-item { width: 100%; display: flex; flex-direction: column; gap: 3px; padding: 9px 11px; text-align: left; cursor: pointer; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font: inherit; color: inherit; transition: border-color .15s; }
.out-item:hover { border-color: var(--primary); }
.out-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.out-meta .badge { height: 20px; font-size: 11px; }
.out-old { color: var(--danger); font-weight: 700; }
@media (max-width: 1100px) { .items-layout { grid-template-columns: 1fr; } .items-layout > aside { position: static; order: -1; } }

/* akceptacja zarządu */
.ap-pending { background: #fff6e5; color: #b86e00; }
.ap-approved { background: var(--success-50); color: #0c7a3d; }
.ap-rejected { background: #fff0f0; color: #d93036; }
.ap-note { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.ap-actions { display: inline-flex; gap: 4px; margin-top: 6px; }
.approval-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 16px; border-radius: var(--radius); background: var(--warn-50); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.tick.locked { opacity: .4; cursor: not-allowed; }
.tick.locked input { cursor: not-allowed; }

/* terminy floty */
.due { display: inline-flex; flex-direction: column; line-height: 1.25; }
.due b { font-weight: 650; }
.due small { font-size: 12px; color: var(--muted); }
.due.warn b, .due.warn small { color: #d93036; }
.due.over { padding: 4px 8px; border-radius: 8px; background: #fff0f0; }
.due.over b, .due.over small { color: #c4161c; font-weight: 700; }
tr.car-alert td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.alert-card { border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--danger) 6%, var(--surface)), var(--surface) 70%); }
.alert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.alert-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.mini-stat { padding: 16px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.mini-stat b { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.mini-stat span { color: var(--muted); font-size: 12.5px; font-weight: 550; }
.report-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px; }
.report-controls input[type=date], .report-controls select { width: auto; box-shadow: none; }
.table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--border); }
.recur-meta { display: block; font-size: 12.5px; color: var(--muted); }
.preview-dates { display: flex; flex-wrap: wrap; gap: 6px; }
.preview-dates span { padding: 3px 9px; border-radius: 8px; background: var(--surface-3); font-size: 12.5px; font-weight: 600; }
.radio-row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.radio-row input[type=date], .radio-row input[type=number] { width: 160px; height: 36px; }
input[type=number] { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; }
.theme-btn { white-space: nowrap; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; background: var(--surface-3); padding: 12px 14px; border-radius: 10px; white-space: pre-wrap; overflow-x: auto; color: var(--text-2); margin: 0; }

@media (max-width: 860px) {
  .work-form { grid-template-columns: 1fr 1fr; }
  .work-form .wf-desc { grid-column: 1 / -1; }
}

/* rodzaje zadań: SPOTKANIE i SERWIS POJAZDU */
.kind-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.kind-opt { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--border-strong); border-radius: 11px; cursor: pointer; font-weight: 650; transition: all .15s; }
.kind-opt input { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; }
.kind-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.kind-opt.kind-meeting:has(input:checked) { border-color: #7c3aed; background: color-mix(in srgb, #7c3aed 12%, var(--surface)); color: #7c3aed; }
.kind-opt.kind-car_service:has(input:checked) { border-color: #0d9488; background: color-mix(in srgb, #0d9488 12%, var(--surface)); color: #0d9488; }
.kind-tag { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; color: #fff; vertical-align: 1px; }
.kind-tag.meeting { background: #7c3aed; }
.kind-tag.car { background: #0d9488; }
/* spotkanie – mocniej wyróżnione: pełniejsze tło, gruba ramka, ukośny wzór */
.tg-ev.kind-meeting {
  background: repeating-linear-gradient(135deg, color-mix(in srgb, #7c3aed 20%, var(--surface)) 0 10px, color-mix(in srgb, #7c3aed 13%, var(--surface)) 10px 20px);
  border-left-width: 5px; box-shadow: 0 0 0 1.5px var(--surface), inset 0 0 0 1px color-mix(in srgb, #7c3aed 45%, transparent);
}
.tg-ev.kind-meeting .t { color: #6d28d9; font-weight: 800; }
.tg-ev.kind-car_service { background: color-mix(in srgb, #0d9488 15%, var(--surface)); }
.chip.kind-meeting { background: #7c3aed; color: #fff; box-shadow: none; font-weight: 700; }
.chip.kind-meeting .t { color: #ede9fe; }
.chip.kind-meeting:hover { background: #6d28d9; }
.ev:has(.kind-tag.meeting) { border-color: color-mix(in srgb, #7c3aed 45%, transparent); }
.legend-sep { width: 1px; align-self: stretch; background: var(--border-strong); margin: 0 4px; }
.legend-kind { display: inline-flex; align-items: center; gap: 7px; padding: 3px 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.legend-kind i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
[data-theme="dark"] .tg-ev.kind-meeting .t { color: #c4b5fd; }

/* etapy zamówienia */
tr.arrived-row td { background: color-mix(in srgb, #12a150 7%, var(--surface)); }
tr.arrived-row td:first-child { box-shadow: inset 3px 0 0 var(--success); }
.flow-wait { margin-top: 3px; font-size: 12px; font-weight: 700; color: #b86e00; }
.is-handed { background: var(--success-50); color: #0c7a3d; }
.is-delivered { background: #e6fbf3; color: #067a52; }
.arrived-card { border-color: color-mix(in srgb, var(--success) 40%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--success) 7%, var(--surface)), var(--surface) 70%); }
[data-theme="dark"] .flow-wait { color: #f6c26b; }
[data-theme="dark"] .is-handed { background: rgba(18, 161, 80, .18); color: #6fdc9c; }

/* Panel zamówień */
.panel-hero { text-align: center; padding: 48px 24px; }
.panel-hero h2 { font-size: 20px; margin-bottom: 8px; }
.panel-hero .btn { height: 44px; padding: 0 22px; margin-top: 8px; }
.panel-ico { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 16px; background: var(--primary-50); color: var(--primary); }
.panel-ico .ico { width: 30px; height: 30px; }

/* „Zabrać ze sobą” */
.bring-box { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px; background: var(--surface-2); }
.bring-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bring-list:not(:empty) { margin-bottom: 8px; }
.bring-list li { display: inline-flex; align-items: center; gap: 2px; padding: 3px 3px 3px 11px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-weight: 550; font-size: 13px; }
.bring-list li .icon-btn { width: 24px; height: 24px; font-size: 12px; }
.bring-add { display: flex; gap: 6px; }
.bring-add input { height: 34px; box-shadow: none; }

/* urlopy */
.chip.leave { background: color-mix(in srgb, var(--c) 22%, var(--surface)); box-shadow: inset 3px 0 0 var(--c); font-weight: 600; }
.chip.leave.pending { background: transparent; box-shadow: none; border: 1.5px dashed var(--c); color: var(--muted); }
.chip.lic { --c: #d97706; display: block; text-decoration: none; font-weight: 650; background: color-mix(in srgb, var(--c) 16%, var(--surface)); }
.chip.holiday { --c: #e5484d; background: color-mix(in srgb, var(--c) 10%, var(--surface)); color: #c4161c; box-shadow: none; font-weight: 700; cursor: default; }
.cal-cell.holiday .cal-date { color: var(--danger); }
.leave-grid .cal-cell { min-height: 104px; }
.legend .chip { display: inline-block; }

/* rodzaje pozycji do zafakturowania */
.cat-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cat-opt { position: relative; display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: 11px; cursor: pointer; font-weight: 600; font-size: 13px; transition: border-color .15s, background .15s; }
.cat-opt:hover { border-color: var(--primary); }
.cat-opt input { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; }
.cat-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.cat-left, .cat-work { background: #fff6e5; color: #b86e00; }
.cat-loaned { background: #eef2ff; color: #3451e0; }
.cat-test { background: #f3f0ff; color: #6941c6; }
[data-theme="dark"] .cat-left, [data-theme="dark"] .cat-work { background: rgba(220, 138, 6, .18); color: #f6c26b; }
[data-theme="dark"] .cat-loaned { background: rgba(80, 120, 255, .18); color: #9db4ff; }
[data-theme="dark"] .cat-test { background: rgba(123, 92, 255, .2); color: #c4b5ff; }
[data-theme="dark"] .chip.holiday { color: #ff8a8e; }
@media (max-width: 860px) { .cat-pick { grid-template-columns: 1fr; } .leave-grid .chip { font-size: 0; height: 7px; padding: 0; } }

/* ════════════ CIEMNY MOTYW ════════════ */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1018;
  --surface: #141a26;
  --surface-2: #181f2d;
  --surface-3: #212a3b;
  --border: #263046;
  --border-strong: #354262;
  --text: #e8ecf4;
  --text-2: #c5ccda;
  --muted: #8f9ab0;
  --faint: #66728b;
  --primary: #f0383d;
  --primary-600: #ff5257;
  --primary-50: rgba(240, 56, 61, .14);
  --primary-100: rgba(240, 56, 61, .26);
  --danger-50: rgba(229, 72, 77, .14);
  --success-50: rgba(18, 161, 80, .16);
  --warn-50: rgba(220, 138, 6, .14);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 4px 16px rgba(0, 0, 0, .2);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, .4);
  --hover: #1a2232;
  --row-done: #141c22;
  --chip-text: color-mix(in srgb, var(--c) 55%, white);
}
[data-theme="dark"] .st-new, [data-theme="dark"] .ap-rejected { background: rgba(229, 72, 77, .16); color: #ff8a8e; }
[data-theme="dark"] .st-in_progress, [data-theme="dark"] .is-ordered, [data-theme="dark"] .is-sent { background: rgba(80, 120, 255, .18); color: #9db4ff; }
[data-theme="dark"] .st-waiting, [data-theme="dark"] .is-todo, [data-theme="dark"] .ap-pending { background: rgba(220, 138, 6, .18); color: #f6c26b; }
[data-theme="dark"] .st-closed, [data-theme="dark"] .pr-low, [data-theme="dark"] .pr-normal, [data-theme="dark"] .is-cancelled, [data-theme="dark"] .is-rejected { background: var(--surface-3); color: var(--text-2); }
[data-theme="dark"] .pr-high { background: rgba(234, 88, 12, .2); color: #ffb07a; }
[data-theme="dark"] .is-delivered, [data-theme="dark"] .is-accepted, [data-theme="dark"] .is-invoiced, [data-theme="dark"] .ap-approved { background: rgba(18, 161, 80, .18); color: #6fdc9c; }
[data-theme="dark"] .stat.hot { border-color: rgba(229, 72, 77, .35); background: linear-gradient(180deg, rgba(229, 72, 77, .1), var(--surface) 60%); }
[data-theme="dark"] .comment.internal { background: rgba(220, 138, 6, .08); border-color: rgba(220, 138, 6, .25); }
[data-theme="dark"] .comment.client { background: rgba(80, 120, 255, .08); border-color: rgba(80, 120, 255, .25); }
[data-theme="dark"] .take-banner, [data-theme="dark"] .assignee-card.none { background: rgba(220, 138, 6, .1); border-color: rgba(220, 138, 6, .3); }
[data-theme="dark"] .tg-col.today { background-color: #161d2c; }
[data-theme="dark"] .tg-col.weekend { background-color: #121825; }
[data-theme="dark"] .tg-col { background-image: linear-gradient(to bottom, var(--border) 1px, transparent 1px), linear-gradient(to bottom, transparent calc(var(--hour) / 2), #1b2333 calc(var(--hour) / 2), #1b2333 calc(var(--hour) / 2 + 1px), transparent calc(var(--hour) / 2 + 1px)); }
[data-theme="dark"] .cal-cell.other .cal-date { color: #47526a; }
[data-theme="dark"] .form-error, [data-theme="dark"] .error-box { background: rgba(229, 72, 77, .12); border-color: rgba(229, 72, 77, .35); color: #ff8a8e; }
[data-theme="dark"] body.plain { background: radial-gradient(1200px 600px at 10% -10%, #3a1416 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #1b2240 0%, transparent 55%), #0c1018; }
[data-theme="dark"] .auth-card { background: rgba(20, 26, 38, .92); border-color: var(--border); }
[data-theme="dark"] .topbar { background: rgba(20, 26, 38, .92); }
[data-theme="dark"] .due.over { background: rgba(229, 72, 77, .16); }
[data-theme="dark"] .due.over b, [data-theme="dark"] .due.over small, [data-theme="dark"] .due.warn b, [data-theme="dark"] .due.warn small { color: #ff8a8e; }
[data-theme="dark"] .toast { background: #263046; }
[data-theme="dark"] .modal-backdrop { background: rgba(0, 0, 0, .6); }
[data-theme="dark"] .client-header .brand-sub { color: var(--faint) !important; }
[data-theme="dark"] .tg-dayhead.weekend .dd { color: var(--faint); }

/* wydruk raportów */
@media print {
  .sidebar, .topbar, .tabs, .report-controls, .page-head .actions, #toasts { display: none !important; }
  body, .card, .mini-stat { background: #fff !important; color: #000 !important; box-shadow: none !important; }
  .view { padding: 0; max-width: none; }
  .card { break-inside: avoid; border-color: #ccc; }
}

/* HelpDesk – zwarta tabela zgłoszeń (mieści się bez przewijania w bok) */
.ticket-table .title-cell { min-width: 200px; }
.ticket-table .tt-client { min-width: 90px; max-width: 160px; }
.ticket-table .tt-status { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.ticket-table .person { white-space: nowrap; }
@media (max-width: 1300px) {
  .hd-layout { grid-template-columns: minmax(0, 1fr); }
  .client-filter { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .client-filter h3 { width: 100%; }
  .client-filter button { width: auto; }
}

/* Zamykanie zgłoszenia – to, co już zapisane */
.close-done { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; background: var(--success-50); border: 1px solid color-mix(in srgb, var(--success) 30%, transparent); }
.close-done .link-btn { margin-left: auto; }
@media (max-width: 1100px) { .ticket-table .person { white-space: normal; } .ticket-table .title-cell { min-width: 160px; } }

/* Strona zgłoszenia – czas pracy bez przewijania w bok */
.work-table .person { white-space: normal; }
.work-form { display: flex; flex-wrap: wrap; }
.work-form > input[type=date] { flex: 0 0 150px; width: 150px; }
.work-form > select[name=time] { flex: 0 0 110px; width: 110px; }
.work-form > select[name=kind] { flex: 1 1 140px; width: auto; }
.work-form > .wf-desc { flex: 1 1 220px; width: auto; min-width: 0; }
.work-form > .btn { flex: 0 0 auto; }
/* lewa kolumna zgłoszenia jest węższa na mniejszych ekranach – układ dopasowuje się do jej szerokości */
.ticket-layout > div { container-type: inline-size; min-width: 0; }
@container (max-width: 620px) {
  .work-table th, .work-table td { padding-left: 8px; padding-right: 8px; }
  .inv-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto !important; }
  .inv-row input[name="title"] { grid-column: 1 / -1; }
}
