:root {
  --bg: #080c14;
  --bg-page: #0a0e17;
  --bg-card: #0d1526;
  --bg-card-inner: #111729;
  --bg-input: #0a101c;
  --border: #1a243a;
  --border-light: #243049;
  --text: #ffffff;
  --text-secondary: #8a9bb7;
  --text-muted: #5c6d88;
  --blue: #2563eb;
  --blue-bright: #3b82f6;
  --blue-dim: rgba(37, 99, 235, 0.15);
  --blue-glow: rgba(37, 99, 235, 0.25);
  --red: #991b1b;
  --red-bright: #b91c1c;
  --red-dim: rgba(153, 27, 27, 0.35);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  background: var(--bg-page);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  padding:
    env(safe-area-inset-top, 0)
    env(safe-area-inset-right, 0)
    env(safe-area-inset-bottom, 0)
    env(safe-area-inset-left, 0);
}

/* Watermark */
.page-watermark {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 0;
  color: rgba(255, 255, 255, 0.025);
}

.page-watermark svg {
  width: min(420px, 70vw);
  height: auto;
}

.page {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 2rem));
  margin-inline: auto;
  padding: 1.5rem 0 3rem;
}

/* Tag badge (niebieski pill jak WYPOSAŻENIE) */
.tag-badge {
  display: inline-block;
  padding: 0.22rem 0.65rem;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.tag-badge--sm {
  font-size: 0.58rem;
  padding: 0.18rem 0.5rem;
  margin-bottom: 0.2rem;
}

/* Hero header card */
.hero-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.35rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}

.hero-card__logo {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  color: var(--text-secondary);
}

.hero-card__logo svg {
  width: 100%;
  height: 100%;
}

.hero-card__body {
  flex: 1;
  min-width: 0;
}

.hero-card__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-card__subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.hero-card__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.fto-status {
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card-inner);
}

.fto-status.is-active {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
  background: var(--green-dim);
}

/* Main panel */
.main { }

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card-inner);
  border-bottom: 1px solid var(--border);
}

.panel__head-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.panel__icon {
  font-size: 1.4rem;
  line-height: 1;
}

.panel__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.panel__toolbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.3rem 0.55rem;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.5);
}

.sync-status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.sync-status.is-syncing .sync-status__dot {
  background: var(--blue-bright);
  animation: sync-pulse 1.2s ease infinite;
}

@keyframes sync-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem 1.25rem 0;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card-inner);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.filter-tab:hover {
  border-color: var(--border-light);
  color: var(--text);
}

.filter-tab.is-active {
  background: var(--blue-dim);
  border-color: rgba(37, 99, 235, 0.45);
  color: #93c5fd;
}

.filter-tab--fail.is-active {
  background: rgba(153, 27, 27, 0.2);
  border-color: rgba(185, 28, 28, 0.45);
  color: #fca5a5;
}

.filter-tab--pass.is-active {
  background: var(--green-dim);
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.filter-tab__count {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.05rem 0.38rem;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.3);
  min-width: 1.1rem;
  text-align: center;
}

.filter-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.filter-hint strong {
  color: var(--blue-bright);
  font-weight: 600;
}

/* Search */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  padding-bottom: 0.25rem;
}

.search-bar__icon {
  position: absolute;
  left: 0.9rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-bar__input {
  width: 100%;
  padding: 0.62rem 2.5rem;
  font-size: 0.86rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-bar__input::placeholder { color: var(--text-muted); }

.search-bar__input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 0 0 3px var(--blue-dim);
}

.search-bar__clear {
  position: absolute;
  right: 0.5rem;
  width: 1.55rem;
  height: 1.55rem;
  border: none;
  border-radius: 6px;
  background: var(--border);
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.search-bar__clear:hover {
  background: var(--border-light);
  color: var(--text);
}

/* Add form */
.add-trainee-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 1.25rem 1rem;
  padding: 0.75rem;
  background: var(--bg-card-inner);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.add-trainee-strip input {
  flex: 1;
  min-width: 100px;
  padding: 0.5rem 0.65rem;
  font-size: 0.84rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
}

.add-trainee-strip input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.45);
}

/* Niezależne kolumny — rozwinięcie w kol. 1 nie przesuwa kol. 2 i 3 */
.trainees-list {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.25rem 1.25rem;
}

.trainees-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.trainees-list > .empty,
.trainees-list > .loading {
  width: 100%;
  flex: 1 1 100%;
}

.trainee-card {
  width: 100%;
  background: var(--bg-card-inner);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.trainee-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.trainee-card--passed { border-color: rgba(34, 197, 94, 0.3); }
.trainee-card--failed { border-color: var(--border); }

.trainee-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.trainee-card__identity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.trainee-card__avatar {
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.trainee-card--passed .trainee-card__avatar {
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.trainee-card__info { min-width: 0; }

.trainee-card__name {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.trainee-card__badge {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.status-pill {
  flex-shrink: 0;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
}

.status-pill--pass {
  color: #86efac;
  background: var(--green-dim);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-pill--fail {
  color: #fca5a5;
  background: var(--red-dim);
  border: 1px solid rgba(185, 28, 28, 0.35);
}

.trainee-card__summary {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.summary__scores {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.summary__total {
  font-size: 1rem;
  font-weight: 800;
  color: var(--blue-bright);
  font-variant-numeric: tabular-nums;
}

.summary__total small {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.summary__threshold {
  font-size: 0.68rem;
  color: var(--text-secondary);
  text-align: right;
}

.progress--summary { height: 5px; }

.trainee-card__toggle {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: none;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
}

.trainee-card__toggle:hover {
  background: rgba(255, 255, 255, 0.04);
}

.trainee-card__toggle-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.trainee-card__toggle-hint {
  font-size: 0.72rem;
  font-weight: 500;
  color: #9eb0cc;
  letter-spacing: 0.01em;
}

.trainee-card__toggle:hover .trainee-card__toggle-hint {
  color: var(--text);
}

.trainee-card__toggle-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.trainee-card__toggle-count {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
}

.trainee-card__chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.trainee-card__toggle[aria-expanded="true"] .trainee-card__chevron {
  transform: rotate(180deg);
}

.score-table.is-collapsed {
  display: none;
}

/* Score list */
.score-table {
  padding: 0.35rem 0.55rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.score-row {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  padding: 0.4rem 0.5rem 0.45rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.score-row.is-done {
  border-color: rgba(37, 99, 235, 0.2);
}

/* wiersz: ikona + nazwa + punkty */
.score-row__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.35rem;
}

.score-row__check {
  flex-shrink: 0;
  width: 0.85rem;
  height: 0.85rem;
  display: grid;
  place-items: center;
}

.score-row__check svg {
  width: 0.85rem;
  height: 0.85rem;
  color: var(--blue-bright);
}

.score-row__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-light);
}

.score-row__name {
  min-width: 0;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-row.is-done .score-row__name {
  color: var(--text-secondary);
}

.score-row__pts {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.score-row__pts-cur {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--blue-bright);
}

.score-row.is-done .score-row__pts-cur { color: var(--green); }

.score-row__pts-sep {
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.55;
  margin: 0 0.06rem;
}

.score-row__pts-max {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* pasek — tuż pod nazwą, pełna szerokość */
.score-row__bar {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  margin: 0;
}

/* przyciski punktów */
.score-row__actions {
  margin-top: 0.2rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(26, 36, 58, 0.75);
}

.pt-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  width: 100%;
}

.pt-btn {
  touch-action: manipulation;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #161f30;
  color: #7a8da8;
  font-size: 0.64rem;
  font-weight: 600;
  padding: 0.34rem 0;
  min-height: 1.6rem;
  cursor: pointer;
  line-height: 1;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.pt-btn--minus {
  background: #3a1518;
  border-color: #6b2228;
  color: #f0a8a8;
}

.pt-btn--plus {
  background: #143322;
  border-color: #1f5c40;
  color: #8fd4a8;
}

.pt-btn:nth-child(3) {
  margin-left: 2px;
}

.pt-btn--minus:hover:not(:disabled):not(.pt-btn--off),
.pt-btn--minus:focus-visible:not(:disabled):not(.pt-btn--off) {
  background: #4a1a1f;
  border-color: #853038;
  color: #ffc4c4;
}

.pt-btn--plus:hover:not(:disabled):not(.pt-btn--off),
.pt-btn--plus:focus-visible:not(:disabled):not(.pt-btn--off) {
  background: #1a4030;
  border-color: #287050;
  color: #b0ecc4;
}

.pt-btn--apply {
  flex-shrink: 0;
  width: 2.1rem;
  min-height: 1.85rem;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 7px;
}

.pt-btn--apply.pt-btn--plus {
  background: #1a4030;
  border-color: #287050;
  color: #b8ecc8;
}

.pt-btn--apply.pt-btn--plus:hover:not(:disabled) {
  background: #225040;
  border-color: #328860;
  color: #d4f5de;
}

.pt-btn--apply:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.pt-custom {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.pt-custom-input {
  flex: 1;
  min-width: 0;
  padding: 0.34rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #0d1422;
  color: var(--text);
}

.pt-custom-input:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pt-custom-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.4);
}

.pt-custom-input::placeholder {
  color: var(--text-muted);
  font-size: 0.66rem;
}

.pt-btn:active:not(:disabled):not(.pt-btn--off) {
  background: #0d121c;
}

.pt-btn--off,
.pt-btn:disabled {
  opacity: 0.22;
  cursor: not-allowed;
  pointer-events: none;
}

body.points-locked .btn-pts:not(.pt-btn--off) {
  pointer-events: none;
  opacity: 0.4;
  cursor: wait;
}

body.points-locked .pt-actions {
  opacity: 0.65;
}

.progress__bar {
  height: 100%;
  width: 100%;
  background: var(--blue);
  border-radius: inherit;
  transform: scaleX(var(--pct, 0));
  transform-origin: left center;
  transition: transform 0.3s ease;
}

.progress__bar.is-full { background: var(--green); }

input, button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* Przyciski UI */
.btn {
  touch-action: manipulation;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.82rem;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn--primary {
  background: #1a3052;
  border-color: #2a4368;
  color: #dce6f5;
}

.btn--primary:hover {
  background: #223a5e;
  border-color: #355278;
}

.btn--accent {
  background: #1a1518;
  border: 1px solid #3d2a2e;
  color: #c4a8a8;
}

.btn--accent:hover {
  background: #221a1d;
  border-color: #4a3539;
  color: #d4bcbc;
}

.btn--danger {
  background: #3d1518;
  border: 1px solid #5c2228;
  color: #e8d0d0;
}

.btn--danger:hover {
  background: #4a1a1f;
  border-color: #6b2a32;
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-light);
  color: var(--text);
}

.btn--sm { padding: 0.4rem 0.7rem; font-size: 0.78rem; }

label {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.52rem 0.68rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 2px var(--blue-dim);
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 100;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 12, 0.8);
  backdrop-filter: blur(4px);
}

.modal__dialog {
  position: relative;
  width: min(400px, calc(100% - 1.5rem));
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.modal__dialog h2 {
  margin: 0.35rem 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  box-shadow: var(--shadow);
  z-index: 200;
}

.toast.is-error { border-color: rgba(185, 28, 28, 0.5); color: #fca5a5; }
.toast.is-success { border-color: rgba(34, 197, 94, 0.4); color: #86efac; }

.loading, .empty {
  color: var(--text-secondary);
  text-align: center;
  padding: 2.5rem 1rem;
  font-size: 0.88rem;
}

.hidden { display: none !important; }

@media (max-width: 720px) {
  .page {
    width: 100%;
    padding: 0.75rem 0.75rem 2rem;
  }

  .page-watermark svg {
    width: min(280px, 85vw);
  }

  .hero-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem;
    margin-bottom: 0.85rem;
  }

  .hero-card__logo {
    width: 2.75rem;
    height: 2.75rem;
  }

  .hero-card__title {
    font-size: 1.15rem;
  }

  .hero-card__subtitle {
    font-size: 0.78rem;
  }

  .hero-card__actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.4rem;
  }

  .panel__head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
  }

  .panel__toolbar {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .sync-status {
    order: -1;
    width: 100%;
    justify-content: center;
    font-size: 0.68rem;
    padding: 0.35rem 0.5rem;
  }

  .controls {
    padding: 0.85rem 1rem 0;
    gap: 0.55rem;
  }

  .filter-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
    margin: 0 -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .filter-tabs::-webkit-scrollbar { display: none; }

  .filter-tab {
    flex-shrink: 0;
    font-size: 0.72rem;
    padding: 0.42rem 0.75rem;
  }

  .filter-hint {
    font-size: 0.72rem;
  }

  .search-bar__input {
    font-size: 16px; /* zapobiega zoomowi iOS przy focus */
    padding: 0.7rem 2.5rem;
  }

  .add-trainee-strip {
    margin: 0 1rem 0.85rem;
    flex-direction: column;
  }

  .add-trainee-strip input,
  .add-trainee-strip .btn {
    width: 100%;
    min-height: 2.75rem;
  }

  .trainees-list {
    gap: 0.75rem;
    padding: 0.85rem 1rem 1rem;
  }

  .trainees-col {
    gap: 0.75rem;
  }

  .trainee-card__head {
    flex-wrap: wrap;
    padding: 0.65rem 0.75rem;
  }

  .status-pill {
    font-size: 0.52rem;
  }

  .trainee-card__summary {
    padding: 0.55rem 0.75rem;
  }

  .summary__total {
    font-size: 1.05rem;
  }

  .score-table {
    padding: 0.35rem 0.5rem 0.55rem;
  }

  .score-row__name {
    white-space: normal;
    font-size: 0.78rem;
  }

  .score-row__bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .pt-actions {
    gap: 6px;
  }

  .pt-btn {
    min-height: 2.65rem;
    font-size: 0.72rem;
    border-radius: 8px;
  }

  .pt-custom-input {
    font-size: 16px;
    min-height: 2.65rem;
    padding: 0.45rem 0.55rem;
  }

  .pt-btn--apply {
    width: 2.75rem;
    min-height: 2.65rem;
    font-size: 1rem;
  }

  .btn {
    min-height: 2.5rem;
    padding: 0.5rem 0.85rem;
  }

  .btn--sm {
    min-height: 2.35rem;
  }

  .toast {
    left: 50%;
    right: auto;
    width: calc(100% - 1.5rem);
    max-width: 24rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0));
    text-align: center;
  }

  .modal__dialog {
    width: calc(100% - 1.25rem);
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
  }
}

@media (max-width: 380px) {
  .page { padding-inline: 0.5rem; }

  .hero-card__title { font-size: 1.05rem; }

  .panel__head-left .panel__icon { display: none; }

  .sync-status__label { display: none; }

  .filter-tab {
    font-size: 0.68rem;
    padding: 0.38rem 0.6rem;
  }
}
