:root {
  --avallo-primary: #8B1D3F;
  --avallo-primary-dark: #6e1631;
  --avallo-accent: #C5A572;
  --avallo-bg: #f5f6f8;
  --avallo-text: #212529;
  --avallo-border: #e5e7eb;
  --status-wait-bg: #fde047;
  --status-wait-border: #ca8a04;
  --status-wait-text: #713f12;
  --status-cancel-bg: #fca5a5;
  --status-cancel-border: #dc2626;
  --status-cancel-text: #7f1d1d;
  --status-hold-bg: #fdba74;
  --status-hold-border: #ea580c;
  --status-hold-text: #7c2d12;
  /* Historical meeting-confirmed / status green (pre-palette) */
  --status-ok-bg: #dcfce7;
  --status-ok-border: #86efac;
  --status-ok-text: #14532d;
  /* W trakcie / in_progress — fiolet */
  --status-progress-bg: #ddd6fe;
  --status-progress-border: #7c3aed;
  --status-progress-text: #4c1d95;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  background: var(--avallo-bg);
  color: var(--avallo-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  max-width: 100%;
}

/* Kotwica historii wysyłek e-mail/SMS — lądowanie pod sticky nav */
#historia-wysylek {
  scroll-margin-top: 5.75rem;
}

.app-layout {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
.app-layout > main { flex: 1 0 auto; }

.avallo-topbar {
  background: #fff;
  border-bottom: 1px solid var(--avallo-border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  position: sticky; top: 0; z-index: 1020;
  padding-top: env(safe-area-inset-top, 0px);
}
.avallo-topbar-inner {
  display: flex; align-items: center; gap: 18px;
  padding: 10px 20px; max-width: 1400px; margin: 0 auto;
}
.avallo-logo { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.avallo-logo img { height: 36px; width: auto; display: block; }
.avallo-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: 12px; }
.avallo-nav-link {
  color: #475569; text-decoration: none; padding: 8px 14px;
  border-radius: 8px; font-weight: 500; font-size: 14px;
  transition: all 0.15s; display: inline-flex; align-items: center;
}
.avallo-nav-link:hover { background: #f1f5f9; color: var(--avallo-primary); }
.avallo-nav-link.active { background: var(--avallo-primary); color: #fff; }
.avallo-nav-link.active:hover { background: var(--avallo-primary-dark); color: #fff; }
.avallo-nav-link i { margin-right: 6px; }
.avallo-topbar-right {
  margin-left: auto; display: flex; align-items: center; gap: 12px;
  font-size: 0.9rem; color: #64748b;
}
.avallo-user-name { white-space: nowrap; }

.btn-avallo {
  background: var(--avallo-primary); border-color: var(--avallo-primary); color: #fff;
}
.btn-avallo:hover { background: var(--avallo-primary-dark); border-color: var(--avallo-primary-dark); color: #fff; }
.btn-outline-avallo {
  color: var(--avallo-primary); border-color: var(--avallo-primary); background: #fff;
}
.btn-outline-avallo:hover { background: var(--avallo-primary); color: #fff; }

/* Lista rekrutacji: Otwórz z lewej, wyśrodkowany w pionie względem reszty akcji */
.recruitment-list-actions-cell {
  vertical-align: middle;
}
.recruitment-list-actions {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}
.recruitment-list-actions-label {
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
  padding: 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  color: #64748b;
  text-transform: uppercase;
}
.recruitment-list-more-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
}
.recruitment-list-more-actions .btn {
  font-size: 0.6875rem;
  line-height: 1.2;
  padding: 0.12rem 0.4rem;
  min-height: 0;
  border-radius: 0.3rem;
}
.recruitment-list-more-actions .btn i {
  font-size: 0.65rem;
}
.recruitment-list-open-btn.btn {
  --recruitment-open-size: 4.75rem;
  box-sizing: border-box;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-width: var(--recruitment-open-size);
  min-height: var(--recruitment-open-size);
  padding: 0.4rem 0.55rem;
  border-radius: 0.6rem;
  line-height: 1.1;
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 700;
}
.recruitment-list-open-btn.btn i {
  margin: 0;
  font-size: 1.45rem;
}

.admin-recruitment-stats {
  border: 1px solid var(--avallo-border);
  border-radius: 0.75rem;
}
.admin-recruitment-stats-period {
  padding: 0.85rem 1rem;
  border: 1px solid var(--avallo-border);
  border-radius: 0.65rem;
  background: #fafbfc;
}
.admin-recruitment-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.85rem;
}
.admin-recruitment-stats-grid dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}
.admin-recruitment-stats-grid dd {
  margin: 0.1rem 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--avallo-primary);
}
.admin-recruitment-stats-split {
  display: inline-flex;
  gap: 0.35rem;
  margin-left: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  vertical-align: middle;
}

.admin-tile {
  transition: transform 0.15s, box-shadow 0.15s;
  border: 1px solid var(--avallo-border);
  border-radius: 0.75rem;
}
.admin-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,23,42,0.08); }
.admin-tile-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
  background: rgba(139, 29, 63, 0.1); color: var(--avallo-primary); flex-shrink: 0;
}
/* Bootstrap subtle helpers (gdyby brakowało w starszym buildzie) */
.bg-primary-subtle { background-color: rgba(139, 29, 63, 0.12) !important; }
.text-primary { color: var(--avallo-primary) !important; }
.bg-info-subtle { background-color: rgba(13, 202, 240, 0.15) !important; }
.bg-warning-subtle { background-color: rgba(255, 193, 7, 0.18) !important; }
.bg-success-subtle { background-color: rgba(25, 135, 84, 0.14) !important; }
.bg-danger-subtle { background-color: rgba(220, 53, 69, 0.14) !important; }
.text-danger { color: #dc3545 !important; }

.badge-assigned { background: var(--status-wait-bg); color: var(--status-wait-text); }
.badge-in_progress { background: var(--status-progress-bg); color: var(--status-progress-text); }
.badge-completed { background: var(--status-ok-bg); color: var(--status-ok-text); }
.badge-cancelled { background: var(--status-cancel-bg); color: var(--status-cancel-text); }
.badge-stage-survey { background: var(--avallo-primary); color: #fff; }
.badge-stage-interview { background: var(--avallo-accent); color: #3b2a12; }
.badge-stage-question { background: #0ea5e9; color: #fff; }
.badge-stage-valuation { background: #059669; color: #fff; }
.badge-stage-contract { background: #7c3aed; color: #fff; }
.badge-stage-recruiter_decision {
  background: rgba(139, 29, 63, 0.12);
  color: var(--avallo-primary);
}
.badge-stage-completed { background: var(--status-ok-bg); color: var(--status-ok-text); }
.badge-stage-resigned { background: var(--status-cancel-bg); color: var(--status-cancel-text); }

/* Shared status palette: wait=żółty, cancel=czerwony, hold=pomarańczowy,
   progress=fiolet (W trakcie), ok=zielony.
   Default = wait so a missing modifier never yields white-on-transparent. */
.status-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  width: 100%;
  max-width: 28rem;
  margin: 0.4rem auto 0;
  padding: 0.7rem 1.15rem;
  border-radius: 0.7rem;
  border: 2px solid var(--status-wait-border);
  background: var(--status-wait-bg);
  color: var(--status-wait-text);
  text-align: center;
  box-sizing: border-box;
}
.status-box-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.78;
}
.status-box-label {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
  color: inherit;
}
.status-box--compact {
  max-width: 22rem;
  padding: 0.48rem 0.85rem;
  margin-top: 0.2rem;
}
.status-box--compact .status-box-label {
  font-size: 0.92rem;
}
.status-box--wait {
  background: var(--status-wait-bg) !important;
  border-color: var(--status-wait-border) !important;
  color: var(--status-wait-text) !important;
}
.status-box--cancel {
  background: var(--status-cancel-bg) !important;
  border-color: var(--status-cancel-border) !important;
  color: var(--status-cancel-text) !important;
}
.status-box--hold {
  background: var(--status-hold-bg) !important;
  border-color: var(--status-hold-border) !important;
  color: var(--status-hold-text) !important;
}
.status-box--ok {
  background: var(--status-ok-bg) !important;
  border-color: var(--status-ok-border) !important;
  color: var(--status-ok-text) !important;
}
.status-box--progress {
  background: var(--status-progress-bg) !important;
  border-color: var(--status-progress-border) !important;
  color: var(--status-progress-text) !important;
}
/* Base: wait default (avoid Bootstrap white-on-transparent).
   Tone modifiers MUST beat .badge.status-badge (0,2,0) — use 0,3,0. */
.status-badge,
.badge.status-badge {
  font-weight: 600;
  --bs-badge-color: var(--status-wait-text);
  --bs-badge-bg: var(--status-wait-bg);
  background: var(--status-wait-bg) !important;
  color: var(--status-wait-text) !important;
  border: 1px solid var(--status-wait-border);
}
.badge.status-badge.status-badge--wait,
.status-badge.status-badge--wait {
  --bs-badge-color: var(--status-wait-text);
  --bs-badge-bg: var(--status-wait-bg);
  background: var(--status-wait-bg) !important;
  color: var(--status-wait-text) !important;
  border-color: var(--status-wait-border);
}
.badge.status-badge.status-badge--cancel,
.status-badge.status-badge--cancel {
  --bs-badge-color: var(--status-cancel-text);
  --bs-badge-bg: var(--status-cancel-bg);
  background: var(--status-cancel-bg) !important;
  color: var(--status-cancel-text) !important;
  border-color: var(--status-cancel-border);
}
.badge.status-badge.status-badge--hold,
.status-badge.status-badge--hold {
  --bs-badge-color: var(--status-hold-text);
  --bs-badge-bg: var(--status-hold-bg);
  background: var(--status-hold-bg) !important;
  color: var(--status-hold-text) !important;
  border-color: var(--status-hold-border);
}
.badge.status-badge.status-badge--ok,
.status-badge.status-badge--ok {
  --bs-badge-color: var(--status-ok-text);
  --bs-badge-bg: var(--status-ok-bg);
  background: var(--status-ok-bg) !important;
  color: var(--status-ok-text) !important;
  border-color: var(--status-ok-border);
}
.badge.status-badge.status-badge--progress,
.status-badge.status-badge--progress {
  --bs-badge-color: var(--status-progress-text);
  --bs-badge-bg: var(--status-progress-bg);
  background: var(--status-progress-bg) !important;
  color: var(--status-progress-text) !important;
  border-color: var(--status-progress-border);
}

.user-stage-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  font-weight: 600;
  margin-top: 0.2rem;
}
.user-recruitment-card .user-recruitment-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.4rem;
  padding: 1.4rem 1.25rem 1.35rem;
  min-height: 11.5rem;
}
.user-recruitment-card .admin-tile-icon {
  margin: 0 auto 0.15rem;
}
.user-recruitment-card-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--avallo-primary);
  overflow-wrap: anywhere;
  max-width: 22rem;
}
.user-recruitment-card .user-stage-label {
  margin-top: 0;
}
.user-recruitment-card .user-pick-slot-cta {
  display: block;
  color: var(--avallo-primary);
  font-weight: 600;
  margin-top: 0.1rem;
  font-size: 0.92rem;
  line-height: 1.35;
  max-width: 20rem;
}
.user-recruitment-card .user-status-badge,
.user-recruitment-detail .user-status-badge {
  display: inline-block;
  margin-top: 0.1rem;
}
.user-recruitment-card .status-box {
  margin-top: 0.15rem;
}
.user-recruitment-detail-hero .status-box {
  margin-top: 0.45rem;
}
.user-signing-stage .status-box,
.user-recruiter-decision-stage .status-box {
  margin: 0 auto 1rem;
}
.user-recruitment-card .user-status-badge + .user-pick-slot-cta {
  margin-top: 0.15rem;
}
.user-recruitment-card-actions {
  margin-top: 0.45rem;
  width: 100%;
  max-width: 16rem;
}
.user-recruitment-card-actions .btn {
  min-height: 2.5rem;
  font-weight: 600;
}
.user-remaining-line {
  display: block;
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 0.15rem;
  margin-bottom: 0.45rem;
}
.user-remaining-line.is-overdue {
  color: #b42318;
  font-weight: 600;
}
/* Detail: in-flow under hero — no sticky/fixed pin */
.user-recruitment-detail > .card-body .user-remaining-line {
  text-align: center;
  margin-top: 0.2rem;
}

.user-recruitment-detail-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  padding: 0.35rem 0.5rem 0.15rem;
}
.user-recruitment-detail-hero .admin-tile-icon {
  margin-bottom: 0.15rem;
}
.user-recruitment-detail-title {
  margin: 0;
  max-width: 36rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.user-recruitment-detail-hero .user-stage-label {
  margin-top: 0;
}
.user-recruitment-status-row {
  margin-top: 0.1rem;
}
.user-assignment-actions--centered {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}
/* Candidate recruitment detail: primary CTA(s) then resign — stacked & centered */
.user-recruitment-actions {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: center;
}
.user-recruitment-actions .js-candidate-decision:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
/* Interview/booking: actions span full layout width (not only right column) */
.user-booking-layout > .user-recruitment-actions {
  grid-column: 1 / -1;
  justify-self: stretch;
}

/* Survey stage: CTA only — no card border/shadow under the button */
.user-survey-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.user-survey-panel {
  width: 100%;
  max-width: 36rem;
  border: none;
  box-shadow: none;
  background: transparent;
}
.user-survey-panel .user-survey-cta {
  padding: 0.85rem 1.75rem;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
}
.user-recruitment-detail .user-meeting-confirmed,
.user-recruitment-detail .user-meeting-awaiting-recruiter {
  align-items: center;
}
.user-recruitment-detail .user-meeting-confirmed-label,
.user-recruitment-detail .user-meeting-awaiting-recruiter-label {
  justify-content: center;
}

.user-recruitment-card.is-meeting-confirmed,
.user-recruitment-detail.is-meeting-confirmed {
  border-color: rgba(139, 29, 63, 0.35) !important;
  border-left: 5px solid var(--avallo-primary);
  background: linear-gradient(180deg, rgba(139, 29, 63, 0.07) 0%, #fff 42%);
}
.user-recruitment-card.is-meeting-confirmed .admin-tile-icon,
.user-recruitment-detail.is-meeting-confirmed .admin-tile-icon {
  background: var(--avallo-primary) !important;
  color: #fff !important;
}
.user-meeting-confirmed,
.user-meeting-awaiting-recruiter {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.65rem 1rem;
  border-radius: 0.6rem;
  border: 1px solid transparent;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
}
.user-meeting-confirmed {
  background: var(--status-ok-bg);
  border-color: var(--status-ok-border);
  color: var(--status-ok-text);
}
.user-meeting-awaiting-recruiter {
  background: var(--status-wait-bg);
  border-color: var(--status-wait-border);
  color: var(--status-wait-text);
}
.user-meeting-awaiting-recruiter.is-hold {
  background: var(--status-hold-bg);
  border-color: var(--status-hold-border);
  color: var(--status-hold-text);
}
.user-meeting-confirmed-label,
.user-meeting-awaiting-recruiter-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 700;
  color: #1e293b;
  font-size: 0.95rem;
  line-height: 1.3;
}
.user-meeting-confirmed-when,
.user-meeting-awaiting-recruiter-when,
.user-meeting-meta-when {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.22rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
/* Data/czas/typ poza kolorowym status-boxem (lista /moje + szczegół). */
.js-meeting-meta,
.user-recruitment-card .user-meeting-meta-when {
  text-align: center;
  width: 100%;
}
.user-recruitment-card .user-meeting-meta-when,
.user-meeting-meta-when--compact {
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 0.2rem;
}
.user-meeting-confirmed .user-meeting-duration,
.user-meeting-awaiting-recruiter .user-meeting-duration {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #334155;
}
.user-meeting-duration {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
}
.user-meeting-duration--compact {
  margin-top: 0.25rem;
  font-size: 0.8rem;
}
.user-meeting-type {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-align: center;
}
.user-meeting-type--compact {
  margin-top: 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}
.user-meeting-confirmed .user-meeting-type,
.user-meeting-awaiting-recruiter .user-meeting-type {
  margin: 0.35rem 0 0;
  color: #64748b;
}
.user-recruitment-detail .user-meeting-duration {
  text-align: center;
}
.user-recruitment-detail .user-meeting-type {
  text-align: center;
}
.user-recruitment-detail .js-detail-info,
.user-recruitment-detail .js-booking-error {
  text-align: center;
}
.user-recruitment-detail .js-interview-detail > p.text-muted {
  text-align: center;
}
.stage-finish-card .stage-pipeline-head {
  cursor: default;
}
.stage-finish-card .stage-order-circle {
  background: var(--avallo-primary);
  color: #fff;
}

.role-badge-rekruter {
  background: rgba(139, 29, 63, 0.12);
  color: var(--avallo-primary);
  border: 1px solid rgba(139, 29, 63, 0.22);
}
.recruiter-pick-list { max-height: 12rem; overflow: auto; }
/* Dane rekrutacji — zwijana sekcja (jak etapy) */
.recruitment-data-card {
  overflow: hidden;
  scroll-margin-top: 5.75rem;
}
.recruitment-data-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #fff !important;
  padding: 0.55rem 0.85rem !important;
  border-bottom: 1px solid var(--avallo-border, #e5e7eb);
}
.recruitment-data-toggle {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  border: 0;
  background: transparent;
  text-align: left;
  min-width: 0;
  padding: 0.15rem 0;
  color: inherit;
  cursor: pointer;
}
.recruitment-data-toggle:hover .recruitment-data-title {
  color: #8B1D3F;
}
.recruitment-data-title {
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.3;
}
.recruitment-data-chevron {
  margin-left: auto;
  color: #8B1D3F;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.recruitment-data-card.is-collapsed .recruitment-data-chevron {
  transform: rotate(-90deg);
}
.recruitment-data-card.is-collapsed .recruitment-data-body {
  display: none;
}
.recruitment-data-card.is-collapsed .recruitment-data-head {
  border-bottom: 0;
}

/* Osoby kandydujące — pasek akcji i multi-select */
.pool-actions-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem 1rem;
}
.pool-actions-bar__left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-right: auto;
}
.pool-select-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.pool-selected-badge {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 0.35em 0.65em;
}
.pool-people-table .pool-person-row--selectable {
  cursor: pointer;
}
.pool-people-table .pool-person-row--selectable:hover > td {
  background-color: rgba(139, 29, 63, 0.04);
}
.pool-people-table .pool-person-row.is-selected > td {
  background-color: rgba(139, 29, 63, 0.08);
}
.pool-people-table .pool-person-row--selectable:focus-visible {
  outline: 2px solid rgba(139, 29, 63, 0.35);
  outline-offset: -2px;
}
/* Checkbox column: enough left room so inputs aren’t clipped by table-responsive / card overflow */
.pool-people-table-wrap {
  padding-left: 0.25rem;
}
.pool-people-table th:first-child,
.pool-people-table td:first-child,
.pool-people-table .pool-col-check {
  width: 3rem;
  min-width: 3rem;
  padding-left: 0.85rem !important;
  padding-right: 0.4rem !important;
  vertical-align: middle;
}
.pool-people-table td:first-child .form-check-input,
.pool-people-table .pool-col-check .form-check-input {
  margin: 0;
  float: none;
  position: relative;
}
.pool-people-table .pool-col-actions {
  width: 6.5rem;
  white-space: nowrap;
}
.pool-add-existing:not(.d-none) {
  animation: pool-add-in 0.15s ease;
}
@keyframes pool-add-in {
  from { opacity: 0; transform: translateY(-0.25rem); }
  to { opacity: 1; transform: none; }
}
.pool-add-pick-list {
  max-height: 14rem;
  overflow: auto;
  overflow-x: hidden;
  background: #fff;
  /* Extra left padding so flexed checkboxes aren’t clipped by overflow */
  padding: 0.35rem 0.75rem 0.35rem 1rem;
}
.pool-add-pick-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  /* Override Bootstrap .form-check padding-left (1.5em) — flex layout doesn’t use the float trick */
  padding: 0.45rem 0.35rem 0.45rem 0.35rem;
  padding-left: 0.35rem;
  border-radius: 0.35rem;
  min-height: 0;
}
.pool-add-pick-row + .pool-add-pick-row {
  border-top: 1px solid #eef2f7;
}
.pool-add-pick-row .form-check-input {
  margin-top: 0.3rem;
  margin-left: 0; /* cancel Bootstrap .form-check .form-check-input { margin-left: -1.5em } */
  float: none;
  flex-shrink: 0;
  position: relative;
}
.pool-add-pick-row.is-selected {
  background-color: rgba(139, 29, 63, 0.08);
}
.pool-add-pick-row:hover {
  background-color: rgba(139, 29, 63, 0.04);
}

.recruitment-summary dt {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 0.15rem;
}
.recruitment-summary dd {
  margin-bottom: 0.85rem;
}

.outcome-badge { font-weight: 600; letter-spacing: .02em; }
.outcome-badge-lg { font-size: 0.95rem; padding: 0.45rem 0.75rem; }
.outcome-pass { background: #16a34a; color: #fff; }
.outcome-fail { background: #dc2626; color: #fff; }
.outcome-on-hold { background: var(--status-hold-bg); color: var(--status-hold-text); }
.interview-on-hold-reason { color: #c2410c; font-weight: 500; }
.recruiter-on-hold-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin-left: 0.35rem;
  padding-left: 0.55rem;
  border-left: 1px solid #e2e8f0;
}
.recruiter-on-hold-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #c2410c;
  cursor: pointer;
  user-select: none;
}
.recruiter-on-hold-controls .js-on-hold-reason-code {
  width: auto;
  min-width: 11rem;
  max-width: 16rem;
}
.recruiter-on-hold-controls .js-on-hold-reason-other {
  min-width: 12rem;
  max-width: 18rem;
}
.outcome-resign { background: var(--status-cancel-bg); color: var(--status-cancel-text); }
.outcome-none { background: #e2e8f0; color: #475569; }

.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at top left, rgba(139,29,63,0.08), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(197,165,114,0.15), transparent 45%),
    var(--avallo-bg);
  padding: 24px;
  padding-top: max(24px, env(safe-area-inset-top, 0px));
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
  box-sizing: border-box;
  overflow-x: hidden;
}
.login-card {
  background: #fff; border-radius: 16px; padding: 2rem;
  box-shadow: 0 12px 40px rgba(15,23,42,0.08);
  width: 100%; max-width: 420px; border: 1px solid var(--avallo-border);
  box-sizing: border-box;
}
.login-logo { height: 48px; width: auto; display: inline-block; }
.login-card h1 { font-size: 1.4rem; color: var(--avallo-primary); font-weight: 700; }
.login-card .form-control {
  font-size: 16px; /* iOS: avoid auto-zoom */
  min-height: 44px;
  padding: 0.65rem 0.85rem;
}
.login-password-wrap {
  position: relative;
}
.login-password-wrap .form-control {
  padding-right: 2.75rem;
}
.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  color: #64748b;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.login-password-toggle:hover,
.login-password-toggle:focus-visible {
  color: var(--avallo-primary);
  outline: none;
  background: rgba(139, 29, 63, 0.06);
}
.login-card .btn {
  min-height: 48px;
  font-size: 1rem;
}

.footer-bar {
  background: #fff; border-top: 1px solid var(--avallo-border);
  padding: 0.85rem 1rem;
  padding-bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
  text-align: center; color: #94a3b8; font-size: 0.85rem;
}
.footer-bar-copy { margin: 0; }
.footer-bar--login {
  background: transparent;
  border-top: 0;
  margin-top: 1.25rem;
  padding: 0;
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
  width: 100%;
  max-width: 420px;
}

.login-body .login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.module-intro { color: #64748b; }
.table thead th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: #64748b; }

main.container.container-wide {
  max-width: min(1680px, 96vw);
}

.users-page-table-wrap {
  overflow-x: visible;
}

.assign-pick-list {
  max-height: 340px;
  overflow: auto;
  background: #fafbfc;
}

.assign-user-row .form-check-input {
  margin-top: 0.35rem;
}
.assign-user-contact {
  display: block;
  margin-top: 0.15rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.assign-user-contact-sep {
  margin: 0 0.35rem;
}

.assign-contact-icon {
  font-size: 0.78rem;
  margin-left: 0.15rem;
}
.assign-contact-icon--ok {
  color: #198754;
}

.assign-count-badge {
  display: inline-block;
  min-width: 1.75rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  color: var(--avallo-primary, #8B1D3F);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
}

.assign-score {
  white-space: nowrap;
}
.assign-score-pts {
  color: #64748b;
  font-size: 0.85em;
}

.assign-list-table .assign-notify-cell {
  min-width: 11rem;
  max-width: 18rem;
}
.assign-notify-line {
  padding: 0.2rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.assign-notify-line:last-child {
  border-bottom: none;
}
.assign-notify-icon {
  color: #64748b;
  width: 1rem;
  margin-right: 0.15rem;
}
.assign-notify-when {
  font-size: 0.78rem;
}
.assign-notify-status {
  font-size: 0.65rem;
  vertical-align: middle;
  margin-left: 0.2rem;
}
.assign-notify-detail {
  font-size: 0.75rem;
  line-height: 1.35;
  margin-top: 0.1rem;
  overflow-wrap: anywhere;
}
.assign-notify-line--error .assign-notify-detail {
  color: #b91c1c !important;
}

.assign-ref-code {
  font-size: 0.78rem;
  color: #475569;
  background: #f8fafc;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
}

.users-list-table {
  table-layout: fixed;
  width: 100%;
}
.users-list-table th,
.users-list-table td {
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.users-list-table th:nth-child(1),
.users-list-table td.users-cell-no { width: 2.5rem; text-align: center; }
.users-list-table th:nth-child(2),
.users-list-table td.users-cell-user { width: 12%; }
.users-list-table th:nth-child(3),
.users-list-table td.users-cell-contact { width: 13%; }
.users-list-table th:nth-child(4),
.users-list-table td.users-cell-account { width: 13%; }
.users-list-table th:nth-child(5),
.users-list-table td.users-cell-recruitment { width: 14%; }
.users-list-table th:nth-child(6),
.users-list-table td.users-cell-dates { width: 11%; }
.users-list-table th:nth-child(7),
.users-list-table td.users-cell-consents { width: 10%; white-space: nowrap; }
.users-list-table th:nth-child(8),
.users-list-table td.users-cell-pwd { width: 12%; word-break: break-word; }
.users-list-table th:nth-child(9),
.users-list-table td.users-cell-actions { width: 12%; }
.users-list-table .users-pwd-login-link a { font-size: 0.7rem; line-height: 1.25; }
.users-list-table .users-cell-actions .btn {
  padding: 0.2rem 0.45rem;
}

.json-editor {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem; min-height: 420px;
}

.survey-player-shell {
  max-width: 860px; margin: 0 auto;
}
.player-slide-box {
  background: #fff; border: 1px solid var(--avallo-border); border-radius: 12px;
  padding: 1.5rem; box-shadow: 0 4px 16px rgba(15,23,42,0.04);
}
.player-title-bar {
  background: var(--avallo-primary); color: #fff; border-radius: 8px;
  padding: 0.85rem 1.1rem; text-align: center; font-weight: 600; margin-bottom: 1.25rem;
}
.choice-opt {
  display: block; width: 100%; text-align: left; border: 1px solid #e2e8f0;
  background: #f8fafc; border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 0.5rem;
  cursor: pointer; transition: 0.15s;
}
.choice-opt:hover { background: #f1f5f9; }
.choice-opt.selected { background: var(--avallo-primary); color: #fff; border-color: var(--avallo-primary); }
.rating-stars span { font-size: 1.75rem; color: #cbd5e1; cursor: pointer; margin: 0 4px; }
.rating-stars span.selected, .rating-stars span.hovered { color: #f59e0b; }

.result-stat-card {
  background: #fff; border: 1px solid var(--avallo-border); border-radius: 12px;
  padding: 1rem 1.1rem; height: 100%;
}
.result-stat-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; margin-bottom: .25rem; }
.result-stat-value { font-size: 1.5rem; font-weight: 700; color: var(--avallo-primary); line-height: 1.2; }
.result-stat-value-sm { font-size: 1.1rem; }

.competence-summary-table {
  margin-bottom: 0;
}
.competence-summary-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  font-weight: 700;
}
.competence-summary-table td:last-child,
.competence-summary-table th:last-child {
  white-space: nowrap;
  font-weight: 600;
  color: var(--avallo-primary);
}

.result-group-header {
  background: #f8fafc !important; font-weight: 700; color: var(--avallo-primary);
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: .04em;
}
.result-answer-row { padding: 1rem 1.25rem; }
.result-answer-row.is-missing { opacity: 0.72; }
.result-answer-body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.result-answer-content { flex: 1 1 auto; margin-bottom: .75rem; }
.result-q-meta { display: flex; gap: .5rem; align-items: center; margin-bottom: .35rem; }
.result-q-title { font-weight: 600; color: #0f172a; margin-bottom: .35rem; }
.result-q-number { color: var(--avallo-primary); font-weight: 700; margin-right: .15rem; }
.result-required-star {
  color: #dc2626;
  font-weight: bold;
  margin-left: .25rem;
}
.result-required-legend {
  color: #64748b;
  font-weight: normal;
}
.result-required-legend .result-required-star {
  color: #dc2626;
  font-weight: bold;
}
.result-q-desc { font-size: 0.85rem; color: #64748b; margin-bottom: .5rem; }
.result-a-text {
  background: rgba(139, 29, 63, 0.05); border-left: 3px solid var(--avallo-primary);
  padding: .6rem .85rem; border-radius: 0 8px 8px 0; white-space: pre-wrap;
  color: #1e293b; font-size: 1rem;
}
.result-a-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.25rem;
}
.result-correct-answer {
  margin-top: 0.65rem;
}
.result-correct-text {
  background: rgba(22, 101, 52, 0.07);
  border-left: 3px solid #166534;
  padding: .6rem .85rem;
  border-radius: 0 8px 8px 0;
  white-space: pre-wrap;
  color: #14532d;
  font-size: 1rem;
}
.result-answer-row.is-wrong .result-a-text {
  border-left-color: #b91c1c;
  background: rgba(185, 28, 28, 0.05);
}
.result-points-footer {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: .35rem;
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px solid #e2e8f0;
}
.result-points-label { font-size: 0.8rem; color: #64748b; }
.result-points-value { font-size: 1rem; font-weight: 700; color: var(--avallo-accent); }

/* --- Mobile / responsive (wzór Team Points: większy root rem + czytelne UI) --- */
@media (max-width: 960px) {
  /* Team Points: html { font-size: 18px } — skaluje rem w całej aplikacji */
  html { font-size: 18px; }
  body { line-height: 1.55; }

  .avallo-topbar-inner {
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
  }
  .avallo-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  /* Osoba kandydująca: ikonka domu zbędna (logo = start); ukryj cały rząd gdy to jedyny link */
  .avallo-nav-link--candidate-home { display: none !important; }
  .avallo-nav:not(:has(.avallo-nav-link:not(.avallo-nav-link--candidate-home))) {
    display: none;
  }
  .avallo-nav-link span { display: none; }
  .avallo-nav-link {
    padding: 10px 12px;
    flex-shrink: 0;
    min-height: 48px;
    min-width: 48px;
    justify-content: center;
    font-size: 1rem;
  }
  .avallo-nav-link i { margin-right: 0; font-size: 1.15rem; }
  .avallo-topbar-right .btn {
    min-width: 48px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .avallo-user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
  }
  .avallo-logo img { height: 34px; }

  main.container { padding-left: 12px; padding-right: 12px; }
  .table-responsive { font-size: 0.95rem; }

  /* Formularze i przyciski — jak Team Points „BIG & READABLE” */
  .form-control, .form-select, textarea.form-control {
    font-size: 1rem !important; /* >=16px przy root 18px — bez zoomu iOS */
    padding: 0.72rem 0.85rem;
    min-height: 50px;
  }
  .form-label { font-size: 0.95rem; font-weight: 600; }
  .btn {
    font-size: 1rem;
    padding: 0.7rem 1.15rem;
    min-height: 50px;
  }
  .btn-sm {
    font-size: 0.9rem;
    padding: 0.5rem 0.85rem;
    min-height: 42px;
  }
  .recruitment-list-open-btn.btn {
    min-width: var(--recruitment-open-size);
    min-height: var(--recruitment-open-size);
    padding: 0.4rem 0.55rem;
    font-size: 0.85rem;
  }
  .recruitment-list-more-actions .btn,
  .recruitment-list-more-actions .btn-sm {
    font-size: 0.6875rem;
    padding: 0.12rem 0.4rem;
    min-height: 0;
  }
  .alert { font-size: 0.95rem; padding: 0.9rem 1rem; }
  .card { border-radius: 14px; }
  h1, h1.h3, .h3 { font-size: 1.45rem; }
  h2, .h2 { font-size: 1.25rem; }
  .card-title, h5.card-title { font-size: 1.15rem; }

  .login-card { padding: 1.75rem 1.35rem; max-width: 480px; }
  .login-card .btn { min-height: 52px; font-size: 1.05rem; }
}

.templates-est-duration {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.3;
}
.templates-est-duration i {
  margin-right: 0.2rem;
  color: #94a3b8;
  font-size: 0.75rem;
}
.templates-est-duration--inline {
  margin-top: 0;
  font-weight: 500;
}
.templates-stats-cell {
  min-width: 14rem;
  max-width: 22rem;
}
.templates-stats {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
  line-height: 1.25;
  color: #475569;
}
.templates-stats-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.45rem;
  white-space: nowrap;
}
.templates-stat-sep {
  color: #cbd5e1;
  font-weight: 600;
}
.templates-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  white-space: nowrap;
}
.templates-stat i {
  color: #94a3b8;
  font-size: 0.75rem;
}
.templates-stat strong {
  color: #0f172a;
  font-weight: 700;
}
.templates-stat-label {
  color: #64748b;
}
.templates-stat--ok strong { color: #15803d; }
.templates-stat--ok i { color: #22c55e; }
.templates-stat--bad strong { color: #b91c1c; }
.templates-stat--bad i { color: #ef4444; }

.page-back-bar {
  margin: 0 0 1.75rem;
  max-width: 1200px;
}
.page-back-bar--inline {
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.page-back-link,
.av-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.page-back-link:hover,
.page-back-link:focus-visible,
.av-back-btn:hover,
.av-back-btn:focus-visible {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--avallo-primary);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.page-back-link i,
.av-back-btn i {
  font-size: 0.78rem;
  opacity: 0.9;
}
button.page-back-link,
button.av-back-btn {
  cursor: pointer;
  font-family: inherit;
}
.page-back-bar .page-back-link + .page-back-link,
.page-back-bar .page-back-link + .av-back-btn,
.page-back-bar .av-back-btn + .page-back-link {
  margin-left: 0;
}

@media (max-width: 480px) {
  /* Team Points: lekko mniejszy root na wąskich telefonach */
  html { font-size: 17px; }
}

@media (max-width: 575.98px) {
  .avallo-user-name { display: none; }
  .avallo-logo img { height: 30px; }
  main.container { padding-top: 1rem !important; padding-bottom: 1rem !important; }
  .login-page { padding: 16px; padding-top: max(16px, env(safe-area-inset-top, 0px)); padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
  .login-card { padding: 1.5rem; }
  .admin-tile .card-body { flex-wrap: wrap; }
  .admin-tile .card-body .flex-grow-1 h5 {
    font-size: 1.05rem;
    word-break: break-word;
  }

  /* Candidate home — Moje rekrutacje */
  .user-assignments-page .user-assignment-card .card-body {
    gap: 0.4rem;
    padding: 1.25rem 1.05rem 1.2rem;
    min-height: 10.5rem;
  }
  .user-assignments-page .user-assignment-card .admin-tile-icon {
    width: 48px;
    height: 48px;
  }
  .user-assignments-page .user-assignment-card .user-recruitment-card-title {
    font-size: 1.08rem;
    line-height: 1.3;
  }
  .user-assignments-page .user-assignment-actions .btn {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .user-assignments-page .user-assignments-heading {
    font-size: 1.45rem;
    text-align: center;
  }

  /* Szczegóły rekrutacji / CTAs */
  .user-recruitment-detail > .card-body {
    padding: 1.1rem 1rem;
  }
  .user-recruitment-detail-title {
    font-size: 1.25rem;
  }
  .user-recruitment-detail > .card-body .user-remaining-line {
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.35;
    background: #fff;
    border: 1px solid var(--avallo-border);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
    margin-bottom: 0.65rem;
  }
  .user-recruitment-detail > .card-body .user-remaining-line.is-overdue {
    color: #b42318;
    background: #fef2f2;
    border-color: #fecaca;
    box-shadow: 0 2px 10px rgba(180, 35, 24, 0.1);
  }
  .user-survey-panel .user-survey-cta,
  .user-recruitment-actions .btn {
    width: 100%;
    max-width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }
  /* Pytania osoby kandydującej: Powrót + Dalej w jednym rzędzie także na telefonie */
  .user-question-stage .user-cq-submit-actions .btn {
    width: auto;
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 7rem;
    max-width: calc(50% - 0.35rem);
  }
  .user-recruitment-actions .js-candidate-decision:not([hidden]) {
    width: 100%;
    flex-direction: column;
  }
  .user-booking-slot {
    min-height: 48px;
    min-width: 4.75rem;
    padding: 0.55rem 0.8rem;
  }
  .page-back-link,
  .av-back-btn {
    min-height: 48px;
    font-size: 0.95rem;
  }
  .user-home {
    padding-left: 0;
    padding-right: 0;
  }
}

.recruitment-perms {
  border: 1px solid rgba(139, 29, 63, 0.18);
  background: #faf7f8;
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
}
.recruitment-perms-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
  color: var(--avallo-primary);
}
.stage-add-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stage-add-trigger {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 2px dashed rgba(139, 29, 63, 0.45);
  background: #faf7f8;
  color: #8B1D3F;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.stage-add-trigger:hover:not(:disabled) {
  background: #8B1D3F;
  border-color: #8B1D3F;
  border-style: solid;
  color: #fff;
  transform: scale(1.04);
}
.stage-add-trigger:focus-visible {
  outline: 2px solid rgba(139, 29, 63, 0.45);
  outline-offset: 3px;
}
.stage-add-trigger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.stage-add-bar[data-expanded="1"] .stage-add-trigger {
  display: none;
}
.stage-add-panel {
  width: 100%;
  border: 1px dashed rgba(139, 29, 63, 0.38) !important;
}
.stage-add-panel .card-header {
  background: #faf7f8 !important;
}
.stage-add-panel .card-body {
  background: #fff;
}
.stage-add-panel[hidden] {
  display: none !important;
}
.stage-pipeline-card {
  border: 1px solid rgba(139, 29, 63, 0.2) !important;
  border-left: 5px solid #8B1D3F !important;
  box-shadow: 0 10px 28px rgba(139, 29, 63, 0.09);
  margin-bottom: 1.85rem !important;
  overflow: hidden;
  scroll-margin-top: 5.75rem;
}
.stage-pipeline-card.is-first,
#assignForm.card {
  border-color: rgba(139, 29, 63, 0.28) !important;
}
.stage-pipeline-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #faf7f8 !important;
  padding: 0.75rem 0.95rem !important;
  border-bottom: 1px solid rgba(139, 29, 63, 0.12);
}
.stage-reorder-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}
.stage-reorder-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(139, 29, 63, 0.22);
  background: #fff;
  color: rgba(139, 29, 63, 0.75);
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.stage-reorder-handle:hover,
.stage-reorder-handle:focus-visible {
  color: #8b1d3f;
  border-color: rgba(139, 29, 63, 0.45);
  background: rgba(139, 29, 63, 0.06);
  box-shadow: 0 0 0 3px rgba(139, 29, 63, 0.12);
  outline: none;
}
.stage-reorder-handle:active,
.stages-pipeline.is-dragging-active .stage-reorder-handle {
  cursor: grabbing;
}
.stage-reorder-controls--pinned {
  min-width: 4.5rem;
}
.stage-reorder-pin {
  white-space: nowrap;
  font-size: 0.75rem;
}
.stages-pipeline.is-reordering {
  opacity: 0.85;
  pointer-events: none;
}
.stages-reorder-feedback {
  min-height: 1.25rem;
}
.stages-pipeline.is-dragging-active .stage-pipeline-card:not(.is-dragging) {
  transition: transform 0.15s ease, box-shadow 0.15s ease, outline-color 0.15s ease;
}
.stage-pipeline-card.is-dragging {
  opacity: 0.45;
  box-shadow: 0 12px 32px rgba(139, 29, 63, 0.18);
  outline: 2px solid rgba(139, 29, 63, 0.25);
  outline-offset: 2px;
}
.stage-pipeline-card.is-drop-target {
  outline: none;
}
.stage-pipeline-card.is-drop-before {
  box-shadow: inset 0 3px 0 0 #8b1d3f;
}
.stage-pipeline-card.is-drop-after {
  box-shadow: inset 0 -3px 0 0 #8b1d3f;
}
.stage-drag-ghost {
  position: fixed;
  top: -10000px;
  left: -10000px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.92;
  transform: rotate(1.5deg) scale(1.02);
  box-shadow: 0 16px 40px rgba(33, 11, 18, 0.28);
  border-radius: 0.5rem;
  background: #fff;
}
.stage-pipeline-toggle {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  border: 0;
  background: transparent;
  text-align: left;
  min-width: 0;
  padding: 0.1rem 0;
  color: inherit;
  cursor: pointer;
}
.stage-pipeline-toggle:hover .stage-pipeline-title {
  color: #8B1D3F;
}
.stage-pipeline-title,
.stage-pipeline-type,
.stage-pipeline-template,
.stage-pipeline-time {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: inherit;
  font-size: 1rem;
  line-height: 1.2;
  font-family: inherit;
}
.stage-pipeline-type {
  display: inline;
  white-space: nowrap;
  flex-shrink: 0;
}
.stage-pipeline-toggle .js-stage-people-count {
  flex-shrink: 0;
  white-space: nowrap;
  max-width: none;
}
.stage-pipeline-template {
  color: #475569;
  font-weight: 650;
  display: inline;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  max-width: none;
  word-break: break-word;
  flex: 1 1 12rem;
  min-width: 0;
}
.stage-pipeline-template[hidden] {
  display: none !important;
}
.stage-pipeline-time {
  display: inline;
  white-space: nowrap;
  flex-shrink: 0;
  color: #475569;
  font-weight: 700;
  font-size: 0.92rem;
}
.stage-pipeline-time[hidden] {
  display: none !important;
}
.stage-template-select-full,
.stage-template-select-full option {
  text-overflow: unset;
  white-space: normal;
}
.stage-template-full-name {
  word-break: break-word;
  max-width: 100%;
}
.stage-pipeline-attention {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.38rem;
  border-radius: 999px;
  background: #8B1D3F;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}
.stage-pipeline-card.is-collapsed .stage-pipeline-attention {
  display: inline-flex;
}
.stage-pipeline-attention[hidden] {
  display: none !important;
}
/* Info pills (docs awaiting / meetings today) — always visible when count > 0 */
.stage-pipeline-info-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
  flex-shrink: 0;
  max-width: 100%;
}
.stage-pipeline-info-badges[hidden] {
  display: none !important;
}
.stage-pipeline-info-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: rgba(139, 29, 63, 0.1);
  color: #8B1D3F;
  border: 1px solid rgba(139, 29, 63, 0.28);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.stage-pipeline-info-badge--doc_awaiting {
  background: rgba(139, 29, 63, 0.12);
  border-color: rgba(139, 29, 63, 0.35);
}
.stage-pipeline-info-badge--meetings_today {
  background: rgba(139, 29, 63, 0.08);
  border-color: rgba(139, 29, 63, 0.22);
}
.finish-pass-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}
.finish-pass-badge.is-passed {
  background: #16a34a;
  color: #fff;
}
.finish-pass-badge.is-nominated {
  background: #e8e0d8;
  color: #5c4a3a;
}
.finish-pass-badge.is-feedback-pass {
  background: #16a34a;
  color: #fff;
}
.finish-pass-badge.is-feedback-fail {
  background: #dc2626;
  color: #fff;
}
.assign-list-table tr.is-finish-passed {
  background: rgba(22, 163, 74, 0.04);
}
.assign-list-table tr.is-finish-feedback-pass {
  background: rgba(22, 163, 74, 0.06);
}
.assign-list-table tr.is-finish-feedback-fail {
  background: rgba(220, 38, 38, 0.05);
}
.assign-list-table tr.is-finish-negative:not(.is-finish-passed) {
  background: rgba(220, 38, 38, 0.03);
}
.assign-list-table tr.is-interview-negative {
  background: rgba(220, 38, 38, 0.03);
}
.finish-negative-opinion .finish-negative-note,
.finish-interview-ratings .finish-negative-note,
.interview-stage-opinion .interview-stage-opinion-note {
  color: #7f1d1d;
  white-space: pre-wrap;
  word-break: break-word;
}
/* Karty weryfikacji dokumentów (rekruter) — kompaktowa lista + status kolorowy. */
.dv-doc-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.dv-doc-card {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.55rem 0.65rem;
  border: 2px solid #e7dcc8;
  border-radius: 0.45rem;
  background: #fffdf8;
}
.dv-doc-card.dv-doc-status-ok {
  border-color: #198754;
  background: rgba(25, 135, 84, 0.06);
}
.dv-doc-card.dv-doc-status-rejected {
  border-color: #dc3545;
  background: rgba(220, 53, 69, 0.06);
}
.dv-doc-card.dv-doc-status-pending {
  border-color: #e0a800;
  background: rgba(255, 193, 7, 0.08);
}
.dv-doc-card.is-latest-resubmit.dv-doc-status-pending {
  box-shadow: 0 0 0 2px rgba(224, 168, 0, 0.35);
}
.dv-doc-body {
  flex: 1 1 8rem;
  min-width: 0;
}
.dv-doc-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
}
.dv-doc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0.25rem 0;
}
.dv-doc-card .dv-status-badge {
  background: #fff3cd;
  color: #664d03;
}
.dv-doc-card.dv-doc-status-ok .dv-status-badge {
  background: #198754;
  color: #fff;
}
.dv-doc-card.dv-doc-status-rejected .dv-status-badge {
  background: #dc3545;
  color: #fff;
}
.dv-doc-card.dv-doc-status-pending .dv-status-badge {
  background: #ffc107;
  color: #664d03;
}
.dv-doc-reason {
  margin-bottom: 0.2rem;
}
.dv-doc-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
}
.dv-doc-links .js-dv-preview-open {
  font-size: inherit;
  line-height: inherit;
  text-decoration: none;
  vertical-align: baseline;
}
.dv-doc-links .js-dv-preview-open:hover {
  text-decoration: underline;
}
.dv-doc-links .js-dv-delete-btn {
  font-size: inherit;
  line-height: inherit;
  text-decoration: none;
  vertical-align: baseline;
}
.dv-doc-links .js-dv-delete-btn:hover {
  text-decoration: underline;
}
.dv-doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  margin-left: auto;
}
.dv-doc-actions .js-dv-status-btn.active.btn-outline-success {
  background: #198754;
  color: #fff;
}
.dv-doc-actions .js-dv-status-btn.active.btn-outline-danger {
  background: #dc3545;
  color: #fff;
}
.dv-reject-thumb {
  flex: 0 0 3rem;
  width: 3rem;
  height: 3rem;
  display: block;
  border-radius: 0.25rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #f8f5ef;
}
.dv-reject-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dv-reject-thumb-file {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b5c4d;
  text-decoration: none;
  font-size: 1.2rem;
}
.dv-reject-thumb-file.is-missing {
  color: #b45309;
}
.dv-preview-frame {
  min-height: 60vh;
  max-height: 75vh;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dv-preview-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.dv-preview-iframe {
  width: 100%;
  height: 75vh;
  border: 0;
  background: #fff;
}
button.dv-reject-thumb {
  padding: 0;
  cursor: pointer;
}
.finish-interview-ratings .finish-pass-note {
  color: #14532d;
  white-space: pre-wrap;
  word-break: break-word;
}
.finish-pass-toggle .form-check-input {
  cursor: pointer;
}
/* Etap Zakończenie — kolumna „Dodatkowe informacje” (lista label: wartość). */
.finish-extra-info-cell {
  min-width: 12rem;
  max-width: 22rem;
}
.finish-extra-info-list .finish-extra-info-item + .finish-extra-info-item {
  margin-top: 0.35rem;
}
.finish-extra-info-label {
  font-weight: 600;
  font-size: 0.72rem;
  color: #6b5c4d;
  margin: 0;
  line-height: 1.25;
}
.finish-extra-info-value {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.3;
}
/* Builder kolumny „Dodatkowe informacje” w ustawieniach etapu Zakończenie. */
.stage-extra-info-list .stage-extra-info-item {
  border: 1px solid #e5ddd4;
  border-radius: 0.5rem;
  padding: 0.6rem 0.7rem;
  background: #fdfbf9;
}
.stage-extra-info-list .stage-extra-info-item + .stage-extra-info-item {
  margin-top: 0.5rem;
}
.stage-extra-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: end;
}
@media (max-width: 991.98px) {
  .stage-extra-info-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }
}
.stage-order-circle {
  min-width: 1.85rem;
  height: 1.7rem;
  padding: 0 0.58rem;
  border-radius: 999px;
  background: #8B1D3F;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}
.stage-pipeline-chevron {
  margin-left: auto;
  color: #8B1D3F;
  transition: transform 0.15s ease;
}
.stage-pipeline-card.is-collapsed .stage-pipeline-chevron {
  transform: rotate(-90deg);
}
.stage-pipeline-card.is-collapsed .stage-pipeline-body {
  display: none;
}
.stage-pipeline-card.is-collapsed .stage-pipeline-head {
  border-bottom: 0;
}
.stage-delete-form {
  flex-shrink: 0;
}
.stage-settings-form label > span {
  display: block;
  font-size: 0.78rem;
  font-weight: 650;
  color: #64748b;
  margin-bottom: 0.2rem;
}
.stage-pipeline-card .stage-edit-grid {
  margin-top: 0.15rem;
}
.stage-interview-note {
  border: 1px dashed rgba(139, 29, 63, 0.28);
  background: #fff;
  border-radius: 0.65rem;
  padding: 0.85rem 1rem;
  color: #334155;
}
.stage-interview-note i { color: var(--avallo-primary); }
.stage-people-wrap {
  border-top: 1px solid var(--avallo-border);
}
.stage-people-filters {
  background: #fafbfc;
}
.stage-people-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}
.stage-people-filter-search {
  position: relative;
  flex: 1 1 14rem;
  min-width: 12rem;
  max-width: 22rem;
}
.stage-people-filter-search .form-control {
  padding-left: 2rem;
}
.stage-people-filter-icon {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.8rem;
  pointer-events: none;
}
.stage-people-filters-row .form-select {
  width: auto;
  min-width: 11rem;
  max-width: 16rem;
}
.stage-people-filter-check {
  /* Push „Po terminie” / „Z terminem” to the right so it doesn’t crowd the selects/list */
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  padding: 0.15rem 0.4rem;
  min-height: 0;
  white-space: nowrap;
  flex-shrink: 0;
}
/* Undo Bootstrap .form-check float / negative margin that pulls the box left over neighbors */
.stage-people-filter-check .form-check-input {
  float: none;
  margin-left: 0;
  margin-top: 0;
  position: static;
  flex-shrink: 0;
}
.stage-people-filter-count {
  margin-left: auto;
  white-space: nowrap;
}
.stage-people-filter-check ~ .stage-people-filter-count {
  margin-left: 0;
}
.stage-people-wrap .assign-list-table tbody tr.is-filter-hidden {
  display: none !important;
}
.stage-people-wrap .assign-list-table thead th {
  font-size: 0.78rem;
  white-space: nowrap;
}
.stage-people-wrap .recruiter-move-form {
  min-width: 11rem;
  max-width: 18rem;
  text-align: left;
}
.recruiter-move-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  width: 100%;
}
.recruiter-move-row .form-select {
  flex: 1 1 8rem;
  min-width: 0;
  width: auto;
}
.recruiter-move-row .btn {
  flex: 0 0 auto;
  margin-top: 0;
}
.stage-people-wrap .recruiter-rate-form {
  min-width: 0;
  width: 100%;
  text-align: left;
}
.stage-people-wrap .meeting-at-form {
  min-width: 12rem;
}
.stage-people-wrap .meeting-at-form .meeting-at-date {
  width: 9.5rem;
}
.stage-people-wrap .meeting-at-form .meeting-at-time {
  width: 6.2rem;
}
.stage-people-wrap .js-meeting-slot-picker {
  max-height: 14rem;
}
.stage-people-wrap .js-meeting-term-actions .btn {
  white-space: nowrap;
}
.stage-person-actions-cell {
  vertical-align: middle;
}
.stage-person-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.45rem;
  cursor: default;
}
tr.js-meeting-row .stage-person-actions,
tr.js-spectator-row .stage-person-actions {
  cursor: default;
}
.stage-person-actions .js-confirm-form,
.stage-person-actions .js-ajax-reset-interview,
.stage-person-actions .js-ajax-reset-answers {
  display: inline-flex;
  margin: 0;
}
.stage-person-move {
  margin-top: 0.55rem;
  max-width: 18rem;
  margin-left: auto;
  margin-right: auto;
}
.stage-inline-toast {
  margin: 0.75rem 1rem 0;
}
.save-feedback {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.05rem;
  min-height: 1.15em;
  min-width: 0;
  max-width: min(22rem, 100%);
  font-size: 0.8125rem;
  line-height: 1.3;
  order: -1;
}
.save-feedback-flash {
  color: #2f6f4e;
  font-weight: 600;
  transition: opacity 0.45s ease;
}
.save-feedback-flash.is-hiding {
  opacity: 0;
}
.save-feedback-time {
  color: var(--avallo-primary);
  opacity: 0.88;
}
.save-feedback-error {
  color: #b42318;
  font-weight: 500;
}
.stage-people-wrap .assign-list-table tr.is-removing,
.stage-pipeline-card.is-removing {
  opacity: 0;
  transition: opacity 0.22s ease;
}
.stage-people-wrap .assign-list-table tr.is-stage-completed > td {
  background: #f8fafc;
}
.stage-people-wrap .recruiter-rate-row > td {
  background: #faf7f8;
  border-top: 0;
  padding: 0 0.85rem 0.9rem;
}

.stages-editor {
  display: grid;
  gap: 0.75rem;
}
.stage-edit-card {
  border: 1px solid var(--avallo-border);
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.85rem 1rem;
}
.stage-edit-card.is-first {
  background: #faf7f8;
  border-color: rgba(139, 29, 63, 0.18);
}
.stage-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.stage-edit-head strong { font-size: 0.92rem; }
.stage-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
}
.stage-edit-grid > label {
  margin-bottom: 0;
}
.stage-termin-type-duration-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
}
.stage-termin-type-duration-row > label {
  margin-bottom: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.stage-termin-type-duration-row > label > .form-select,
.stage-termin-type-duration-row > label > .form-control {
  width: 100%;
}
.stage-termin-type-duration-row > label > .form-text {
  min-height: 2.4em;
}
.stage-message-templates-grid {
  align-items: start;
}
.stage-message-templates-grid .stage-survey-row {
  margin-bottom: 0;
}
.stage-notify-overrides-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}
.stage-notify-overrides-grid .stage-notify-email-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}
.stage-notify-overrides-grid .stage-survey-row {
  margin-bottom: 0;
}
.stage-notify-overrides-grid textarea.js-stage-notify-email-body,
.stage-notify-overrides-grid textarea.js-start-notify-email-body {
  min-height: 6.5rem;
  font-size: 0.8125rem;
}
.stage-notify-overrides-grid textarea.js-stage-notify-sms-body,
.stage-notify-overrides-grid textarea.js-start-notify-sms-body {
  min-height: 4.25rem;
  width: 100%;
}

/* Termin: zwijane bloki szablonów e-mail / SMS (domyślnie zwinięte) */
.stage-templates-fold {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.5rem;
  background: #fff;
  margin-bottom: 0.85rem;
  overflow: hidden;
}
.stage-templates-fold-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-align: left;
  background: #f8fafc;
  border: 0;
  padding: 0.65rem 0.85rem;
  font-weight: 650;
  color: #0f172a;
  cursor: pointer;
}
.stage-templates-fold-toggle:hover {
  background: #f1f5f9;
}
.stage-templates-fold-title {
  flex: 1 1 auto;
  min-width: 0;
}
.stage-templates-fold-meta {
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 600;
}
.stage-templates-fold-chevron {
  color: var(--avallo-primary, #8B1D3F);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.stage-templates-fold.is-collapsed .stage-templates-fold-chevron {
  transform: rotate(-90deg);
}
.stage-templates-fold-body {
  padding: 0.75rem 0.85rem 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}
.stage-templates-fold.is-collapsed .stage-templates-fold-body {
  display: none;
}

/* Ustawienia etapu — zwijane (domyślnie zwinięte; bez zapisu stanu) */
.stage-settings-fold-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 0;
  background: #f8fafc;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.stage-settings-fold-toggle:hover {
  background: #f1f5f9;
}
.stage-settings-fold-chevron {
  color: #8B1D3F;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.stage-settings-fold.is-collapsed .stage-settings-fold-chevron {
  transform: rotate(-90deg);
}
.stage-settings-fold.is-collapsed .stage-settings-fold-body {
  display: none;
}

/* Podgląd kafelka /moje na karcie etapu */
.stage-candidate-tile-block {
  background: linear-gradient(180deg, #fafbfc 0%, #fff 48%);
}
.stage-candidate-tile-preview-wrap {
  max-width: 22rem;
}
.stage-candidate-tile-preview .user-recruitment-card {
  pointer-events: none;
  cursor: default;
}
.stage-candidate-tile-preview .js-tile-preview-instruction {
  text-align: center;
  margin-top: 0.35rem;
}
.stage-candidate-tile-preview .js-tile-preview-description,
.user-recruitment-card .user-tile-description {
  text-align: center;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.45;
  margin: 0.25rem 0 0.45rem;
}
.stage-candidate-tile-preview .js-tile-preview-description > :first-child,
.user-recruitment-card .user-tile-description > :first-child {
  margin-top: 0;
}
.stage-candidate-tile-preview .js-tile-preview-description > :last-child,
.user-recruitment-card .user-tile-description > :last-child {
  margin-bottom: 0;
}
.user-recruitment-card .user-tile-booking-title {
  text-align: center;
}
.stage-candidate-tile-edit-inner h4 {
  margin-top: 0;
}
.stage-candidate-tile-edit .js-tile-desc-field .simple-rich-editor {
  background: #fff;
  border-radius: 0.35rem;
}

.stage-edit-card label > span,
.stage-survey-row > span,
.stage-edit-grid > label > span {
  display: block;
  font-size: 0.78rem;
  font-weight: 650;
  color: #64748b;
  margin-bottom: 0.2rem;
}
.stage-auto-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.92rem;
  font-weight: 650;
  color: #1e293b;
  line-height: 1.35;
}
.stage-auto-row .form-check-input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}
.stage-survey-row[hidden],
.stage-auto-row[hidden],
.js-stage-notify-wrap[hidden],
.js-stage-interview-wrap[hidden],
.js-add-stage-interview[hidden],
.js-stage-question-wrap[hidden],
.js-add-stage-question[hidden],
.js-finish-bulk-notify[hidden],
.js-finish-row-notify[hidden],
.js-finish-notify-status[hidden] { display: none !important; }

.stage-cq-item {
  background: #f8fafc;
}
.stage-cq-opt .form-control,
.stage-cq-opt .form-select {
  font-size: 0.875rem;
}

.user-question-stage .user-cq-item {
  border: 0;
  padding: 0;
  margin: 0 0 1.25rem;
}
.user-candidate-questions-form.is-sequential .user-cq-item[hidden] {
  display: none !important;
}
.user-candidate-questions-form .js-cq-step-error {
  min-height: 1.25rem;
}
/* Hasło do PDF po pobraniu / wysyłce dokumentu — box z hasłem */
.user-candidate-questions-form .cq-download-password-hint,
.user-candidate-questions-form .js-cq-download-password-hint {
  margin: 0.85rem 0 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}
.user-candidate-questions-form .cq-download-password-box {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1rem 1.15rem;
  border: 1px solid #fecaca;
  border-left: 4px solid #b91c1c;
  border-radius: 0.75rem;
  background: linear-gradient(165deg, #fff7f7 0%, #fff1f2 55%, #fef2f2 100%);
  box-shadow: 0 1px 3px rgba(127, 29, 29, 0.06);
}
.user-candidate-questions-form .cq-download-password-box-icon {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  background: rgba(185, 28, 28, 0.1);
  color: #b91c1c;
  font-size: 1.05rem;
}
.user-candidate-questions-form .cq-download-password-box-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.user-candidate-questions-form .cq-download-password-hint .cq-download-password-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: #b91c1c;
  user-select: all;
  word-break: break-word;
}
.user-candidate-questions-form .cq-download-password-note {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
  color: #475569;
}
/* Wcześniej wgrany / właśnie wybrany plik na kroku upload */
.user-candidate-questions-form .cq-upload-saved-hint,
.user-candidate-questions-form .js-cq-upload-saved {
  margin: 0.65rem 0 0;
  padding: 0;
}
.user-candidate-questions-form .cq-upload-saved-box {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 0.9rem 1.05rem;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #15803d;
  border-radius: 0.75rem;
  background: linear-gradient(165deg, #f0fdf4 0%, #ecfdf5 55%, #f0fdf4 100%);
  box-shadow: 0 1px 3px rgba(21, 128, 61, 0.07);
}
.user-candidate-questions-form .cq-upload-saved-box.is-pending {
  border-color: #bfdbfe;
  border-left-color: #1d4ed8;
  background: linear-gradient(165deg, #eff6ff 0%, #f0f9ff 55%, #eff6ff 100%);
  box-shadow: 0 1px 3px rgba(29, 78, 216, 0.07);
}
.user-candidate-questions-form .cq-upload-saved-media {
  flex: 0 0 auto;
  width: 4.5rem;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d1fae5;
}
.user-candidate-questions-form .cq-upload-saved-box.is-pending .cq-upload-saved-media {
  border-color: #bfdbfe;
}
.user-candidate-questions-form .cq-upload-saved-icon {
  background: rgba(21, 128, 61, 0.1);
  border-color: transparent;
  color: #15803d;
  font-size: 1.35rem;
}
.user-candidate-questions-form .cq-upload-saved-box.is-pending .cq-upload-saved-icon {
  background: rgba(29, 78, 216, 0.1);
  color: #1d4ed8;
}
.user-candidate-questions-form .cq-upload-saved-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.user-candidate-questions-form .cq-upload-saved-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.user-candidate-questions-form .cq-upload-saved-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  color: #15803d;
}
.user-candidate-questions-form .cq-upload-saved-box.is-pending .cq-upload-saved-title {
  color: #1d4ed8;
}
.user-candidate-questions-form .cq-upload-saved-name {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  color: #0f172a;
  word-break: break-word;
  text-decoration: none;
}
.user-candidate-questions-form a.cq-upload-saved-name {
  color: #0f172a;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.user-candidate-questions-form a.cq-upload-saved-name:hover {
  color: #15803d;
}
.user-candidate-questions-form .cq-upload-saved-note {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  color: #475569;
}
.user-candidate-questions-form[hidden],
.user-cq-splash[hidden] {
  display: none !important;
}

/* Plansza wprowadzająca przed pytaniami */
.user-cq-splash {
  margin: 0 0 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}
.user-cq-splash-media {
  overflow: hidden;
  background: #0f172a;
  position: relative;
}
/* S/M/L — stała wysokość + cover (bez białych ramek / letterbox) */
.user-cq-splash-media--s,
.user-cq-splash-media--m,
.user-cq-splash-media--l {
  width: 100%;
  margin: 1.1rem 1.2rem 0;
  border-radius: 8px;
}
.user-cq-splash-media--s { max-width: 200px; height: 132px; }
.user-cq-splash-media--m { max-width: 340px; height: 168px; }
.user-cq-splash-media--l { max-width: 480px; height: 196px; }
/* Cała szerokość — baner o stałej wysokości (nie góruje nad treścią) */
.user-cq-splash-media--full,
.user-cq-splash-media--banner {
  width: 100%;
  max-width: none;
  height: 160px;
  margin: 0;
  border-radius: 0;
}
.user-cq-splash-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.user-cq-splash-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem 1.2rem 1.35rem;
}
.user-cq-splash-title {
  font-size: 1.35rem;
  font-weight: 650;
  color: #1e293b;
  margin: 0;
  line-height: 1.3;
}
.user-cq-splash-desc {
  color: #475569;
  font-size: 0.98rem;
  line-height: 1.55;
}
.user-cq-splash-desc p:last-child {
  margin-bottom: 0;
}
.user-cq-splash-video {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  border-radius: 8px;
  overflow: hidden;
}
.user-cq-splash-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.user-cq-splash-actions {
  margin-top: 0.35rem;
}
.user-cq-splash-actions .btn {
  width: 100%;
  max-width: 22rem;
}
.user-cq-splash.is-centered .user-cq-splash-media--s,
.user-cq-splash.is-centered .user-cq-splash-media--m,
.user-cq-splash.is-centered .user-cq-splash-media--l {
  margin-left: auto;
  margin-right: auto;
}
.user-cq-splash.is-centered .user-cq-splash-body {
  text-align: center;
  align-items: center;
}
.user-cq-splash.is-centered .user-cq-splash-video {
  margin-left: auto;
  margin-right: auto;
}
.user-cq-splash.is-centered .user-cq-splash-actions {
  display: flex;
  justify-content: center;
  width: 100%;
}
.user-cq-splash.is-centered .user-cq-splash-actions .btn {
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 576px) {
  .user-cq-splash-body {
    padding: 1.5rem 1.5rem 1.6rem;
  }
  .user-cq-splash-media--s,
  .user-cq-splash-media--m,
  .user-cq-splash-media--l {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
  }
  .user-cq-splash.is-centered .user-cq-splash-media--s,
  .user-cq-splash.is-centered .user-cq-splash-media--m,
  .user-cq-splash.is-centered .user-cq-splash-media--l {
    margin-left: auto;
    margin-right: auto;
  }
  .user-cq-splash-media--full,
  .user-cq-splash-media--banner {
    height: 200px;
  }
  .user-cq-splash-actions .btn {
    width: auto;
  }
}

.user-cq-splash.is-centered .user-cq-splash-actions .btn {
  min-width: 12rem;
}

/* Boxy grup (badanie lek. / psych.) — hub wewnątrz etapu */
.user-question-stage.has-cq-boxes .user-cq-stage-hub {
  text-align: center;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}
.user-cq-stage-hub-label .user-stage-label {
  display: inline-block;
}
.user-cq-stage-hub-title {
  font-weight: 650;
  color: #0f172a;
}
.user-cq-stage-hub-lead {
  font-size: 0.95rem;
  line-height: 1.45;
}
.user-question-stage.is-in-group .user-cq-stage-hub {
  display: none;
}
.user-cq-groups-overview {
  margin-top: 0.25rem;
}
.user-cq-groups-lead {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}
/* Zawsze ten sam układ: obok siebie na desktopie, stos na mobile.
   Osobne klasy — bez .user-valuation-layout (ten jest kolumną flex). */
.user-cq-groups-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
  align-items: stretch;
}
@media (min-width: 640px) {
  .user-cq-groups-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.user-cq-group-box {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.user-cq-group-box:hover,
.user-cq-group-box:focus-within {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.16);
  transform: translateY(-1px);
}
.user-cq-group-box.is-complete {
  border-color: #059669;
  background: linear-gradient(165deg, #ecfdf5 0%, #f0fdf4 100%);
}
.user-cq-group-box.is-progress {
  border-color: #f59e0b;
  background: linear-gradient(165deg, #fffbeb 0%, #fff7ed 100%);
}
.user-cq-group-box-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 1.15rem 1.25rem 1.25rem;
  min-width: 0;
}
.user-cq-group-box-status {
  min-height: 1.25rem;
  font-size: 0.9rem;
  font-weight: 650;
  color: #059669;
}
.user-cq-group-box-status.is-pending {
  color: #64748b;
  font-weight: 600;
}
.user-cq-group-box-status.is-progress {
  color: #b45309;
}
.user-cq-group-box-status.is-done {
  color: #059669;
}
.user-cq-group-box-title {
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1.3;
  color: #0f172a;
  margin: 0 0 0.35rem;
}
.user-cq-group-box-hint {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}
.user-cq-group-box.is-complete .user-cq-group-box-hint {
  color: #047857;
}
.user-cq-group-box-actions {
  margin-top: auto;
  padding-top: 0.75rem;
}
.user-cq-group-box-actions .btn {
  width: 100%;
}
.user-cq-group-context {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.75rem;
}
.user-cq-group-context-title {
  font-size: 0.95rem;
  margin-top: 0.15rem;
}
.user-cq-group-context-sep {
  margin: 0 0.35rem;
  color: #94a3b8;
}

.stage-cq-intro-img-preview {
  width: 72px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: #e2e8f0;
  flex-shrink: 0;
}
.stage-cq-intro-img-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Umowa — przełącznik FAQ (przycisk nad i pod treścią, widok osobny) */
.user-contract-doc-panel[hidden],
.user-contract-qa-panel[hidden] {
  display: none !important;
}
.contract-qa-actions {
  max-width: 210mm;
  margin: 1.25rem auto 0;
  display: flex;
  justify-content: center;
}
.contract-qa-actions--above {
  margin: 0 auto 1.25rem;
}
.contract-qa-actions--below {
  margin: 1.25rem auto 0;
}
.contract-qa-toolbar {
  max-width: 210mm;
  margin: 0 auto 0.85rem;
  display: flex;
  justify-content: flex-start;
}
.contract-qa-toolbar--bottom {
  margin: 1rem auto 0.25rem;
}
/* Panel FAQ — jasne tło (jak przed pełnym bordowym stylem) */
.contract-qa-box {
  max-width: 210mm;
  margin: 0 auto;
  padding: 1.15rem 1.25rem 1.35rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.contract-qa-inner {
  font-size: 0.95rem;
  line-height: 1.45;
  color: #404040;
}
.contract-qa-inner > :first-child {
  margin-top: 0;
}
.contract-qa-inner > :last-child {
  margin-bottom: 0;
}
.contract-qa-ask {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}
.contract-qa-ask-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}
.contract-qa-ask-feedback {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}
.contract-qa-ask-feedback.is-ok {
  color: #166534;
}
.contract-qa-ask-feedback.is-error {
  color: #b91c1c;
}
/* Akceptacja umowy — przycisk w dokumencie */
.contract-accept-box {
  max-width: 210mm;
  margin: 1.25rem auto 0;
  padding: 1.15rem 1.15rem 1.25rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #f8fafc;
}
.contract-accept-box.is-invalid {
  border-color: #dc2626;
  background: #fef2f2;
}
.contract-accept-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
}
.contract-accept-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-align: left;
  margin: 0;
  padding: 0;
  min-height: 1.5rem;
  max-width: 100%;
}
.contract-accept-check .form-check-input {
  float: none;
  margin: 0;
  flex-shrink: 0;
}
.contract-accept-check .form-check-label {
  margin: 0;
}
.contract-accept-feedback {
  display: none;
  color: #b91c1c;
  font-size: 0.875rem;
  margin: 0;
  width: 100%;
  text-align: center;
}
.contract-accept-box.is-invalid .contract-accept-feedback {
  display: block;
}
.contract-accept-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0;
}
.contract-accept-box .btn {
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  min-height: 48px;
  font-weight: 600;
  max-width: 100%;
}
.contract-accept-required {
  color: #64748b;
  font-size: 0.8125rem;
  margin: 0;
  width: 100%;
  text-align: center;
}
.contract-accept-disabled-note {
  max-width: 210mm;
}
.contract-accept-success {
  max-width: 210mm;
  margin: 0.75rem auto 0;
}
.user-contract-canvas {
  margin-bottom: 0.5rem;
}

/* Pływający pasek akcji — akceptacja umowy / Powrót w Q&A (gdy przycisk w dokumencie poza viewportem) */
.contract-accept-bar,
.cq-back-bar,
.contract-qa-back-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  width: 100%;
  margin: 0;
  padding: 0.75rem 1rem;
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.97);
  border: none;
  border-top: 1px solid #e5e7eb;
  border-radius: 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}
.contract-accept-bar[hidden],
.cq-back-bar[hidden],
.contract-qa-back-bar[hidden] {
  display: none !important;
  pointer-events: none !important;
}
.contract-accept-bar .contract-accept-box {
  max-width: 960px;
  margin: 0 auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}
.contract-accept-bar .contract-accept-box.is-invalid {
  border: none;
  background: transparent;
}
.contract-accept-bar:has(.contract-accept-box.is-invalid) {
  background: #fef2f2;
  border-top-color: #fecaca;
}
.contract-accept-bar .contract-accept-inner {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: left;
  gap: 0.55rem 1rem;
}
.contract-accept-bar .contract-accept-actions {
  flex: 1 1 auto;
  min-width: min(100%, 16rem);
}
.contract-accept-bar .btn,
.cq-back-bar .btn,
.contract-qa-back-bar .btn,
.contract-qa-back-bar .av-back-btn {
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  min-height: 48px;
  font-weight: 600;
  max-width: 100%;
}
.cq-back-bar-inner,
.contract-qa-back-bar-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 1rem;
}
body.has-contract-accept-bar .user-contract-main:not([hidden]),
body.has-contract-accept-bar .doc-a4-canvas:not(.user-contract-canvas) {
  padding-bottom: var(--contract-accept-bar-height, 8.5rem);
}
body.has-cq-back-bar .user-question-stage,
body.has-cq-back-bar .user-candidate-questions-form {
  padding-bottom: var(--cq-back-bar-height, 5rem);
}
body.has-contract-qa-back-bar .user-contract-qa-panel:not([hidden]) {
  padding-bottom: var(--contract-qa-back-bar-height, 5rem);
}
@media (max-width: 575.98px) {
  .contract-accept-bar,
  .cq-back-bar,
  .contract-qa-back-bar {
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  }
  .contract-accept-bar .contract-accept-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .contract-accept-bar .contract-accept-check {
    justify-content: flex-start;
    text-align: left;
  }
  .contract-accept-bar .contract-accept-actions {
    flex-direction: column;
    width: 100%;
    min-width: 0;
  }
  .contract-accept-bar .btn,
  .cq-back-bar .btn,
  .contract-qa-back-bar .btn,
  .contract-qa-back-bar .av-back-btn {
    width: 100%;
  }
  .cq-back-bar-inner,
  .contract-qa-back-bar-inner {
    flex-direction: column;
    align-items: stretch;
  }
}
.user-contract-main[hidden] {
  display: none !important;
}
.js-stage-splash-main[hidden] {
  display: none !important;
}

.user-question-stage .user-cq-submit-actions {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: row; /* override .user-recruitment-actions column */
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem 0.85rem;
  width: 100%;
}
.user-question-stage .user-cq-submit-actions .js-cq-back-btn[hidden] {
  display: none !important;
}
.user-question-stage .user-cq-submit-actions .btn {
  width: auto;
  max-width: none;
  min-width: 8.5rem;
  flex: 0 1 auto;
}
.user-question-stage .user-cq-submit-actions .js-cq-download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.55rem 0.75rem;
  width: 100%;
  max-width: 36rem;
}
.user-question-stage .user-cq-submit-actions .js-cq-download-actions[hidden] {
  display: none !important;
}
.user-question-stage .user-cq-submit-actions .js-cq-download-action-btn,
.user-question-stage .user-cq-submit-actions .js-cq-email-action-btn {
  max-width: 18rem;
  flex: 1 1 11rem;
  white-space: normal;
  line-height: 1.25;
}
@media (max-width: 575.98px) {
  .user-question-stage .user-cq-submit-actions .js-cq-download-actions {
    flex-direction: column;
    align-items: stretch;
    max-width: none;
  }
  .user-question-stage .user-cq-submit-actions .js-cq-download-action-btn,
  .user-question-stage .user-cq-submit-actions .js-cq-email-action-btn {
    max-width: none;
    width: 100%;
  }
}
.user-question-stage .user-cq-submit-actions.is-download-gate .js-cq-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
/* Główna akcja pobrania jest na dole — ukryj mały „Pobierz PDF” w podglądzie. */
.user-question-stage .js-cq-q-media[data-download-step="1"] .js-cq-doc-pdf {
  display: none !important;
}
/* Duży odstęp od „Dalej / Wyślij”, żeby uniknąć missclick rezygnacji */
.user-question-stage .user-cq-resign-actions {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.14);
  gap: 1rem;
}
.user-question-stage .user-cq-resign-actions .js-candidate-resign {
  min-height: 2.75rem;
}
.user-question-stage .user-cq-question {
  font-size: 1.05rem;
  font-weight: 650;
  color: #1e293b;
  margin-bottom: 0.65rem;
  float: none;
  width: 100%;
}
.user-question-stage .user-cq-options {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.user-question-stage .user-cq-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  color: #1e293b;
}
.user-question-stage .user-cq-option:has(input:checked) {
  border-color: var(--avallo, #0d6efd);
  background: #f0f7ff;
}
.user-question-stage .user-cq-option input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

/* Etap Wycena — karty wyboru (osoba kandydująca) + pola admin */
.user-valuation-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.user-valuation-choice-copy {
  max-width: 48rem;
  margin: 0 auto 1.5rem;
  width: 100%;
}
.user-valuation-choice-copy.is-centered {
  text-align: center;
}
.user-valuation-choice-lead {
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}
.user-valuation-choice-guide {
  background: #e8edf3;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 1.15rem 1.25rem 1.2rem;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.user-valuation-choice-copy.is-centered .user-valuation-choice-guide {
  margin-left: auto;
  margin-right: auto;
}
.user-valuation-choice-guide--in-layout {
  max-width: 48rem;
  width: 100%;
  margin: 1rem auto 1.25rem;
}
.user-valuation-text-block .user-valuation-choice-guide--in-layout {
  margin-top: 0.85rem;
  margin-bottom: 1rem;
}
.user-valuation-choice-guide-inner {
  color: #1e293b;
  font-size: 0.98rem;
  line-height: 1.65;
  white-space: pre-line;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.user-valuation-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: stretch;
}
.user-valuation-layout.is-centered {
  align-items: center;
}
.user-valuation-layout > .user-valuation-text-block,
.user-valuation-layout > .user-valuation-card {
  /* BFC: marginesy/float z HTML nie „wycieka” na sąsiednie bloki */
  display: flow-root;
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  overflow: visible;
  isolation: isolate;
}
.user-valuation-layout .user-valuation-card {
  max-width: 36rem;
}
.user-valuation-layout.is-centered .user-valuation-card {
  text-align: center;
}
.user-valuation-layout.is-centered .user-valuation-card-actions {
  display: flex;
  justify-content: center;
}
.user-valuation-text-block {
  color: #334155;
  font-size: 1rem;
  line-height: 1.55;
  max-width: 48rem;
}
.user-valuation-layout.is-centered .user-valuation-text-block {
  text-align: center;
}
.user-valuation-text-block p:last-child {
  margin-bottom: 0;
}
.user-valuation-text-block h1,
.user-valuation-text-block h2,
.user-valuation-text-block h3 {
  color: #1e293b;
  line-height: 1.3;
  margin-top: 0.25rem;
}
.stage-layout-list .stage-layout-block {
  border-color: #e2e8f0 !important;
}
.stage-layout-block .simple-rich-editor .email-body-editor-visual {
  min-height: 5.5rem;
}
/* Admin: podgląd układu jak u osoby kandydującej — treść wyśrodkowana domyślnie */
.stage-layout-list--centered .stage-layout-block[data-block-type="text"] .email-body-editor-visual {
  text-align: center;
}
.user-valuation-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.user-valuation-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}
.user-valuation-card-media {
  aspect-ratio: 16 / 9;
  background: #f1f5f9;
  overflow: hidden;
  text-align: center;
}
.user-valuation-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.user-valuation-text-block img,
.user-valuation-card-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
}
.user-valuation-resign-actions {
  margin-top: 1.75rem;
}
.user-valuation-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.1rem 1.15rem 1.2rem;
  flex: 1;
}
.user-valuation-card-title {
  font-size: 1.1rem;
  font-weight: 650;
  color: #1e293b;
  margin: 0;
  line-height: 1.35;
}
.user-valuation-card-desc {
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.5;
  flex: 1;
}
.user-valuation-card-desc--secondary {
  flex: 0;
  font-size: 0.85rem;
  opacity: 0.9;
}
.user-valuation-card-content {
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.5;
  flex: 1;
}
.user-valuation-card-content p:last-child {
  margin-bottom: 0;
}
.user-valuation-card--form {
  border-color: #bbf7d0;
}
.user-valuation-card-actions {
  margin-top: 0.35rem;
}
.user-valuation-card-btn {
  width: 100%;
  justify-content: center;
}
.stage-valuation-img-preview {
  width: 72px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}
.stage-valuation-img-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stage-valuation-card-fields {
  border-color: #e2e8f0 !important;
}
.stage-valuation-item.is-selected > label .fw-semibold {
  color: #8B1D3F;
}

.user-question-stage .user-cq-option-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.user-question-stage .user-cq-opt-media {
  margin: 0 0 0.35rem 0.25rem;
  padding: 0.75rem 0.85rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.5rem;
  background: #f8fafc;
}
.user-question-stage .user-cq-att-link {
  color: #0f172a;
  text-decoration: none;
  font-weight: 500;
}
.user-question-stage .user-cq-att-link:hover {
  text-decoration: underline;
  color: var(--avallo, #0d6efd);
}
.user-question-stage .user-cq-doc {
  position: relative;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.user-question-stage .user-cq-doc-title {
  font-size: 0.95rem;
}
/* Podgląd 1:1 z Dokumentami — kartka A4 (doc-a4-sheet), bez „karty” zwężającej layout. */
.user-question-stage .user-cq-doc-a4 {
  margin-top: 0.25rem;
}
.user-question-stage .user-cq-doc-body-wrap {
  position: relative;
  overflow: hidden;
}
.user-question-stage .user-cq-doc-watermark {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  display: none;
}
.user-question-stage .user-cq-doc-body {
  position: relative;
  z-index: 2;
  /* Dziedzicz typografię z .doc-a4-sheet — nie nadpisuj font-size/line-height. */
}
.user-question-stage .user-cq-doc-body .document-word-watermark {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}
/* Live placeholder spans must not shift baseline/line-height vs surrounding text
   (imported docs often wrap text in sized spans; an unstyled inner span can sit high).
   Keep them in normal flow so long addresses stay in the same layout slot as {{token}}. */
.user-question-stage .user-cq-doc-body .js-cq-ph,
.doc-a4-sheet .js-cq-ph {
  display: inline;
  position: static;
  float: none;
  vertical-align: baseline;
  line-height: inherit;
  font-size: inherit;
  font-weight: inherit;
  font-family: inherit;
  letter-spacing: inherit;
  white-space: inherit;
}

.stage-cq-opt-media .stage-cq-att-item a {
  word-break: break-word;
}
.stage-cq-doc-list {
  max-height: 9rem;
  overflow: auto;
}
.stage-cq-ph-map {
  padding: 0.5rem 0.6rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.4rem;
  background: #fff;
}
.stage-cq-ph-map code {
  font-size: 0.8em;
}
.stage-cq-notify .form-control {
  font-size: 0.875rem;
}
.stage-cq-on-answer,
.stage-cq-notify {
  border-color: #cbd5e1 !important;
}
.stage-cq-opt .stage-cq-notify {
  margin-top: 0.5rem;
}

.recruiter-stage-cols {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 0;
  overflow-x: auto;
}
.recruiter-stage-col {
  min-width: 240px;
  padding: 0.85rem;
  border-right: 1px solid var(--avallo-border);
  background: #fafbfc;
}
.recruiter-stage-col:last-child { border-right: 0; }
.recruiter-stage-col h3 {
  font-size: 0.92rem;
  margin: 0 0 0.2rem;
}
.recruiter-stage-meta {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.7rem;
}
.recruiter-person {
  background: #fff;
  border: 1px solid var(--avallo-border);
  border-radius: 0.65rem;
  padding: 0.7rem 0.75rem;
  margin-bottom: 0.6rem;
}
.recruiter-person strong { display: block; font-size: 0.9rem; }
.recruiter-person .small { color: #64748b; }
.recruiter-rate-form {
  width: 100%;
  max-width: 100%;
}
.recruiter-rate-form .recruiter-rate-label,
.recruiter-move-form label {
  font-size: 0.75rem;
  font-weight: 650;
  color: #64748b;
  display: block;
  margin-top: 0.4rem;
  margin-bottom: 0.2rem;
}
.recruiter-rating-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.15rem 0 0.35rem;
}
.recruiter-rating-opt {
  display: inline-flex;
  position: relative;
  margin: 0;
  cursor: pointer;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  user-select: none;
}
.recruiter-rating-opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.recruiter-rating-opt span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.15rem;
  height: 2.15rem;
  padding: 0 0.4rem;
  border: 1.5px solid var(--avallo-primary);
  border-radius: 0.45rem;
  color: var(--avallo-primary);
  background: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.recruiter-rating-opt:hover span {
  background: rgba(139, 29, 63, 0.08);
}
.recruiter-rating-opt input:checked + span {
  background: var(--avallo-primary);
  border-color: var(--avallo-primary);
  color: #fff;
}
.recruiter-rating-opt input:focus-visible + span {
  outline: 2px solid var(--avallo-accent);
  outline-offset: 2px;
}
.recruiter-rating-legacy { color: #64748b; }
.recruiter-rating-note {
  display: block;
  width: 100%;
  min-height: 6.5rem;
  resize: vertical;
}

.live-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  font-size: 0.8rem;
  line-height: 1.3;
}
.live-progress[hidden] { display: none !important; }
.live-progress-survey { font-weight: 650; color: #334155; }
.live-progress-fraction {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #8B1D3F;
  background: #f8eef2;
  border: 1px solid #e8d0d8;
  padding: 0.05rem 0.4rem;
  border-radius: 0.35rem;
  letter-spacing: 0.02em;
}
.live-progress-slide { color: #475569; }
.live-progress-id {
  font-size: 0.72em;
  color: #64748b;
  background: #f1f5f9;
  padding: 0.05rem 0.3rem;
  border-radius: 0.25rem;
}
.live-progress-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #b45309;
}
.live-progress-watch {
  font-weight: 650;
  color: var(--avallo-primary);
  text-decoration: none;
}
.live-progress-watch:hover { text-decoration: underline; }
.live-progress-name {
  font-weight: 650;
  color: inherit;
  text-decoration: none;
}
.live-progress-name:hover { color: var(--avallo-primary); text-decoration: underline; }
tr.is-live-row { cursor: pointer; }
tr.is-live-row:hover > td { background: rgba(139, 29, 63, 0.04); }

/* Obecność osoby kandydującej — tylko lista osób na etapie rekrutacji */
.candidate-presence {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  line-height: 1.2;
  margin-bottom: 0.15rem;
  font-weight: 500;
}
.candidate-presence--online {
  color: #15803d;
}
.candidate-presence--offline {
  color: #94a3b8;
  font-weight: 400;
}
.candidate-presence-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

/* Kalendarz rekrutera (Reservio) */
/* Row height = min duration track; booked tiles may grow taller than span. */
.cal-page {
  --cal-row-h: 52px;
  --cal-grid-minor: rgba(100, 116, 139, 0.14);
  --cal-grid-major: rgba(100, 116, 139, 0.26);
  --cal-grid-col: var(--avallo-border);
  --cal-empty-bg: #f8fafc;
  --cal-unavail-bg: #f1f5f9;
  --cal-unavail-border: #e2e8f0;
  --cal-unavail-text: #64748b;
}
.cal-range-title { font-weight: 700; font-size: 1.05rem; color: #1e293b; min-width: 12rem; text-align: center; }
.cal-pending-banner { border-left: 4px solid var(--avallo-accent); }
.cal-pending-item { background: #faf7f2; border: 1px solid #ead9bc; border-radius: 0.6rem; padding: 0.65rem 0.85rem; }
.cal-grid-wrap { overflow: auto; }
.cal-grid {
  display: grid;
  grid-template-columns: 4.2rem repeat(var(--cal-days, 7), minmax(8.5rem, 1fr));
  grid-template-rows: auto minmax(12rem, auto);
  min-width: 48rem;
  padding-bottom: 8rem;
}
.cal-corner { grid-column: 1; grid-row: 1; position: sticky; left: 0; background: #fff; z-index: 2; border-bottom: 1px solid var(--cal-grid-col); }
.cal-day-head {
  grid-row: 1;
  text-align: center; padding: 0.7rem 0.4rem; border-bottom: 1px solid var(--cal-grid-col);
  border-left: 1px solid var(--cal-grid-col); background: #fff;
}
.cal-day-head.is-off,
.cal-day-col.is-off,
.cal-day-head.is-out-of-range,
.cal-day-col.is-out-of-range {
  background-color: var(--cal-empty-bg);
}
/* Blocked must win over is-off / is-out-of-range (same specificity otherwise hides hatch). */
.cal-day-head.is-blocked,
.cal-day-head.is-blocked.is-off,
.cal-day-head.is-blocked.is-out-of-range {
  background: repeating-linear-gradient(-45deg, #f1f5f9, #f1f5f9 6px, #e2e8f0 6px, #e2e8f0 12px);
}
.cal-day-head.is-blocked .cal-day-num { color: #64748b; text-decoration: line-through; }
.cal-day-blocked-label, .cal-month-blocked-label {
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.68rem;
}
.cal-range-summary {
  font-size: 0.9rem;
  color: #334155;
  margin: 0;
}
.cal-week-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.cal-week-chips-label {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--avallo-primary);
  margin-right: 0.15rem;
}
.cal-day-name { font-size: 0.78rem; font-weight: 700; color: var(--avallo-primary); text-transform: uppercase; letter-spacing: 0.03em; }
.cal-day-num { font-size: 1.1rem; font-weight: 700; color: #0f172a; }
.cal-hours {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-rows: repeat(var(--cal-rows), var(--cal-row-h));
  border-right: 1px solid var(--cal-grid-col);
  border-top: 1px solid var(--cal-grid-col);
  position: sticky; left: 0; background: #fff; z-index: 1;
}
/* Horizontal guide lines (30 min + hour) — day columns only; hour labels stay on solid bg. */
.cal-day-col::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--cal-row-h) - 1px),
      var(--cal-grid-minor) calc(var(--cal-row-h) - 1px),
      var(--cal-grid-minor) var(--cal-row-h)
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--cal-row-h) * 2 - 1px),
      var(--cal-grid-major) calc(var(--cal-row-h) * 2 - 1px),
      var(--cal-grid-major) calc(var(--cal-row-h) * 2)
    );
}
.cal-hour {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  color: #64748b;
  transform: translateY(-0.45rem);
  padding: 0 0.35rem 0 0.15rem;
  text-align: right;
  background: #fff;
}
.cal-day-col {
  grid-row: 2;
  display: grid;
  grid-template-rows: repeat(var(--cal-rows), var(--cal-row-h));
  border-left: 1px solid var(--cal-grid-col);
  border-top: 1px solid var(--cal-grid-col);
  position: relative;
  overflow: visible;
  min-height: calc(var(--cal-rows) * var(--cal-row-h));
  background-color: var(--cal-empty-bg);
}
.cal-event {
  margin: 1px 4px;
  border-radius: 0.4rem;
  padding: 0.15rem 0.35rem;
  font-size: 0.78rem;
  line-height: 1.3;
  overflow: hidden;
  z-index: 1;
  box-sizing: border-box;
}
.cal-event.is-free {
  border: 1px dashed var(--cal-unavail-border);
  background: var(--cal-unavail-bg);
  color: var(--cal-unavail-text);
  font-weight: 650;
  display: flex; align-items: center;
  overflow: hidden;
  align-self: stretch;
  height: auto;
  min-height: calc(100% - 2px);
}
.cal-event.is-busy {
  background: repeating-linear-gradient(
    -45deg,
    #e2e8f0,
    #e2e8f0 6px,
    #f1f5f9 6px,
    #f1f5f9 12px
  );
  color: #475569;
  border: 1px solid #94a3b8;
  cursor: pointer;
}
.cal-event.is-busy:hover {
  border-color: #64748b;
  color: #334155;
}
.cal-dot.is-busy {
  background: #94a3b8;
  border: 1px solid #64748b;
}
.cal-page.is-moving .cal-event.is-free {
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(139, 29, 63, 0.35);
}
.cal-page.is-moving .cal-event.is-free:hover {
  background: var(--avallo-primary);
  color: #fff;
}
.cal-event.is-pending {
  background: var(--avallo-accent);
  color: #3f2e16;
  border: 1px solid #b8904c;
}
.cal-event.is-booked {
  background: var(--avallo-primary);
  color: #fff;
}
.cal-event.is-done {
  background: #e8edf2;
  color: #4b5563;
  border: 1px solid #c5ced8;
  opacity: 0.92;
}
.cal-event.is-done .cal-event-status { font-weight: 600; }
.cal-event.is-awaiting-candidate {
  background: #fff;
  color: var(--avallo-primary);
  border: 1px solid var(--avallo-primary);
}
.cal-event.is-awaiting-candidate .cal-event-status { font-weight: 600; }
/* Booked / status tiles: stay inside grid span; compact text (details in side panel). */
.cal-event.is-pending,
.cal-event.is-booked,
.cal-event.is-awaiting-candidate,
.cal-event.is-done,
.cal-event.is-status-planned,
.cal-event.is-status-progress,
.cal-event.is-status-done,
.cal-event.is-status-rescheduled,
.cal-event.is-status-cancelled,
.cal-event.is-status-noshow,
.cal-event.is-status-awaiting,
.cal-event.is-own-meeting,
.cal-event.is-busy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: stretch;
  justify-content: flex-start;
  box-sizing: border-box;
  min-height: 0;
  height: calc(100% - 2px);
  max-height: calc(100% - 2px);
  position: relative;
  overflow: hidden;
  z-index: 4;
  padding: 0.2rem 0.38rem 0.28rem;
  gap: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}
.cal-event.is-pending:hover,
.cal-event.is-booked:hover,
.cal-event.is-awaiting-candidate:hover,
.cal-event.is-done:hover,
.cal-event.is-status-planned:hover,
.cal-event.is-status-progress:hover,
.cal-event.is-status-done:hover,
.cal-event.is-status-rescheduled:hover,
.cal-event.is-status-cancelled:hover,
.cal-event.is-status-noshow:hover,
.cal-event.is-status-awaiting:hover,
.cal-event.is-own-meeting:hover,
.cal-event.is-busy:hover,
.cal-event.is-pending:focus-within,
.cal-event.is-booked:focus-within,
.cal-event.is-awaiting-candidate:focus-within,
.cal-event.is-done:focus-within,
.cal-event.is-status-planned:focus-within,
.cal-event.is-status-progress:focus-within,
.cal-event.is-status-done:focus-within,
.cal-event.is-status-rescheduled:focus-within,
.cal-event.is-status-cancelled:focus-within,
.cal-event.is-status-noshow:focus-within,
.cal-event.is-status-awaiting:focus-within,
.cal-event.is-open {
  z-index: 12;
}
.cal-event.is-open {
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
}
.cal-event-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  min-width: 0;
  flex: 0 0 auto;
}
.cal-event-main {
  display: flex;
  flex-direction: column;
  gap: 0.04rem;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.cal-event-time {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  font-size: 0.68rem;
  line-height: 1.15;
  opacity: 0.95;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-event-who {
  font-weight: 700;
  font-size: 0.76rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-event-status {
  opacity: 0.9;
  font-size: 0.62rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-event-meta {
  font-size: 0.62rem;
  line-height: 1.15;
  opacity: 0.88;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Short slots: name + time only */
.cal-event[data-span="1"] .cal-event-meta,
.cal-event[data-span="1"] .cal-event-status,
.cal-event[data-span="2"] .cal-event-meta {
  display: none;
}
.cal-event[data-span="1"] .cal-event-who {
  font-size: 0.72rem;
}
/* Taller slots: allow wrapped name (max 2 lines) */
.cal-event[data-span="3"] .cal-event-who,
.cal-event[data-span="4"] .cal-event-who,
.cal-event[data-span="5"] .cal-event-who,
.cal-event[data-span="6"] .cal-event-who {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cal-event-actions {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.25rem;
  margin-top: 0.15rem;
}
.cal-event-actions .js-meeting-decision {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.cal-event-actions .btn {
  font-size: 0.68rem;
  padding: 0.18rem 0.4rem;
  width: 100%;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
.cal-dot {
  display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 0.2rem;
  margin-right: 0.3rem; vertical-align: -0.1rem;
}
.cal-dot.is-free { border: 1px dashed #94a3b8; background: var(--cal-empty-bg); }
.cal-dot.is-pending { background: var(--avallo-accent); }
.cal-dot.is-awaiting-candidate { background: #fff; border: 1px solid var(--avallo-primary); }
.cal-dot.is-booked { background: var(--avallo-primary); }
.cal-dot.is-done { background: #c5ced8; border: 1px solid #9aa5b1; }
.cal-dot.is-blocked-day { background: #94a3b8; border: 1px solid #64748b; }
.cal-hours-table { max-width: 36rem; }

.cal-event.has-recruiter {
  border-left: 4px solid var(--cal-recruiter, var(--avallo-primary));
}
.cal-event-recruiter {
  flex: 0 1 auto;
  max-width: 46%;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.15;
  padding: 0.06rem 0.32rem;
  border-radius: 0.2rem;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-recruiter-chip {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--cal-recruiter, var(--avallo-primary));
  vertical-align: middle;
}
.cal-recruiter-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--avallo-border);
  background: #fff;
  color: #334155;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
}
.cal-recruiter-legend-item:hover {
  border-color: var(--cal-recruiter, var(--avallo-primary));
  color: var(--avallo-primary);
}
.cal-recruiter-filter { max-width: 16rem; }

/* Collapsible calendar settings */
.cal-settings-head {
  padding: 0.55rem 0.85rem !important;
  border-bottom: 1px solid var(--avallo-border, #e5e7eb);
}
.cal-settings-toggle {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.15rem 0;
  color: inherit;
  cursor: pointer;
}
.cal-settings-toggle:hover .cal-settings-title {
  color: var(--avallo-primary, #8B1D3F);
}
.cal-settings-title {
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}
.cal-settings-toggle-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
}
.cal-settings-chevron {
  margin-left: auto;
  color: var(--avallo-primary, #8B1D3F);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.cal-settings.is-collapsed .cal-settings-chevron {
  transform: rotate(-90deg);
}
.cal-settings.is-collapsed .cal-settings-body {
  display: none;
}
.cal-settings.is-collapsed .cal-settings-head {
  border-bottom: 0;
}

/* Upcoming appointments under calendar */
.cal-upcoming {
  border-top: 1px solid var(--avallo-border, #e5e7eb);
  padding-top: 1rem;
}
.cal-upcoming-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.cal-upcoming-item {
  display: grid;
  grid-template-columns: minmax(7.5rem, 10rem) minmax(0, 1fr) auto;
  gap: 0.5rem 1rem;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  padding: 0.55rem 0.65rem;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s ease;
}
.cal-upcoming-item:hover,
.cal-upcoming-item:focus-visible {
  background: #f8fafc;
  color: inherit;
  text-decoration: none;
  outline: none;
}
.cal-upcoming-when {
  font-size: 0.85rem;
  font-weight: 650;
  color: #0f172a;
  white-space: nowrap;
}
.cal-upcoming-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.cal-upcoming-title {
  font-weight: 650;
  color: #0f172a;
  line-height: 1.25;
}
.cal-upcoming-meta {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.25;
}
.cal-upcoming-recruiter {
  font-weight: 600;
  color: var(--cal-recruiter, var(--avallo-primary));
}
.cal-upcoming-status .badge {
  font-weight: 600;
  font-size: 0.72rem;
}
.badge.is-status-own {
  background: #0d9488 !important;
  color: #fff !important;
  border-color: #0f766e;
}
.cal-upcoming-empty {
  padding: 0.25rem 0.15rem;
}
@media (max-width: 640px) {
  .cal-upcoming-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .cal-upcoming-when { white-space: normal; }
}

.cal-block-month { max-width: 26rem; user-select: none; }
.cal-block-month-title { text-transform: capitalize; color: var(--avallo-primary); }
.cal-block-month-weekdays,
.cal-block-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
}
.cal-block-month-weekdays span {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}
.cal-block-day {
  aspect-ratio: 1;
  border: 1px solid var(--avallo-border);
  border-radius: 0.45rem;
  background: #fff;
  color: #0f172a;
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  contain: layout style;
}
.cal-block-month.is-dragging .cal-block-day {
  transition: none;
}
.cal-block-month.is-dragging {
  cursor: crosshair;
  touch-action: none;
}
.cal-block-day.is-pad {
  border: none;
  background: transparent;
  pointer-events: none;
}
.cal-block-day.is-today {
  box-shadow: inset 0 0 0 2px rgba(139, 29, 63, 0.35);
}
.cal-block-day:hover:not(.is-pad) {
  border-color: var(--avallo-primary);
  color: var(--avallo-primary);
}
.cal-block-day.is-blocked {
  background: #e8edf2;
  color: #64748b;
  border-color: #94a3b8;
  text-decoration: line-through;
  position: relative;
}
.cal-block-day.is-blocked::after {
  content: '';
  position: absolute;
  inset: 18% 12%;
  border-top: 2px solid rgba(100, 116, 139, 0.75);
  transform: rotate(-28deg);
  pointer-events: none;
}
.cal-block-day.is-blocked .cal-block-day-num { position: relative; z-index: 1; }
.cal-day-col.is-blocked,
.cal-day-col.is-blocked.is-off,
.cal-day-col.is-blocked.is-out-of-range {
  background: repeating-linear-gradient(
    -45deg, #f8fafc, #f8fafc 6px, #e2e8f0 6px, #e2e8f0 12px
  );
}
/* Blocked day: candidate slots are gone server-side after reload; hide them
   instantly when the day is blocked live from the mini-calendar. */
.cal-day-col.is-blocked .cal-event.is-free { display: none; }
.cal-month-cell.is-blocked {
  background: repeating-linear-gradient(-45deg, #f1f5f9, #f1f5f9 6px, #e2e8f0 6px, #e2e8f0 12px);
}
.cal-month-cell.is-blocked .cal-month-daynum { color: #64748b; text-decoration: line-through; }
/* Drag-select in the mini blocked-days calendar (also on touch). */
.cal-block-month-grid { touch-action: none; }

/* Hour block / meeting mode + paint preview */
.cal-page.is-hour-block-mode .cal-day-col { cursor: crosshair; }
.cal-page.is-hour-meeting-mode .cal-day-col { cursor: copy; }
.cal-paint-preview {
  background: rgba(100, 116, 139, 0.35);
  border: 1px dashed #64748b;
  border-radius: 0.25rem;
  pointer-events: none;
  z-index: 2;
  will-change: grid-row;
}
.cal-page.is-painting-hours { user-select: none; }
.cal-block-month.is-dragging .cal-block-day { pointer-events: none; }
.cal-block-month.is-dragging { cursor: crosshair; }
.cal-week-schedule .form-check-label { font-size: 0.9rem; }
.cal-week-override-badge {
  font-weight: 500;
  vertical-align: middle;
}
.cal-hour-mode-bar .btn { white-space: nowrap; }

/* Own meetings (outside recruitment) */
.cal-event.is-own-meeting,
.cal-month-chip.is-own-meeting,
.cal-dot.is-own-meeting { background: #0d9488; color: #fff; border: 1px solid #0f766e; }
.cal-event.is-own-meeting { cursor: pointer; }
.cal-event.is-own-meeting:hover { filter: brightness(0.95); }
.cal-event.is-busy {
  padding: 0.2rem 0.38rem;
}

/* "Nowe spotkanie" modal */
.cal-meeting-modal[hidden] { display: none !important; }
.cal-meeting-modal { position: fixed; inset: 0; z-index: 1085; }
.cal-meeting-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.4); }
.cal-meeting-modal-sheet {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(26rem, calc(100% - 2rem)); max-height: calc(100vh - 2rem); overflow: auto;
  background: #fff; border-radius: 0.6rem; padding: 1rem 1.1rem;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.3);
}

@media (max-width: 576px) {
  .cal-block-month { max-width: 100%; }
  .cal-block-day { border-radius: 0.35rem; font-size: 0.85rem; }
  .cal-recruiter-filter { max-width: 100%; }
}

/* Calendar MUST: status colors, now-line, month, side panel */
.cal-event.is-status-planned,
.cal-dot.is-status-planned,
.badge.is-status-planned { background: #2563eb !important; color: #fff !important; border-color: #1d4ed8; }
.cal-event.is-status-progress,
.cal-dot.is-status-progress,
.badge.is-status-progress { background: #d97706 !important; color: #fff !important; border-color: #b45309; }
.cal-event.is-status-done,
.cal-dot.is-status-done,
.badge.is-status-done { background: #16a34a !important; color: #fff !important; border-color: #15803d; }
.cal-event.is-status-rescheduled,
.cal-dot.is-status-rescheduled,
.badge.is-status-rescheduled { background: #ea580c !important; color: #fff !important; border-color: #c2410c; }
.cal-event.is-status-cancelled,
.cal-dot.is-status-cancelled,
.badge.is-status-cancelled { background: #dc2626 !important; color: #fff !important; border-color: #b91c1c; }
.cal-event.is-status-noshow,
.cal-dot.is-status-noshow,
.badge.is-status-noshow { background: #94a3b8 !important; color: #fff !important; border-color: #64748b; }
.cal-event.is-status-awaiting,
.cal-dot.is-status-awaiting,
.badge.is-status-awaiting { background: #7c3aed !important; color: #fff !important; border-color: #6d28d9; }
.cal-event.is-status-planned,
.cal-event.is-status-progress,
.cal-event.is-status-done,
.cal-event.is-status-rescheduled,
.cal-event.is-status-cancelled,
.cal-event.is-status-noshow,
.cal-event.is-status-awaiting {
  cursor: pointer;
  color: #fff;
  border: 1px solid transparent;
}
.cal-event.js-cal-draggable {
  cursor: grab;
  touch-action: none;
}
.cal-page.is-dragging-meeting {
  cursor: grabbing;
  user-select: none;
}
.cal-page.is-dragging-meeting .cal-event.js-cal-draggable {
  cursor: grabbing;
}
.cal-event.cal-meeting-drag-ghost {
  pointer-events: none;
  z-index: 12;
  opacity: 0.9;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.55);
  background: #2563eb !important;
  color: #fff !important;
}
.cal-day-col.is-drop-target {
  background: rgba(37, 99, 235, 0.06);
}
.cal-event-meta { opacity: 0.9; font-size: 0.62rem; }
.cal-day-col { position: relative; }
.cal-day-head.is-today .cal-day-num { color: var(--avallo-primary); }
.cal-now-line {
  position: absolute; left: 0; right: 0; height: 0;
  border-top: 2px solid #e11d48; z-index: 8; pointer-events: none;
}
.cal-now-line::before {
  content: ''; position: absolute; left: -4px; top: -5px;
  width: 8px; height: 8px; border-radius: 50%; background: #e11d48;
}
.cal-month-wrap { overflow: hidden; }
.cal-month-weekdays, .cal-month-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
}
.cal-month-wd {
  text-align: center; font-size: 0.75rem; font-weight: 700; color: #64748b;
  padding: 0.55rem 0.25rem; border-bottom: 1px solid var(--avallo-border); text-transform: uppercase;
}
.cal-month-cell {
  min-height: 6.5rem; border-right: 1px solid var(--avallo-border);
  border-bottom: 1px solid var(--avallo-border); padding: 0.35rem;
  background: var(--cal-empty-bg);
  display: flex; flex-direction: column;
}
.cal-month-cell.is-addable { cursor: pointer; }
.cal-month-cell.is-addable:hover { background: var(--cal-unavail-bg); }
.cal-month-cell-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.25rem;
  margin-bottom: 0.25rem;
}
.cal-month-add-btn {
  flex-shrink: 0; width: 1.35rem; height: 1.35rem; padding: 0; border: 1px dashed #cbd5e1;
  border-radius: 0.35rem; background: transparent; color: #64748b; font-size: 0.65rem;
  line-height: 1; opacity: 0; transition: opacity 0.15s, border-color 0.15s, color 0.15s, background 0.15s;
}
.cal-month-cell.is-addable:hover .cal-month-add-btn,
.cal-month-add-btn:focus-visible { opacity: 1; }
.cal-month-add-btn:hover,
.cal-month-add-btn:focus-visible {
  border-color: var(--avallo-primary); color: var(--avallo-primary); background: #fff;
}
.cal-month-cell.is-other-month { background: var(--cal-unavail-bg); opacity: 0.72; }
.cal-month-cell.is-today .cal-month-daynum { color: var(--avallo-primary); }
.cal-month-daynum {
  display: inline-block; font-weight: 700; color: #0f172a; text-decoration: none;
}
.cal-month-chip.is-own-meeting { cursor: pointer; }
.cal-month-chip.is-own-meeting:hover { background: #0f766e; }
.cal-month-events { display: flex; flex-direction: column; gap: 0.2rem; }
.cal-month-chip {
  display: block; width: 100%; text-align: left; border: 0; border-radius: 0.3rem;
  padding: 0.15rem 0.35rem; font-size: 0.68rem; font-weight: 650;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff;
}
.cal-sidepanel[hidden] { display: none !important; }
.cal-sidepanel { position: fixed; inset: 0; z-index: 1080; }
.cal-sidepanel-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.35); }
.cal-sidepanel-sheet {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(24rem, 100%);
  background: #fff; box-shadow: -8px 0 28px rgba(15, 23, 42, 0.18);
  display: flex; flex-direction: column;
}
.cal-sidepanel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem 1rem; border-bottom: 1px solid var(--avallo-border);
}
.cal-sidepanel-body { padding: 1rem; overflow: auto; }
.cal-panel-dl { margin: 0; }
.cal-panel-dl > div { margin-bottom: 0.65rem; }
.cal-panel-dl dt {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: #64748b; margin-bottom: 0.1rem;
}
.cal-panel-dl dd { margin: 0; font-weight: 600; color: #0f172a; }
.cal-panel-when { font-weight: 700; color: var(--avallo-primary); }

/* Keep the reschedule slot picker visible after closing the side panel
   (panel leave the user scrolled on the grid, far below this banner). */
.js-cal-propose-banner:not([hidden]) {
  position: sticky;
  top: 4.5rem;
  z-index: 1010;
  scroll-margin-top: 4.75rem;
  border-color: var(--avallo-accent);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

.user-booking-panel {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-height: 16rem;
  overflow: auto;
  padding: 0.15rem 0.1rem 0.2rem 0;
}
.user-booking-panel-full {
  max-height: none;
}
.user-booking-until {
  margin: 0;
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.35;
  text-align: center;
  width: 100%;
  grid-column: 1 / -1;
  justify-self: center;
}
.user-booking-until[hidden] {
  display: none !important;
}
.user-booking-week-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
}
.user-booking-week-title {
  flex: 0 1 auto;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--avallo-primary);
  min-width: 0;
  line-height: 1.3;
  padding: 0 0.15rem;
}
.user-booking-week-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  font-size: 0.8rem;
}
.user-booking-week-btn-label {
  font-size: inherit;
}
.user-booking-week-btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}
/* Mobile: week range on its own row above prev/next */
@media (max-width: 640px) {
  .user-booking-week-nav {
    flex-wrap: wrap;
    row-gap: 0.45rem;
    column-gap: 0.4rem;
  }
  .user-booking-week-title {
    order: -1;
    flex: 1 0 100%;
    width: 100%;
    padding: 0 0.25rem;
  }
  .user-booking-week-btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
  }
}
.user-booking-week-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.user-recruitment-detail {
  border: 1px solid rgba(139, 29, 63, 0.2) !important;
  border-left: 5px solid #8B1D3F;
}
.user-recruitment-detail-title {
  color: var(--avallo-primary);
  font-weight: 700;
}
a.user-recruitment-card {
  color: inherit;
  text-decoration: none;
}
a.user-recruitment-card:hover,
a.user-recruitment-card:focus {
  color: inherit;
}
.user-assignments-page .user-assignments-heading {
  text-align: center;
}
.user-recruitment-grid {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
.user-booking-week {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--avallo-primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0.35rem 0 0.15rem;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid rgba(139, 29, 63, 0.18);
}
.user-booking-day-label { font-size: 0.8rem; font-weight: 700; color: #334155; margin-bottom: 0.3rem; }
.user-booking-slots { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.user-booking-slot {
  border: 1px solid var(--avallo-primary);
  color: var(--avallo-primary);
  background: #fff;
  min-width: 4.2rem;
}
.user-booking-slot:hover, .user-booking-slot:focus {
  background: var(--avallo-primary);
  color: #fff;
}

.user-booking-meta {
  margin-top: 1rem;
}
.user-booking-meta .js-detail-info {
  margin-top: 0;
}
.user-booking-layout {
  display: grid;
  gap: 1.25rem;
  margin-top: 1rem;
}
.user-booking-layout > .user-booking-intro {
  grid-column: 1 / -1;
}
.user-booking-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  margin: 0;
  width: 100%;
}
.user-booking-intro .user-meeting-type {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.03em;
  text-transform: none;
}
/* Tytuł + notka strony rezerwacji — nad boxem statusu w hero */
.user-booking-header {
  margin: 0;
  max-width: 36rem;
  width: 100%;
}
.user-booking-header--above-status {
  margin-top: 0.35rem;
  margin-bottom: 0.55rem;
}
.user-booking-header-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin: 0;
}
.user-booking-header-desc {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
}
.user-booking-header-desc > :first-child {
  margin-top: 0;
}
.user-booking-header-desc > :last-child {
  margin-bottom: 0;
}
.user-booking-header-title + .user-booking-header-desc {
  margin-top: 0.4rem;
}
@media (min-width: 992px) {
  .user-booking-layout {
    grid-template-columns: minmax(260px, 340px) 1fr;
    align-items: start;
  }
  /* Desktop: „Terminy dostępne do” na osi jak szacowany czas (pełna szerokość layoutu). */
  .user-booking-layout > .user-booking-until:not([hidden]) {
    grid-column: 1 / -1;
    margin-bottom: -0.35rem;
  }
}
/* Mobile: komunikat tuż nad mapką, ta sama oś środka co mapa. */
@media (max-width: 991.98px) {
  .user-booking-layout > .user-booking-until:not([hidden]) {
    grid-column: 1 / -1;
    margin-bottom: -0.55rem;
  }
  .user-booking-layout > .user-meeting-location {
    margin-top: 0;
  }
}
.user-meeting-location {
  border: 1px solid rgba(139, 29, 63, 0.15);
  border-left: 4px solid var(--avallo-primary);
}
.user-meeting-location .card-body {
  padding: 0.65rem 0.85rem;
}
.user-meeting-location-intro {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1.35;
  margin-bottom: 0.5rem !important;
}
.user-meeting-location-section {
  margin-bottom: 0.5rem !important;
}
.user-meeting-location-section:last-child {
  margin-bottom: 0 !important;
}
.user-meeting-location-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--avallo-primary);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}
.user-meeting-location-name {
  font-weight: 600;
  color: #334155;
  font-size: 0.85rem;
  line-height: 1.3;
  margin-bottom: 0.35rem !important;
}
.user-meeting-map {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: clamp(168px, 48vw, 200px);
  overflow: hidden;
  border-radius: 0.4rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #f1f5f9;
  margin-left: auto;
  margin-right: auto;
}
.user-meeting-map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.user-meeting-contact {
  font-style: normal;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #334155;
}
.user-meeting-contact-company {
  font-weight: 700;
  color: #0f172a;
}
.user-meeting-contact a {
  word-break: break-all;
}
.user-booking-main {
  min-width: 0;
}

/* Booked slot (calendar hidden): centered map + resign pinned to page bottom */
.user-recruitment-detail.has-meeting-scheduled > .card-body {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 10.5rem);
}
.user-recruitment-detail.has-meeting-scheduled .js-interview-detail {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.user-recruitment-detail.is-meeting-confirmed .user-booking-meta {
  display: none;
}
.user-recruitment-detail.has-meeting-scheduled .user-booking-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 auto;
  margin-top: 0.25rem;
  gap: 0.35rem;
}
.user-recruitment-detail.has-meeting-scheduled .user-booking-layout.has-booking-panel-open,
.user-recruitment-detail.has-meeting-scheduled .user-booking-layout:has(.js-booking-panel:not([hidden])) {
  display: grid;
  flex-direction: unset;
  align-items: start;
  flex: unset;
}
.user-recruitment-detail.has-meeting-scheduled .user-meeting-location {
  width: 100%;
  max-width: min(520px, 100%);
  align-self: flex-start;
  flex: 0 0 auto;
  height: auto;
}
.user-recruitment-detail.has-meeting-scheduled .user-meeting-location .card-body {
  flex: 0 0 auto;
  min-height: 0;
}
/* Booked slot (no calendar): spacer absorbs flex height — location card shrink-wraps */
.user-recruitment-detail.has-meeting-scheduled .user-booking-layout:not(.has-booking-panel-open):not(:has(.js-booking-panel:not([hidden])))::after {
  content: '';
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  order: 1;
}
.user-recruitment-detail.has-meeting-scheduled .user-booking-layout:not(.has-booking-panel-open):not(:has(.js-booking-panel:not([hidden]))) .user-meeting-location {
  flex: 0 0 auto;
  align-self: center;
  height: auto;
  min-height: 0;
  order: 0;
}
.user-recruitment-detail.has-meeting-scheduled .user-booking-layout:not(.has-booking-panel-open):not(:has(.js-booking-panel:not([hidden]))) .user-meeting-location .card-body {
  flex: 0 0 auto;
}
.user-recruitment-detail.has-meeting-scheduled .user-booking-layout.has-booking-panel-open .user-meeting-location,
.user-recruitment-detail.has-meeting-scheduled .user-booking-layout:has(.js-booking-panel:not([hidden])) .user-meeting-location {
  max-width: none;
}
.user-recruitment-detail.has-meeting-scheduled .user-booking-layout:not(.has-booking-panel-open):not(:has(.js-booking-panel:not([hidden]))) .user-meeting-location-section {
  text-align: center;
}
.user-recruitment-detail.has-meeting-scheduled .user-booking-layout:not(.has-booking-panel-open):not(:has(.js-booking-panel:not([hidden]))) .user-meeting-contact {
  text-align: center;
}
.user-recruitment-detail.has-meeting-scheduled .user-booking-main {
  width: 100%;
  max-width: min(520px, 100%);
  margin-top: 0;
  padding-top: 0;
}
/* Hide empty booking column when calendar is closed (resign is a sibling now) */
.user-recruitment-detail.has-meeting-scheduled .user-booking-layout:not(.has-booking-panel-open):not(:has(.js-booking-panel:not([hidden]))) .user-booking-main {
  display: none;
}
.user-recruitment-detail.has-meeting-scheduled .user-booking-layout.has-booking-panel-open .user-booking-main,
.user-recruitment-detail.has-meeting-scheduled .user-booking-layout:has(.js-booking-panel:not([hidden])) .user-booking-main {
  max-width: none;
  margin-top: 0;
  padding-top: 0;
  display: block;
}
.user-recruitment-detail.has-meeting-scheduled .user-recruitment-actions {
  width: 100%;
  max-width: min(520px, 100%);
  justify-content: center;
  margin-top: auto;
  padding-top: 1.25rem;
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
}
.user-recruitment-detail.has-meeting-scheduled .user-booking-layout:not(.has-booking-panel-open):not(:has(.js-booking-panel:not([hidden]))) > .user-recruitment-actions {
  flex: 0 0 auto;
  margin-top: 0;
  order: 2;
  max-width: none;
}
.user-recruitment-detail.has-meeting-scheduled .user-booking-layout.has-booking-panel-open > .user-recruitment-actions,
.user-recruitment-detail.has-meeting-scheduled .user-booking-layout:has(.js-booking-panel:not([hidden])) > .user-recruitment-actions {
  margin-top: 0.75rem;
  padding-top: 0;
  max-width: none;
}
@media (min-width: 992px) {
  .user-recruitment-detail.has-meeting-scheduled .user-booking-layout {
    grid-template-columns: unset;
  }
  .user-recruitment-detail.has-meeting-scheduled .user-booking-layout.has-booking-panel-open,
  .user-recruitment-detail.has-meeting-scheduled .user-booking-layout:has(.js-booking-panel:not([hidden])) {
    grid-template-columns: minmax(260px, 340px) 1fr;
  }
}
@media (max-width: 575.98px) {
  .user-recruitment-detail.has-meeting-scheduled > .card-body {
    min-height: calc(100dvh - 9rem);
  }
}

@media (max-width: 768px) {
  .stage-edit-grid { grid-template-columns: 1fr; }
  .stage-termin-type-duration-row { grid-template-columns: 1fr; }
}

/* In-app Avallo confirm / alert (replaces native browser dialogs) */
body.avallo-dialog-open { overflow: hidden; }
.avallo-dialog {
  position: fixed;
  inset: 0;
  z-index: 10800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding-top: max(1rem, env(safe-area-inset-top, 0px));
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
}
.avallo-dialog[hidden] { display: none !important; }
.avallo-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.avallo-dialog-card {
  position: relative;
  background: #fff;
  border-radius: 0.5rem;
  border: 1px solid var(--avallo-border);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  display: flex;
  flex-direction: column;
}
.avallo-dialog-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--avallo-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.avallo-dialog-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--avallo-primary);
  line-height: 1.3;
}
.avallo-dialog-body {
  padding: 1rem 1.25rem;
  overflow: auto;
}
.avallo-dialog-body p { margin-bottom: 0.65rem; }
.avallo-dialog-body p:last-child,
.avallo-dialog-body .mb-0 { margin-bottom: 0; }
.avallo-dialog-body ul { margin-bottom: 0.65rem; }
.avallo-dialog-body a {
  color: var(--avallo-primary);
  word-break: break-all;
}
.avallo-dialog-body a:hover { color: var(--avallo-primary-dark); }
.avallo-dialog-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--avallo-border);
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Mobile: center action buttons in okienka (Avallo confirm + Bootstrap modals) */
@media (max-width: 960px) {
  .avallo-dialog-footer,
  .modal-footer {
    justify-content: center;
    align-items: stretch;
    text-align: center;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }
  .avallo-dialog-footer > .btn,
  .modal-footer > .btn {
    width: 100%;
    margin: 0;
  }
}

.interview-quill {
  min-height: 220px;
  background: #fff;
  border: 1px solid var(--avallo-border);
  border-radius: 0 0 8px 8px;
}
.interview-quill .ql-editor { min-height: 220px; font-size: 0.95rem; }
.interview-quill .ql-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 0.35rem 0;
}
.ql-toolbar.ql-snow { border-color: var(--avallo-border); border-radius: 8px 8px 0 0; }
.ql-container.ql-snow { border-color: var(--avallo-border); }
.interview-editor-quill .ql-toolbar.ql-snow.interview-quill-toolbar--sticky {
  position: sticky;
  top: 56px;
  z-index: 1010;
  background: #fff;
  box-shadow: 0 1px 0 var(--avallo-border);
}
.interview-live-preview {
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.85rem 1rem 1rem;
}
.interview-live-preview__head { margin-bottom: 0.75rem; }
.interview-live-preview__body { max-height: min(70vh, 640px); overflow: auto; }
#interviewPreviewToggle.active {
  background: var(--avallo-primary);
  border-color: var(--avallo-primary);
  color: #fff;
}
.ql-snow .ql-interview-check,
.interview-script-html .ql-interview-check,
.interview-report .ql-interview-check {
  border: 1px solid #f0c2ce;
  background: #fff7f9;
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  margin: 0.18rem 0;
}
.ql-snow .ql-interview-question,
.interview-script-html .ql-interview-question,
.interview-report .ql-interview-question {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  margin: 0.55rem 0;
}
.ql-snow .ql-interview-check + .ql-interview-check,
.interview-script-html .ql-interview-check + .ql-interview-check,
.interview-report .ql-interview-check + .ql-interview-check {
  margin-top: 0.12rem;
}
.interview-embed-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--avallo-primary);
  margin-bottom: 0;
}
.interview-embed-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
  margin-bottom: 0.35rem;
}
.interview-unwrap-check {
  padding: 0;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  color: #64748b;
  line-height: 1.2;
}
.interview-unwrap-check:hover {
  color: var(--avallo-primary);
  text-decoration: underline;
}
.interview-embed-label {
  display: block;
  font-weight: 650;
  font-size: 0.95rem;
}
.interview-embed-edit-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  width: 100%;
}
.interview-embed-preview-check {
  margin-top: 0.45rem;
  flex-shrink: 0;
  pointer-events: auto;
  cursor: pointer;
  opacity: 1;
}
.ql-snow .interview-embed-body,
.interview-quill .interview-embed-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 2.1rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  font-weight: 650;
  font-size: 0.95rem;
  line-height: 1.45;
  outline: none;
}
.ql-snow .interview-embed-body:focus,
.interview-quill .interview-embed-body:focus {
  border-color: var(--avallo-primary);
  box-shadow: 0 0 0 0.15rem rgba(139, 29, 63, 0.12);
}
.ql-snow .interview-embed-body:empty::before,
.interview-quill .interview-embed-body:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
  font-weight: 500;
}
.ql-snow .interview-embed-body p,
.interview-quill .interview-embed-body p {
  margin: 0 0 0.35rem;
}
.ql-snow .interview-embed-body p:last-child,
.interview-quill .interview-embed-body p:last-child {
  margin-bottom: 0;
}
/* Quill snow sets li { list-style: none } for data-list UI — restore real bullets inside checkbox bodies. */
.ql-snow .interview-embed-body ul,
.interview-quill .interview-embed-body ul,
.ql-snow .interview-embed-body ol,
.interview-quill .interview-embed-body ol,
.interview-check-label-html ul,
.interview-check-label-html ol {
  margin: 0.15rem 0 0.15rem 0.15rem;
  padding-left: 1.25rem;
}
.ql-snow .interview-embed-body li,
.interview-quill .interview-embed-body li,
.interview-check-label-html li {
  list-style: inherit;
  padding-left: 0;
  position: static;
  margin: 0.05rem 0;
}
.ql-snow .interview-embed-body ul > li,
.interview-quill .interview-embed-body ul > li,
.interview-check-label-html ul > li {
  list-style-type: disc;
}
.ql-snow .interview-embed-body ol > li,
.interview-quill .interview-embed-body ol > li,
.interview-check-label-html ol > li {
  list-style-type: decimal;
}
.ql-snow .interview-embed-body li > .ql-ui,
.interview-quill .interview-embed-body li > .ql-ui,
.interview-check-label-html li > .ql-ui {
  display: none;
}
.interview-check-label-html {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 650;
  font-size: 0.95rem;
  line-height: 1.45;
}
.interview-check-label-html p {
  margin: 0 0 0.35rem;
}
.interview-check-label-html p:last-child {
  margin-bottom: 0;
}
.ql-snow .interview-embed-input,
.interview-quill .interview-embed-input {
  display: block;
  width: 100%;
  font-weight: 650;
  font-size: 0.95rem;
  border-color: #e2e8f0;
  background: #fff;
}
.ql-snow .interview-embed-input:focus,
.interview-quill .interview-embed-input:focus {
  border-color: var(--avallo-primary);
  box-shadow: 0 0 0 0.15rem rgba(139, 29, 63, 0.12);
}
.interview-embed-preview-opts {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.interview-embed-yn {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  background: #fff;
  cursor: pointer;
  line-height: 1.3;
}
.interview-embed-yn:hover { border-color: #94a3b8; color: #0f172a; }
.interview-embed-yn.is-selected {
  border-color: var(--avallo-primary);
  background: #fff7f9;
  color: var(--avallo-primary);
}
.interview-script-html .js-meet-check,
.interview-script-html .js-meet-answer {
  pointer-events: auto;
  cursor: pointer;
}
.ql-interview-file,
.interview-script-html .ql-interview-file,
.interview-report .ql-interview-file {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: var(--avallo-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  max-width: 100%;
}
.ql-interview-file:hover { background: #e2e8f0; color: var(--avallo-primary); }

/* Znaczniki slajdów w edytorze / scenariuszu */
.ql-snow .ql-interview-slide,
.interview-script-html .ql-interview-slide,
.interview-script-html .interview-slide-break {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.85rem 0;
  padding: 0.45rem 0.75rem;
  border: 1px dashed #c4a0ad;
  border-radius: 8px;
  background: linear-gradient(90deg, #fff7f9 0%, #fff 50%, #fff7f9 100%);
  color: var(--avallo-primary);
  user-select: none;
}
.interview-slide-marker-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--avallo-primary);
}
.interview-slide-marker-label i {
  opacity: 0.85;
}
.interview-scenario-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.interview-slideshow-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  /* Równy padding L/R ≈ szerokość „Pełny ekran”, żeby środek nawigacji był prawdziwy */
  padding: 0.55rem 7.25rem;
  border-bottom: 1px solid var(--avallo-border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}
/* Zwarty blok: Wstecz · Slajd N z M · Dalej — wyśrodkowany; Pełny ekran absolute right */
.interview-slideshow-controls {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.45rem;
  flex: 0 1 auto;
  min-width: 0;
  margin-inline: auto;
}
.interview-slideshow-bar .js-slide-fullscreen {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
}
.interview-slideshow-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  flex: 0 0 auto;
  min-width: 0;
  text-align: center;
  padding-inline: 0.15rem;
}
/* Stage: logo + treść slajdu jako jeden blok (logo tylko w fullscreen) */
.interview-slideshow-fs-stage {
  display: contents;
}
.interview-slideshow-fs-logo {
  display: none;
}
.interview-slideshow-status {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--avallo-primary);
}
.interview-slideshow-tip {
  display: block;
  line-height: 1.25;
  max-width: 22rem;
}
#meetingSlideshowToggle.active {
  background: var(--avallo-primary);
  border-color: var(--avallo-primary);
  color: #fff;
}
#meetingScenarioCard.is-slideshow .js-scenario-body {
  min-height: 10rem;
}
#meetingScenarioCard.is-slideshow .interview-slide-pane.is-active-slide {
  animation: interview-slide-in 0.22s ease-out;
}
@keyframes interview-slide-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.interview-slide-pane {
  min-height: 0;
}

/* Pełny ekran pokazu slajdów (Fullscreen API + fallback overlay) */
#meetingScenarioCard:fullscreen,
#meetingScenarioCard:-webkit-full-screen,
#meetingScenarioCard.is-slide-fullscreen-overlay {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  border-radius: 0;
  border: 0;
  background: #fff;
  box-shadow: none;
}
#meetingScenarioCard.is-slide-fullscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
}
#meetingScenarioCard:fullscreen .card-header,
#meetingScenarioCard:-webkit-full-screen .card-header,
#meetingScenarioCard.is-slide-fullscreen-overlay .card-header {
  display: none;
}
/* Dolny pasek: Wstecz · Slajd N z M · Dalej + Zamknij — wyśrodkowany */
#meetingScenarioCard:fullscreen .interview-slideshow-bar,
#meetingScenarioCard:-webkit-full-screen .interview-slideshow-bar,
#meetingScenarioCard.is-slide-fullscreen-overlay .interview-slideshow-bar {
  order: 2;
  flex: 0 0 auto;
  position: static;
  top: auto;
  z-index: auto;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.25rem 0.75rem;
  border-bottom: 0;
  border-top: 1px solid var(--avallo-border);
  background: linear-gradient(0deg, #fff 0%, #faf7f8 100%);
}
/* Stage nad nawigacją: logo + treść */
#meetingScenarioCard:fullscreen .interview-slideshow-fs-stage,
#meetingScenarioCard:-webkit-full-screen .interview-slideshow-fs-stage,
#meetingScenarioCard.is-slide-fullscreen-overlay .interview-slideshow-fs-stage {
  order: 1;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  justify-content: center;
  align-items: center;
  padding: 1.25rem 1.5rem 1rem;
  -webkit-overflow-scrolling: touch;
}
/* Logo bezpośrednio nad pierwszym tekstem/nagłówkiem slajdu */
#meetingScenarioCard:fullscreen .interview-slideshow-fs-logo,
#meetingScenarioCard:-webkit-full-screen .interview-slideshow-fs-logo,
#meetingScenarioCard.is-slide-fullscreen-overlay .interview-slideshow-fs-logo {
  display: block;
  flex: 0 0 auto;
  height: 9rem;
  width: auto;
  max-width: min(28rem, 85vw);
  margin: 0 auto 0.65rem;
  object-fit: contain;
}
#meetingScenarioCard:fullscreen .js-scenario-body,
#meetingScenarioCard:-webkit-full-screen .js-scenario-body,
#meetingScenarioCard.is-slide-fullscreen-overlay .js-scenario-body {
  flex: 0 1 auto;
  min-height: 0;
  width: 100%;
  overflow: visible;
  display: block;
  padding: 0;
}
#meetingScenarioCard:fullscreen .interview-slide-pane.is-active-slide,
#meetingScenarioCard:-webkit-full-screen .interview-slide-pane.is-active-slide,
#meetingScenarioCard.is-slide-fullscreen-overlay .interview-slide-pane.is-active-slide {
  max-width: 52rem;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
/* Zamknij — w dolnym pasku pod nawigacją (nie w prawym górnym rogu) */
#meetingScenarioCard:fullscreen .js-slide-fullscreen,
#meetingScenarioCard:-webkit-full-screen .js-slide-fullscreen,
#meetingScenarioCard.is-slide-fullscreen-overlay .js-slide-fullscreen {
  position: static;
  right: auto;
  top: auto;
  left: auto;
  bottom: auto;
  transform: none;
  z-index: auto;
  flex: 0 0 auto;
  align-self: center;
}
#meetingScenarioCard.is-slide-fullscreen .js-slide-fullscreen,
#meetingScenarioCard.is-slide-fullscreen-overlay .js-slide-fullscreen {
  background: var(--avallo-primary);
  border-color: var(--avallo-primary);
  color: #fff;
}
body.is-slide-fullscreen-lock {
  overflow: hidden !important;
}

@media (max-width: 575.98px) {
  .interview-slideshow-bar {
    padding: 0.5rem 3.25rem;
  }
  .interview-slideshow-bar .btn {
    min-width: 2.5rem;
    min-height: 2.35rem;
  }
  .interview-slideshow-controls {
    gap: 0.25rem 0.3rem;
  }
  .interview-scenario-heading .h6 {
    font-size: 0.95rem;
  }
  #meetingScenarioCard:fullscreen .interview-slideshow-bar,
  #meetingScenarioCard:-webkit-full-screen .interview-slideshow-bar,
  #meetingScenarioCard.is-slide-fullscreen-overlay .interview-slideshow-bar {
    padding: 0.45rem 0.85rem 0.65rem;
    gap: 0.35rem;
  }
  #meetingScenarioCard:fullscreen .interview-slideshow-fs-stage,
  #meetingScenarioCard:-webkit-full-screen .interview-slideshow-fs-stage,
  #meetingScenarioCard.is-slide-fullscreen-overlay .interview-slideshow-fs-stage {
    padding: 0.85rem 0.85rem 0.75rem;
    justify-content: flex-start;
  }
  #meetingScenarioCard:fullscreen .interview-slideshow-fs-logo,
  #meetingScenarioCard:-webkit-full-screen .interview-slideshow-fs-logo,
  #meetingScenarioCard.is-slide-fullscreen-overlay .interview-slideshow-fs-logo {
    height: 6.5rem;
    max-width: min(22rem, 80vw);
    margin: 0 auto 0.45rem;
  }
  .interview-slideshow-bar .js-slide-fullscreen {
    right: 0.5rem;
  }
}

.interview-inline-opt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.35rem;
}
.interview-meet-check .interview-check-row,
.interview-meet-q { margin-bottom: 0; }
.ql-snow button.ql-interview-check,
.ql-snow button.ql-interview-question,
.ql-snow button.ql-interview-file,
.ql-snow button.ql-interview-slide {
  width: 28px;
}
.ql-snow button.ql-interview-check i,
.ql-snow button.ql-interview-question i,
.ql-snow button.ql-interview-file i,
.ql-snow button.ql-interview-slide i {
  font-size: 0.85rem;
}
.interview-struct-block h2 { color: var(--avallo-primary); }
.interview-item-list { display: flex; flex-direction: column; gap: 0.45rem; }
.interview-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}
.interview-item-row--q {
  grid-template-columns: minmax(0, 1.4fr) minmax(9rem, 0.7fr) auto;
}
.interview-check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.95rem;
  margin-bottom: 0.18rem;
  font-weight: 550;
}
.interview-check-row .form-check-input { margin-top: 0.25rem; }
.interview-q-block {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--avallo-border);
}
.interview-q-block:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.interview-q-prompt { font-weight: 650; margin-bottom: 0.25rem; }
.interview-inline-opt {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 550;
}
.interview-script-html {
  font-size: 0.95rem;
  line-height: 1.5;
}
.interview-script-html img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
.interview-script-html h1,
.interview-script-html h2,
.interview-script-html h3 { color: var(--avallo-primary); }
.interview-report h1 { font-size: 1.4rem; color: var(--avallo-primary); }
.interview-report h2 { font-size: 1.05rem; color: var(--avallo-primary); margin-top: 1.25rem; }
.interview-report-meta { color: #64748b; }
.interview-report-checklist ul { list-style: none; padding-left: 0; }
.interview-report-checklist li { margin-bottom: 0.35rem; }
.interview-report-prompt { font-weight: 650; margin-bottom: 0.15rem; }
.interview-report-qtype { font-size: 0.8rem; color: #64748b; margin-bottom: 0.2rem; }
.interview-report-answer { white-space: pre-wrap; }
.interview-report-answer.is-empty { color: #94a3b8; font-style: italic; }
.interview-check-mark { font-family: inherit; margin-right: 0.25rem; }
.interview-report-inline-check.is-checked,
.interview-meet-check.is-checked {
  border-color: #86efac;
  background: #f0fdf4;
}
/* Panel checklist rows (lista kontrolna) — same green when ticked */
.interview-meeting .card-body > .interview-check-row {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  margin-bottom: 0.12rem;
}
.interview-meeting .card-body > .interview-check-row.is-checked {
  border-color: #86efac;
  background: #f0fdf4;
}
.interview-report img { max-width: 100%; height: auto; }
tr.js-meeting-row { cursor: pointer; }
tr[id^="osoba-"] {
  scroll-margin-top: 5.75rem;
}

/* Live session timer — rozmowa */
.meeting-session {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}
.meeting-session--meeting {
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  margin-bottom: 0;
  padding: 0.75rem 1rem;
  border: 1px solid #f0c2ce;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff7f9 0%, #fff 70%);
  flex-shrink: 0;
}
.meeting-session-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}
.meeting-session-meta {
  font-size: 0.875rem;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 12rem;
}
/* Meeting chrome: keep timestamps on one wrapping row so Zakończ
   doesn't stack 3 block lines and push the timer box away from topics/notes. */
.meeting-session--meeting .meeting-session-toolbar {
  justify-content: center;
  flex-direction: column;
  align-items: center;
}
.meeting-session--meeting .meeting-session-meta {
  font-size: 0.95rem;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.2rem 0.85rem;
  flex: 0 1 auto;
}
.meeting-session--meeting .meeting-session-actions {
  justify-content: center;
}
.meeting-session-started,
.meeting-session-ended,
.meeting-session-duration {
  font-weight: 650;
  color: #334155;
  line-height: 1.35;
}
.meeting-session-duration {
  font-weight: 600;
  color: #64748b;
  font-size: 0.95em;
}
.meeting-session-times {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  font-size: 0.875rem;
}
.meeting-session-times .meeting-session-started,
.meeting-session-times .meeting-session-ended,
.meeting-session-times .meeting-session-duration {
  display: block;
}
/* Osobna kolumna „Sesja prezentacji” obok Termin — th i td wyśrodkowane */
.stage-people-wrap .assign-list-table thead th.meeting-session-cell,
.stage-people-wrap .meeting-session-cell {
  text-align: center;
  min-width: 11rem;
  white-space: nowrap;
}
.stage-people-wrap .meeting-session-cell {
  vertical-align: middle;
}
.stage-people-wrap .meeting-session-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 0;
  width: 100%;
  height: 100%;
  margin-inline: auto;
}
.stage-people-wrap .meeting-session-times {
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  background: #fff7f9;
  border: 1px solid #f0c2ce;
  width: 100%;
  white-space: normal;
  text-align: center;
  box-sizing: border-box;
}
.stage-people-wrap .meeting-session--compact .js-meeting-session-meta {
  /* Czas start/stop jest w .js-row-session-times w kolumnie Sesja. */
  display: none !important;
}
.stage-people-wrap .meeting-session--compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-inline: 0;
  gap: 0.35rem;
}
.stage-people-wrap .meeting-session--compact .meeting-session-toolbar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 0.4rem 0.55rem;
}
.stage-people-wrap .meeting-session--compact .meeting-session-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
}
.stage-people-wrap .meeting-session--compact .meeting-session-actions .btn {
  margin-left: auto;
  margin-right: auto;
}
.meeting-session--meeting .meeting-session-started,
.meeting-session--meeting .meeting-session-ended,
.meeting-session--meeting .meeting-session-duration {
  display: inline;
}
.meeting-session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 0 0 auto;
}
.meeting-session-mini-clock {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  border: 1px solid transparent;
}
.meeting-session-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 2px solid #6ee7b7;
  border-left-width: 6px;
  background: #ecfdf5;
  color: #065f46;
  overflow: visible;
  max-height: none;
  min-height: 5.5rem;
  box-sizing: border-box;
  transition:
    background-color 0.5s ease,
    border-color 0.5s ease,
    color 0.5s ease,
    box-shadow 0.5s ease;
}
.meeting-session-clock[hidden] {
  display: none !important;
}
.meeting-session-clock-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 0;
}
.meeting-session-clock-label {
  font-size: 0.8rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}
.meeting-session-clock-time {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  letter-spacing: 0.02em;
}
.meeting-session-overrun {
  font-size: 0.85rem;
  font-weight: 700;
  color: #991b1b;
  line-height: 1.25;
  text-align: center;
  max-width: 22rem;
}
.meeting-session-clock.is-overtime .meeting-session-overrun,
.meeting-session-clock.is-expired .meeting-session-overrun {
  color: inherit;
}
.meeting-session-mini-clock.is-overtime {
  font-weight: 800;
}
.meeting-session-clock.timer-phase-green {
  background: #ecfdf5;
  border-color: #6ee7b7;
  border-left-color: #10b981;
  color: #065f46;
}
.meeting-session-clock.timer-phase-yellow,
.meeting-session-mini-clock.timer-phase-yellow {
  background: #fefce8;
  border-color: #fde047;
  border-left-color: #eab308;
  color: #854d0e;
}
.meeting-session-clock.timer-phase-orange,
.meeting-session-mini-clock.timer-phase-orange {
  background: #fff7ed;
  border-color: #fdba74;
  border-left-color: #f97316;
  color: #9a3412;
}
.meeting-session-clock.timer-phase-red,
.meeting-session-clock.is-urgent,
.meeting-session-mini-clock.timer-phase-red,
.meeting-session-mini-clock.is-urgent {
  background: #fef2f2;
  border-color: #f87171;
  border-left-color: #dc2626;
  color: #991b1b;
  animation: meeting-timer-pulse 0.9s ease-in-out infinite;
}
.meeting-session-clock.is-expired,
.meeting-session-mini-clock.is-expired {
  background: #fee2e2;
  border-color: #dc2626;
  border-left-color: #b91c1c;
  color: #7f1d1d;
  animation: none;
}
.meeting-session-mini-clock.timer-phase-green {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}
@keyframes meeting-timer-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.28);
  }
  50% {
    transform: scale(1.01);
    box-shadow: 0 0 0 6px rgba(220, 38, 38, 0);
  }
}

/*
 * Rozmowa: document scroll (not a 100vh overflow:hidden lock).
 * Chrome (timer / presentation / topics / notes / rating) grows with
 * content — no nested scroll box. Scenariusz stays in normal flow
 * below and remains reachable via page scroll. Fullscreen overlays
 * still lock body.
 */
html:has(body.interview-meeting-page) {
  height: auto;
  overflow: auto;
}
body.interview-meeting-page {
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  max-height: none;
  min-height: 100vh;
  min-height: 100dvh;
}
body.interview-meeting-page .app-layout {
  height: auto;
  max-height: none;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: visible;
}
body.interview-meeting-page .avallo-topbar {
  position: sticky;
  top: 0;
  flex: 0 0 auto;
  z-index: 1020;
}
body.interview-meeting-page .footer-bar {
  display: none;
}
body.interview-meeting-page .app-layout > main.interview-meeting-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.interview-meeting-page-head {
  flex: 0 0 auto;
}
.interview-meeting,
.interview-meeting-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}
.interview-meeting-shell {
  gap: 0.65rem;
}
.interview-meeting-chrome {
  flex: 0 0 auto;
  z-index: 4;
  background: var(--avallo-bg, #f5f6f8);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
  max-height: none;
  overflow: visible;
  align-items: stretch;
  justify-content: flex-start;
}
.interview-meeting-chrome > * {
  flex: 0 0 auto;
  margin-top: 0;
  margin-bottom: 0;
}
/* Prezentacja embed: never clip flush edge logos (card/radius/overflow). */
.interview-meeting-chrome .presentation-meeting-card,
.interview-meeting-chrome .presentation-meeting-card > .card-body,
.interview-meeting-chrome .presentation-meeting-card .presentation-viewer,
.interview-meeting-chrome .presentation-meeting-card .presentation-viewer__stage {
  overflow: visible;
  max-height: none;
}
.recruiter-rating-opt.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.recruiter-rating-opt.is-disabled:hover span {
  background: transparent;
  color: inherit;
}
.interview-meeting-rating .recruiter-rate-form.is-rate-locked {
  pointer-events: none;
}
.interview-meeting-chrome .interview-meeting-rating {
  overflow: visible;
  max-height: none;
}
.interview-meeting-rating-head {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}
.interview-meeting-rating-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  min-width: 0;
  padding: 0;
  color: inherit;
  cursor: pointer;
}
.interview-meeting-rating-toggle:hover .interview-meeting-rating-title {
  color: #8B1D3F;
}
.interview-meeting-rating-title {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
}
.interview-meeting-rating-preview {
  margin-left: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.interview-meeting-rating-chevron {
  margin-left: auto;
  color: #8B1D3F;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.interview-meeting-rating.is-collapsed .interview-meeting-rating-chevron {
  transform: rotate(-90deg);
}
.interview-meeting-rating.is-collapsed .interview-meeting-rating-body {
  display: none;
}
.interview-meeting-rating.is-collapsed .interview-meeting-rating-head {
  border-bottom: 0;
}
.interview-meeting-rating .recruiter-rating-note {
  min-height: 4.5rem;
  max-height: 10rem;
  resize: vertical;
}
.interview-meeting-rating .recruiter-rate-decision-row {
  margin-top: 0.15rem;
}
.interview-meeting-rating .recruiter-rate-decision-row .recruiter-rating-scale {
  margin: 0;
}
.interview-meeting-rating .js-interview-rate-fail.btn-danger {
  background-color: #dc2626;
  border-color: #b91c1c;
  color: #fff;
}
.interview-meeting-rating .js-interview-rate-fail.btn-danger:hover:not(:disabled) {
  background-color: #b91c1c;
  border-color: #991b1b;
  color: #fff;
}
.interview-meeting-rating .recruiter-rate-save-row {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: 0.75rem;
}

.interview-meeting-topics .card-body {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}
.interview-meeting-starter .interview-starter-q {
  margin-bottom: 0.75rem;
}
.interview-meeting-starter .interview-starter-q:last-child {
  margin-bottom: 0;
}
.interview-meeting-starter .interview-check-row {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  margin-bottom: 0.35rem;
}
.interview-meeting-starter .interview-check-row.is-checked {
  border-color: #86efac;
  background: #f0fdf4;
}
.interview-meeting-starter .js-starter-text {
  margin-left: 0.15rem;
}
.interview-meeting-starter .js-starter-text:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  background-color: #f8fafc;
}
.interview-meeting-starter .js-starter-occupation-text {
  min-height: 6.5rem;
  resize: vertical;
  line-height: 1.45;
}
.interview-meeting-starter.is-starter-incomplete {
  border-color: #f59e0b;
}
.interview-meeting-starter.is-starter-incomplete .js-starter-required-hint {
  color: #b45309;
}
.interview-meeting-starter .interview-starter-q.is-incomplete .js-starter-text,
.interview-meeting-starter .interview-starter-q.is-incomplete .js-starter-check {
  outline: 1px solid #f59e0b;
  outline-offset: 1px;
}
.meeting-session .js-meeting-session-start.is-rated-disabled,
.meeting-session .js-meeting-session-start:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.interview-topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.interview-topic-chip {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.28rem 0.55rem;
  border-radius: 0.45rem;
  white-space: nowrap;
}
.interview-topic-chip.is-selected,
.interview-topic-chip.is-selected:hover,
.interview-topic-chip.is-selected:focus {
  background: var(--avallo-primary);
  border-color: var(--avallo-primary);
  color: #fff;
}
.interview-meeting-notes .form-control,
.interview-meeting-notes textarea#meetingFreeNotes {
  min-height: 4.5rem;
  max-height: none;
  overflow-y: hidden;
  resize: none;
  field-sizing: content;
}
.interview-meeting-scenario-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
  padding-bottom: 0.5rem;
}
.interview-meeting-scenario-scroll .interview-script-html {
  min-height: 12rem;
}
@media (max-width: 767.98px) {
  .interview-meeting-page-head .h3 {
    font-size: 1.15rem;
  }
  .meeting-session-clock-time {
    font-size: 2.1rem;
  }
}

@media print {
  .avallo-topbar, .footer-bar, .page-back-bar, .interview-report-toolbar { display: none !important; }
  .interview-report-card { box-shadow: none !important; border: 0 !important; }
}

.avallo-nav-link { position: relative; }
.avallo-nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.15rem; height: 1.15rem; padding: 0 0.28rem;
  margin-left: 0.35rem; border-radius: 999px;
  background: var(--avallo-primary); color: #fff;
  font-size: 0.68rem; font-weight: 700; line-height: 1;
}
.avallo-nav-link.active .avallo-nav-badge {
  background: #fff; color: var(--avallo-primary);
}

.home-stat-tiles {
  display: flex; flex-wrap: wrap; gap: 1rem; margin: 0 0 1.75rem;
}
.home-stat-tile {
  flex: 1 1 160px; min-width: 150px; max-width: 280px;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 1.15rem 1.2rem 1.05rem; border-radius: 16px;
  text-decoration: none; color: inherit;
  border: 1px solid #fad2dc; background: #fef2f5;
  box-shadow: 0 2px 8px rgba(139, 29, 63, 0.06);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.home-stat-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(139, 29, 63, 0.12);
  border-color: var(--avallo-primary);
  color: inherit;
}
.home-stat-tile.is-active {
  box-shadow: inset 0 0 0 2px var(--avallo-primary);
}
.home-stat-tile--used { background: #fffbeb; border-color: #fde68a; }
.home-stat-tile--success { background: #f0fdf4; border-color: #bbf7d0; }
.home-stat-icon {
  color: var(--avallo-primary); font-size: 1.05rem; margin-bottom: 0.35rem;
}
.home-stat-tile--used .home-stat-icon,
.home-stat-tile--used .home-stat-value { color: #b45309; }
.home-stat-tile--success .home-stat-icon,
.home-stat-tile--success .home-stat-value { color: #15803d; }
.home-stat-value {
  font-size: 2rem; font-weight: 800; line-height: 1.1;
  color: var(--avallo-primary); margin-bottom: 0.2rem;
}
.home-stat-label {
  font-size: 0.82rem; font-weight: 600; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.3;
}
.home-focus-list { border-radius: 12px; }

@media (max-width: 575.98px) {
  .home-stat-tile { flex: 1 1 calc(50% - 0.5rem); max-width: none; }
  .home-stat-value { font-size: 1.7rem; }
}

.user-recruitment-card.is-meeting-confirmed {
  border-color: rgba(139, 29, 63, 0.35);
  background: linear-gradient(135deg, #fff 0%, #fff7fa 100%);
}
.user-meeting-confirmed--compact,
.user-meeting-awaiting-recruiter--compact {
  margin-top: 0.35rem;
  padding: 0.5rem 0.75rem;
}
.user-meeting-confirmed--compact .user-meeting-confirmed-label,
.user-meeting-awaiting-recruiter--compact .user-meeting-awaiting-recruiter-label {
  font-size: 0.82rem;
}
.user-meeting-confirmed--compact .user-meeting-confirmed-when,
.user-meeting-awaiting-recruiter--compact .user-meeting-awaiting-recruiter-when {
  font-size: 0.78rem;
}

/* ------------------------------------------------------------------------
   Strona startowa — kafelki modułów i sekcja powiadomień.
   Kopia 1:1 stylów z Team Points (static/css/user-nav.css).
   ------------------------------------------------------------------------ */
.user-home {
  max-width: 920px;
  margin: 0 auto;
  padding: 8px 4px 32px;
}

.user-home-greeting {
  text-align: center;
  color: #64748b;
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.user-home-groups {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.user-nav-squares--primary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.user-nav-squares.user-nav-squares--primary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  grid-template-columns: unset;
}

.user-nav-squares--primary .user-nav-square {
  flex: 0 1 260px;
  max-width: 280px;
  min-width: min(100%, 220px);
}

.user-nav-squares {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

@media (min-width: 900px) {
  .user-nav-squares {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }
}

.user-nav-square.has-attention .user-nav-square-body {
  padding: 14px 12px 10px;
}

.user-nav-square.has-attention i {
  margin-bottom: 8px;
  flex-shrink: 0;
}

.user-nav-square.has-attention .user-nav-square-label {
  padding: 0 6px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.user-nav-square {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  text-align: center;
  aspect-ratio: 1;
  min-height: 168px;
  padding: 0;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--avallo-border, #e5e7eb);
  color: #1e293b;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  position: relative;
  overflow: hidden;
}

.user-nav-square-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 24px 16px;
}

.user-nav-square i {
  font-size: 2.6rem;
  margin-bottom: 14px;
  color: var(--avallo-primary, #8B1D3F);
}

.user-nav-square-label {
  font-size: 1.08rem;
}

.user-nav-square:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 29, 63, 0.35);
  box-shadow: 0 8px 20px rgba(139, 29, 63, 0.12);
  color: #1e293b;
}

.user-nav-square.is-active {
  background: linear-gradient(135deg, var(--avallo-primary, #8B1D3F), var(--avallo-primary-dark, #6e1631));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px rgba(139, 29, 63, 0.22);
}

.user-nav-square.is-active i {
  color: #fff;
}

.user-nav-square.has-unread,
.user-nav-square.has-attention {
  border-color: rgba(139, 29, 63, 0.45);
  box-shadow: 0 4px 14px rgba(139, 29, 63, 0.14);
}

.user-nav-square.has-unread:not(.is-active) i,
.user-nav-square.has-attention:not(.is-active) i {
  color: var(--avallo-primary-dark, #6e1631);
}

.user-nav-square-ribbon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 30px;
  padding: 6px 10px;
  line-height: 1;
  background-color: #8B1D3F;
  background-image: linear-gradient(135deg, #8B1D3F 0%, #6e1631 100%);
  color: #fff !important;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-nav-square:hover .user-nav-square-ribbon {
  color: #fff !important;
}

.user-nav-square .user-nav-square-ribbon-icon {
  font-size: 0.95rem;
  width: 1em;
  height: 1em;
  margin: 0;
  align-self: center;
  flex-shrink: 0;
  color: #fff !important;
}

.user-nav-square-ribbon-text {
  display: inline-block;
  line-height: 1;
}

.user-nav-square.is-active .user-nav-square-ribbon {
  background-color: #4a0f24;
  background-image: linear-gradient(135deg, #5c122c 0%, #3d0c1d 100%);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

@media (max-width: 767.98px) {
  .user-nav-square.has-attention .user-nav-square-body {
    padding: 12px 8px 8px;
  }

  .user-nav-square.has-attention i,
  .user-nav-square.has-unread i {
    margin-bottom: 6px;
    font-size: 2.2rem;
  }

  .user-nav-square.has-attention .user-nav-square-label,
  .user-nav-square.has-unread .user-nav-square-label {
    font-size: 0.9rem;
    padding: 0 4px;
  }

  .user-nav-square-ribbon {
    min-height: 28px;
    padding: 5px 8px;
    font-size: 0.62rem;
    gap: 5px;
  }

  .user-nav-square .user-nav-square-ribbon-icon {
    font-size: 0.78rem;
  }

  .user-nav-squares--primary .user-nav-square {
    min-width: min(100%, 160px);
  }
}

.user-nav-square-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--avallo-primary, #8B1D3F);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(139, 29, 63, 0.3);
}

.user-nav-square.is-active .user-nav-square-badge {
  background: #fff;
  color: var(--avallo-primary, #8B1D3F);
}

.user-attention-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 14px;
  text-align: center;
}

.user-attention-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.user-attention-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.user-attention-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(139, 29, 63, 0.1);
  color: var(--avallo-primary, #8B1D3F);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.user-attention-item-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: #1e293b !important;
}

.user-attention-item-detail {
  font-size: 0.88rem;
  color: #64748b !important;
  margin: 0 0 10px;
  line-height: 1.45;
}

.user-attention-body {
  flex: 1;
  min-width: 0;
}

.user-attention-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-attention-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

@media (max-width: 480px) {
  .user-attention-actions .btn {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
  }
}

/* Rozszerzenia Badania (nieobecne w TP): stan nieprzeczytany, licznik, data */
.user-attention-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.4rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: var(--avallo-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: 0.1rem;
}
.user-attention-item.is-unread {
  border-color: rgba(139, 29, 63, 0.25);
  background: linear-gradient(135deg, #fff 0%, #fff7fa 100%);
}
.user-attention-item-meta {
  font-size: 0.78rem;
  color: #94a3b8 !important;
  margin: 0 0 10px;
}

/* —— Instrukcja administratora —— */
.admin-manual {
  max-width: 58rem;
  margin: 0 auto 2rem;
  line-height: 1.55;
  color: var(--avallo-text);
}
.admin-manual-hero {
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 3px solid var(--avallo-primary);
}
.admin-manual-toc {
  background: #fff;
  border: 1px solid var(--avallo-border);
  border-left: 4px solid var(--avallo-primary);
  border-radius: 0.35rem;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.75rem;
}
.admin-manual-toc-list {
  margin: 0;
  padding-left: 1.25rem;
  columns: 1;
}
@media (min-width: 640px) {
  .admin-manual-toc-list { columns: 2; column-gap: 1.5rem; }
}
.admin-manual-toc-list a {
  color: var(--avallo-primary);
  text-decoration: none;
  font-weight: 500;
}
.admin-manual-toc-list a:hover { text-decoration: underline; }
.admin-manual-section {
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
}
.admin-manual-section h2 {
  font-size: 1.35rem;
  color: var(--avallo-primary);
  margin: 0 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--avallo-border);
}
.admin-manual-section h3 {
  font-size: 1.05rem;
  margin: 1.15rem 0 0.45rem;
  color: #334155;
}
.admin-manual-section ul,
.admin-manual-section ol {
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
}
.admin-manual-section li { margin-bottom: 0.3rem; }
.admin-manual-section code {
  font-size: 0.88em;
  background: #f1f5f9;
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}
.admin-manual-note {
  background: linear-gradient(135deg, #fff 0%, #fff7fa 100%);
  border: 1px solid rgba(139, 29, 63, 0.18);
  border-radius: 0.35rem;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  color: #475569;
}
.admin-manual-diagram {
  margin: 1rem 0 1.25rem;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--avallo-border);
  border-radius: 0.35rem;
  overflow-x: auto;
}
.admin-manual-diagram svg {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  margin: 0 auto;
}
.admin-manual-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--avallo-border);
}
.admin-manual > h1 {
  font-size: 1.65rem;
  color: var(--avallo-primary);
  margin: 0 0 0.65rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--avallo-primary);
}
.admin-manual h2 {
  font-size: 1.32rem;
  color: var(--avallo-primary);
  margin: 1.85rem 0 0.7rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--avallo-border);
  scroll-margin-top: 4.5rem;
}
.admin-manual h3 {
  font-size: 1.06rem;
  margin: 1.2rem 0 0.4rem;
  color: #334155;
  scroll-margin-top: 4.5rem;
}
.admin-manual h4 {
  font-size: 1rem;
  margin: 0.95rem 0 0.3rem;
  color: #475569;
}
.admin-manual p { margin-bottom: 0.75rem; }
.admin-manual ul,
.admin-manual ol {
  margin-bottom: 0.85rem;
  padding-left: 1.3rem;
}
.admin-manual li { margin-bottom: 0.32rem; }
.admin-manual a[href^="#"] {
  color: var(--avallo-primary);
  font-weight: 500;
  text-decoration: none;
}
.admin-manual a[href^="#"]:hover { text-decoration: underline; }
.admin-manual-toc ol {
  margin: 0;
  columns: 1;
}
@media (min-width: 720px) {
  .admin-manual-toc ol { columns: 2; column-gap: 1.5rem; }
}
.admin-manual code {
  font-size: 0.88em;
  background: #f1f5f9;
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}
.admin-manual pre {
  background: #f8fafc;
  border: 1px solid var(--avallo-border);
  border-radius: 0.35rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  font-size: 0.88rem;
}
.admin-manual pre code { background: transparent; padding: 0; }
.admin-manual table {
  width: 100%;
  margin: 0.75rem 0 1.1rem;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.admin-manual th,
.admin-manual td {
  border: 1px solid var(--avallo-border);
  padding: 0.45rem 0.65rem;
  vertical-align: top;
}
.admin-manual th {
  background: #fff7fa;
  color: var(--avallo-primary);
  font-weight: 600;
}
.admin-manual tr:nth-child(even) td { background: #fcfcfd; }
.admin-manual blockquote {
  background: linear-gradient(135deg, #fff 0%, #fff7fa 100%);
  border: 1px solid rgba(139, 29, 63, 0.18);
  border-left: 4px solid var(--avallo-primary);
  border-radius: 0.35rem;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  color: #475569;
  margin: 0.85rem 0 1rem;
}
.admin-manual blockquote p:last-child { margin-bottom: 0; }
.admin-manual-diagram .mermaid {
  display: block;
  max-width: 640px;
  margin: 0 auto;
}
.admin-manual hr {
  border: 0;
  border-top: 1px solid var(--avallo-border);
  margin: 1.4rem 0;
}

/* Licznik znaków SMS (1 wiadomość) */
.sms-body-wrap {
  display: block;
}
.sms-char-counter {
  margin-top: 0.25rem;
  font-variant-numeric: tabular-nums;
  color: #64748b;
}
.sms-char-counter--over,
.sms-body-wrap--over .sms-char-counter {
  color: #b42318;
  font-weight: 650;
}
.sms-char-help {
  margin-top: 0.1rem;
  color: #94a3b8;
}
.sms-charset-warn {
  margin-top: 0.15rem;
  font-size: 0.8125rem;
}
.sms-body-wrap--over .js-sms-body,
textarea.js-sms-body[aria-invalid="true"],
input.js-sms-body[aria-invalid="true"] {
  border-color: #f04438;
}
.sms-charset-warn {
  margin-top: 0.15rem;
}
.stage-notify-overrides-grid .sms-body-wrap .js-sms-body {
  min-height: 4.25rem;
}

/* Edytor treści e-mail HTML (wizualny / źródło) */
.email-body-editor {
  width: 100%;
}
.email-body-editor-head .btn.active {
  background: var(--avallo-primary, #0d6efd);
  border-color: var(--avallo-primary, #0d6efd);
  color: #fff;
}
.email-body-editor-visual {
  min-height: 6.5rem;
  overflow: auto;
  line-height: 1.55;
  font-size: 0.875rem;
}
.email-body-editor-visual:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}
.email-body-editor-visual p {
  margin: 0 0 0.65rem;
}
.email-body-editor-visual p:last-child {
  margin-bottom: 0;
}
.email-body-editor-visual ul,
.email-body-editor-visual ol {
  margin: 0 0 0.65rem 1.25rem;
  padding: 0;
}
/* Intro / bloki tekstu wyceny: wklejka Word z line-height:%, position:absolute,
   ujemnymi marginami lub transform nakładała tekst na karty / inne bloki. */
.simple-rich-editor .email-body-editor-visual,
.user-cq-splash-desc,
.user-cq-info-body,
.user-valuation-text-block,
.user-valuation-card-content {
  position: relative;
  isolation: isolate;
}
.simple-rich-editor .email-body-editor-visual *,
.user-cq-splash-desc *,
.user-cq-info-body *,
.user-valuation-text-block *,
.user-valuation-card-content * {
  line-height: inherit !important;
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  float: none !important;
  clear: none !important;
  transform: none !important;
  translate: none !important;
  z-index: auto !important;
  /* WebWave/Word: sztywne height (83px/412px) wylewały treść na karty */
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  max-width: 100% !important;
}
.email-body-editor[data-ebe-mode="visual"] > textarea.js-email-body-editor {
  display: none !important;
}
.stage-notify-email-body-row .email-body-editor,
.stage-notify-email-section .email-body-editor {
  margin-top: 0.25rem;
}

/* Szablony umów — pasek placeholderów + wyższy edytor + toolbar Word */
.contract-placeholder-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.contract-placeholder-bar__label {
  white-space: nowrap;
}
.email-body-editor:has(#contractBodyHtml) .email-body-editor-visual,
textarea#contractBodyHtml {
  min-height: 22rem;
}
.contract-rich-editor .contract-toolbar {
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  background: #f8fafc;
  padding: 0.4rem 0.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.contract-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}
.contract-toolbar-sep {
  width: 1px;
  height: 1.4rem;
  background: #cbd5e1;
  margin: 0 0.2rem;
}
.contract-toolbar-select {
  width: auto;
  min-width: 7.5rem;
  max-width: 11rem;
  display: inline-block;
}
.contract-toolbar-select--size {
  min-width: 5rem;
  max-width: 6rem;
}
.contract-color-btn {
  position: relative;
  overflow: hidden;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}
.contract-color-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  border: 0;
  padding: 0;
}
.contract-rich-editor .email-body-editor-visual table,
.contract-rich-editor .email-body-editor-visual td,
.contract-rich-editor .email-body-editor-visual th {
  border: 1px solid #94a3b8;
}
.contract-rich-editor .email-body-editor-visual table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.5rem 0;
}
.contract-rich-editor .email-body-editor-visual td,
.contract-rich-editor .email-body-editor-visual th {
  padding: 4px 6px;
  min-width: 2rem;
}
.contract-rich-editor .email-body-editor-visual h1 {
  font-size: 1.5rem;
  margin: 0.6rem 0 0.4rem;
}
.contract-rich-editor .email-body-editor-visual h2 {
  font-size: 1.25rem;
  margin: 0.55rem 0 0.35rem;
}
.contract-rich-editor .email-body-editor-visual h3 {
  font-size: 1.1rem;
  margin: 0.5rem 0 0.3rem;
}
.contract-rich-editor .email-body-editor-visual h4 {
  font-size: 1rem;
  margin: 0.45rem 0 0.25rem;
}
.contract-rich-editor .email-body-editor-visual img,
.contract-rich-editor .email-body-editor-visual .document-inline-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.5rem auto;
}
/* Obrazy w dokumencie: jak w Dokumentach — bez display:block/margin:auto
   (to rozwalało logo/pieczątki z position:absolute z Worda). */
.user-question-stage .user-cq-doc-body img,
.user-question-stage .user-cq-doc-body .document-inline-image {
  max-width: 100%;
  height: auto;
}
.user-question-stage .user-cq-doc-body img[style*="position: absolute"],
.user-question-stage .user-cq-doc-body img[style*="position:absolute"],
.user-question-stage .user-cq-doc-body .sd-abs-pos,
.user-question-stage .user-cq-doc-body .sd-abs-pos img {
  max-width: none;
}

.tpl-recipient-info .badge {
  white-space: normal;
  text-align: left;
  line-height: 1.35;
  font-weight: 500;
}


/* --- Dokumenty: strona A4 (edytor / podgląd) — wygląd kartki jak w Wordzie --- */
:root {
  --doc-a4-width: 210mm;
  --doc-a4-height: 297mm;
  --doc-a4-margin: 20mm;
}
.doc-a4-canvas {
  background: #e9edf3;
  border: 1px solid #dbe2ea;
  border-radius: 0.5rem;
  padding: 1.25rem;
  overflow-x: auto;
  overflow-y: visible;
}
.doc-a4-sheet {
  box-sizing: border-box;
  width: var(--doc-a4-width);
  min-height: var(--doc-a4-height);
  padding: var(--doc-a4-margin);
  margin: 0 auto;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  font-family: "Times New Roman", "Liberation Serif", Georgia, serif;
  font-size: 12pt;
  line-height: normal;
  color: #111827;
  word-wrap: break-word;
}
.doc-a4-sheet > :first-child { margin-top: 0; }
.doc-a4-sheet > :last-child { margin-bottom: 0; }
/* Domyślnie 0 — import z Worda niesie własne margin/line-height w style="";
   wymuszanie 0.5rem rozwijało skierowania na kilka stron / rozjeżdżało pola. */
.doc-a4-sheet p { margin: 0; }
.doc-a4-sheet h1 { font-size: 18pt; margin: 0; }
.doc-a4-sheet h2 { font-size: 14pt; margin: 0; }
.doc-a4-sheet h3 { font-size: 12.5pt; margin: 0; }
.doc-a4-sheet h4 { font-size: 11.5pt; margin: 0; }
.doc-a4-sheet h5,
.doc-a4-sheet h6 { font-size: 12pt; margin: 0; }
.doc-a4-sheet ul,
.doc-a4-sheet ol { margin: 0; padding-left: 1.5rem; }
.doc-a4-sheet hr { margin: 1rem 0; border: 0; border-top: 1px solid #cbd5e1; }
.doc-a4-sheet table { max-width: 100%; margin: 0; border-collapse: collapse; }
.doc-a4-sheet td,
.doc-a4-sheet th { vertical-align: top; }
.doc-a4-sheet img,
.doc-a4-sheet .document-inline-image {
  max-width: 100%;
  height: auto;
}
.doc-a4-sheet img[style*="position: absolute"],
.doc-a4-sheet img[style*="position:absolute"],
.doc-a4-sheet .sd-abs-pos,
.doc-a4-sheet .sd-abs-pos img {
  max-width: none;
}
.doc-a4-sheet--preview { position: relative; overflow: hidden; }

/* Overlay znaku wodnego (podgląd umowy / dokumentu / etap u osoby kandydującej).
   Bez position:absolute+inset warstwa SVG ma wysokość ~0 i widać tylko 1–2 znaki. */
.document-preview-watermark {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  display: none;
  overflow: hidden;
}
.document-preview-watermark.is-active {
  display: block;
}
.document-preview-body {
  position: relative;
  z-index: 2;
}
.document-preview-body .document-word-watermark {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}
/* Sam tekst POUFNE z Worda (bez SVG) — umiarkowany rozmiar. */
.document-preview-body .document-word-watermark:not(:has(svg)) {
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(22pt, 6vw, 36pt);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  color: rgba(0, 0, 0, 0.12);
  text-transform: uppercase;
  white-space: nowrap;
}
.document-preview-body .document-word-watermark-text {
  font-size: clamp(22pt, 6vw, 36pt);
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  line-height: 1;
  color: rgba(0, 0, 0, 0.12);
}

/* Znak wodny z Worda (VML WordArt w nagłówku → CSS overlay przy imporcie) */
.document-page {
  position: relative;
}
.document-word-watermark {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}
.document-page > :not(.document-word-watermark) {
  position: relative;
  z-index: 1;
}
.doc-a4-sheet .document-word-watermark:not(.document-word-watermark--paged):not(.document-word-watermark-clone),
.email-body-editor-visual .document-word-watermark,
.contract-rich-editor .email-body-editor-visual .document-word-watermark {
  position: absolute;
  inset: 0;
}
.doc-body .document-word-watermark,
.doc-shell .document-word-watermark {
  position: absolute;
  inset: 0;
  z-index: 0;
}
/* POUFNE z Worda powtórzone co A4 (oryginał + klony JS) — umowa do wglądu.
   Po ogólnych regułach inset:0, żeby nie zostały nadpisane. */
.doc-a4-sheet .document-word-watermark--paged,
.doc-a4-sheet .document-word-watermark-clone,
.document-preview-body .document-word-watermark--paged,
.document-preview-body .document-word-watermark-clone,
.document-page .document-word-watermark--paged,
.document-page .document-word-watermark-clone {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  height: 297mm;
  inset: auto;
  top: 0;
  bottom: auto;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

@media print {
  .doc-body .document-word-watermark,
  .doc-shell .document-word-watermark,
  .document-word-header,
  .document-word-footer {
    position: fixed !important;
  }
}

/* Edytor treści dokumentu jako kartka A4 (contenteditable wstrzykiwany przez JS) */
.doc-a4-canvas--editor > textarea.js-email-body-editor {
  width: 100%;
  min-height: 24rem;
}
.contract-rich-editor .doc-a4-canvas--editor .email-body-editor-visual {
  position: relative;
  box-sizing: border-box;
  width: var(--doc-a4-width);
  min-height: var(--doc-a4-height);
  padding: var(--doc-a4-margin);
  margin: 0 auto;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  font-family: "Times New Roman", "Liberation Serif", Georgia, serif;
  font-size: 12pt;
  line-height: 1.45;
  color: #111827;
  overflow: visible;
}
.contract-rich-editor .doc-a4-canvas--editor .email-body-editor-visual:focus {
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12), 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}
.contract-rich-editor .doc-a4-canvas--editor .email-body-editor-visual table {
  border-collapse: collapse;
  width: auto;
  max-width: 100%;
}
.contract-rich-editor .doc-a4-canvas--editor .email-body-editor-visual td,
.contract-rich-editor .doc-a4-canvas--editor .email-body-editor-visual th {
  padding: 2pt 4pt;
  vertical-align: top;
}
.contract-rich-editor .doc-a4-canvas--editor .email-body-editor-visual p { margin: 0 0 0.5rem; }
.contract-rich-editor .doc-a4-canvas--editor .email-body-editor-visual h1 { font-size: 18pt; }
.contract-rich-editor .doc-a4-canvas--editor .email-body-editor-visual h2 { font-size: 14pt; }
.contract-rich-editor .doc-a4-canvas--editor .email-body-editor-visual h3 { font-size: 12.5pt; }
.contract-rich-editor .doc-a4-canvas--editor .email-body-editor-visual h4 { font-size: 11.5pt; }
.contract-rich-editor .doc-a4-canvas--editor .email-body-editor-visual img,
.contract-rich-editor .doc-a4-canvas--editor .email-body-editor-visual .document-inline-image {
  max-width: 100%;
  height: auto;
  display: inline-block;
  margin: 0;
}
.doc-a4-hint {
  font-size: 0.8rem;
  color: #64748b;
}
@media (max-width: 992px) {
  .doc-a4-canvas { padding: 0.6rem; }
}

/* --- Obrazy w edytorze umów/dokumentów: zaznaczanie, przeciąganie, uchwyty --- */
.contract-rich-editor {
  position: relative;
}
.contract-rich-editor .email-body-editor-visual img {
  cursor: move;
}
.contract-rich-editor .email-body-editor-visual img:hover {
  outline: 2px dashed rgba(13, 110, 253, 0.45);
  outline-offset: 1px;
}
.contract-rich-editor .email-body-editor-visual.doc-img-dragging,
.contract-rich-editor .email-body-editor-visual.doc-img-dragging * {
  cursor: grabbing;
}
.doc-img-overlay {
  position: absolute;
  z-index: 40;
  pointer-events: none;
  border: 2px solid #0d6efd;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.75);
}
.doc-img-overlay[hidden] {
  display: none;
}
.doc-img-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid #0d6efd;
  border-radius: 50%;
  pointer-events: auto;
  touch-action: none;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
}
.doc-img-handle[data-dir="nw"] { top: -7px; left: -7px; cursor: nwse-resize; }
.doc-img-handle[data-dir="ne"] { top: -7px; right: -7px; cursor: nesw-resize; }
.doc-img-handle[data-dir="sw"] { bottom: -7px; left: -7px; cursor: nesw-resize; }
.doc-img-handle[data-dir="se"] { bottom: -7px; right: -7px; cursor: nwse-resize; }
.doc-img-toolbar {
  position: absolute;
  top: -2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  background: #1f2937;
  border-radius: 0.375rem;
  padding: 3px 4px;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
  white-space: nowrap;
}
.doc-img-overlay--toolbar-below .doc-img-toolbar {
  top: auto;
  bottom: -2.5rem;
}
.doc-img-toolbar button {
  border: 0;
  background: transparent;
  color: #e5e7eb;
  width: 1.8rem;
  height: 1.7rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
}
.doc-img-toolbar button:hover {
  background: #374151;
  color: #fff;
}
.doc-img-toolbar button.active {
  background: #0d6efd;
  color: #fff;
}
.doc-img-toolbar button.doc-img-btn-danger:hover {
  background: #b91c1c;
}
.doc-img-toolbar-sep {
  width: 1px;
  align-self: stretch;
  background: #4b5563;
  margin: 2px 3px;
}
.doc-img-size {
  position: absolute;
  right: 0;
  bottom: -1.55rem;
  background: rgba(31, 41, 55, 0.92);
  color: #f9fafb;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 0.25rem;
  pointer-events: none;
  white-space: nowrap;
}
.doc-img-size[hidden] {
  display: none;
}

.user-consents-page {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.user-consent-withdraw {
  background: #fff;
  border: 1px solid var(--avallo-border);
  border-radius: 0.75rem;
  padding: 1rem 1.15rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.user-consent-withdraw a {
  color: var(--avallo-primary);
  font-weight: 600;
  word-break: break-word;
}
.user-consent-card {
  border: 1px solid rgba(139, 29, 63, 0.16);
  border-left: 5px solid var(--avallo-primary);
  border-radius: 0.75rem;
}
.user-consent-card.is-expired {
  border-left-color: var(--status-hold-border);
}
.user-consent-card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}
.user-consent-title {
  margin: 0 0 0.15rem;
  color: var(--avallo-primary);
  font-weight: 700;
}
.user-consent-type {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
/* Compact status badge: directly under rodzaj zgody, not a full-width hero. */
.user-consent-status.status-box,
.user-consent-card .user-consent-status {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: none;
  margin: 0.1rem 0 0.55rem;
  padding: 0.32rem 0.7rem;
  border-radius: 0.5rem;
  border-width: 1.5px;
}
.user-consent-status .status-box-label {
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.2;
}
.user-consent-meta {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.65rem 1.25rem;
  margin-top: 0.15rem;
}
.user-consent-meta dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.15rem;
}
.user-consent-meta dd {
  margin: 0;
  font-weight: 600;
  color: #1e293b;
}


/* CQ: potwierdzenia (Wydruk) + numer konta (opłata) */
.user-cq-ack-list {
  text-align: left;
  max-width: 36rem;
  margin: 0.5rem auto 0;
}
.user-cq-ack-item {
  font-size: 0.98rem;
  line-height: 1.4;
  color: #0f172a;
}
.user-cq-info-body {
  text-align: left;
  max-width: 40rem;
  margin: 0.35rem auto 0.75rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #334155;
  white-space: normal;
}
.user-cq-info-body p:last-child { margin-bottom: 0; }
.user-cq-bank-account {
  text-align: left;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}
.user-cq-bank-account .js-cq-answer-bank {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
/* Opisy pomocnicze przy / nad przyciskami akcji (Dalej, Wrócę później, pobranie…) */
.user-candidate-questions-form .user-cq-btn-helper {
  text-align: center;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}
