:root {
  --navy-950: #0b202c;
  --navy-900: #102b39;
  --navy-800: #183c4b;
  --ink: #17242c;
  --muted: #54636c;
  --soft: #62717a;
  --line: #dde4e7;
  --line-strong: #cbd5da;
  --surface: #ffffff;
  --canvas: #f4f6f7;
  --teal: #147f7a;
  --teal-soft: #e4f3f1;
  --red: #c6433a;
  --red-soft: #fae9e7;
  --amber: #8a520e;
  --amber-soft: #fbf0df;
  --green: #236d48;
  --green-soft: #e7f3eb;
  --blue: #356d9b;
  --blue-soft: #e8f0f7;
  --violet: #6951a3;
  --violet-soft: #f0edf8;
  --shadow: 0 8px 24px rgba(18, 39, 50, .075);
}

/* Grafik WKRM — wspólny kalendarz dla WKRM, kierownika ORM i administracji centralnej */
.schedule-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 14px;
}
.schedule-workflow-notice { margin-bottom: 14px; }
.schedule-layout {
  display: grid;
  grid-template-columns: minmax(650px, 1fr) minmax(260px, 330px);
  gap: 14px;
  align-items: start;
}
.schedule-layout.manager-layout { grid-template-columns: minmax(650px, 1.15fr) minmax(300px, .55fr); }
.schedule-side-stack { min-width: 0; }
.schedule-calendar-card { min-width: 0; overflow: hidden; }
.schedule-calendar-header { align-items: center; text-align: center; }
.schedule-calendar-header > div { flex: 1; min-width: 0; }
.schedule-calendar-header h3 { text-transform: capitalize; }
.schedule-calendar-header .btn:disabled { opacity: .35; cursor: not-allowed; }
.schedule-view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 13px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
}
.schedule-view-toolbar > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.schedule-view-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.schedule-view-toggle button {
  min-height: 27px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}
.schedule-view-toggle button.is-active { background: var(--navy-900); color: #fff; }
.schedule-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--line);
}
.schedule-weekday {
  padding: 9px 4px;
  background: #f5f7f8;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}
.schedule-calendar-day {
  min-width: 0;
  min-height: 126px;
  padding: 7px;
  background: #fff;
}
.schedule-calendar-day.is-neighbour { background: #f8fafb; }
.schedule-calendar-day.is-neighbour .schedule-day-number,
.schedule-calendar-day.is-neighbour .schedule-day-button { color: #9ca9ae; }
.schedule-calendar-day.is-outside-period { opacity: .48; }
.schedule-day-button,
.schedule-day-number {
  width: 100%;
  min-height: 23px;
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}
.schedule-day-button { cursor: pointer; }
.schedule-day-button:hover > span:first-child {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  margin: -4px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
}
.schedule-shifts { display: grid; gap: 4px; }
.schedule-shift {
  min-width: 0;
  min-height: 34px;
  padding: 5px 6px;
  border: 1px solid #dce5e7;
  border-radius: 7px;
  background: #f8fbfb;
  color: var(--ink);
  font: inherit;
  line-height: 1.2;
  text-align: left;
}
button.schedule-shift { width: 100%; cursor: pointer; }
button.schedule-shift:hover { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(49, 142, 137, .1); }
.schedule-shift b {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .04em;
}
.schedule-shift span {
  display: block;
  overflow: hidden;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.schedule-shift.is-own { border-color: #9fd3cf; background: var(--teal-soft); color: #0c655f; }
.schedule-shift.is-empty { border-color: #e8b8b4; background: var(--red-soft); color: var(--red); }
.schedule-shift.is-empty b { color: inherit; }
.schedule-team-view {
  display: grid;
  gap: 12px;
  padding: 12px;
  overflow-x: hidden;
  background: #f4f7f8;
}
.schedule-team-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}
.schedule-team-legend span { display: inline-flex; align-items: center; gap: 5px; }
.schedule-team-legend i { width: 9px; height: 9px; border-radius: 3px; }
.schedule-team-legend i.is-day { background: #31a9a1; }
.schedule-team-legend i.is-night { background: #4d4a91; }
.schedule-team-legend i.is-empty { background: var(--red); }
.schedule-team-week {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(18, 39, 50, .045);
}
.schedule-team-week > header {
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  background: #f9fbfb;
  color: var(--ink);
  font-size: 9px;
}
.schedule-team-grid {
  display: grid;
  grid-template-columns: minmax(128px, 1.18fr) repeat(7, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  min-width: 0;
}
.schedule-team-corner,
.schedule-team-day {
  min-width: 0;
  min-height: 40px;
  padding: 6px 3px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f2f6f7;
}
.schedule-team-corner {
  position: sticky;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.schedule-team-day { text-align: center; }
.schedule-team-day strong,
.schedule-team-day small { display: block; }
.schedule-team-day strong { color: var(--ink); font-size: 9px; }
.schedule-team-day small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.schedule-team-day.is-neighbour { background: #f7f8f9; opacity: .55; }
.schedule-team-row { display: contents; }
.schedule-team-person,
.schedule-team-cell {
  min-width: 0;
  min-height: 52px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.schedule-team-person {
  position: sticky;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  background: #fff;
}
.schedule-team-person strong,
.schedule-team-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-team-person strong { font-size: 8px; }
.schedule-team-person small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.schedule-team-cell {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  padding: 4px 3px;
  background: #fff;
  text-align: center;
}
.schedule-team-row.is-current > .schedule-team-person,
.schedule-team-row.is-current > .schedule-team-cell { background: #f1fbf9; }
.schedule-team-row.is-current > .schedule-team-person { box-shadow: inset 3px 0 0 var(--teal); }
.schedule-team-cell.is-neighbour { background: #f8f9fa; opacity: .48; }
.schedule-team-shift {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 24px;
  padding: 3px 2px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #fff;
  font: inherit;
  font-size: 7px;
  font-weight: 800;
  line-height: 1.1;
  white-space: normal;
}
button.schedule-team-shift { cursor: pointer; }
button.schedule-team-shift:hover { filter: brightness(.92); box-shadow: 0 0 0 2px rgba(20, 43, 57, .12); }
.schedule-team-shift.is-dzienna { background: #218f88; }
.schedule-team-shift.is-nocna { background: #4d4a91; }
.schedule-team-shift.is-swapped { outline: 2px solid #e5a93f; outline-offset: -2px; }
.schedule-team-shift.is-missing { border-color: #b83931; background: var(--red); }
.schedule-team-off { color: #b4bdc1; font-size: 10px; }
.schedule-team-absence {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 4px 5px;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 750;
}
.schedule-team-absence.is-vacation { background: var(--blue-soft); color: var(--blue); }
.schedule-team-absence.is-unavailable { background: var(--amber-soft); color: var(--amber); }
.schedule-team-edit-availability {
  width: 100%;
  min-height: 19px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal);
  font: inherit;
  font-size: 7px;
  font-weight: 750;
  cursor: pointer;
}
.schedule-team-person .schedule-avatar {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  font-size: 8px;
}
.schedule-team-edit-availability:hover { text-decoration: underline; }
.schedule-team-row.is-missing-row > .schedule-team-person,
.schedule-team-row.is-missing-row > .schedule-team-cell { background: #fff9f8; }
.schedule-team-row.is-missing-row > .schedule-team-person { color: var(--red); }
.schedule-team-row.is-missing-row .schedule-avatar { background: var(--red-soft); color: var(--red); }
.schedule-team-grid > :nth-last-child(-n + 8) { border-bottom: 0; }
.schedule-marker {
  display: block;
  width: fit-content;
  margin-top: 3px;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 7px;
  font-weight: 750;
  line-height: 1.2;
}
.schedule-marker.unavailable { background: var(--amber-soft); color: var(--amber); }
.schedule-marker.vacation { background: var(--blue-soft); color: var(--blue); }
.schedule-actor-picker,
.schedule-year-picker {
  display: grid;
  gap: 3px;
  min-width: 210px;
}
.schedule-actor-picker span,
.schedule-year-picker span,
.schedule-fraction-row label span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.schedule-actor-picker select,
.schedule-year-picker input,
.schedule-fraction-row input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
}
.schedule-wide-button { width: 100%; justify-content: center; }
.schedule-help {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}
.schedule-opinion-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.schedule-mini-list,
.schedule-request-list,
.schedule-fraction-list { display: grid; gap: 8px; margin-top: 10px; }
.schedule-mini-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 10px;
}
.schedule-request-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}
.schedule-request-row > div:first-child { min-width: 0; }
.schedule-request-row strong,
.schedule-request-row small { display: block; }
.schedule-request-row strong { color: var(--ink); font-size: 10px; }
.schedule-request-row small { margin: 3px 0 6px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.schedule-fraction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 94px;
  align-items: center;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.schedule-fraction-row label { display: grid; gap: 3px; }
.schedule-fraction-row input { width: 100%; padding: 0 8px; }
.schedule-person { display: flex; align-items: center; gap: 8px; min-width: 0; }
.schedule-person strong,
.schedule-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-person strong { font-size: 10px; }
.schedule-person small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.schedule-avatar {
  flex: 0 0 auto;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 9px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 9px;
  font-weight: 800;
}
.schedule-summary-card { margin-top: 14px; }
.schedule-hours-list { display: grid; gap: 8px; }
.schedule-hours-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.schedule-hours-row.is-shortage { border-color: #e9c0bc; background: #fff9f8; }
.schedule-hours-row.is-covered { border-color: #c9dfd2; background: #f8fcf9; }
.schedule-hours-row.is-excess { border-color: #e5aa55; background: #fff8ed; box-shadow: inset 3px 0 0 #d88120; }
.schedule-hours-values { text-align: right; white-space: nowrap; }
.schedule-hours-values strong,
.schedule-hours-values small { display: block; }
.schedule-hours-values strong { font-size: 10px; }
.schedule-hours-values small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.schedule-hours-row.is-shortage .schedule-hours-values small { color: var(--red); }
.schedule-hours-row.is-covered .schedule-hours-values small { color: var(--green); }
.schedule-hours-row.is-excess .schedule-hours-values small { color: #a35b0d; font-weight: 800; }
.schedule-manager-bottom { margin-top: 14px; }
.schedule-empty { padding: 14px 7px; }
.schedule-modal { width: min(620px, 100%); }
.schedule-modal-intro { margin-bottom: 12px; }
.schedule-modal-intro strong,
.schedule-modal-intro small { display: block; }
.schedule-modal-intro small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.schedule-modal-footer { margin: 15px -19px -17px; }
.schedule-shift-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.schedule-shift-choice label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfc;
  cursor: pointer;
}
.schedule-shift-choice input { width: 18px; height: 18px; accent-color: var(--teal); }
.schedule-shift-choice b,
.schedule-shift-choice small { display: block; }
.schedule-shift-choice b { font-size: 11px; }
.schedule-shift-choice small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.schedule-norm-card { margin-bottom: 14px; }
.schedule-norm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.schedule-norm-grid label {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfc;
}
.schedule-norm-grid label > span { color: var(--ink); font-size: 10px; font-weight: 750; text-transform: capitalize; }
.schedule-norm-grid input {
  width: 100%;
  min-height: 37px;
  padding: 0 42px 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
}
.schedule-norm-grid small { position: absolute; right: 18px; bottom: 22px; color: var(--muted); font-size: 8px; }
.schedule-norm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.schedule-norm-footer strong,
.schedule-norm-footer small { display: block; }
.schedule-norm-footer strong { font-size: 13px; }
.schedule-norm-footer small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.schedule-formula {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.schedule-formula span { padding: 9px 12px; border-radius: 8px; background: #f3f7f8; color: var(--ink); font-size: 10px; font-weight: 700; }
.schedule-formula b { color: var(--teal); font-size: 15px; }

@media (max-width: 1280px) {
  .schedule-layout,
  .schedule-layout.manager-layout { grid-template-columns: 1fr; }
  .schedule-side-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-side-stack > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .schedule-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-calendar-card { overflow-x: auto; }
  .schedule-calendar { min-width: 760px; }
  .schedule-team-view { padding: 8px; }
  .schedule-team-grid { grid-template-columns: minmax(105px, 1.1fr) repeat(7, minmax(0, 1fr)); }
  .schedule-team-person { gap: 4px; padding: 4px; }
  .schedule-team-person .schedule-avatar { width: 23px; height: 23px; font-size: 7px; }
  .schedule-team-person strong { font-size: 7px; }
  .schedule-team-person small { font-size: 6px; }
  .schedule-team-shift { font-size: 6px; }
  .schedule-norm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .schedule-side-stack,
  .schedule-metrics { grid-template-columns: 1fr; }
  .schedule-side-stack > .card:last-child:nth-child(odd) { grid-column: auto; }
  .schedule-calendar-header { min-width: 760px; }
  .schedule-team-grid { grid-template-columns: 88px repeat(7, minmax(0, 1fr)); }
  .schedule-team-person .schedule-avatar { display: none; }
  .schedule-team-day strong { font-size: 7px; }
  .schedule-team-day small { font-size: 6px; }
  .schedule-team-shift { min-height: 21px; font-size: 5px; }
  .schedule-norm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-norm-footer,
  .schedule-hours-row,
  .schedule-request-row { align-items: stretch; flex-direction: column; }
  .schedule-hours-values { text-align: left; }
  .schedule-shift-choice { grid-template-columns: 1fr; }
  .schedule-actor-picker { min-width: 100%; }
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 246px minmax(0, 1fr); }
.sidebar { position: sticky; inset: 0 auto 0 0; height: 100vh; background: var(--navy-950); color: #dfe8eb; padding: 24px 16px 18px; display: flex; flex-direction: column; overflow-y: auto; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 25px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-logo { width: 39px; height: 39px; flex: 0 0 39px; border-radius: 11px; display: grid; place-items: center; overflow: hidden; background: #fff; }
.sidebar-logo img { display: block; width: 31px; height: 26px; object-fit: contain; }
.sidebar-brand strong { display: block; font-size: 17px; letter-spacing: -.04em; color: #fff; }
.sidebar-brand strong span { color: #d61f2c; }
.sidebar-brand small { display: block; margin-top: 2px; color: #91a5af; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.side-section { margin: 20px 10px 7px; color: #738b96; font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .14em; }
.side-nav { display: grid; gap: 3px; }
.side-link { border: 0; width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 9px; background: transparent; color: #b7c6cc; text-decoration: none; text-align: left; cursor: pointer; font-size: 13px; }
.side-link:hover { color: #fff; background: rgba(255,255,255,.055); }
.side-link.active { color: #fff; background: #1c4353; box-shadow: inset 3px 0 0 #54b9b3; }
.nav-icon { width: 20px; height: 20px; border: 1px solid currentColor; border-radius: 6px; display: inline-grid; place-items: center; flex: 0 0 auto; font-size: 10px; font-weight: 800; opacity: .88; }
.nav-icon svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; }
.sidebar-bottom { margin-top: auto; padding-top: 18px; }
.system-state { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; font-size: 11px; color: #9fb0b7; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: #55bd83; box-shadow: 0 0 0 4px rgba(85,189,131,.12); }
.sidebar-back { display: block; margin-top: 12px; padding: 4px 10px; color: #8da1aa; font-size: 11px; text-decoration: none; }
.sidebar-back:hover { color: #fff; }

.workspace { min-width: 0; }
.topbar { height: 72px; padding: 0 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; backdrop-filter: blur(10px); }
.prototype-security-notice { display:flex; align-items:center; justify-content:center; gap:6px; min-height:30px; padding:6px 18px; border-bottom:1px solid #ead7b9; background:#fffaf1; color:#76521f; font-size:10px; line-height:1.35; text-align:center; }
.prototype-security-notice strong { font-weight:800; }
.access-guard-active .app-shell { visibility:hidden; pointer-events:none; user-select:none; }
.access-guard-active .modal-backdrop[data-required-session="true"] { visibility:visible; }
.role-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mobile-menu { display: none; border: 0; background: var(--canvas); border-radius: 8px; width: 36px; height: 36px; cursor: pointer; }
.role-title h1 { margin: 0; font-size: 17px; letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-title p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.demo-chip { padding: 6px 9px; border: 1px solid #d5e0e4; border-radius: 7px; background: #f8fafb; color: #6c7e87; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.clock { text-align: right; line-height: 1.25; }
.clock strong { font-size: 13px; }
.clock small { display: block; color: var(--muted); font-size: 10px; }
.avatar { width: 35px; height: 35px; border-radius: 50%; background: var(--navy-900); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }

.content { padding: 28px 30px 48px; max-width: 1650px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 22px; }
.page-head h2 { margin: 0; font-size: 27px; letter-spacing: -.04em; }
.page-head p { max-width: 680px; margin: 7px 0 0; color: var(--muted); line-height: 1.5; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn { min-height: 38px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 13px; background: #fff; color: var(--ink); font-weight: 650; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none; }
.btn:hover { background: #f8fafb; border-color: #aebdc4; }
.btn-primary { border-color: var(--navy-900); background: var(--navy-900); color: #fff; }
.btn-primary:hover { background: var(--navy-800); }
.btn-critical { border-color: #a8322b; background: #a8322b; color: #fff; }
.btn-critical:hover { background: #8f2a24; }
.btn-teal { border-color: var(--teal); background: var(--teal); color: #fff; }
.btn-teal:hover { background: #106d69; }
.btn-ghost { background: transparent; }
.btn-small { min-height: 30px; padding: 5px 9px; font-size: 11px; }
.btn-wide { width: 100%; }

.duty-card [data-modal="startDuty"][hidden],
.duty-card [data-modal="endDuty"][hidden] {
  display: none !important;
}

.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 20px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; border-bottom: 2px solid transparent; padding: 11px 13px 10px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--teal); border-bottom-color: var(--teal); }
.tab .count { margin-left: 5px; padding: 2px 6px; background: var(--red-soft); color: var(--red); border-radius: 8px; font-size: 9px; }
.tab-panel { display: none; animation: fade .16s ease; }
.tab-panel.active { display: block; }
@keyframes fade { from { opacity: .4; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin-bottom: 16px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: 0 3px 12px rgba(18,39,50,.035); }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.metric-icon { width: 29px; height: 29px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.metric-icon.red { background: var(--red-soft); color: var(--red); }
.metric-icon.amber { background: var(--amber-soft); color: var(--amber); }
.metric-icon.green { background: var(--green-soft); color: var(--green); }
.metric-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.metric-icon:empty { background: var(--line, #e3e8ec); }
.metric-state { display: block; margin-top: 4px; color: var(--muted, #5b6b75); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.metric[data-metric-tone="critical"] .metric-state { color: var(--red); }
.metric[data-metric-tone="warn"] .metric-state { color: var(--amber); }
.metric[data-metric-tone="ok"] .metric-state { color: var(--green); }
.metric strong { display: block; margin-top: 11px; font-size: 25px; letter-spacing: -.04em; }
.metric footer { margin-top: 4px; color: var(--soft); font-size: 10px; }
.metric-clickable { position: relative; cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.metric-clickable:hover, .metric-clickable:focus-visible { border-color: #9accca; box-shadow: 0 8px 22px rgba(18, 80, 90, .10); transform: translateY(-2px); outline: none; }
.metric-clickable.active { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(28, 153, 147, .12); }
.metric-open-hint { display: block; margin-top: 10px; color: var(--teal); font-size: 9px; font-weight: 720; }
.metric-drilldown[hidden] { display: none; }
.metric-drilldown { margin: -4px 0 16px; padding: 16px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 12px; background: #fff; box-shadow: 0 6px 22px rgba(18,39,50,.05); }
.metric-drilldown.critical { border-left-color: var(--red); background: #fffafa; }
.metric-drilldown.warning { border-left-color: var(--amber); background: #fffcf7; }
.metric-drilldown.info { border-left-color: var(--blue); }
.metric-drilldown > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.metric-drilldown h3 { margin: 4px 0 3px; font-size: 15px; }
.metric-drilldown p { margin: 0; color: var(--muted); font-size: 10px; }
.metric-detail-list { margin-top: 13px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.metric-detail-item { min-width: 0; padding: 11px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.metric-detail-item strong, .metric-detail-item small { display: block; }
.metric-detail-item strong { font-size: 11px; }
.metric-detail-item small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.metric-detail-item.critical { border-color: #f1c4c0; background: var(--red-soft); color: #9f2f28; }
.metric-detail-item.warning { border-color: #f0d5ae; background: var(--amber-soft); color: #7d541e; }
.metric-detail-item.critical small, .metric-detail-item.warning small { color: inherit; opacity: .75; }
.metric-detail-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--blue); }
.metric-detail-item.critical .metric-detail-dot { background: var(--red); }
.metric-detail-item.warning .metric-detail-dot { background: var(--amber); }
.metric-detail-item-action { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.metric-detail-item-action .btn { white-space: nowrap; }
.metric-drilldown footer { margin-top: 12px; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }

.report-reminder-host { margin: 0 0 16px; }
.report-reminder-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 6px 22px rgba(18,39,50,.05); }
.report-reminder-panel.is-unread { border-color: #efb5b0; border-left: 4px solid var(--red); background: #fffafa; }
.report-reminder-panel > header { padding: 14px 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.report-reminder-panel h3 { margin: 4px 0 0; font-size: 15px; }
.report-reminder-list { display: grid; }
.report-reminder-item { min-width: 0; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.report-reminder-item:last-child { border-bottom: 0; }
.report-reminder-item.is-unread { background: var(--red-soft); }
.report-reminder-item.is-read { color: var(--muted); background: #f7f9f9; }
.report-reminder-item strong, .report-reminder-item small, .report-reminder-item span { display: block; }
.report-reminder-item strong { font-size: 12px; }
.report-reminder-item small { margin-top: 4px; color: inherit; font-size: 10px; line-height: 1.45; }
.report-reminder-item span { margin-top: 4px; color: var(--soft); font-size: 9px; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .85fr); gap: 16px; }
.grid-2.equal { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.stack { display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 14px rgba(18,39,50,.035); overflow: hidden; }
.card-header { min-height: 54px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #e8edef; }
.card-header h3 { margin: 0; font-size: 14px; letter-spacing: -.015em; }
.card-header p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.card-body { padding: 16px; }
.card-footer { padding: 11px 16px; border-top: 1px solid #e8edef; background: #fbfcfc; }
.section-title { margin: 26px 0 11px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.section-title h3 { margin: 0; font-size: 16px; }
.section-title p { margin: 3px 0 0; font-size: 11px; color: var(--muted); }

.status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-ok { color: var(--green); background: var(--green-soft); }
.status-warn { color: var(--amber); background: var(--amber-soft); }
.status-critical { color: #9f2f28; background: var(--red-soft); }
.status-info { color: var(--blue); background: var(--blue-soft); }
.status-neutral { color: #53636c; background: #edf1f2; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 12px; background: #f7f9fa; border-bottom: 1px solid var(--line); color: #52636c; font-size: 11px; font-weight: 750; letter-spacing: .075em; text-transform: uppercase; text-align: left; white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid #edf0f2; font-size: 11px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcfc; }
.row-critical td { background: #fff9f8; }
.row-warn td { background: #fffdf8; }
.row-muted td { background: #f3f5f6; color: #7d8a90; }
.entity { min-width: 190px; }
.entity strong { display: block; font-size: 11px; }
.entity small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.number { font-variant-numeric: tabular-nums; font-weight: 650; }
.number.good { color: var(--green); }
.number.bad { color: var(--red); }
.table-action { border: 0; background: transparent; color: var(--teal); cursor: pointer; font-size: 11px; font-weight: 650; }

.alert-list, .timeline, .contact-list, .file-list { display: grid; gap: 9px; }
.alert-item { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 11px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.alert-item.critical { border-left: 3px solid var(--red); }
.alert-item.warning { border-left: 3px solid var(--amber); }
.alert-item.info { border-left: 3px solid var(--blue); }
.alert-symbol { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); font-size: 12px; font-weight: 850; }
.warning .alert-symbol { color: var(--amber); background: var(--amber-soft); }
.info .alert-symbol { color: var(--blue); background: var(--blue-soft); }
.alert-item h4 { margin: 0; font-size: 12px; }
.alert-item p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.alert-time { color: var(--soft); font-size: 10px; white-space: nowrap; }
.alert-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.alert-actions .btn-small { min-height: 32px; font-size: 12px; }
.alert-item[data-alert-openable] { cursor: pointer; }
.alert-item[data-alert-openable]:hover { border-color: var(--line-strong); }

@keyframes widok-alert-attention-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(216, 67, 58, .42); }
  50% { box-shadow: 0 0 0 6px rgba(216, 67, 58, 0); }
}
.alert-item.alert-needs-attention { border-color: rgba(216, 67, 58, .42); box-shadow: 0 5px 18px rgba(216, 67, 58, .08); }
.alert-item.alert-needs-attention > .alert-symbol { position: relative; }
.alert-attention-marker { position: absolute; z-index: 3; top: -7px; right: -7px; width: 18px; height: 18px; display: inline-grid; place-items: center; border: 2px solid #fff; border-radius: 50%; background: var(--red); color: #fff; font-size: 10px; font-weight: 900; line-height: 1; animation: widok-alert-attention-pulse 1.5s ease-in-out infinite; }
.alert-attention-inline { position: relative; top: -1px; width: 17px; height: 17px; margin-left: 7px; border-width: 1px; vertical-align: middle; }
@media (prefers-reduced-motion: reduce) { .alert-attention-marker { animation: none; box-shadow: 0 0 0 3px rgba(216, 67, 58, .16); } }

.timeline-item { display: grid; grid-template-columns: 52px 12px minmax(0,1fr); gap: 8px; }
.timeline-time { padding-top: 2px; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.timeline-line { position: relative; display: flex; justify-content: center; }
.timeline-line::before { content: ""; position: absolute; top: 12px; bottom: -14px; width: 1px; background: #dfe5e8; }
.timeline-item:last-child .timeline-line::before { display: none; }
.timeline-dot { position: relative; z-index: 1; width: 8px; height: 8px; margin-top: 3px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.timeline-dot.red { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.timeline-content { padding-bottom: 14px; }
.timeline-content h4 { margin: 0; font-size: 11px; }
.timeline-content p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.timeline-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 6px; color: var(--soft); font-size: 9px; }
.timeline-meta-spacer { flex: 1 1 auto; }
.timeline-actions { margin-top: 7px !important; padding: 7px 9px; border-left: 3px solid var(--teal); border-radius: 0 7px 7px 0; background: #f2f9f8; color: var(--ink) !important; }
.timeline-entry-open { min-height: 27px; padding: 4px 9px; border: 1px solid #9fc8c3; border-radius: 7px; background: #fff; color: var(--teal); cursor: pointer; font-size: 9px; font-weight: 750; white-space: nowrap; }
.timeline-entry-open:hover { border-color: var(--teal); background: var(--teal-soft); }
.timeline-dispatch-status { color: var(--green); font-weight: 750; }
.timeline-merge-status { color: var(--blue); font-weight: 750; }

.merge-alert-modal .modal-body { display: grid; gap: 14px; }
.merge-alert-summary,
.merge-alert-preview { display: grid; gap: 4px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: #f7fafb; }
.merge-alert-summary span,
.merge-alert-preview span { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.merge-alert-summary strong,
.merge-alert-preview strong { color: var(--ink); font-size: 12px; line-height: 1.35; }
.merge-alert-summary small,
.merge-alert-preview small { color: var(--muted); font-size: 10px; line-height: 1.4; }

.duty-card { padding: 17px; border-radius: 12px; color: #fff; background: linear-gradient(130deg, var(--navy-900), #1d4a5a); box-shadow: var(--shadow); }
.duty-card-top { display: flex; align-items: center; justify-content: space-between; }
.duty-card small { color: #a8bdc5; font-size: 10px; }
.duty-card h3 { margin: 16px 0 4px; font-size: 18px; }
.duty-card p { margin: 0; color: #c6d5da; font-size: 11px; }
.duty-card footer { display: flex; justify-content: space-between; align-items: end; margin-top: 23px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.13); }
.duty-card .elapsed { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

.progress-row { margin-bottom: 14px; }
.progress-row:last-child { margin-bottom: 0; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 10px; }
.progress-label span:last-child { color: var(--muted); }
.progress { height: 7px; border-radius: 5px; background: #edf1f2; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.progress > i.amber { background: var(--amber); }
.progress > i.red { background: var(--red); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.form-group { min-width: 0; }
.form-group.full { grid-column: 1 / -1; }
label { display: block; margin-bottom: 6px; color: #52636c; font-size: 12px; font-weight: 650; }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); outline: none; padding: 9px 10px; font-size: 11px; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20,127,122,.1); }
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.dispatch-message-form { align-items: start; }
.dispatch-message-form > .form-group:not(.full) { display: grid; grid-template-rows: auto 38px; align-content: start; }
.dispatch-message-form > .form-group:not(.full) > label { align-self: end; }
.dispatch-message-form > .form-group:not(.full) > :is(input, select) {
  box-sizing: border-box;
  height: 38px;
  min-height: 38px;
  margin: 0;
  padding: 8px 10px;
}
.field-help { margin-top: 5px; color: var(--soft); font-size: 9px; }
.entity-autocomplete-control { position: relative; }
.entity-autocomplete-list {
  position: absolute;
  z-index: 35;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  max-height: 270px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 35px rgba(7,23,31,.18);
}
.entity-autocomplete-list[hidden] { display: none; }
.entity-autocomplete-option {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 4px 12px;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.entity-autocomplete-option:hover,
.entity-autocomplete-option.active { background: #edf8f7; }
.entity-autocomplete-option strong { min-width: 0; overflow-wrap: anywhere; font-size: 10px; line-height: 1.35; }
.entity-autocomplete-option small { grid-column: 1; color: var(--muted); font-size: 9px; line-height: 1.35; }
.entity-autocomplete-kind {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 8px;
  font-weight: 750;
  white-space: nowrap;
}
.entity-autocomplete-empty { padding: 10px; color: var(--muted); font-size: 9px; text-align: center; }
.entity-autocomplete-help.selected { color: var(--green); font-weight: 700; }
.check-row { display: flex; align-items: center; gap: 8px; }
.check-row input { width: 15px; height: 15px; }

.availability-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.availability-box { padding: 11px; border: 1px solid var(--line); border-radius: 9px; text-align: center; background: #fff; }
.availability-box strong { display: block; font-size: 19px; }
.availability-box span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.availability-box.available { border-color: #b9d8c8; background: #f6fbf8; }
.availability-box.available strong { color: var(--green); }
.availability-box.unavailable { border-color: #ebcac7; background: #fff9f8; }
.availability-box.unavailable strong { color: var(--red); }

.contact-item, .file-item { padding: 11px 12px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; }
.contact-icon, .file-icon { width: 31px; height: 31px; flex: 0 0 auto; border-radius: 8px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.contact-item strong, .file-item strong { display: block; font-size: 11px; }
.contact-item small, .file-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.contact-item .btn, .file-item .btn { margin-left: auto; }

.empty-state { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty-state-symbol { width: 42px; height: 42px; margin: 0 auto 12px; border-radius: 12px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-weight: 800; }
.empty-state h3 { margin: 0 0 5px; color: var(--ink); font-size: 14px; }
.empty-state p { margin: 0; font-size: 11px; }

.notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 13px; border: 1px solid #c9dfe8; border-radius: 10px; background: #f3f9fc; color: #375d70; font-size: 11px; line-height: 1.5; }
.notice[hidden] { display: none !important; }
.notice.warning { border-color: #ead7b9; background: #fffaf1; color: #76521f; }
.notice.critical { border-color: #ecc8c5; background: #fff7f6; color: #843a34; }
.notice strong { color: inherit; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 20px; background: rgba(7,23,31,.52); backdrop-filter: blur(3px); }
.modal-backdrop.open { display: grid; }
.modal { width: min(540px, 100%); max-height: 86vh; overflow-y: auto; border-radius: 14px; background: #fff; box-shadow: 0 30px 70px rgba(0,0,0,.25); }
.modal-head { padding: 17px 19px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-close { border: 0; width: 30px; height: 30px; border-radius: 8px; background: var(--canvas); cursor: pointer; }
.modal-body { padding: 18px 19px; }
.modal-footer { padding: 13px 19px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); background: #fbfcfc; }
.auth-modal { width: min(570px, 100%); }
.auth-modal .modal-head > div { min-width: 0; }
.auth-step-label { margin: 3px 0 0; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.auth-stage[hidden],
.auth-error[hidden],
#auth-modal-close[hidden] { display: none; }
.auth-demo-notice { display: grid; grid-template-columns: auto 1fr; margin-bottom: 15px; }
.auth-demo-notice code { display: inline-block; padding: 1px 5px; border-radius: 5px; background: #e4eef2; color: var(--navy-900); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 800; }
.auth-form-grid { gap: 11px; }
.auth-password-control { position: relative; }
.auth-password-control input { padding-right: 66px; }
.auth-password-control button { position: absolute; top: 50%; right: 5px; min-width: 52px; padding: 6px 8px; border: 0; border-radius: 6px; background: var(--canvas); color: var(--teal); cursor: pointer; font: inherit; font-size: 9px; font-weight: 750; transform: translateY(-50%); }
.auth-error { margin-top: 12px; }
.auth-context-field { margin-top: 15px; }
.auth-context-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafb; }
.auth-context-summary > div { min-width: 0; }
.auth-context-summary span:not(.status) { display: block; margin-bottom: 3px; color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.auth-context-summary strong { display: block; overflow-wrap: anywhere; color: var(--ink); font-size: 10px; line-height: 1.35; }
.auth-session-footer { display: grid; grid-template-columns: auto 1fr auto auto; }
.auth-logout { color: var(--red); }
@media (max-width: 560px) {
  .auth-demo-notice { grid-template-columns: 1fr; }
  .auth-context-summary { grid-template-columns: 1fr; }
  .auth-session-footer { grid-template-columns: 1fr 1fr; }
  .auth-session-footer > span { display: none; }
}

/* Formularz wpisu WKRM: przewija się wyłącznie treść, a działania pozostają widoczne. */
#newEntry .modal {
  width: min(600px, 100%);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#newEntry .modal-head,
#newEntry .modal-footer { flex: 0 0 auto; }
#newEntry .modal-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 14px 19px;
}
#newEntry .form-grid { gap: 10px 12px; }
#newEntry textarea { min-height: 74px; }
#newEntry .modal-footer {
  position: relative;
  z-index: 1;
  box-shadow: 0 -8px 18px rgba(7,23,31,.05);
}
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 120; max-width: 360px; padding: 12px 15px; border-radius: 10px; background: var(--navy-950); color: #fff; box-shadow: 0 15px 35px rgba(7,23,31,.28); font-size: 11px; transform: translateY(18px); opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { transform: none; opacity: 1; }

.offline-bar { display: none; position: fixed; z-index: 200; left: 0; right: 0; bottom: 0; padding: 9px 20px; background: #8f4b0d; color: #fff; text-align: center; font-size: 11px; box-shadow: 0 -5px 16px rgba(0,0,0,.12); }
body.simulate-offline .offline-bar { display: block; }
body.simulate-offline .online-dot { background: var(--amber); }

.kpi-inline { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.kpi-inline > span { color: var(--muted); font-size: 10px; }
.kpi-inline strong { margin-right: 4px; color: var(--ink); font-size: 13px; }
.search { position: relative; }
.search input { padding-left: 30px; min-width: 220px; }
.search::before { content: "⌕"; position: absolute; z-index: 1; left: 10px; top: 8px; color: var(--soft); }
.pill-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 6px 9px; color: var(--muted); font-size: 10px; cursor: pointer; }
.pill.active { border-color: var(--navy-900); background: var(--navy-900); color: #fff; }
.callout-number { font-size: 34px; letter-spacing: -.05em; font-weight: 750; }
.live-pulse { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 10px; font-weight: 700; }
.live-pulse::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px var(--green-soft); }
.report-cover { padding: 24px; border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(150deg, #fff, #f5f8f9); }
.report-cover .report-type { color: var(--teal); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.report-cover h3 { margin: 8px 0 3px; font-size: 21px; letter-spacing: -.035em; }
.report-cover p { margin: 0; color: var(--muted); font-size: 11px; }
.report-cover footer { margin-top: 30px; display: flex; justify-content: space-between; color: var(--soft); font-size: 9px; }

button:disabled { cursor: default; opacity: .62; }
.required-mark { color: var(--red); }
.field-error { display: none; margin-top: 5px; color: var(--red); font-size: 10px; font-weight: 650; }
.field-error.show { display: block; }
input.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(198,67,58,.1); }
.communication-option { margin-top: 9px; padding: 10px 11px; border: 1px solid #c9dfe8; border-radius: 9px; background: #f4f9fb; color: #375d70; line-height: 1.4; }
.communication-option span { font-size: 10px; }
.conditional-field { display: none; margin-top: 8px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfc; }
.conditional-field.show { display: block; }
.dispatch-centres-note { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 500; }
.form-actions { display: flex; justify-content: flex-end; }
.form-feedback { margin-top: 13px; }
.notice.success { border-color: #bedbc9; background: #f3faf6; color: var(--green); }

.duty-card-compact { padding: 12px 14px; }
.duty-side-stack { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; }
.duty-side-stack > * { flex: 0 0 auto; align-self: stretch; height: max-content; min-height: 0; }
.duty-card-compact h3 { margin: 8px 0 2px; font-size: 15px; }
.duty-card-compact p { font-size: 10px; }
.duty-card-compact footer { margin-top: 10px; padding-top: 9px; align-items: center; }
.duty-card-compact .elapsed { font-size: 17px; }
.duty-card-compact .btn { min-height: 31px; padding: 5px 9px; }
.wkrm-dispatch-presence { height: max-content; min-height: 0; }
.wkrm-dispatch-presence .card-header { padding: 9px 12px; }
.wkrm-dispatch-presence .card-header h3 { font-size: 14px; }
.dispatch-presence-list { padding: 7px 9px 9px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.dispatch-presence-centre { min-width: 0; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fafcfc; }
.dispatch-presence-centre > header { margin-bottom: 4px; padding-bottom: 4px; display: flex; align-items: center; justify-content: space-between; gap: 5px; border-bottom: 1px solid var(--line); }
.dispatch-presence-centre > header div { min-width: 0; }
.dispatch-presence-centre > header strong, .dispatch-presence-centre > header span { display: block; }
.dispatch-presence-centre > header strong { font-size: 12px; }
.dispatch-presence-centre > header div span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.dispatch-presence-centre > header .status { padding: 3px 6px; font-size: 9px; }
.dispatch-presence-person { padding: 3px 0; display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; column-gap: 6px; }
.dispatch-presence-person > span { grid-row: 1 / span 2; color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.dispatch-presence-person strong { min-width: 0; font-size: 12px; line-height: 1.25; overflow-wrap: anywhere; }
.dispatch-presence-person small { margin-top: 1px; color: var(--soft); font-size: 9.5px; line-height: 1.2; }
.sort-control { margin: 0 3px 0 auto; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.sort-control select { width: auto; min-width: 160px; padding: 6px 8px; font-size: 10px; }

.alert-item.handled { border-color: #dfe4e6; border-left-color: #aeb9be; background: #f3f5f6; color: #5f6d73; }
.alert-item.handled .alert-symbol { color: #718087; background: #e5e9eb; }
.alert-item.handled h4, .alert-item.handled p { color: #5f6d73; }
.alert-item.handled .btn-read-alert { color: #738087; border-color: #cbd3d6; background: #edf0f1; }
.handled-label { margin-top: 6px; }
.alert-item[hidden], .side-badge[hidden], .status[hidden], .dispatch-alert-empty[hidden], .side-link[hidden] { display: none !important; }

.filter-panel { margin: -5px 0 8px; padding: 13px; display: grid; grid-template-columns: minmax(220px, 1.5fr) minmax(170px, 1fr) minmax(160px, .8fr) auto auto; gap: 9px; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 3px 12px rgba(18,39,50,.03); }
.filter-panel.availability-filter-panel { grid-template-columns: minmax(210px, 1.35fr) minmax(150px, .95fr) minmax(145px, .8fr) minmax(145px, .8fr) auto auto; }
.filter-panel .search input { min-width: 0; }
.facility-list { margin-top: 15px; display: grid; gap: 9px; }
.facility-group { border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 3px 12px rgba(18,39,50,.03); overflow: hidden; }
.facility-group > summary { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; list-style: none; }
.facility-group > summary::-webkit-details-marker { display: none; }
.facility-group > summary:hover { background: #f9fbfb; }
.facility-summary-main { min-width: 0; display: flex; align-items: center; gap: 12px; }
.facility-summary-main h3 { margin: 0; font-size: 13px; }
.facility-summary-main p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.facility-chevron { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 7px; background: var(--teal-soft); color: var(--teal); font-size: 19px; line-height: 1; transition: transform .16s ease; }
.facility-group[open] .facility-chevron { transform: rotate(90deg); }
.facility-summary-side { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.facility-admin-note { max-width: 150px; color: var(--soft); font-size: 8px; line-height: 1.35; text-align: right; }
.facility-departments { border-top: 1px solid var(--line); background: #fafcfc; }
.facility-departments table { min-width: 900px; }
.facility-departments tbody tr:last-child td { border-bottom: 0; }
.facility-departments .entity small { color: var(--soft); }
.selected-department td { background: #edf8f7 !important; box-shadow: inset 0 1px 0 #c9e7e4, inset 0 -1px 0 #c9e7e4; }

.province-availability-summary { margin-bottom: 14px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.province-availability-summary > div { padding: 12px 14px; display: flex; align-items: baseline; gap: 7px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 3px 12px rgba(18,39,50,.03); }
.province-availability-summary strong { color: var(--navy-900); font-size: 18px; font-variant-numeric: tabular-nums; }
.province-availability-summary span { color: var(--muted); font-size: 9px; }
.province-facility .facility-summary-side .status { min-width: 82px; justify-content: center; }
.province-departments table { min-width: 1100px; table-layout: fixed; }
.province-departments th, .province-departments td { padding: 12px 14px; }
.province-departments th:nth-child(1), .province-departments td:nth-child(1) { width: 40%; }
.province-departments th:nth-child(2), .province-departments td:nth-child(2) { width: 140px; }
.province-departments th:nth-child(3), .province-departments td:nth-child(3) { width: 180px; }
.province-departments th:nth-child(4), .province-departments td:nth-child(4) { width: 150px; }
.province-departments th:nth-child(5), .province-departments td:nth-child(5) { width: 205px; }
.province-departments .entity strong { font-size: 11px; line-height: 1.35; }
.province-departments .entity small { margin-top: 4px; font-size: 8.5px; line-height: 1.35; }
.province-update-cell, .province-contact-cell { vertical-align: middle; }
.province-update-stack { display: grid; align-content: center; gap: 3px; min-width: 0; }
.province-update-time { display: block; color: var(--ink); font-size: 10.5px; line-height: 1.25; font-weight: 750; font-variant-numeric: tabular-nums; }
.province-report-source { display: block; color: var(--soft); font-size: 8.5px; line-height: 1.35; font-weight: 500; overflow-wrap: anywhere; }
.province-contact-placeholder { display: grid; gap: 3px; color: var(--muted); line-height: 1.35; }
.province-contact-placeholder strong { display: block; color: #53646d; font-size: 9.5px; font-weight: 650; }
.province-contact-placeholder small { display: block; color: var(--soft); font-size: 8px; font-weight: 450; }
.province-availability-controls { flex-wrap: wrap; }
.province-availability-controls .search { flex: 1 1 240px; }
.province-hide-unavailable { min-height: 36px; white-space: nowrap; }
.province-contact-list { display: grid; gap: 6px; }
.province-contact-number { display: grid; gap: 1px; padding: 4px 6px; border: 1px solid #d8e6e5; border-radius: 7px; background: #f4f9f8; color: var(--teal); line-height: 1.25; }
.province-contact-number:hover { border-color: #94c8c4; background: #eaf6f4; }
.province-contact-number strong { font-size: 9.5px; font-variant-numeric: tabular-nums; }
.province-contact-number small { color: var(--muted); font-size: 7.5px; overflow-wrap: anywhere; }

.decision-detection { display: none; margin-top: 9px; padding: 10px 12px; border: 1px solid #eaa8a2; border-left: 4px solid var(--red); border-radius: 8px; background: var(--red-soft); color: #9c3029; font-size: 9px; line-height: 1.5; }
.decision-detection.show { display: block; }
.patient-data-warning { margin-top: 9px; font-size: 10px; line-height: 1.5; }
.timeline-item.administrative-decision .timeline-content { margin: -7px 0 9px; padding: 11px 12px; border: 1px solid #edb9b4; border-left: 4px solid var(--red); border-radius: 9px; background: var(--red-soft); }
.timeline-item.administrative-decision .timeline-content h4 { color: #952c25; }
.decision-badge { display: inline-flex; padding: 4px 7px; border-radius: 6px; background: #d8433a !important; color: #fff !important; font-size: 8px; font-weight: 780; letter-spacing: .035em; text-transform: uppercase; }
.row-administrative-decision td { background: #fff0ef !important; color: #832a24; }
.row-administrative-decision td:first-child { box-shadow: inset 4px 0 0 var(--red); }
.decision-scan-warning { display: block; margin-top: 5px; color: var(--red); font-size: 8.5px; font-weight: 700; }
.entry-attachment-link { margin: -3px 0; padding: 3px 6px; border: 1px solid currentColor; border-radius: 6px; background: rgba(255,255,255,.72); color: var(--teal); cursor: pointer; font: inherit; font-weight: 700; }
.entry-attachment-link.missing { color: var(--red); }
.entry-attachment-link.attached { color: var(--green); }
.entry-attachment-list { display: grid; gap: 8px; }
.entry-attachment-item { padding: 11px 12px; display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.entry-attachment-item.missing-required, .decision-file-item.missing-required { border-color: #e6aaa4; border-left: 4px solid var(--red); background: #fff7f6; }
.entry-attachment-copy { min-width: 0; }
.entry-attachment-copy strong, .entry-attachment-copy small { display: block; }
.entry-attachment-copy strong { font-size: 11px; line-height: 1.4; }
.entry-attachment-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.entry-attachment-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
#entry-attachment-context > div { min-width: 0; }
#entry-attachment-context strong, #entry-attachment-context span { display: block; }
#entry-attachment-context span { margin-top: 5px; }
.filter-check { min-height: 38px; padding: 0 6px; white-space: nowrap; }
.filter-check span { color: var(--ink); font-size: 10px; font-weight: 650; }
.filter-result { min-height: 24px; margin-bottom: 8px; color: var(--muted); font-size: 10px; text-align: right; }

.modal-wide { width: min(900px, 100%); }
.report-entry-details-modal { width: min(760px, 100%); max-height: calc(100dvh - 32px); overflow: hidden; display: flex; flex-direction: column; }
.report-entry-details-modal form { min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; }
.report-entry-details-modal .modal-head, .report-entry-details-modal .modal-footer { flex: 0 0 auto; }
.report-entry-details-modal .modal-body { min-height: 0; flex: 1 1 auto; overflow-y: auto; }
.report-entry-summary { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin-bottom: 16px; }
.report-entry-summary > div { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #f7f9fa; }
.report-entry-summary span { display: block; color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; }
.report-entry-summary strong { display: block; margin-top: 4px; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.report-entry-summary .full { grid-column: 1 / -1; }
.report-entry-edit-grid textarea { min-height: 105px; }
.report-entry-dispatch-state { min-height: 37px; display: flex; align-items: center; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); color: var(--muted); font-size: 10px; line-height: 1.35; }
.report-entry-dispatch-state.sent { border-color: #bedbc9; background: #f3faf6; color: var(--green); font-weight: 700; }
.modal-report { width: min(980px, 100%); overflow: hidden; display: flex; flex-direction: column; }
.modal-report .modal-head, .modal-report .modal-footer { flex: 0 0 auto; }
.modal-report .modal-body { min-height: 0; padding: 24px; overflow-y: auto; }
.detail-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 16px; }
.detail-heading h3 { margin: 4px 0; font-size: 21px; letter-spacing: -.03em; }
.detail-heading p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--teal); font-size: 9px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.detail-summary { margin-bottom: 18px; }
.detail-section { margin-top: 18px; }
.detail-section h4 { margin: 0 0 9px; font-size: 13px; }
.detail-section > p { color: var(--muted); line-height: 1.65; }
.detail-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.detail-grid > div { padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfb; }
.detail-grid span, .detail-grid small { display: block; color: var(--muted); font-size: 9px; }
.detail-grid strong { display: block; margin-top: 4px; font-size: 11px; line-height: 1.45; }
.detail-grid small { margin-top: 4px; }

.recent-report-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; }
.recent-report-grid.manager-recent { grid-template-columns: repeat(5, minmax(0,1fr)); }
.compact-report { padding: 17px; }
.compact-report h3 { font-size: 16px; }
.compact-report footer { margin-top: 18px; align-items: center; gap: 8px; }
.inline-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.table-action.secondary { color: var(--muted); }
.report-browser { display: grid; grid-template-columns: minmax(340px, .78fr) minmax(0, 1.22fr); gap: 14px; align-items: start; }
.calendar-card .card-header { text-align: center; }
.calendar { padding: 14px; display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 5px; }
.calendar-weekday { padding: 5px 0; color: var(--muted); font-size: 9px; font-weight: 750; text-align: center; }
.calendar-day { position: relative; min-height: 47px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.calendar-day:not(:disabled):hover { background: var(--teal-soft); }
.calendar-day.has-reports { border-color: #c9dddc; background: #f7fbfb; }
.calendar-day.selected { border-color: var(--navy-900); background: var(--navy-900); color: #fff; }
.calendar-day:disabled { opacity: .36; }
.calendar-day span { display: block; font-size: 11px; font-weight: 700; }
.calendar-day small { display: block; margin-top: 3px; color: var(--teal); font-size: 8px; }
.calendar-day.selected small { color: #bce5e2; }
.report-day-list { display: grid; gap: 8px; }
.report-list-item { padding: 11px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; }
.report-list-item strong { display: block; font-size: 11px; }
.report-list-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.report-item-actions { display: flex; gap: 6px; }
.report-document { color: var(--ink); }
.report-document > header { padding: 2px 0 18px; border-bottom: 2px solid var(--navy-900); }
.report-document h2 { margin: 7px 0 6px; max-width: 100%; font-size: 24px; line-height: 1.18; letter-spacing: -.035em; overflow-wrap: anywhere; }
.report-document > header p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.report-document > h3 { margin: 22px 0 10px; font-size: 14px; }
.report-meta { padding: 16px 0 4px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.report-meta-item { min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafb; }
.report-meta-item span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .075em; text-transform: uppercase; }
.report-meta-item strong { display: block; color: var(--ink); font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.report-document .table-wrap { border: 1px solid var(--line); border-radius: 9px; overflow-x: auto; }
.report-document th { padding: 11px 13px; }
.report-document td { padding: 12px 13px; line-height: 1.45; }
.zgdm-daily-report-document { padding-bottom: 16px; }
.zgdm-daily-report-document > header { padding: 14px 16px 18px; }
.zgdm-daily-report-document > .report-meta { margin-right: 16px; margin-left: 16px; }
.zgdm-daily-report-document > h3 { margin-right: 16px; margin-left: 16px; }
.zgdm-daily-report-document > .table-wrap { margin-right: 16px; margin-left: 16px; }
.report-time { color: var(--navy-800); font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-category { display: inline-flex; padding: 4px 7px; border-radius: 6px; background: var(--blue-soft); color: var(--blue); font-size: 9px; font-weight: 700; white-space: nowrap; }
.report-missing { margin-top: 16px; padding: 13px 14px; display: grid; grid-template-columns: minmax(150px,.32fr) minmax(0,1fr); gap: 14px; align-items: center; }
.report-missing-title strong { display: block; }
.report-missing-title small { display: block; margin-top: 3px; color: inherit; opacity: .72; font-size: 9px; }
.report-missing-list { display: flex; flex-wrap: wrap; gap: 6px; }
.report-missing-list span { padding: 5px 8px; border: 1px solid currentColor; border-radius: 7px; background: rgba(255,255,255,.55); font-size: 9px; font-weight: 650; }

.phonebook-list { display: grid; gap: 9px; }
.phone-entity { border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 3px 12px rgba(18,39,50,.03); overflow: hidden; }
.phone-entity > summary { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.phone-entity > summary::-webkit-details-marker { display: none; }
.phone-entity > summary h3 { margin: 0; font-size: 14px; }
.phone-entity > summary p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.details-hint { color: var(--teal); font-size: 10px; font-weight: 650; }
.phone-entity[open] .details-hint { font-size: 0; }
.phone-entity[open] .details-hint::after { content: "Zwiń dane"; font-size: 10px; }
.phone-contact-list { padding: 14px 16px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; border-top: 1px solid var(--line); background: #fafbfb; }
.phone-contact { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.phone-contact.added-contact { border-color: #bed8e3; box-shadow: inset 3px 0 0 var(--blue); }
.phone-contact.private-contact { border-color: #efc8c3; box-shadow: inset 3px 0 0 var(--red); }
.phone-contact.official-contact { border-color: #c8e2d4; box-shadow: inset 3px 0 0 var(--green); }
.phone-contact > header { display: flex; justify-content: space-between; gap: 10px; }
.phone-contact > header strong, .phone-contact > header small { display: block; }
.phone-contact > header small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.phone-contact dl { margin: 12px 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.phone-contact dl div { min-width: 0; }
.phone-contact dt { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.phone-contact dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 10px; font-weight: 650; }
.phone-number-list { margin: 12px 0; display: grid; gap: 6px; }
.phone-number-list > div { min-height: 43px; padding: 7px 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafb; }
.phone-number-list span small, .phone-number-list span strong { display: block; }
.phone-number-list span small { color: var(--muted); font-size: 8px; }
.phone-number-list span strong { margin-top: 2px; font-size: 10px; }
.phone-number-empty { margin: 12px 0; padding: 10px; border: 1px dashed #cbd5d9; border-radius: 8px; color: var(--muted); background: #f8fafb; font-size: 9px; line-height: 1.45; }
.operational-note { min-height: 34px; margin: 0 0 10px; padding: 8px; border-radius: 7px; background: var(--amber-soft); color: #76521f; font-size: 9px; line-height: 1.45; }
.phonebook-help { margin-top: 10px; text-align: right; }
.settings-card { max-width: 760px; }

.orm-transfer-layout { align-items: start; }
.orm-outbox-item { align-items: flex-start; }
.orm-outbox-item .status { margin-left: auto; }
.inbox-list { display: grid; gap: 10px; }
.inbox-item { padding: 15px; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 3px 12px rgba(18,39,50,.03); }
.inbox-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-weight: 800; }
.inbox-content > header { display: flex; justify-content: space-between; gap: 12px; }
.inbox-content h3 { margin: 0; font-size: 13px; }
.inbox-content header p, .inbox-content > p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.inbox-meta { margin: 10px 0; padding: 9px; display: flex; gap: 18px; flex-wrap: wrap; border-radius: 8px; background: #f7f9fa; color: var(--muted); font-size: 9px; }
.inbox-meta strong { color: var(--ink); }
.inbox-item.inbox-read { border-color: #dfe4e6; background: #f4f6f7; opacity: .82; }
.inbox-item.inbox-read .inbox-icon { color: #738087; background: #e5e9eb; }
.metric strong.metric-text { font-size: 16px; letter-spacing: -.02em; }
.dispatch-centre-chip { text-transform: uppercase; letter-spacing: .05em; }
.generated-report-card { margin-top: 10px; }

.shared-phonebook-list { display: grid; gap: 7px; }
.role-phonebook-notice { margin-bottom: 14px; }
.contact-pending { color: var(--muted); font-size: 9px; }
.hospital-unit-banner { margin-bottom: 10px; }
.phone-editor-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.department-phone-fields { display: grid; gap: 9px; }
.department-phone-field { display: grid; grid-template-columns: minmax(180px,1fr) minmax(180px,1fr) auto; align-items: end; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafb; }
.phone-count-cell strong, .phone-count-cell span { display: block; }
.phone-count-cell span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.compact-phone-entity { border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 2px 9px rgba(18,39,50,.025); overflow: hidden; }
.compact-phone-entity > summary { min-height: 56px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.compact-phone-entity > summary::-webkit-details-marker { display: none; }
.compact-phone-entity > summary:hover { background: #f8fbfb; }
.compact-phone-entity > summary h3 { margin: 0; font-size: 12px; }
.compact-phone-entity > summary p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.compact-phone-contacts { border-top: 1px solid var(--line); background: #fafcfc; }
.compact-phone-row { min-height: 52px; padding: 8px 14px; display: grid; grid-template-columns: minmax(210px,1.2fr) minmax(130px,.6fr) minmax(190px,1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.compact-phone-row:last-child { border-bottom: 0; }
.compact-phone-row strong, .compact-phone-row small { display: block; }
.compact-phone-row strong { font-size: 10px; }
.compact-phone-row small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.compact-phone-row a { color: var(--teal); font-size: 9px; font-weight: 650; overflow-wrap: anywhere; }
.compact-phone-numbers span { display: block; font-size: 10px; font-weight: 720; }

.manager-duty-roster { padding: 14px; }
.manager-duty-roster .duty-card-top { margin-bottom: 10px; }
.manager-duty-roster .active-person { padding: 8px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.11); }
.manager-duty-roster .active-person span { display: block; color: #9fc0c9; font-size: 8px; font-weight: 780; letter-spacing: .08em; }
.manager-duty-roster .active-person strong { display: block; margin-top: 2px; color: #fff; font-size: 11px; }
.manager-duty-roster .wkrm-person strong { font-size: 14px; }
.active-person-contact { display: grid; gap: 3px; text-align: right; }
.active-person-contact a { color: #d6f2ef; font-size: 9px; font-weight: 680; }
.dispatch-roster { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-top: 9px; }
.dispatch-roster section { padding: 9px; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; background: rgba(255,255,255,.04); }
.dispatch-roster section > header { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 5px; border-bottom: 1px solid rgba(255,255,255,.1); }
.dispatch-roster section > header strong { color: #fff; font-size: 10px; }
.dispatch-roster section > header span { color: #9fc0c9; font-size: 8px; }
.manager-duty-roster footer { margin-top: 10px; padding-top: 9px; }
.duty-report-code { max-width: 190px; text-align: right; }
.duty-report-code strong { display: block; margin-top: 4px; color: #fff; font-size: 8px; overflow-wrap: anywhere; }

.role-choice-grid { padding: 10px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfb; }
.account-danger-zone { margin-top: 16px; padding: 13px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #efc1bd; border-radius: 9px; background: var(--red-soft); }
.account-danger-zone[hidden] { display: none; }
.account-danger-zone strong { font-size: 11px; color: #922f28; }
.account-danger-zone p { margin: 3px 0 0; color: #9b625d; font-size: 9px; }
.dispatch-centre-admin-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.dispatch-centre-admin .detail-grid + .btn { margin-top: 14px; }
.dispatch-centre-admin.is-inactive { opacity: .68; }
.dispatcher-identity-button { min-width: 190px; padding: 7px 10px; border: 1px solid #cbd8dc; border-radius: 9px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.dispatcher-identity-button span, .dispatcher-identity-button strong { display: block; }
.dispatcher-identity-button span { color: var(--muted); font-size: 7px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.dispatcher-identity-button strong { margin-top: 2px; font-size: 9px; }
.dispatcher-break-button { white-space: nowrap; }
.dispatcher-break-button .dispatcher-break-dot { width: 7px; height: 7px; display: inline-block; margin-right: 6px; border-radius: 50%; background: var(--amber); }
.dispatcher-break-button.is-active { border-color: #e0b66f; background: var(--amber-soft); color: #8e5915; }
.dispatcher-break-button.is-active .dispatcher-break-dot { background: var(--red); }
.dispatcher-routing-chip { white-space: nowrap; }
.dispatcher-routing-banner { margin: -3px 0 14px; }
.dispatcher-routing-banner[hidden] { display: none; }
.dispatch-routed-away { opacity: .72; }
.dispatch-routed-away .alert-item { background: #f5f7f8; }
.dispatch-message-handled { border-color: #dfe4e6; box-shadow: none; }
.dispatch-message-handled .card-header { background: #f3f5f6; }
.dispatch-message-handled .card-header h3,
.dispatch-message-handled .card-header p { color: #7d8a90; }
.dispatch-message-handled .card-body { background: #f7f8f8; }
.user-directory-controls { display: grid; grid-template-columns: minmax(180px,.8fr) minmax(190px,1fr) minmax(240px,1.3fr) auto auto; gap: 10px; align-items: end; margin: -2px 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.user-directory-controls .form-group { margin: 0; }
.filter-result-count { align-self: center; justify-self: end; color: var(--muted); font-size: 10px; font-weight: 750; white-space: nowrap; }
.user-role-stack { display: flex; flex-wrap: wrap; gap: 4px; }
.user-unit-stack { display: grid; gap: 3px; }
.user-unit-stack span { display: block; font-size: 11px; font-weight: 720; line-height: 1.25; }
.user-unit-stack span + span { padding-top: 4px; border-top: 1px solid #edf0f1; }
.user-assignment-list { display: grid; gap: 7px; }
.user-assignment-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: #f7f9fa; }
.user-assignment-item div { min-width: 0; }
.user-assignment-item strong, .user-assignment-item small { display: block; }
.user-assignment-item small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.existing-user-results { display: grid; gap: 5px; margin-top: 7px; }
.existing-user-result { width: 100%; display: grid; grid-template-columns: minmax(160px,.7fr) minmax(220px,1.3fr); gap: 12px; align-items: center; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.existing-user-result:hover { border-color: var(--teal); background: #f2fbfa; }
.existing-user-result strong, .existing-user-result small { display: block; }
.existing-user-result small, .existing-user-result em { margin-top: 2px; color: var(--muted); font-size: 10px; font-style: normal; }
.existing-user-empty { padding: 9px 10px; border-radius: 8px; background: #f4f6f7; color: var(--muted); font-size: 10px; }
.conflict-assignment-summary { margin: 12px 0; }
.conflict-person { margin-bottom: 8px; }
.conflict-person strong, .conflict-person span { display: block; }
.conflict-person span { color: var(--muted); font-size: 11px; }
.dispatch-active-coverage { border-color: #9fcfc9; box-shadow: 0 0 0 2px rgba(20,127,122,.08); }

.central-full-access { margin: -4px 0 16px; border-color: #afd6d2; background: #eef9f8; color: #245a57; }
.central-scope-note { margin-bottom: 14px; }
.central-editor-section { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.central-editor-section > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.central-editor-section h4 { margin: 0; font-size: 13px; }
.central-editor-section p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.central-department-list, .central-report-entry-list { margin-top: 12px; display: grid; gap: 8px; }
.central-department-row { padding: 10px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 10px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafb; }
.central-department-row label span, .central-report-entry label span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 720; letter-spacing: .05em; text-transform: uppercase; }
.central-department-row input, .central-report-entry input { width: 100%; }
.central-department-detail-row { grid-template-columns: minmax(260px,1.55fr) minmax(155px,.8fr) 80px 92px minmax(210px,1.15fr) auto; align-items: end; }
.central-department-detail-row > label { min-width: 0; }
.central-department-detail-row textarea { width: 100%; min-height: 54px; padding: 8px 9px; resize: vertical; }
.central-department-active-field .check-row { min-height: 36px; margin: 0; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.central-department-active-field .check-row span { margin: 0; color: var(--ink); font-size: 9px; letter-spacing: 0; text-transform: none; }
#centralHospitalEditor { padding: 16px; }
#centralHospitalEditor .modal { width: min(1080px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: hidden; display: flex; flex-direction: column; }
#centralHospitalEditor .modal-head,
#centralHospitalEditor .modal-footer { flex: 0 0 auto; }
#centralHospitalEditor #central-hospital-form { min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; }
#centralHospitalEditor .modal-body { min-height: 0; display: block; flex: 1 1 auto; overflow-x: hidden; overflow-y: auto; }
#centralHospitalEditor .central-department-detail-row { grid-template-columns: minmax(220px,1.7fr) minmax(150px,1fr) 82px 105px; align-items: end; overflow: hidden; }
#centralHospitalEditor .central-department-detail-row > * { min-width: 0; max-width: 100%; }
#centralHospitalEditor .central-department-detail-row input,
#centralHospitalEditor .central-department-detail-row textarea { min-width: 0; max-width: 100%; box-sizing: border-box; }
#centralHospitalEditor .central-department-phones-field { grid-column: 1 / 4; }
#centralHospitalEditor [data-remove-department] { grid-column: 4; grid-row: 2; width: 100%; justify-self: stretch; white-space: nowrap; }
.report-version-group + .report-version-group { border-top: 1px solid var(--line); }
.report-version-history { padding: 0 12px 10px 58px; background: #f6f8f9; }
.report-version-history > summary { padding: 9px 0; color: var(--teal); font-size: 10px; font-weight: 780; cursor: pointer; }
.report-list-item-history { margin-top: 6px; border: 1px solid var(--line); border-radius: 9px; background: #fff; opacity: .78; }
.central-report-actions { display: grid; gap: 6px; min-width: 118px; }
.central-report-history > summary { color: var(--muted); font-size: 9px; font-weight: 750; cursor: pointer; }
.central-report-history[open] { padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: #f6f8f9; }
.central-report-history .table-action { width: 100%; margin-top: 5px; text-align: left; }
.hospital-directory-card { max-height: 62vh; overflow: auto; }
.hospital-directory-card .table-wrap { overflow: visible; }
.hospital-directory-card thead th { position: sticky; top: 0; z-index: 2; background: #f4f7f8; box-shadow: 0 1px 0 var(--line); }
#hospital-department-count { display: inline-block; margin-left: 8px; color: var(--teal); font-weight: 700; }
.central-report-entry { padding: 10px; display: grid; grid-template-columns: 105px 145px minmax(240px,1.8fr) minmax(150px,.8fr) auto; align-items: end; gap: 9px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafb; }
.medical-entity-filters { margin: 14px 0; grid-template-columns: minmax(280px,1.5fr) minmax(190px,.7fr) auto auto; }
.medical-entity-card { max-height: 63vh; overflow: auto; }
.medical-entity-card .table-wrap { overflow: visible; }
.medical-entity-card thead th { position: sticky; top: 0; z-index: 2; background: #f4f7f8; box-shadow: 0 1px 0 var(--line); }
.table-sort-button { display: inline-flex; align-items: center; gap: 7px; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; letter-spacing: inherit; text-align: left; text-transform: inherit; cursor: pointer; }
.table-sort-button span { color: #92a2a9; font-size: 9px; line-height: 1; }
.table-sort-button:hover, .table-sort-button:focus-visible, .table-sort-button.is-active { color: var(--teal); }
.table-sort-button.is-active span { color: var(--teal); }
.table-sort-button:focus-visible { outline: 2px solid rgba(24,145,139,.35); outline-offset: 4px; border-radius: 3px; }
.medical-entity-card td:nth-child(2) { min-width: 180px; }
.medical-entity-card td:nth-child(4) { min-width: 170px; }
.medical-entity-form-section + .medical-entity-form-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.medical-entity-form-section > h4 { margin: 0 0 12px; font-size: 12px; }
.medical-entity-active-row { margin-top: 18px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafb; }
.central-report-entry > label { min-width: 0; }
.central-muted { color: var(--muted); font-size: 8.5px; line-height: 1.4; }
.central-dictionary-list { display: grid; gap: 8px; }
.central-dictionary-item { min-height: 58px; padding: 9px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.central-dictionary-item strong, .central-dictionary-item small { display: block; }
.central-dictionary-item strong { font-size: 10px; }
.central-dictionary-item small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.central-dictionary-item.is-inactive { opacity: .58; background: #f3f5f6; }
#central-hospital-body .number, #central-report-body .number { font-variant-numeric: tabular-nums; font-weight: 760; }
#central-report-scope { min-width: 150px; }
.central-audit-scope-note { margin-bottom: 14px; border-color: #afd6d2; background: #eef9f8; color: #245a57; }
.central-audit-file-meta { margin: -4px 0 14px; padding-top: 10px; padding-bottom: 10px; }
.central-audit-filter-panel { margin: 0 0 14px; grid-template-columns: minmax(160px,.8fr) minmax(150px,.75fr) minmax(220px,1.25fr) minmax(150px,.75fr) minmax(210px,1fr) auto; }
.central-audit-filter { min-width: 0; }
.central-audit-filter > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.central-audit-filter select { width: 100%; }
.central-audit-filter-panel .search { align-self: end; }
.central-audit-filter-panel > .btn { align-self: end; }
.central-audit-metrics .metric strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.central-audit-card { max-height: 61vh; overflow: auto; }
.central-audit-card > .card-header { position: sticky; top: 0; z-index: 4; background: #fff; }
.central-audit-card .table-wrap { overflow: visible; }
.central-audit-card thead th { position: sticky; top: 55px; z-index: 3; background: #f7f9fa; box-shadow: 0 1px 0 var(--line); }
.central-audit-time { min-width: 112px; font-variant-numeric: tabular-nums; }
.central-audit-time strong, .central-audit-time small { display: block; }
.central-audit-time small { margin-top: 3px; color: var(--muted); }
.central-audit-modal .modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.central-audit-detail-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.central-audit-description { margin-top: 14px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafb; }
.central-audit-description > span { color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.central-audit-description p { margin: 6px 0 0; font-size: 11px; line-height: 1.55; }

.ward-transfer-filter-panel { margin: 0 0 14px; grid-template-columns: minmax(240px,1.45fr) minmax(190px,1fr) minmax(160px,.75fr) auto auto; }
.ward-transfer-results { display: grid; gap: 9px; }
.ward-transfer-result { border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 3px 12px rgba(18,39,50,.03); overflow: hidden; }
.ward-transfer-result > summary { min-height: 76px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; list-style: none; }
.ward-transfer-result > summary::-webkit-details-marker { display: none; }
.ward-transfer-result > summary:hover { background: #f9fbfb; }
.ward-transfer-result[open] .facility-chevron { transform: rotate(90deg); }
.ward-transfer-result-main { min-width: 0; display: flex; align-items: center; gap: 12px; }
.ward-transfer-result-main h3 { margin: 0; font-size: 12px; }
.ward-transfer-result-main p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.35; }
.ward-transfer-result-state { display: grid; grid-template-columns: minmax(80px,auto) minmax(105px,auto) minmax(105px,auto); align-items: center; justify-content: end; gap: 12px; text-align: right; }
.ward-transfer-result-state > div strong, .ward-transfer-result-state > div span { display: block; }
.ward-transfer-result-state > div strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.ward-transfer-result-state > div strong.good { color: var(--green); }
.ward-transfer-result-state > div strong.bad { color: var(--red); }
.ward-transfer-result-state > div span, .ward-transfer-result-state > small { color: var(--muted); font-size: 8px; }
.ward-transfer-contact-panel { border-top: 1px solid var(--line); background: #fafcfc; }
.ward-transfer-contact-panel > header { padding: 11px 15px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.ward-transfer-contact-panel > header strong, .ward-transfer-contact-panel > header small { display: block; }
.ward-transfer-contact-panel > header strong { font-size: 10px; }
.ward-transfer-contact-panel > header small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.ward-transfer-phone { min-height: 52px; padding: 8px 15px; display: grid; grid-template-columns: minmax(220px,1fr) minmax(150px,.6fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.ward-transfer-phone:last-child { border-bottom: 0; }
.ward-transfer-phone strong, .ward-transfer-phone small { display: block; }
.ward-transfer-phone strong { font-size: 10px; }
.ward-transfer-phone small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.ward-transfer-phone a { color: var(--teal); font-size: 11px; font-weight: 750; }
.ward-transfer-phone.is-missing { grid-template-columns: minmax(0,1fr) auto; }
.operational-demo-steps { margin: 16px 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: operational-step; }
.operational-demo-steps li { counter-increment: operational-step; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafb; color: var(--muted); }
.operational-demo-steps li::before { content: counter(operational-step); width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #e7eef1; color: var(--ink); font-size: 11px; font-weight: 800; }
.operational-demo-steps li.completed { border-color: #b8dfcf; background: #f0faf5; color: var(--ink); }
.operational-demo-steps li.completed::before { content: "✓"; background: var(--green); color: #fff; }

@media (max-width: 1280px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .filter-panel { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .filter-panel.availability-filter-panel { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .central-audit-filter-panel, .ward-transfer-filter-panel, .medical-entity-filters { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .recent-report-grid.manager-recent { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .central-department-detail-row { grid-template-columns: minmax(240px,1.5fr) minmax(150px,1fr) 90px 92px; }
  .central-department-phones-field { grid-column: 1 / -2; }
  .user-directory-controls { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .filter-result-count { justify-self: start; }
}
@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 80; width: 246px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 18px 0 50px rgba(0,0,0,.18); }
  body.menu-open .sidebar { transform: none; }
  .mobile-menu { display: grid; place-items: center; }
  .topbar { padding: 0 18px; }
  .content { padding: 22px 18px 40px; }
  .grid-2, .grid-2.equal { grid-template-columns: 1fr; }
  .demo-chip, .clock { display: none; }
  .report-browser { grid-template-columns: 1fr; }
  .recent-report-grid, .recent-report-grid.manager-recent { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .facility-group > summary { align-items: flex-start; }
  .facility-summary-side { flex-direction: column; align-items: flex-end; }
  .compact-phone-row { grid-template-columns: minmax(190px,1fr) minmax(120px,.6fr) auto; }
  .compact-phone-row a { grid-column: 1 / 3; }
  .dispatch-centre-admin-list { grid-template-columns: 1fr; }
  .dispatcher-identity-button { min-width: 0; }
  .province-availability-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .central-report-entry { grid-template-columns: 100px 140px minmax(210px,1fr); }
  .central-report-entry .central-entry-text-label { grid-column: 1 / -1; }
  .central-department-detail-row { grid-template-columns: minmax(220px,1.3fr) minmax(150px,1fr) 90px; }
  .central-department-active-field { grid-column: 1; }
  .central-department-phones-field { grid-column: 2 / -1; }
  #centralHospitalEditor { padding: 10px; }
  #centralHospitalEditor .modal { width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
  #centralHospitalEditor .central-department-detail-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  #centralHospitalEditor .central-department-name-field,
  #centralHospitalEditor .central-department-phones-field { grid-column: 1 / -1; }
  #centralHospitalEditor .central-department-active-field { grid-column: 1; }
  #centralHospitalEditor [data-remove-department] { grid-column: 2; grid-row: 3; }
  .central-audit-detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ward-transfer-result > summary { align-items: flex-start; }
  .ward-transfer-result-state { grid-template-columns: repeat(3,auto); }
}
@media (max-width: 640px) {
  .page-head { display: block; }
  .page-actions { margin-top: 15px; justify-content: flex-start; }
  .metric-grid, .grid-3, .form-grid { grid-template-columns: 1fr; }
  .user-directory-controls, .existing-user-result { grid-template-columns: 1fr; }
  .form-group.full { grid-column: auto; }
  .availability-summary { grid-template-columns: repeat(2,1fr); }
  .topbar { height: 64px; }
  .role-title p { display: none; }
  .content { padding: 18px 13px 34px; }
  .page-head h2 { font-size: 23px; }
  .alert-item { grid-template-columns: auto minmax(0,1fr); }
  .alert-time { grid-column: 2; }
  .topbar-actions { gap: 8px; }
  .sort-control { width: 100%; margin-top: 8px; justify-content: space-between; }
  .sort-control select { min-width: 0; flex: 1; }
  .filter-panel, .recent-report-grid, .recent-report-grid.manager-recent, .phone-contact-list, .detail-grid { grid-template-columns: 1fr; }
  .filter-panel.availability-filter-panel { grid-template-columns: 1fr; }
  .central-audit-filter-panel, .ward-transfer-filter-panel, .medical-entity-filters { grid-template-columns: 1fr; }
  .filter-check { padding: 6px; }
  .report-list-item { grid-template-columns: auto minmax(0,1fr); }
  .report-item-actions { grid-column: 2; }
  .report-version-history { padding-left: 14px; }
  .calendar { padding: 9px; gap: 3px; }
  .calendar-day { min-height: 42px; }
  .detail-heading, .inbox-content > header { display: block; }
  .detail-heading .status, .inbox-content > header .status { margin-top: 9px; }
  .phone-contact dl { grid-template-columns: 1fr; }
  .modal-report .modal-body { padding: 18px 15px; }
  .report-document h2 { font-size: 19px; }
  .report-meta { grid-template-columns: 1fr; }
  .report-missing { grid-template-columns: 1fr; }
  .metric-detail-list { grid-template-columns: 1fr; }
  .metric-drilldown > header, .facility-group > summary { display: block; }
  .facility-summary-side { margin: 11px 0 0 37px; align-items: flex-start; }
  .facility-admin-note { max-width: none; text-align: left; }
  .compact-phone-row { grid-template-columns: 1fr auto; }
  .compact-phone-row a { grid-column: 1 / -1; }
  .compact-phone-numbers { text-align: right; }
  .dispatch-roster, .role-choice-grid { grid-template-columns: 1fr; }
  .dispatch-presence-list { grid-template-columns: 1fr; }
  .account-danger-zone { display: block; }
  .account-danger-zone .inline-actions { margin-top: 10px; }
  .department-phone-field { grid-template-columns: 1fr; }
  .entry-attachment-item { grid-template-columns: auto minmax(0,1fr); }
  .entry-attachment-item .status, .entry-attachment-item .btn { grid-column: 2; justify-self: start; }
  .entry-attachment-actions { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; }
  .province-availability-summary { grid-template-columns: 1fr 1fr; }
  .province-availability-summary > div { display: block; }
  .province-availability-summary span { display: block; margin-top: 3px; }
  .central-editor-section > header { display: block; }
  .central-editor-section > header .inline-actions, .central-editor-section > header > .btn { margin-top: 10px; }
  .central-department-row, .central-report-entry { grid-template-columns: 1fr; }
  .central-department-detail-row > * { grid-column: auto; }
  #centralHospitalEditor .modal-head { padding: 13px 14px; }
  #centralHospitalEditor .modal-body { padding: 14px; }
  #centralHospitalEditor .modal-footer { padding: 11px 14px; }
  #centralHospitalEditor .central-department-detail-row { grid-template-columns: 1fr; }
  #centralHospitalEditor .central-department-detail-row > * { grid-column: 1; grid-row: auto; }
  #centralHospitalEditor [data-remove-department] { width: 100%; justify-self: stretch; }
  .central-report-entry .central-entry-text-label { grid-column: auto; }
  #central-report-scope { width: 100%; }
  .central-audit-detail-grid { grid-template-columns: 1fr; }
  .ward-transfer-result > summary, .ward-transfer-contact-panel > header { display: block; }
  .ward-transfer-result-state { margin: 12px 0 0 37px; grid-template-columns: repeat(2,minmax(0,1fr)); justify-content: stretch; text-align: left; }
  .ward-transfer-result-state > small { grid-column: 1 / -1; }
  .ward-transfer-phone { grid-template-columns: 1fr auto; }
  .ward-transfer-phone a { grid-column: 1; }
  .province-availability-controls { width: 100%; display: grid; grid-template-columns: 1fr; }
  .province-hide-unavailable { white-space: normal; }
}

/* WIDOK RM 0.2 — wspólne rozszerzenia prototypu */
.v02-version-chip { display:inline-flex; align-items:center; min-height:30px; padding:0 11px; border:1px solid #b7d4d6; border-radius:8px; background:#eefafa; color:#087b78; font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; white-space:nowrap; }
.v02-floating-tools { position:fixed; right:18px; bottom:18px; z-index:78; display:flex; gap:8px; }
.v02-round-button { width:42px; height:42px; border:1px solid #cbd8dc; border-radius:50%; background:#fff; color:#0b3442; box-shadow:0 7px 24px rgba(8,37,47,.15); font-size:18px; font-weight:800; cursor:pointer; }
.v02-round-button:hover { background:#e8f7f6; border-color:#65bfbc; }
.v02-nav-icon { font-size:16px; font-weight:800; line-height:1; }
.v02-search-results { display:grid; gap:7px; margin-top:14px; max-height:430px; overflow:auto; }
.v02-search-result { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:12px; width:100%; padding:11px; border:1px solid var(--line); border-radius:10px; background:#fff; text-align:left; cursor:pointer; }
.v02-search-result:hover { background:#f2f9f9; border-color:#8ccac8; }
.v02-search-result span:last-child { display:grid; gap:2px; min-width:0; }
.v02-search-result small { color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.v02-glossary { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.v02-glossary article { padding:13px; border:1px solid var(--line); border-radius:10px; background:#f8fafb; }
.v02-glossary p { margin:5px 0 0; color:var(--muted); line-height:1.45; }
.v02-file-scan-status { display:inline-flex; margin-top:7px; }
.v02-control-tabs { display:flex; flex-wrap:wrap; gap:7px; margin:16px 0; }
.v02-metrics { margin:16px 0; }
.v02-check-list { display:grid; gap:0; }
.v02-check-list > div { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:9px; padding:11px 0; border-bottom:1px solid var(--line); }
.v02-check-list > div:last-child { border-bottom:0; }
.v02-check-list small { color:var(--muted); text-align:right; }
.online-dot.warn { background:#e9a236; box-shadow:0 0 0 4px #fff1d9; }
.v02-list { display:grid; gap:8px; }
.v02-list-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 11px; border:1px solid var(--line); border-radius:9px; background:#fbfcfc; }
.v02-list-row > div { min-width:0; display:grid; gap:3px; }
.v02-list-row small { color:var(--muted); line-height:1.35; }
.v02-list-row .btn { flex:none; }
.v02-inline-form { display:grid; grid-template-columns:minmax(140px,1.2fr) minmax(140px,1fr) minmax(160px,1fr) auto; align-items:end; gap:8px; margin-bottom:12px; }
.v02-role-links { display:flex; flex-wrap:wrap; gap:8px; }
.v02-preview-box { margin-top:12px; padding:12px; border:1px dashed #aebfc4; border-radius:10px; background:#f8fafb; color:var(--muted); }
.v02-preview-box strong { color:var(--ink); }
.v02-toggle-list { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.v02-filter-grid { display:grid; grid-template-columns:1.4fr 1.2fr 1fr 1fr; align-items:end; gap:10px; }
.v02-filter-check { align-self:end; min-height:42px; }
.v02-filter-actions { display:flex; gap:8px; align-items:end; }
.v02-saved-row { display:flex; align-items:center; gap:8px; margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.v02-saved-row select { max-width:320px; }
.v02-saved-row .filter-result-count { margin-left:auto; }
.v02-availability-results .table-wrap { margin:0; }
.v02-pagination { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 14px; border-top:1px solid var(--line); background:#fbfcfc; }
.v02-pagination > div:first-child { display:grid; gap:2px; min-width:110px; }
.v02-pagination > div:first-child span { color:var(--muted); font-size:12px; }
.v02-pagination label { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:12px; }
.v02-pagination select { width:auto; min-width:70px; }
.v02-pagination .btn:disabled { opacity:.42; cursor:not-allowed; }
.v02-star { border:0; background:transparent; color:#a5b2b5; font-size:21px; cursor:pointer; }
.v02-star.is-active { color:#e7a429; }
.v02-contact-cell { max-width:270px; }
.v02-contact-cell strong, .v02-contact-cell small { display:block; line-height:1.35; }
.v02-contact-cell strong { font-size:12px; }
.v02-contact-cell small { margin-top:3px; color:var(--muted); }
.v02-comparison { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.v02-comparison article { display:grid; gap:3px; padding:11px; border:1px solid var(--line); border-radius:10px; background:#f7fafb; }
.v02-comparison article small, .v02-comparison article span { color:var(--muted); }
.v02-comparison article b { margin-top:5px; color:#15805e; font-size:25px; }
.v02-comparison article em { margin-top:5px; font-size:12px; font-style:normal; color:#9a6414; }
.v02-report-heading { padding-bottom:14px; border-bottom:3px solid #123a48; }
.v02-report-heading > span { color:#087b78; font-size:11px; font-weight:800; letter-spacing:.12em; }
.v02-report-heading h2 { margin:7px 0 4px; font-size:25px; }
.v02-scroll-table { max-height:52vh; margin-top:14px; overflow:auto; border:1px solid var(--line); border-radius:10px; }
.v02-scroll-table table { width:100%; border-collapse:collapse; }
.v02-scroll-table th { position:sticky; top:0; z-index:1; background:#f4f7f8; }
.v02-scroll-table td, .v02-scroll-table th { padding:10px; border-bottom:1px solid var(--line); text-align:left; }
.v02-status-legend { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.v02-plan-row, .v02-handover-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:14px; padding:13px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.v02-plan-row > div:first-child, .v02-handover-row > div:first-child { min-width:0; }
.v02-plan-row small, .v02-handover-row small { display:block; margin-top:3px; color:var(--muted); }
.v02-plan-row p, .v02-handover-row p { margin:7px 0 0; color:#425961; line-height:1.4; }
.v02-plan-row.is-muted, .v02-handover-row.is-muted { background:#f2f4f5; opacity:.72; }
.v02-plan-actions { display:flex; align-items:flex-end; flex-direction:column; gap:7px; }
.v02-list-section-title { margin:6px 0 0; padding:9px 2px 2px; border-top:1px solid var(--line); color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
#v02-plan-history-toggle[hidden] { display:none !important; }
.v02-handover-row > div:last-child { display:grid; justify-items:end; gap:7px; }
.v02-handover-recipient { min-height:44px; padding:9px 12px; border:1px solid var(--line); border-radius:9px; background:#f4fafb; display:flex; flex-direction:column; justify-content:center; gap:2px; }
.v02-handover-recipient strong { color:#173d49; }
.v02-handover-recipient small { color:var(--muted); line-height:1.3; }
.v02-inline-card { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 16px; margin-bottom:14px; }
.v02-inline-card p { margin:4px 0 0; color:var(--muted); }
.v02-permission-matrix { min-width:980px; }
.v02-permission-matrix th:not(:first-child):not(:last-child), .v02-permission-matrix td:not(:first-child):not(:last-child) { width:84px; text-align:center; }
.v02-matrix-cell { display:grid; place-items:center; min-width:36px; min-height:34px; margin:auto; border:1px solid #d5e0e3; border-radius:8px; background:#f7fafb; cursor:pointer; }
.v02-matrix-cell:has(input:checked) { border-color:#75c5bd; background:#e5f6f1; color:#14765e; }
.v02-matrix-cell input { position:absolute; width:1px; height:1px; overflow:hidden; opacity:0; }
.v02-matrix-cell span { font-weight:900; }
.v02-import-diff { display:grid; gap:7px; max-height:280px; margin:12px 0; overflow:auto; }
.v02-import-diff > div { display:grid; grid-template-columns:auto minmax(140px,.75fr) minmax(220px,1.5fr); align-items:center; gap:9px; padding:9px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.v02-import-diff small { color:var(--muted); line-height:1.35; }
.v02-subheading { margin:17px 0 9px; color:var(--ink); font-size:14px; }
.v02-session-revoked { z-index:130; }
.v02-session-locked main, .v02-session-locked .sidebar, .v02-session-locked .topbar { pointer-events:none; filter:grayscale(.75); }
.v02-session-locked #v02SessionRevoked, .v02-session-locked #v02SessionRevoked * { pointer-events:auto; filter:none; }
.v02-list-row.is-muted { opacity:.62; background:#f1f4f5; }
.central-critical-error-alert { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:16px; border:2px solid #d8433a; background:#fff0ef; box-shadow:0 7px 20px rgba(216,67,58,.12); }
.central-critical-error-alert[hidden] { display:none !important; }
.central-critical-error-alert p { margin:4px 0 0; color:#7c3a35; }
.central-critical-metric.has-critical-errors { border:2px solid #d8433a; background:#fff5f4; box-shadow:0 6px 18px rgba(216,67,58,.12); }
.central-critical-metric.has-critical-errors strong { color:#c63831; }
.central-critical-audit-row td { background:#fff0ef !important; border-bottom-color:#f0c9c6; }
.central-critical-audit-row td:first-child { box-shadow:inset 4px 0 0 #d8433a; }
.central-critical-audit-row:hover td { background:#ffe9e7 !important; }
.central-critical-label { display:inline-flex; margin-right:4px; padding:2px 5px; border-radius:4px; background:#d8433a; color:#fff; font-size:8px; font-weight:850; letter-spacing:.05em; vertical-align:1px; }
.central-audit-error-technical { margin-top:14px; }
.central-audit-error-technical > span { display:block; margin-bottom:7px; color:#a9342e; font-size:10px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.central-audit-error-technical pre { max-height:38vh; margin:0; padding:14px; overflow:auto; border:1px solid #603936; border-radius:9px; background:#251b1a; color:#ffeceb; font:11px/1.55 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; white-space:pre-wrap; overflow-wrap:anywhere; }

@media (max-width: 1100px) {
  .topbar { padding-right:18px; padding-left:18px; gap:10px; }
  .topbar-actions { min-width:0; gap:8px; }
  .topbar .v02-version-chip, .topbar .demo-chip, .topbar .clock { display:none; }
  .dispatcher-identity-button { min-width:150px; }
  .v02-filter-grid { grid-template-columns:1fr 1fr; }
  .v02-inline-form { grid-template-columns:1fr 1fr; }
  .v02-saved-row { flex-wrap:wrap; }
  .v02-saved-row .filter-result-count { width:100%; margin-left:0; }
}

@media (max-width: 700px) {
  .prototype-security-notice { align-items:flex-start; flex-direction:column; padding:7px 14px; text-align:left; }
  .v02-version-chip { display:none; }
  .v02-floating-tools { right:10px; bottom:10px; }
  .v02-round-button { width:38px; height:38px; }
  .v02-glossary, .v02-filter-grid, .v02-toggle-list, .v02-inline-form, .v02-comparison { grid-template-columns:1fr; }
  .v02-plan-row, .v02-handover-row { grid-template-columns:1fr; }
  .v02-plan-actions, .v02-handover-row > div:last-child { align-items:flex-start; justify-items:start; }
  .v02-list-row, .v02-inline-card { align-items:flex-start; flex-direction:column; }
  .v02-check-list > div { grid-template-columns:auto minmax(0,1fr); }
  .v02-check-list small { grid-column:2; text-align:left; }
  .v02-import-diff > div { grid-template-columns:1fr; }
  .v02-pagination { align-items:stretch; flex-direction:column; }
  .v02-pagination label { justify-content:space-between; }
  .v02-pagination .inline-actions { display:grid; grid-template-columns:1fr 1fr; }
  .central-critical-error-alert { align-items:stretch; flex-direction:column; }
}

@media print {
  .sidebar, .topbar, .v02-floating-tools, .modal-head, .modal-footer, body > .toast { display:none !important; }
  #v02SpecialtyReport { position:static; display:block !important; background:#fff; }
  #v02SpecialtyReport .modal { width:100%; max-width:none; max-height:none; box-shadow:none; }
  #v02SpecialtyReport .modal-body, .v02-scroll-table { max-height:none; overflow:visible; }
}
.v02-readonly-banner {
  margin-bottom: 16px;
}

.v02-readonly-action[aria-disabled="true"] {
  cursor: not-allowed;
  filter: grayscale(.8);
  opacity: .5;
}

.entity-multiselect {
  min-height: 170px;
  max-height: 230px;
  padding: 6px;
  overflow-y: auto;
}

.entity-multiselect option {
  padding: 7px 9px;
  border-radius: 6px;
}

.security-check {
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid #cbdfe4;
  border-radius: 10px;
  background: #f4fafb;
}

.security-check span,
.security-check strong,
.security-check small { display: block; }

.security-check small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 500;
}

.inline-actions.compact { gap: 10px; white-space: nowrap; }
.action-activate { color: #087a70; font-weight: 800; }
.account-context-button { max-width: 270px; }
.account-context-button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.central-province-scope {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #cbdfe4;
  border-radius: 12px;
  background: #f7fafb;
  box-shadow: 0 3px 12px rgba(18,39,50,.035);
}
.central-province-scope-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 11px;
}
.central-province-scope-header > div { display: grid; gap: 3px; }
.central-province-scope-header strong { color: var(--ink); font-size: 12px; }
.central-province-scope-header small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.central-province-scope-header > span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: #e7f5f2;
  color: #14765e;
  font-size: 9px;
  font-weight: 800;
}
.central-province-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.central-province-tile {
  display: flex;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid #d6e1e4;
  border-radius: 9px;
  background: #fff;
  color: #63757d;
  text-align: left;
}
.central-province-tile strong { min-width: 0; font-size: 10px; line-height: 1.25; overflow-wrap: anywhere; }
.central-province-tile small { flex: 0 0 auto; color: #93a1a6; font-size: 8px; font-weight: 750; }
.central-province-tile.is-active {
  border-color: #58b8ae;
  background: #e8f7f4;
  color: #116f62;
  box-shadow: inset 0 0 0 1px rgba(40,151,139,.12);
  cursor: default;
}
.central-province-tile.is-active small { color: #15805e; }
.central-province-tile.is-planned { background: #f3f5f6; opacity: .68; cursor: not-allowed; }
.central-province-scope.is-gateway .central-province-tile.is-active { cursor: pointer; }
.central-province-scope.is-gateway .central-province-tile.is-active:hover {
  border-color: #258f83;
  background: #ddf3ef;
  box-shadow: 0 5px 15px rgba(19, 111, 98, .12);
}
.tab-panel.is-province-gateway > .page-head .page-actions { display: none; }
[data-central-province-content][hidden] { display: none !important; }
.central-province-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #cbdfe4;
  border-radius: 10px;
  background: #f7fafb;
}
.central-province-selection-bar[hidden] { display: none; }
.central-province-selection-bar > div { display: grid; gap: 2px; }
.central-province-selection-bar small { color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.central-province-selection-bar strong { color: #116f62; font-size: 11px; }
.central-province-native-select { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
.central-province-scope.is-compact { margin: 8px 0 0; padding: 11px; }
.central-province-scope.is-compact .central-province-scope-header { margin-bottom: 9px; }
.central-province-scope.is-compact .central-province-tile { min-height: 42px; padding: 7px 9px; }

/* Planowane ograniczenia: jednakowy rytm pól i równe panele. */
#ograniczenia-planowane > .grid-2.equal {
  align-items: stretch;
}
#ograniczenia-planowane > .grid-2.equal > .card {
  height: 100%;
}
#v02-planned-form :is(input:not([type="checkbox"]), select) {
  box-sizing: border-box;
  height: 40px;
  min-height: 40px;
  line-height: normal;
}
#v02-planned-form textarea {
  box-sizing: border-box;
  min-height: 96px;
}

@media (max-width: 900px) {
  .account-context-button { max-width: 180px; }
  .inline-actions.compact { align-items: flex-start; flex-direction: column; gap: 4px; }
  .central-province-grid { gap: 6px; }
  .central-province-tile { padding: 7px 8px; }
  .central-province-tile strong { font-size: 9px; }
}

@media (max-width: 640px) {
  .report-entry-summary { grid-template-columns: 1fr; }
  .report-entry-summary .full { grid-column: auto; }
  .report-entry-details-modal .modal-footer { flex-wrap: wrap; }
  .report-entry-details-modal .modal-footer .btn { flex: 1 1 auto; }
  .central-province-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .central-province-scope-header { align-items: flex-start; flex-direction: column; }
  .central-province-selection-bar { align-items: flex-start; flex-direction: column; }
  .metric-detail-list { grid-template-columns: 1fr; }
  .metric-detail-item { align-items: flex-start; flex-direction: column; }
  .metric-detail-item-action { width: 100%; justify-content: space-between; }
  .metric-detail-item-action .btn { flex: 1 1 auto; }
  .report-reminder-panel > header, .report-reminder-item { align-items: flex-start; flex-direction: column; }
  .report-reminder-item .btn { width: 100%; }
}
/* Serwerowa brama logowania: tokeny OIDC i sesji aplikacyjnej pozostają
   wyłącznie w pamięci strony. Warstwa zasłania interfejs do czasu zakończenia
   walidacji po stronie Keycloak i backendu. */
.widokrm-auth-pending{overflow:hidden}
.widokrm-auth-pending body{background:#f4f7f8}
.widokrm-auth-pending body>:not(#widokrm-auth-gate){visibility:hidden}
.widokrm-auth-gate{position:fixed;inset:0;z-index:100000;display:grid;place-items:center;padding:24px;background:#f4f7f8}
.widokrm-auth-card{width:min(520px,100%);padding:40px;border:1px solid #dbe4e7;border-radius:20px;background:#fff;box-shadow:0 18px 55px rgba(4,24,35,.12);text-align:center}
.widokrm-auth-card img{display:block;margin:0 auto 18px}.widokrm-auth-eyebrow{margin:0 0 8px;color:#147f7a;font-size:12px;font-weight:800;letter-spacing:.16em}.widokrm-auth-card h1{margin:0 0 12px;font-size:28px;line-height:1.15}.widokrm-auth-card>p:not(.widokrm-auth-eyebrow){margin:0 auto;color:#66757e;line-height:1.55}
.widokrm-auth-spinner{width:34px;height:34px;margin:24px auto 0;border:4px solid #dfe9ea;border-top-color:#147f7a;border-radius:50%;animation:widokrm-auth-spin .8s linear infinite}.widokrm-auth-spinner[hidden]{display:none}
.widokrm-auth-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin-top:26px}.widokrm-auth-actions[hidden]{display:none}.widokrm-scope-field{display:grid;gap:8px;width:100%;text-align:left}.widokrm-scope-field span{color:#344b56;font-size:12px;font-weight:800}.widokrm-scope-select{width:100%;min-height:52px;padding:0 44px 0 14px;border:1px solid #bdccd1;border-radius:10px;background:#fff;color:#102a36;font:inherit}.widokrm-scope-submit{width:100%;margin-top:4px}
.launch-card.widokrm-role-unavailable{cursor:not-allowed;filter:grayscale(.85);opacity:.54}.launch-card.widokrm-role-unavailable:hover{transform:none;box-shadow:0 4px 14px #1227320a}
@keyframes widokrm-auth-spin{to{transform:rotate(360deg)}}
@media(max-width:600px){.widokrm-auth-card{padding:28px 22px}.widokrm-auth-card h1{font-size:23px}}

/* Dane pochodzące z API muszą być wizualnie odróżnialne od elementów
   odziedziczonych po prototypie, dopóki każdy moduł nie ma endpointu. */
.widokrm-live-source{display:flex;align-items:center;justify-content:center;gap:9px;min-height:34px;padding:7px 18px;border-bottom:1px solid #b8e0d9;background:#edf9f6;color:#205e56;font-size:12px;line-height:1.35;text-align:center}
.widokrm-live-source[data-kind="error"]{border-color:#efc1bc;background:#fff3f1;color:#8e352f}
.widokrm-live-source-dot{width:8px;height:8px;border-radius:50%;background:#2d9b73;box-shadow:0 0 0 4px #2d9b731a;flex:0 0 auto}
.widokrm-live-source[data-kind="error"] .widokrm-live-source-dot{background:#c6433a;box-shadow:0 0 0 4px #c6433a1a}
.widokrm-live-badge{align-self:center;white-space:nowrap}
.widokrm-live-empty{padding:26px 12px;margin:0;border:0;background:transparent}
.widokrm-live-cell-detail{display:block;margin-top:4px;color:#66757e;font-weight:400;line-height:1.4}
.toast.error{background:#8f302b}
@media(max-width:760px){.widokrm-live-source{align-items:flex-start;justify-content:flex-start;text-align:left}.widokrm-live-source strong{white-space:nowrap}}

/* 1.14.0 — wspólny pasek filtrów i formularzy: równe wysokości, etykiety nad polami,
   pole wyboru z etykietą po prawej, jednakowy przycisk wyszukiwania i odstęp od treści. */
.widokrm-filtry.widokrm-filtry { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.widokrm-filtry.widokrm-filtry > label { display: flex; flex-direction: column; justify-content: flex-end; gap: 5px; margin: 0; min-width: 150px; flex: 1 1 170px; color: var(--ink); font-size: 12px; font-weight: 650; }
.widokrm-filtry.widokrm-filtry :is(input:not([type="checkbox"]):not([type="radio"]), select) { box-sizing: border-box; width: 100%; min-width: 0; height: 40px; min-height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 500; }
.widokrm-filtry.widokrm-filtry input::placeholder { color: #7a878d; text-overflow: clip; }
.widokrm-filtry.widokrm-filtry > label:has(> input[type="checkbox"]) { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 8px; min-width: 0; height: 40px; }
.widokrm-filtry.widokrm-filtry > label:has(> input[type="checkbox"]) > input { order: -1; width: 18px; height: 18px; margin: 0; }
.widokrm-filtry.widokrm-filtry > :is(button, .btn) { flex: 0 0 auto; height: 40px; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.widokrm-filtry.widokrm-filtry > :is(button[type="submit"], [data-freshness-refresh]) { border-color: var(--navy-900); background: var(--navy-900); color: #fff; }
.widokrm-filtry.widokrm-filtry > :is(button, .btn):disabled { opacity: .5; cursor: not-allowed; }
.widokrm-filtry.widokrm-filtry > [hidden] { display: none; }
@media (max-width: 600px) {
  .widokrm-filtry.widokrm-filtry > label { flex: 1 1 100%; }
  .widokrm-filtry.widokrm-filtry > :is(button, .btn) { flex: 1 1 auto; }
}

/* Elementy przyklejane i przewijane nie chowają się pod paskiem roli. */
.content :is(.page-head, h2, h3) { scroll-margin-top: 88px; }
.zdlp-p0 { top: 72px !important; }
.role-title > div { min-width: 0; }
@media (max-width: 980px) {
  .zdlp-p0 { top: 64px !important; }
  .role-title h1 { font-size: 15px; }
}

.form-group[hidden] { display: none !important; }
.service-number-edit { display: flex; gap: 6px; align-items: center; }
.service-number-edit input { height: 32px; min-width: 0; width: 9.5rem; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 6px; font: inherit; }
[data-service-number-error] { display: block; margin-top: 4px; color: #a8322b; font-weight: 650; }

/* Shared readable controls and focus states, including narrow screens. */
:root { --focus-ring: #086d87; --field-placeholder: #64727b; --space-control: 44px; }
::selection { background: #c6e9e4; color: #102a36; }
input, textarea { caret-color: var(--teal); }
input::placeholder, textarea::placeholder { color: var(--field-placeholder); opacity: 1; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.modal-close { min-width: 44px; min-height: 44px; }
input, select, textarea { font-size: max(12px, .8rem); }
@media (max-width: 920px) {
  .btn, .side-link, .central-nav-group-toggle, .mobile-menu { min-height: var(--space-control); }
  input, select, textarea { min-height: 44px; font-size: 16px; }
  .sidebar[inert] { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { .sidebar, .central-nav-chevron { transition: none !important; } .metric-clickable:hover { transform: none; } }
