.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 30%, rgba(26, 41, 68, .9), var(--navy-950) 70%);
  position: relative;
  overflow: hidden;
}
.login::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grid-pattern);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
}
.login__box {
  position: relative;
  width: min(420px, 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.login__box--wide { width: min(560px, 100%); }
.login__seal { width: 180px; height: auto; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .6)); }
.login__title { font: 600 28px/1.15 var(--font-display); letter-spacing: .06em; color: var(--gold-300); margin-top: 24px; }
.login__sub { font: var(--text-label); letter-spacing: .24em; color: var(--silver-300); margin-top: 12px; }
.hairline { width: 220px; height: 1px; background: var(--hairline-gold); margin: 28px 0; }
.login__text { margin: 0 0 24px; font: var(--text-small); color: var(--text-secondary); max-width: 360px; }
.login__foot { display: flex; align-items: center; gap: 6px; margin-top: 20px; font: 400 12px/1.4 var(--font-sans); color: var(--text-muted); }
.login .alert { margin-bottom: 18px; width: 100%; }
.login__seal--sm { width: 96px; }
.onboarding { width: 100%; text-align: left; }
.profile-card, .form-card { max-width: 760px; }
.me__link { color: inherit; text-decoration: none; min-width: 0; }
.me__link:hover { text-decoration: none; color: inherit; }
.me__link:hover .me__name { color: var(--gold-200); }
.input--static { display: flex; align-items: center; color: var(--text-secondary); background: var(--surface-3); }

.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.error-page__code { font: 600 64px/1 var(--font-display); color: var(--gold-300); letter-spacing: .06em; }
.error-page__text { color: var(--text-secondary); margin: 14px 0 22px; max-width: 420px; }

/* Pulpit */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px 24px;
  margin-bottom: 16px;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at 0% 0%, rgba(212, 170, 82, .12), transparent 55%),
    linear-gradient(135deg, var(--navy-800), var(--navy-900));
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grid-pattern);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000);
  mask-image: linear-gradient(90deg, transparent 30%, #000);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero__seal { width: 88px; height: 88px; flex: none; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .55)); }
.hero__eyebrow { font: var(--text-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--gold-300); }
.hero__title { font: 600 26px/1.2 var(--font-sans); margin: 8px 0 10px; }
.hero__week {
  width: 260px;
  flex: none;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(5, 9, 15, .45);
  border: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hero__hours { font: 600 24px/1 var(--font-sans); font-variant-numeric: tabular-nums; }
.hero__hours .muted { font-size: 15px; font-weight: 500; }

.meter {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: var(--navy-600);
  overflow: hidden;
}
.meter::-webkit-progress-bar { background: var(--navy-600); border-radius: 99px; }
.meter::-webkit-progress-value { background: linear-gradient(90deg, var(--gold-500), var(--gold-300)); border-radius: 99px; }
.meter::-moz-progress-bar { background: linear-gradient(90deg, var(--gold-500), var(--gold-300)); border-radius: 99px; }
.meter--full::-webkit-progress-value { background: var(--success); }
.meter--full::-moz-progress-bar { background: var(--success); }

.org { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.org__row { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 10px; justify-content: center; width: 100%; }
.org__row--top { grid-template-columns: minmax(0, 300px); }
.org__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 12px;
  font: var(--text-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-muted);
}
.org__divider::before, .org__divider::after { content: ""; flex: 1; height: 1px; background: var(--border-subtle); }
.org__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 10px; }
.post {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--surface-1);
  color: var(--text-primary);
  text-decoration: none;
  min-width: 0;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
a.post:hover { border-color: var(--border-gold); box-shadow: var(--glow-gold); text-decoration: none; color: var(--text-primary); }
.post__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.post__role { font: var(--text-label); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-300); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post__name { font: 600 14px/1.2 var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post--vacant { flex-direction: column; align-items: flex-start; gap: 4px; border-style: dashed; background: transparent; }
.post--vacant .post__role { color: var(--text-muted); }
.post--vacant .post__name { color: var(--text-disabled); font-weight: 500; }

.rules-link { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--text-primary); text-decoration: none; }
.rules-link:hover { border-color: var(--border-gold); text-decoration: none; color: var(--text-primary); }

.feed { display: flex; flex-direction: column; gap: 12px; }
.feed__item { display: flex; gap: 10px; font: var(--text-small); }
.feed__dot { width: 6px; height: 6px; border-radius: 9px; background: var(--navy-500); margin-top: 7px; flex: none; }
.feed__item:first-child .feed__dot { background: var(--gold-400); }
.feed__text { flex: 1; color: var(--text-secondary); min-width: 0; }
.feed__text b { color: var(--text-primary); font-weight: 600; }
.feed__time { font: 400 11px/1.6 var(--font-mono); color: var(--text-muted); white-space: nowrap; }

.list { display: flex; flex-direction: column; }
.list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  min-width: 0;
}
.list__item:first-child { border-top: 0; }
a.list__item:hover { background: var(--surface-hover); text-decoration: none; color: var(--text-primary); }
.list__icon {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-subtle);
  color: var(--gold-300);
}
.list__icon .ic { width: 15px; height: 15px; }

.notice {
  --c: var(--gold-300);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  background: color-mix(in srgb, var(--c) 10%, transparent);
  color: var(--text-primary);
}
.notice > .ic { color: var(--c); margin-top: 2px; }
.notice--danger { --c: var(--danger-fg); }
.notice--gold { --c: var(--gold-300); }

/* Skład */
.roster__badge { width: 64px; }
.roster__group td {
  padding: 9px 14px;
  background: var(--surface-1);
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-subtle);
}
.roster tbody:first-of-type .roster__group td { border-top: 0; }
.roster tbody tr.roster__group:hover { background: var(--surface-1); }
.roster__vacant td { padding-top: 7px; padding-bottom: 7px; opacity: .55; }
.roster__vacant .ic { vertical-align: -2px; }
.row--end { justify-content: flex-end; }
.table__sub { display: block; margin-top: 2px; }
.stat--link { color: var(--text-primary); text-decoration: none; transition: border-color var(--dur-fast); }
.stat--link:hover { border-color: var(--border-gold); text-decoration: none; color: var(--text-primary); }

.division {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-default);
  background: var(--info-subtle);
  color: var(--info-fg);
  font: 700 10px/1 var(--font-sans);
  letter-spacing: .08em;
  white-space: nowrap;
}

.certs { display: flex; flex-wrap: wrap; gap: 3px; max-width: 360px; }
.cert {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
  color: var(--text-disabled);
  font: 600 9.5px/1 var(--font-sans);
  letter-spacing: .04em;
  white-space: nowrap;
}
.cert.is-on { color: var(--success-fg); border-color: rgba(61, 181, 126, .4); background: var(--success-subtle); }
.cert--lg { height: 28px; padding: 0 10px; font-size: 12px; border-radius: var(--radius-sm); justify-content: center; }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.cert-toggle { position: relative; cursor: pointer; }
.cert-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.cert-toggle__box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--surface-1);
  color: var(--text-muted);
  font: 600 12px/1 var(--font-sans);
  transition: all var(--dur-fast);
}
.cert-toggle__box .ic { display: none; }
.cert-toggle input:checked + .cert-toggle__box { color: var(--success-fg); border-color: rgba(61, 181, 126, .5); background: var(--success-subtle); }
.cert-toggle input:checked + .cert-toggle__box .ic { display: inline-block; }
.cert-toggle input:focus-visible + .cert-toggle__box { box-shadow: var(--focus-ring); }

.rank--staff { background: rgba(76, 141, 240, .16); color: var(--blue-400); border-color: rgba(76, 141, 240, .45); }
.rank--sgt { background: var(--navy-600); color: var(--silver-50); border-color: var(--silver-400); }
.avatar--24 { --size: 24px; }

/* Profil */
.profile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; margin-bottom: 14px; }
.profile__name { font: 600 19px/1.2 var(--font-sans); }
.profile__alias { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.profile__badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.profile__actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.profile__actions > * { flex: 1 1 auto; }
.profile__actions form { display: flex; }
.profile__actions form .btn { flex: 1; }
.note-box { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-1); border-left: 2px solid var(--accent); }
.note-box .label { display: block; margin-bottom: 4px; }

.tally { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tally__item {
  --c: var(--text-secondary);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tally__item--plus { --c: var(--success-fg); }
.tally__item--praise { --c: var(--gold-300); }
.tally__item--minus { --c: var(--warning-fg); }
.tally__item--reprimand { --c: var(--danger-fg); }
.tally__value { font: 600 26px/1 var(--font-sans); color: var(--c); font-variant-numeric: tabular-nums; }
.tally__value small { font-size: 13px; color: var(--text-muted); margin-left: 2px; }
.tally__label { font: var(--text-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-muted); }
.tally--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tally--compact .tally__item { padding: 10px 12px; background: var(--surface-1); }
.tally--compact .tally__value { font-size: 20px; }

.timeline { display: flex; flex-direction: column; gap: 18px; }
.tl { display: flex; gap: 14px; }
.tl__time { font: 400 12px/1.5 var(--font-mono); color: var(--text-muted); width: 118px; flex: none; }
.tl__dot { width: 9px; height: 9px; border-radius: 9px; margin-top: 7px; flex: none; background: var(--navy-500); }
.tl--promotion .tl__dot { background: var(--gold-400); box-shadow: var(--glow-gold); }
.tl--demotion .tl__dot { background: var(--danger); }
.tl--hire .tl__dot, .tl--rehire .tl__dot { background: var(--success); }
.tl__text { font: var(--text-small); }
.tl__who { color: var(--text-muted); font-size: 12px; margin-top: 4px; }
.prose { white-space: pre-line; color: var(--text-secondary); overflow-wrap: anywhere; }

.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stages__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
}
.stages__item.is-done { border-style: solid; border-color: rgba(61, 181, 126, .45); background: var(--success-subtle); color: var(--text-primary); }
.stages__mark { color: var(--text-disabled); }
.stages__item.is-done .stages__mark { color: var(--success-fg); }
.stages__label { font-weight: 600; font-size: 13px; }
.stages__meta { font: 400 11px/1.4 var(--font-mono); color: var(--text-muted); }

/* Dyscyplina */
.discipline__reason { min-width: 220px; max-width: 460px; }
.table tr.is-inactive td { opacity: .6; }
.table tr.is-inactive td:last-child { opacity: 1; }
.appeal { display: flex; gap: 6px; margin-top: 6px; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--info-subtle); color: var(--info-fg); font-size: 12px; }
.appeal .ic { margin-top: 2px; }
.appeal span { color: var(--text-secondary); }
.appeal strong { color: var(--info-fg); }
.type-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.type-picker__item { position: relative; cursor: pointer; }
.type-picker__item input { position: absolute; opacity: 0; pointer-events: none; }
.type-picker__item span {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--surface-1);
  color: var(--text-secondary);
  font: 600 12px/1 var(--font-sans);
}
.type-picker__item input:checked + span { border-color: var(--gold-500); background: var(--accent-subtle); color: var(--gold-200); }
.type-picker__item input:focus-visible + span { box-shadow: var(--focus-ring); }
.type-picker__item--success .ic { color: var(--success-fg); }
.type-picker__item--warning .ic { color: var(--warning-fg); }
.type-picker__item--danger .ic { color: var(--danger-fg); }
.type-picker__item--gold .ic { color: var(--gold-300); }
.type-picker__item--info .ic { color: var(--info-fg); }

.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 16px; align-items: start; }
.rules ol { margin: 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 8px; color: var(--text-secondary); font-size: 13px; }
.rules li::marker { color: var(--gold-400); font-weight: 600; }
.ladder { display: flex; flex-direction: column; gap: 8px; }
.ladder__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.offences { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 0; }
.offences__item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--border-subtle); font-size: 13px; color: var(--text-secondary); }

/* Godziny */
.timesheet td { vertical-align: middle; }
.timesheet .input--hours { width: 88px; text-align: right; }
.timesheet tr.is-dirty { background: var(--accent-subtle); }
.is-over { color: var(--success-fg); }
.is-under { color: var(--warning-fg); }
.week-nav { display: flex; align-items: center; gap: 8px; }
.week-nav__label { font: 600 14px/1 var(--font-mono); padding: 0 6px; white-space: nowrap; }
.sheet-foot { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 12px 16px; margin-top: 12px; border: 1px solid var(--border-gold); border-radius: var(--radius-md); background: rgba(8, 14, 26, .94); backdrop-filter: blur(8px); }
.sheet-foot__value { font: 600 16px/1 var(--font-mono); color: var(--text-primary); }

/* Wydziały, radiowozy */
.division-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px; }
.division-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; color: var(--text-primary); text-decoration: none; }
.division-card:hover { border-color: var(--border-gold); box-shadow: var(--glow-gold); text-decoration: none; color: var(--text-primary); }
.division-card__icon { width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; background: var(--accent-subtle); color: var(--gold-300); }
.division-card__icon .ic { width: 20px; height: 20px; }
.division-card__name { font: 600 16px/1.3 var(--font-sans); }
.division-card__desc { font-size: 13px; color: var(--text-muted); }
.stack-avatars { display: flex; }
.stack-avatars .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface-2); border-radius: 99px; }
.stack-avatars .avatar:first-child { margin-left: 0; }

.matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.matrix th { padding: 10px 6px; vertical-align: bottom; }
.matrix th:first-child { text-align: left; padding: 10px 18px; }
.matrix td { text-align: center; padding: 8px; border-top: 1px solid var(--border-subtle); }
.matrix td:first-child { text-align: left; padding: 10px 18px; color: var(--text-secondary); min-width: 220px; }
.matrix .ic { color: var(--gold-300); }
.matrix__none { color: var(--navy-500); }
.matrix__group td { background: var(--surface-1); font: var(--text-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-muted); text-align: left; padding: 8px 18px; }
.matrix__vertical { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }

.table tr.is-suspended { background: rgba(229, 72, 77, .05); }
.officer-link { color: var(--text-primary); font-weight: 600; }
.officer-link__badge { font: 500 11px/1 var(--font-mono); color: var(--text-muted); margin-right: 6px; }
.table .input--sm, .table .select--sm { min-width: 0; }
.cell-input { width: 100%; min-width: 90px; }
.input--num { width: 110px; text-align: right; }
.input--badge { width: 76px; }
.input--short { width: 110px; }
.input--role { min-width: 190px; }
.center, .table th.center, .table td.center { text-align: center; }
.hairline--left { width: 100%; margin: 6px 0; background: var(--border-subtle); }
.table tr.is-current td { background: var(--accent-subtle); }
.fieldset { margin: 0; padding: 14px 16px 16px; border: 1px solid var(--border-default); border-radius: var(--radius-md); }
.fieldset legend { padding: 0 6px; font: 600 13px/1 var(--font-sans); color: var(--text-primary); }

.stage-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  background: transparent;
  color: var(--text-disabled);
  cursor: pointer;
  transition: all var(--dur-fast);
}
button.stage-btn:hover { border-color: var(--gold-500); color: var(--gold-300); background: var(--accent-subtle); }
.stage-btn.is-done { border-style: solid; border-color: rgba(61, 181, 126, .5); background: var(--success-subtle); color: var(--success-fg); }
button.stage-btn.is-done:hover { border-color: var(--danger); color: var(--danger-fg); background: var(--danger-subtle); }
span.stage-btn { cursor: default; }

.interrogation ol { margin: 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 8px; color: var(--text-secondary); font-size: 13px; }
.interrogation li::marker { color: var(--gold-400); font-weight: 600; }
.interrogation strong { color: var(--text-primary); }
.interrogation__icon { width: 34px; height: 34px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; background: var(--accent-subtle); color: var(--gold-300); }
.interrogation__criminal { margin-top: 14px; }
.interrogation__criminal strong { color: var(--danger-fg); }
.id-photo {
  position: relative;
  width: 136px;
  height: 168px;
  flex: none;
  border-radius: var(--radius-lg);
  padding: 3px;
  background: linear-gradient(160deg, var(--gold-300), var(--gold-700));
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .8);
}
.id-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius-lg) - 3px); background: var(--navy-900); }
.id-photo--empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--navy-800); border: 1.5px dashed var(--border-strong); padding: 0; box-shadow: none; }
.id-photo__initials { font: 600 38px/1 var(--font-sans); color: var(--silver-300); }
.id-photo__hint { font: var(--text-label); letter-spacing: .08em; text-transform: uppercase; color: var(--text-disabled); }
.id-photo__edit {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 34px;
  height: 34px;
  border-radius: 99px;
  border: 2px solid var(--navy-850);
  background: var(--accent);
  color: var(--text-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-2);
}
.id-photo__edit:hover { background: var(--accent-hover); }
.id-photo--preview { width: 120px; height: 148px; }
.photo-upload { display: flex; gap: 18px; align-items: flex-start; }
.photo-upload .upload input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
@media (max-width: 640px) {
  .photo-upload { flex-direction: column; align-items: center; }
}
.ctx__item--danger { color: var(--danger-fg); }
.ctx__item--danger:hover, .ctx__item--danger:focus-visible { background: var(--danger-subtle); color: var(--danger-fg); }
.post--hidden .post__name { display: inline-flex; align-items: center; gap: 6px; }

/* Formularze decyzji i pierwszego logowania */
.req { color: var(--danger-fg); }
.form-section { display: flex; flex-direction: column; gap: 12px; }
.form-section + .form-section { padding-top: 18px; border-top: 1px solid var(--border-subtle); }
.form-section__title { display: flex; align-items: center; gap: 8px; font: 600 13px/1.2 var(--font-sans); color: var(--gold-200); letter-spacing: .02em; }

.signers { border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--surface-1); }
.signers[open] { border-color: var(--border-strong); }
.signers__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  font: 600 13px/1.2 var(--font-sans);
  color: var(--text-primary);
  user-select: none;
}
.signers__summary::-webkit-details-marker { display: none; }
.signers__summary:hover { color: var(--gold-200); }
.signers__chev { transition: transform var(--dur-base) var(--ease-out); color: var(--text-muted); }
.signers[open] .signers__chev { transform: rotate(180deg); }
.signers__count { min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 99px; background: var(--accent); color: var(--text-on-accent); font: 700 11px/1 var(--font-mono); }
.signers__body { display: flex; flex-direction: column; gap: 12px; padding: 4px 12px 14px; max-height: 320px; overflow-y: auto; }
.signers__group { display: flex; flex-direction: column; gap: 6px; }
.signers__label { font: var(--text-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 99px;
  border: 1px solid var(--border-default);
  background: var(--surface-2);
  color: var(--text-secondary);
  font: 500 12px/1 var(--font-sans);
  white-space: nowrap;
  transition: all var(--dur-fast);
}
.chip:hover span { border-color: var(--border-strong); color: var(--text-primary); }
.chip input:checked + span { border-color: var(--gold-500); background: var(--accent-subtle); color: var(--gold-200); }
.chip input:checked + span::before { content: "✓"; font-weight: 700; }
.chip input:focus-visible + span { box-shadow: var(--focus-ring); }
.chip--group span { border-style: dashed; }

.confirm-card { display: flex; flex-direction: column; gap: 14px; padding: 14px; border: 1px solid var(--border-gold); border-radius: var(--radius-md); background: linear-gradient(160deg, rgba(212, 170, 82, .07), transparent 60%), var(--surface-1); }
.confirm-card__rank { display: flex; align-items: center; gap: 12px; }
.confirm-card__rank .ins--none { display: none; }
.confirm-card__value { font: 600 15px/1.3 var(--font-sans); color: var(--text-primary); }
.confirm-card__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 0; }
.confirm-card__grid dd { margin: 6px 0 0; }
.confirm-card__check { align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border-default); line-height: 1.45; }
.confirm-card__check .check__box { margin-top: 1px; }
.confirm-card__check strong { color: var(--gold-200); }

.tl__note { margin-top: 6px; font: 400 13px/1.45 var(--font-sans); color: var(--text-primary); }
.tl__signers { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; color: var(--gold-300); }

@media (max-width: 640px) {
  .confirm-card__grid { grid-template-columns: 1fr; }
}

/* Skład - filtry */
.show-xs { display: none; }
.roster-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.roster-filters__search { flex: 1 1 320px; height: 40px; }
.roster-filters__count { font: 500 11px/1 var(--font-mono); color: var(--text-muted); white-space: nowrap; }
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font: 600 12px/1 var(--font-sans);
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.seg__item:hover { color: var(--text-primary); background: var(--surface-hover); text-decoration: none; }
.seg__item.is-active { background: var(--surface-raised); color: var(--gold-200); box-shadow: inset 0 0 0 1px var(--border-gold); }

/* Skład - insygnia stopni */
.ins {
  --ins-c: var(--silver-200);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  color: var(--ins-c);
  background: rgba(132, 148, 178, .1);
  border: 1px solid var(--border-default);
}
.ins { background: linear-gradient(180deg, var(--navy-700), var(--navy-850)); }
.ins--gold { --ins-c: var(--gold-300); background: var(--accent-subtle); border-color: var(--border-gold); }
.ins--lg { width: 36px; height: 36px; }
.ins--none { visibility: hidden; }
.ins__svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
.ins--lg .ins__svg { width: 26px; height: 26px; }
.ins--stars { width: auto; min-width: 30px; padding: 0 6px; }
.ins--lg.ins--stars { min-width: 36px; padding: 0 7px; }
.ins__svg--stars { width: auto; height: 11px; filter: drop-shadow(0 0 3px rgba(227, 193, 112, .45)); }
.ins--lg .ins__svg--stars { width: auto; height: 13px; }

.rank__ins { display: inline-flex; }
.rank__ins .ins__svg { width: 12px; height: 12px; filter: none; }
.rank__ins .ins__svg--stars { width: auto; height: 8px; }

/* Skład - High Command */
.command__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.command__eyebrow { display: inline-flex; align-items: center; gap: 6px; font: var(--text-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--gold-300); white-space: nowrap; }
.command__eyebrow .ic { fill: currentColor; }
.command__line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-gold), transparent); }
.command__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(212, 170, 82, .10), transparent 60%),
    linear-gradient(160deg, var(--navy-800), var(--navy-900));
  color: var(--text-primary);
  text-decoration: none;
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast);
}
.post-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--hairline-gold); }
a.post-card:hover { border-color: var(--border-gold); box-shadow: var(--glow-gold); transform: translateY(-1px); text-decoration: none; color: var(--text-primary); }
.post-card__top { display: flex; align-items: center; justify-content: space-between; }
.post-card__no { font: 600 13px/1 var(--font-mono); color: var(--gold-200); letter-spacing: .04em; }
.post-card__person { display: flex; align-items: center; gap: 14px; min-width: 0; }
.post-card__avatar { flex: none; border-radius: 99px; padding: 2px; background: linear-gradient(160deg, var(--gold-300), var(--gold-700)); }
.post-card__avatar .avatar__img { border: 2px solid var(--navy-900); }
.post-card__avatar--empty { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: none; border: 1.5px dashed var(--border-strong); color: var(--text-disabled); }
.post-card__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.post-card__rank { font: var(--text-label); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-300); }
.post-card__name { font: 600 17px/1.2 var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-card__sub { font: 400 11px/1.3 var(--font-mono); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border-subtle); min-height: 31px; }
.post-card--vacant { background: transparent; border-style: dashed; box-shadow: none; }
.post-card--vacant::before { display: none; }
.post-card--vacant .post-card__name { color: var(--text-disabled); font-weight: 500; }
.post-card--vacant .post-card__rank { color: var(--text-muted); }
.post-card.is-away .post-card__avatar { background: var(--navy-500); }

/* Skład - tabela */
.roster-wrap { border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: var(--surface-2); overflow-x: auto; box-shadow: var(--shadow-1); }
.roster { width: 100%; border-collapse: collapse; font: var(--text-small); }
.roster thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 14px;
  text-align: left;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-default);
  font: var(--text-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.roster td { padding: 10px 14px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.roster tbody:last-child tr:last-child td { border-bottom: 0; }
.roster__row { cursor: pointer; transition: background var(--dur-fast); }
.roster__row:hover { background: var(--surface-hover); }
.roster__row:hover .person__name { color: var(--gold-200); }
.roster__row.is-suspended { background: rgba(229, 72, 77, .05); }
.roster__row.is-away .person__name { color: var(--text-secondary); }
.roster__c-badge { width: 96px; }
.roster__c-div { width: 150px; }
.roster__c-certs { width: 180px; }
.roster__c-status { width: 120px; }
.roster__c-service { width: 120px; }
.roster__c-disc { width: 140px; }

.roster .rank-band td { padding: 0; border-bottom: 1px solid var(--border-subtle); }
.rank-band__inner {
  --band: var(--navy-400);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--band) 16%, transparent), transparent 55%), var(--surface-1);
  box-shadow: inset 3px 0 0 var(--band);
}
.rank-band--tsgt .rank-band__inner { --band: var(--silver-300); }
.rank-band--tstaff .rank-band__inner { --band: var(--gold-500); }
tbody:first-of-type .rank-band td { border-top: 0; }
tbody + tbody .rank-band td { border-top: 1px solid var(--border-default); }
.rank-band__name { font: 600 14px/1.2 var(--font-sans); color: var(--text-primary); white-space: nowrap; }
.rank-band__count {
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  background: var(--surface-active);
  font: 600 11px/1 var(--font-mono);
  color: var(--text-secondary);
}
.rank-band__meta { margin-left: auto; display: flex; align-items: center; gap: 18px; font: 400 12px/1 var(--font-sans); color: var(--text-muted); white-space: nowrap; }
.rank-band__fill { display: inline-flex; align-items: center; gap: 8px; }
.rank-band__fill .meter { width: 70px; }
.rank-band__rate { font: 600 12px/1 var(--font-mono); color: var(--gold-300); }
.meter--thin { height: 4px; }

.badge-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 26px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-gold);
  background: linear-gradient(180deg, rgba(212, 170, 82, .16), rgba(212, 170, 82, .05));
  font: 600 13px/1 var(--font-mono);
  color: var(--gold-200);
  letter-spacing: .04em;
}
.badge-no::before { content: "#"; opacity: .45; margin-right: 1px; }
.badge-no--empty { border-style: dashed; border-color: var(--border-strong); background: none; color: var(--text-disabled); }

.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.person__name { font: 600 14px/1.2 var(--font-sans); color: var(--text-primary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person__name:hover { text-decoration: none; }
.person__sub { display: inline-flex; align-items: center; gap: 5px; font: 400 11px/1.3 var(--font-mono); color: var(--text-muted); white-space: nowrap; }
.person__flag { display: inline-flex; align-items: center; gap: 4px; color: var(--text-disabled); }
.person__flag--warn { color: var(--warning-fg); font-family: var(--font-sans); }

.sdot { --c: var(--navy-400); display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1 var(--font-sans); color: var(--text-secondary); white-space: nowrap; }
.sdot::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.sdot--success { --c: var(--success); }
.sdot--warning { --c: var(--warning); color: var(--warning-fg); }
.sdot--danger { --c: var(--danger); color: var(--danger-fg); }

.certbar { display: inline-flex; align-items: center; gap: 10px; }
.certbar__cells { display: inline-flex; gap: 2px; }
.certbar__cells i { width: 7px; height: 16px; border-radius: 2px; background: var(--navy-700); }
.certbar__cells i.is-on { background: linear-gradient(180deg, var(--gold-300), var(--gold-500)); box-shadow: 0 0 6px rgba(212, 170, 82, .35); }
.certbar__count { font: 600 12px/1 var(--font-mono); color: var(--text-primary); }
.certbar__count small { font-size: 11px; color: var(--text-muted); font-weight: 400; }

.service { display: flex; flex-direction: column; gap: 3px; }
.service__main { font: 500 13px/1.2 var(--font-sans); color: var(--text-primary); }
.service__sub { font: 400 11px/1.2 var(--font-mono); color: var(--text-muted); }

.dpill { --c: var(--text-secondary); display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 7px; border-radius: var(--radius-xs); font: 500 11px/1 var(--font-mono); color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.dpill b { font: 700 11px/1 var(--font-sans); }
.dpill--reprimand { --c: var(--danger-fg); }
.dpill--minus { --c: var(--warning-fg); }
.dpill--praise { --c: var(--gold-300); }
.dpill--plus { --c: var(--success-fg); }

.roster__vacant td { padding-top: 7px; padding-bottom: 7px; }
.roster__vacant .badge-no { height: 22px; font-size: 12px; }

@media (max-width: 640px) {
  .roster-filters { gap: 8px; }
  .roster-filters .seg { width: 100%; }
  .rank-band__meta .rank-band__fill span, .rank-band__rate { display: none; }
  .roster thead { display: none; }
  .show-xs { display: block; margin-top: 2px; }
  .badge-no { min-width: 44px; font-size: 12px; }
  .roster td { padding: 10px; }
  .roster .rank-band td { padding: 0; }
  .rank-band__inner { padding: 9px 10px; }
  .command__grid { gap: 8px; }
  .post-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px; }
  .post-card__person { grid-column: 1; grid-row: 1; gap: 12px; }
  .post-card__top { grid-column: 2; grid-row: 1; flex-direction: column; align-items: flex-end; gap: 6px; }
  .post-card__avatar .avatar { --size: 42px; }
  .post-card__avatar--empty { width: 46px; height: 46px; }
  .post-card__name { font-size: 15px; }
  .post-card__foot { display: none; }
  .post-card .ins--lg { height: 28px; min-width: 28px; }
}

@media (max-width: 900px) {
  .hero { flex-wrap: wrap; padding: 18px; }
  .hero__seal { width: 64px; height: 64px; }
  .hero__week { width: 100%; }
  .tally { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .org__row { grid-template-columns: minmax(0, 1fr); }
  .sheet-foot { position: static; }
}
