/* ============================================================
   PSB PROFESSIONAL REDESIGN · 2026
   Warstwa wizualna nad istniejącym systemem funkcjonalnym.
   ============================================================ */

:root {
  --bg: #070c14;
  --bg-2: #0a111d;
  --surface: #101825;
  --surface-2: #151f2e;
  --surface-3: #1b2738;
  --border: #28364a;
  --border-soft: #1c293a;
  --text: #edf2f9;
  --muted: #93a4bc;
  --faint: #60718b;
  --accent: #e1b94e;
  --accent-2: #b98622;
  --accent-soft: rgba(225, 185, 78, .11);
  --navy: #0b294d;
  --blue: #5a9df8;
  --danger: #f06470;
  --ok: #45c98a;
  --review: #eaae43;
  --invest: #5a9df8;
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 276px;
  --shadow: 0 22px 60px rgba(0, 0, 0, .32);
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, .18);
}

* {
  scrollbar-color: #33445d #0b111c;
}

html {
  background: var(--bg);
}

body {
  background:
    radial-gradient(circle at 78% -10%, rgba(29, 77, 127, .14), transparent 35rem),
    linear-gradient(135deg, #070c14 0%, #090f19 56%, #07101b 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.008em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .012) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.65), transparent 72%);
}

.app-accent {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 3px;
  background: linear-gradient(90deg, #795413, var(--accent) 25%, #f5d473 50%, var(--accent) 75%, #795413);
  box-shadow: 0 0 16px rgba(225, 185, 78, .3);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Główny układ ---------- */

.shell {
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(16, 28, 44, .98), rgba(7, 13, 22, .99)),
    #09111c;
  border-right: 1px solid #1e3046;
  box-shadow: 12px 0 38px rgba(0, 0, 0, .2);
  transition: width .2s ease, transform .22s ease;
}

.side-brand {
  min-height: 82px;
  padding: 1rem 1.05rem;
  gap: .8rem;
  background: linear-gradient(115deg, rgba(225, 185, 78, .08), transparent 70%);
  border-bottom: 1px solid rgba(255, 255, 255, .055);
}

.side-emblem {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 52px;
  place-items: center;
  border-radius: 10px;
  background: radial-gradient(circle, rgba(225,185,78,.14), transparent 68%);
}

.side-logo {
  width: auto;
  height: 48px;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .55));
}

.side-brand-text {
  gap: .25rem;
  white-space: nowrap;
}

.side-brand-text strong {
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.side-brand-text small {
  color: var(--accent);
  font-size: .61rem;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.side-nav {
  overflow-x: hidden;
  overflow-y: auto;
  padding: .65rem .65rem 1rem;
  gap: 2px;
}

.side-label {
  padding: 1.05rem .65rem .4rem;
  color: #667a96;
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .16em;
  white-space: nowrap;
}

.side-label:first-child {
  padding-top: .4rem;
}

.side-nav a {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: .68rem;
  padding: .46rem .58rem;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  border-radius: 8px;
  color: #9babbe;
  font-size: .83rem;
  font-weight: 620;
  white-space: nowrap;
  transition: color .14s ease, background .14s ease, border-color .14s ease;
}

.side-nav a:hover {
  color: #eef4fb;
  border-color: rgba(255, 255, 255, .045);
  background: rgba(255, 255, 255, .035);
}

.side-nav a.active,
.side-nav a.side-gold.active {
  color: #fff5d3;
  border-color: rgba(225, 185, 78, .18);
  border-left-color: var(--accent);
  background: linear-gradient(90deg, rgba(225, 185, 78, .15), rgba(225, 185, 78, .045));
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

.side-nav a.side-gold {
  color: #e6c66e;
}

.nav-icon-wrap {
  display: inline-flex;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  color: #71839b;
  transition: color .14s ease, transform .14s ease;
}

.nav-icon {
  display: block;
  width: 18px;
  height: 18px;
  overflow: visible;
}

.side-nav a:hover .nav-icon-wrap {
  color: #dbe5f1;
}

.side-nav a.active .nav-icon-wrap {
  color: var(--accent);
}

.side-nav a.side-gold .nav-icon-wrap {
  color: #c9a84d;
}

.side-nav a.side-gold.active .nav-icon-wrap {
  color: #f0cb65;
}

.nav-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-user {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 34px;
  align-items: center;
  gap: .62rem;
  min-height: 74px;
  padding: .8rem .9rem;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(3, 8, 15, .38);
}

.side-user .avatar {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(225, 185, 78, .38);
}

.side-user-meta .badge {
  max-width: 150px;
  padding: .14rem .46rem;
}

.user-name {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f4f7fb;
  font-size: .82rem;
}

.side-user-menu {
  position: relative;
  flex: 0 0 34px;
}

.side-user-menu-trigger {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid #2a3a4f;
  border-radius: 9px;
  color: #91a2b9;
  background: #0c1420;
  cursor: pointer;
  transition: color .14s ease, border-color .14s ease, background .14s ease;
}

.side-user-menu-trigger svg,
.side-user-menu-item > svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
}

.side-user-menu-trigger:hover,
.side-user-menu-trigger[aria-expanded="true"] {
  color: var(--accent);
  border-color: rgba(225, 185, 78, .5);
  background: rgba(225, 185, 78, .08);
}

.side-user-menu-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + .65rem);
  z-index: 120;
  width: 244px;
  padding: .48rem;
  border: 1px solid #2b3b51;
  border-radius: 12px;
  background: rgba(11, 18, 29, .98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .48);
}

.side-user-menu-panel[hidden] {
  display: none;
}

.side-user-menu-panel::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid #2b3b51;
  border-bottom: 1px solid #2b3b51;
  background: #0b121d;
  transform: rotate(45deg);
}

.side-user-menu-heading {
  display: flex;
  min-width: 0;
  padding: .52rem .58rem .62rem;
  flex-direction: column;
  gap: .12rem;
  border-bottom: 1px solid rgba(117, 143, 175, .15);
}

.side-user-menu-heading strong,
.side-user-menu-heading span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-user-menu-heading strong {
  color: #f2f6fb;
  font-size: .78rem;
}

.side-user-menu-heading span {
  color: var(--muted);
  font-size: .66rem;
}

.side-user-menu-panel form {
  margin: .3rem 0 0;
}

.side-user-menu-item {
  display: grid;
  width: 100%;
  min-height: 48px;
  padding: .48rem .55rem;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: .58rem;
  border: 0;
  border-radius: 8px;
  color: #b7c5d7;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.side-user-menu-item:hover,
.side-user-menu-item:focus-visible {
  color: #fff;
  background: #172335;
}

.side-user-menu-item span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .04rem;
}

.side-user-menu-item strong {
  font-size: .76rem;
}

.side-user-menu-item small {
  overflow: hidden;
  color: #71839c;
  font-size: .64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-user-menu-danger {
  color: #ef9aa2;
}

.side-user-menu-danger:hover,
.side-user-menu-danger:focus-visible {
  color: #ffdfe2;
  background: rgba(240, 100, 112, .1);
}

.density-compact {
  font-size: 14px;
}

.density-compact .topbar {
  min-height: 56px;
  padding-block: .45rem;
}

.density-compact .container {
  padding-top: 1rem;
  padding-bottom: 1.75rem;
}

.density-compact .side-brand {
  padding-top: .72rem;
  padding-bottom: .68rem;
}

.density-compact .side-nav {
  padding-top: .48rem;
  padding-bottom: .6rem;
}

.density-compact .side-label {
  padding-top: .65rem;
  padding-bottom: .2rem;
  font-size: .58rem;
}

.density-compact .side-nav a {
  min-height: 35px;
  padding-block: .27rem;
  font-size: .78rem;
}

.density-compact .nav-icon-wrap {
  width: 27px;
  height: 27px;
  flex-basis: 27px;
}

.density-compact .side-user {
  min-height: 62px;
  padding-block: .58rem;
}

.density-compact .page-head {
  margin-bottom: .85rem;
}

.density-compact .page-head h1 {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
}

.density-compact .panel {
  margin-bottom: .78rem;
  padding: .78rem;
  border-radius: 10px;
}

.density-compact .panel-head {
  min-height: 28px;
  margin-bottom: .55rem;
}

.density-compact .panel-subtitle {
  margin-bottom: .65rem;
}

.density-compact .stat-grid,
.density-compact .command-stats,
.density-compact .dashboard-grid,
.density-compact .workspace-grid,
.density-compact .credential-grid,
.density-compact .record-form-grid,
.density-compact .split,
.density-compact .field-row {
  gap: .65rem;
}

.density-compact .stat-grid {
  margin-bottom: .85rem;
}

.density-compact .stat {
  padding: .72rem .82rem;
  border-radius: 10px;
}

.density-compact .stat-num {
  font-size: 1.55rem;
}

.density-compact .form .field {
  margin-bottom: .62rem;
}

.density-compact input,
.density-compact select {
  min-height: 36px;
  padding-top: .42rem;
  padding-bottom: .42rem;
}

.density-compact textarea {
  min-height: 68px;
}

.density-compact .btn-primary,
.density-compact .btn-ghost,
.density-compact .btn-danger,
.density-compact .btn-discord {
  min-height: 34px;
  padding: .46rem .82rem;
  font-size: .78rem;
}

.density-compact .table th,
.density-compact .table td {
  padding: .42rem .55rem;
  font-size: .74rem;
}

.density-compact .task-card,
.density-compact .search-result,
.density-compact .timeline-entry,
.density-compact .priority-item,
.density-compact .activity-item,
.density-compact .action-item,
.density-compact .record-card,
.density-compact .credential-card-body {
  min-height: 48px;
  padding: .48rem .62rem;
  border-radius: 9px;
}

.density-compact .footer {
  padding-top: .7rem;
  padding-bottom: .7rem;
}

.value-ok { color: var(--ok) !important; }
.value-review { color: var(--review) !important; }
.value-danger { color: var(--danger) !important; }
.notice-spaced { margin-bottom: 1.4rem; }
.danger-heading { padding-left: .6rem; border-left: 3px solid var(--danger); }
.hero-eyebrow-flush { margin: 0; }
.result-ok { background: var(--ok); }
.result-review { background: var(--review); }
.result-danger { background: var(--danger); }
.result-muted { background: var(--muted); }

.pct-0 { --pct: 0%; }
.pct-5 { --pct: 5%; }
.pct-10 { --pct: 10%; }
.pct-15 { --pct: 15%; }
.pct-20 { --pct: 20%; }
.pct-25 { --pct: 25%; }
.pct-30 { --pct: 30%; }
.pct-35 { --pct: 35%; }
.pct-40 { --pct: 40%; }
.pct-45 { --pct: 45%; }
.pct-50 { --pct: 50%; }
.pct-55 { --pct: 55%; }
.pct-60 { --pct: 60%; }
.pct-65 { --pct: 65%; }
.pct-70 { --pct: 70%; }
.pct-75 { --pct: 75%; }
.pct-80 { --pct: 80%; }
.pct-85 { --pct: 85%; }
.pct-90 { --pct: 90%; }
.pct-95 { --pct: 95%; }
.pct-100 { --pct: 100%; }
.bar-fill[class*="pct-"],
.stackbar-seg[class*="pct-"] { width: var(--pct); }
.col-bar[class*="pct-"] { height: var(--pct); }

.main {
  min-height: 100vh;
  background: transparent;
}

.topbar {
  min-height: 66px;
  padding: .65rem 1.6rem;
  gap: .8rem;
  background: rgba(7, 13, 22, .82);
  border-bottom: 1px solid rgba(117, 143, 175, .15);
  box-shadow: 0 8px 25px rgba(0, 0, 0, .12);
  backdrop-filter: blur(18px);
}

.top-context {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .08rem;
}

.top-eyebrow {
  color: var(--accent);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.top-title {
  color: #f1f5fa;
  font-size: .96rem;
  font-weight: 720;
}

.top-right {
  margin-left: auto;
}

.sidebar-collapse,
.nav-toggle {
  width: 34px;
  height: 34px;
  place-items: center;
  flex: 0 0 34px;
  border: 1px solid #2b3a4f;
  border-radius: 8px;
  color: #9aabc1;
  background: #0d1521;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  transition: .14s ease;
}

.sidebar-collapse {
  display: grid;
}

.sidebar-collapse:hover,
.nav-toggle:hover {
  color: var(--accent);
  border-color: rgba(225, 185, 78, .45);
  background: rgba(225, 185, 78, .07);
}

.container {
  width: 100%;
  max-width: 1480px;
  padding: 1.75rem clamp(1.1rem, 2.2vw, 2rem) 2.75rem;
}

.footer {
  padding: 1rem clamp(1.1rem, 2.2vw, 2rem);
  border-top-color: rgba(117, 143, 175, .12);
  color: #64758d;
  font-size: .7rem;
}

/* ---------- Zwinięty sidebar na komputerze ---------- */

body.nav-collapsed .sidebar {
  width: 78px;
}

body.nav-collapsed .side-brand {
  justify-content: center;
  padding-inline: .5rem;
}

body.nav-collapsed .side-emblem {
  flex-basis: 44px;
  width: 44px;
}

body.nav-collapsed .side-brand-text,
body.nav-collapsed .side-label,
body.nav-collapsed .nav-text,
body.nav-collapsed .side-user-meta,
body.nav-collapsed .side-user > .avatar {
  display: none;
}

body.nav-collapsed .side-nav {
  padding-inline: .55rem;
}

body.nav-collapsed .side-nav a {
  justify-content: center;
  padding-inline: .35rem;
}

body.nav-collapsed .side-user {
  grid-template-columns: 34px;
  justify-content: center;
  padding-inline: .4rem;
}

body.nav-collapsed .side-user-menu-panel {
  position: fixed;
  right: auto;
  bottom: .8rem;
  left: 88px;
}

body.nav-collapsed .side-user-menu-panel::after {
  right: auto;
  bottom: 15px;
  left: -6px;
  border: 0;
  border-bottom: 1px solid #2b3b51;
  border-left: 1px solid #2b3b51;
}

body.nav-collapsed .sidebar-collapse span {
  display: inline-block;
  transform: rotate(180deg);
}

/* ---------- Nagłówki stron i elementy wspólne ---------- */

.page-head {
  position: relative;
  margin-bottom: 1.25rem;
  padding: .2rem 0 .25rem 1rem;
}

.page-head::before {
  content: "";
  position: absolute;
  inset: .15rem auto .15rem 0;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #f2cf67, #9f711c);
}

.page-head h1 {
  margin-bottom: .26rem;
  color: #f4f7fb;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  letter-spacing: -.035em;
}

.page-head p {
  max-width: 760px;
  margin: 0;
}

.page-kicker,
.section-kicker {
  display: block;
  margin-bottom: .35rem;
  color: var(--accent);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.panel,
.card-form,
.form-section,
.add-block,
.status-card,
.data-card {
  border-color: rgba(111, 137, 168, .18);
  background:
    linear-gradient(145deg, rgba(19, 29, 43, .98), rgba(13, 21, 33, .98));
  box-shadow: 0 12px 36px rgba(0, 0, 0, .16);
}

.panel {
  padding: 1.25rem;
}

.panel-head {
  min-height: 34px;
  margin-bottom: .85rem;
}

.panel > h2,
.panel-head h2 {
  padding-left: .65rem;
  border-left-color: var(--accent);
  color: #f1f5fa;
  font-size: 1rem;
  letter-spacing: -.015em;
}

.panel-subtitle {
  margin: -.45rem 0 .95rem;
  color: var(--muted);
  font-size: .78rem;
}

.notice,
.flash {
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.13);
}

.notice {
  border-color: rgba(90, 157, 248, .3);
  background: linear-gradient(90deg, rgba(26, 79, 136, .13), rgba(16, 25, 38, .96));
}

.supervisor-approval-panel {
  border-color: rgba(234, 174, 67, .38);
  background: linear-gradient(90deg, rgba(234, 174, 67, .105), rgba(16, 25, 38, .96));
}

.btn-primary,
.btn-ghost,
.btn-danger,
.btn-discord {
  min-height: 38px;
  border-radius: 8px;
  font-weight: 730;
  letter-spacing: .005em;
}

.btn-primary {
  border-color: #e2bd55;
  color: #211705;
  background: linear-gradient(145deg, #f0cc63, #c99527);
  box-shadow: 0 7px 18px rgba(185, 134, 30, .18);
}

.btn-primary:hover {
  background: linear-gradient(145deg, #f5d578, #d5a535);
  box-shadow: 0 8px 22px rgba(185, 134, 30, .24);
}

.btn-ghost {
  color: #c4d0df;
  border-color: #304158;
  background: #111b29;
}

.btn-ghost:hover {
  color: #fff;
  border-color: #465a73;
  background: #192537;
}

input,
select,
textarea {
  min-height: 42px;
  border-color: #2a3a50;
  border-radius: 8px;
  background: rgba(8, 14, 23, .7);
}

textarea {
  min-height: 84px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(225, 185, 78, .7);
  box-shadow: 0 0 0 3px rgba(225, 185, 78, .09);
}

/* Jednolite checkboxy i przyciski radiowe w całym systemie.
   Nadpisuje ogólne wymiary pól formularza (min-height: 42px), które wcześniej
   powiększały kontrolki i powodowały wizualny skok podczas kliknięcia. */
input[type="checkbox"],
input[type="radio"] {
  width: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
  flex: 0 0 16px;
  padding: 0 !important;
  margin: 2px 0 0 !important;
  border-radius: 4px;
  accent-color: var(--accent);
  box-shadow: none !important;
  transform: none !important;
  scale: 1 !important;
  animation: none !important;
  transition: none !important;
  cursor: pointer;
  vertical-align: top;
}

input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 50%;
  border: 2px solid #d8e0eb;
  background: #f8fafc;
}

input[type="radio"]:checked {
  border-color: var(--accent);
  background:
    radial-gradient(circle at center, var(--accent) 0 3px, transparent 3.5px),
    rgba(8, 14, 23, .92);
}

input[type="checkbox"]:hover,
input[type="checkbox"]:active,
input[type="checkbox"]:checked,
input[type="radio"]:hover,
input[type="radio"]:active,
input[type="radio"]:checked {
  transform: none !important;
  scale: 1 !important;
  animation: none !important;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  box-shadow: none !important;
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.list-search {
  padding: .65rem;
  border: 1px solid rgba(111, 137, 168, .17);
  border-radius: 11px;
  background: rgba(15, 24, 37, .82);
}

.list-search input[type="search"] {
  border-color: transparent;
  background: rgba(5, 11, 19, .58);
}

.filters {
  padding: .15rem 0;
}

.chip {
  padding: .42rem .78rem;
  border-color: #293950;
  border-radius: 7px;
  background: rgba(15, 24, 37, .8);
}

.chip:hover {
  color: #fff;
  border-color: #465b76;
  background: #172334;
}

.chip.active {
  color: #261b06;
  border-color: var(--accent);
  background: linear-gradient(145deg, #edc95f, #c8982c);
}

.badge {
  border: 1px solid transparent;
  border-radius: 6px;
  letter-spacing: .01em;
}

.st-new,
.st-review {
  border-color: rgba(234, 174, 67, .28);
  background: rgba(234, 174, 67, .12);
  color: #f2c96d;
}

.st-good {
  border-color: rgba(69, 201, 138, .27);
  background: rgba(69, 201, 138, .11);
  color: #65dca1;
}

.st-bad {
  border-color: rgba(240, 100, 112, .3);
  background: rgba(240, 100, 112, .12);
  color: #ff8892;
}

.st-progress {
  border-color: rgba(90, 157, 248, .29);
  background: rgba(90, 157, 248, .12);
  color: #7db4ff;
}

/* ---------- Tabele i listy ---------- */

.table-shell,
.container > .table {
  overflow: hidden;
  margin-bottom: 1.2rem;
  border: 1px solid rgba(111, 137, 168, .18);
  border-radius: 11px;
  background: rgba(14, 23, 36, .88);
  box-shadow: 0 12px 34px rgba(0,0,0,.14);
}

.table-shell {
  overflow-x: auto;
}

.table-shell .table {
  margin: 0;
}

.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table th {
  padding: .72rem .82rem;
  color: #8293aa;
  border-bottom-color: #26364a;
  background: rgba(5, 11, 19, .4);
  font-size: .66rem;
  letter-spacing: .095em;
}

.table td {
  padding: .78rem .82rem;
  border-bottom-color: rgba(111, 137, 168, .12);
}

.table tbody tr {
  transition: background-color .12s ease;
}

.table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, .012);
}

.table .clickable:hover,
.table tr.clickable:hover {
  background: rgba(90, 157, 248, .055);
}

.empty {
  min-height: 96px;
  display: grid;
  place-items: center;
  margin: 0 0 1.2rem;
  border: 1px dashed #293a50;
  border-radius: 11px;
  background: rgba(13, 21, 33, .68);
}

/* ---------- Panel operacyjny ---------- */

.dashboard-head {
  align-items: center;
}

.dashboard-head .dashboard-welcome {
  max-width: 750px;
}

.dashboard-date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .15rem;
  color: var(--muted);
  font-size: .72rem;
}

.dashboard-date strong {
  color: #d9e2ed;
  font-size: .82rem;
}

.command-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
  margin-bottom: 1.15rem;
}

.command-stat {
  min-height: 122px;
  padding: 1rem 1.05rem;
  gap: .4rem;
  border-color: rgba(111, 137, 168, .18);
  background:
    radial-gradient(circle at 95% 10%, rgba(90,157,248,.08), transparent 45%),
    linear-gradient(145deg, #121c2b, #0d1623);
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  transform: none;
}

.command-stat:hover {
  border-color: rgba(111, 137, 168, .3);
  transform: none;
}

.command-stat::before {
  width: 4px;
  opacity: 1;
  background: var(--stat-color, var(--accent));
}

.command-stat .stat-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}

.command-stat .stat-code {
  color: #71839b;
  font-family: var(--mono);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.command-stat .stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--stat-color, var(--accent));
  box-shadow: 0 0 12px color-mix(in srgb, var(--stat-color, var(--accent)) 65%, transparent);
}

.command-stat .stat-num {
  margin-top: auto;
  color: var(--stat-color, var(--accent));
  font-size: 2rem;
}

.command-stat.stat-info { --stat-color: var(--blue); }
.command-stat.stat-warning { --stat-color: var(--review); }
.command-stat.stat-danger { --stat-color: var(--danger); }
.command-stat.stat-success { --stat-color: var(--ok); }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(290px, .75fr);
  gap: 1rem;
  align-items: start;
}

.dashboard-stack {
  display: grid;
  gap: 1rem;
}

.dashboard-stack > .panel,
.dashboard-grid > .panel,
.dashboard-grid .panel {
  margin-bottom: 0;
}

.priority-list,
.activity-list,
.action-list {
  display: grid;
  gap: .48rem;
}

.priority-item,
.activity-item,
.action-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  min-height: 58px;
  padding: .65rem .72rem;
  border: 1px solid rgba(111, 137, 168, .14);
  border-radius: 9px;
  background: rgba(7, 13, 22, .32);
}

.priority-item:hover,
.action-item:hover {
  border-color: rgba(225, 185, 78, .28);
  background: rgba(225, 185, 78, .035);
}

.priority-signal,
.action-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #314259;
  border-radius: 8px;
  color: #90a4bd;
  background: #111b29;
  font-family: var(--mono);
  font-size: .65rem;
  font-weight: 800;
}

.action-icon {
  display: block;
  width: 17px;
  height: 17px;
  overflow: visible;
}

.priority-signal.overdue {
  color: #ff8c96;
  border-color: rgba(240,100,112,.38);
  background: rgba(240,100,112,.09);
}

.priority-signal.pending {
  color: #f1c66a;
  border-color: rgba(234,174,67,.36);
  background: rgba(234,174,67,.09);
}

.priority-copy,
.action-copy {
  min-width: 0;
}

.priority-copy strong,
.action-copy strong {
  display: block;
  overflow: hidden;
  color: #edf2f9;
  font-size: .82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-copy small,
.action-copy small {
  display: block;
  margin-top: .12rem;
  overflow: hidden;
  color: var(--muted);
  font-size: .7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-meta {
  color: #8294ad;
  font-family: var(--mono);
  font-size: .66rem;
  white-space: nowrap;
}

.action-list {
  grid-template-columns: 1fr;
}

.action-item {
  grid-template-columns: auto minmax(0, 1fr) auto;
  color: inherit;
}

.action-item::after {
  content: "›";
  color: #6f829b;
  font-size: 1.15rem;
}

.action-item:hover .action-mark {
  color: #211705;
  border-color: var(--accent);
  background: var(--accent);
}

.dashboard-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  margin-top: .85rem;
}

.dashboard-mini-stat {
  padding: .7rem;
  border: 1px solid rgba(111,137,168,.14);
  border-radius: 8px;
  text-align: center;
  background: rgba(7,13,22,.28);
}

.dashboard-mini-stat strong {
  display: block;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.1rem;
}

.dashboard-mini-stat span {
  color: var(--muted);
  font-size: .64rem;
}

.dashboard-section {
  margin-top: 1rem;
}

.quick-actions {
  gap: .65rem;
}

.quick {
  min-height: 84px;
  border-color: rgba(111, 137, 168, .16);
  background: linear-gradient(145deg, #121c2b, #0d1623);
  transform: none;
}

.quick:hover {
  border-color: rgba(225, 185, 78, .3);
  background: linear-gradient(145deg, #162235, #111b29);
  transform: none;
}

.quick-t {
  color: #f0cc6d;
}

/* ---------- Baza wiedzy ---------- */

.knowledge-nav,
.knowledge-hero,
.knowledge-toolbar,
.manual-chapter,
.reg-item,
.tariff-table-wrap {
  box-shadow: 0 12px 34px rgba(0,0,0,.15);
}

.knowledge-nav {
  border-color: rgba(111,137,168,.2);
  background: rgba(12, 20, 32, .92);
}

.knowledge-tabs a.active {
  border-color: rgba(225,185,78,.28);
  background: rgba(225,185,78,.1);
}

.knowledge-hero {
  border-color: rgba(225,185,78,.27);
  background:
    radial-gradient(circle at 88% 12%, rgba(225,185,78,.11), transparent 25rem),
    linear-gradient(125deg, #111c2c, #0d1622);
}

.knowledge-reader {
  margin-bottom: 1rem;
  padding: .85rem;
  border: 1px solid rgba(111, 137, 168, .22);
  border-left: 3px solid #5da9ff;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 8% 10%, rgba(93, 169, 255, .08), transparent 18rem),
    rgba(12, 21, 34, .96);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .15);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.knowledge-reader.is-active {
  position: sticky;
  z-index: 24;
  top: 68px;
  border-color: rgba(93, 169, 255, .48);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .32);
  backdrop-filter: blur(16px);
}

.knowledge-reader.is-paused {
  border-left-color: var(--accent);
}

.knowledge-reader.is-loading {
  border-left-color: #7fc0ff;
}

.knowledge-reader.is-loading .knowledge-reader-symbol {
  animation: knowledge-reader-pulse 1.25s ease-in-out infinite;
}

@keyframes knowledge-reader-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(93, 169, 255, .08);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(93, 169, 255, .12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .knowledge-reader.is-loading .knowledge-reader-symbol {
    animation: none;
  }
}

.knowledge-reader-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.knowledge-reader-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: .7rem;
}

.knowledge-reader-symbol {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(93, 169, 255, .28);
  border-radius: 10px;
  color: #70b4ff;
  background: rgba(93, 169, 255, .08);
}

.knowledge-reader-icon {
  width: 21px;
  height: 21px;
}

.knowledge-reader-heading .hero-eyebrow,
.knowledge-reader-heading strong,
.knowledge-reader-heading small {
  display: block;
}

.knowledge-reader-heading .hero-eyebrow {
  margin: 0 0 .12rem;
  color: #70b4ff;
  font-size: .55rem;
}

.knowledge-reader-heading strong {
  color: #eef4fb;
  font-size: .82rem;
}

.knowledge-reader-heading small {
  margin-top: .12rem;
  color: var(--muted);
  font-size: .65rem;
}

.knowledge-reader-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .42rem;
}

.knowledge-reader-actions button {
  white-space: nowrap;
}

.knowledge-reader-actions button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.knowledge-reader-settings {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(130px, .32fr) minmax(230px, .9fr);
  align-items: end;
  gap: .65rem;
  margin-top: .7rem;
  padding-top: .7rem;
  border-top: 1px solid var(--border-soft);
}

.knowledge-reader-settings > label {
  display: grid;
  gap: .28rem;
  margin: 0;
}

.knowledge-reader-settings > label > span,
.knowledge-reader-progress span {
  color: #728aa8;
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.knowledge-reader-settings select {
  min-height: 36px;
  padding: .4rem 2rem .4rem .62rem;
  font-size: .68rem;
}

.knowledge-reader-settings select optgroup {
  color: #8fa8c5;
  font-style: normal;
}

.knowledge-reader-progress {
  display: grid;
  align-self: stretch;
  align-content: end;
  gap: .38rem;
  min-width: 0;
}

.knowledge-reader-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}

.knowledge-reader-progress strong {
  color: #dce7f3;
  font-family: var(--mono);
  font-size: .64rem;
}

.knowledge-reader-progress progress {
  width: 100%;
  height: 7px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #08111d;
}

.knowledge-reader-progress progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #08111d;
}

.knowledge-reader-progress progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, #4d91e8, #70b4ff);
}

.knowledge-reader-progress progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, #4d91e8, #70b4ff);
}

.knowledge-reader-voice-note {
  display: block;
  margin-top: .5rem;
  color: #647e9d;
  font-size: .58rem;
  line-height: 1.4;
}

.knowledge-reader.is-unsupported {
  border-left-color: var(--danger);
}

.manual-card.is-reading-aloud {
  border-color: rgba(93, 169, 255, .65);
  box-shadow: 0 0 0 2px rgba(93, 169, 255, .1);
}

.manual-chapter-summary.is-reading-aloud {
  outline: 2px solid rgba(93, 169, 255, .35);
  outline-offset: -2px;
}

.manual-chapter,
.reg-item {
  transform: none !important;
}

.manual-chapter:hover,
.reg-item:hover {
  transform: none !important;
}

@media (max-width: 900px) {
  .knowledge-reader-settings {
    grid-template-columns: minmax(0, 1fr) 150px;
  }

  .knowledge-reader-progress {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .knowledge-reader.is-active {
    top: 58px;
  }

  .knowledge-reader-top {
    align-items: stretch;
    flex-direction: column;
  }

  .knowledge-reader-actions {
    justify-content: flex-start;
  }

  .knowledge-reader-settings {
    grid-template-columns: 1fr;
  }

  .knowledge-reader-progress {
    grid-column: auto;
    min-height: 38px;
  }
}

.vehicle-guide-hero {
  overflow: hidden;
}

.vehicle-start-here {
  display: grid;
  grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.05rem;
  border: 1px solid rgba(111, 137, 168, .2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(15, 26, 41, .98), rgba(11, 37, 69, .32)),
    var(--surface);
  box-shadow: 0 12px 34px rgba(0,0,0,.15);
}

.vehicle-start-here h2,
.vehicle-check-head h2 {
  margin: .18rem 0 0;
  font-size: 1.05rem;
}

.vehicle-start-copy p,
.vehicle-check-head p {
  max-width: 680px;
  margin: .45rem 0 0;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.55;
}

.vehicle-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.vehicle-legend-item {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: .08rem .55rem;
  align-items: center;
  min-height: 58px;
  padding: .62rem .72rem;
  border: 1px solid rgba(111, 137, 168, .15);
  border-radius: 8px;
  background: rgba(7, 13, 22, .36);
}

.vehicle-legend-item i {
  grid-row: 1 / 3;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--guide-color);
  box-shadow: 0 0 10px color-mix(in srgb, var(--guide-color) 45%, transparent);
}

.vehicle-legend-item strong {
  color: #edf2f9;
  font-size: .72rem;
}

.vehicle-legend-item small {
  color: var(--muted);
  font-size: .61rem;
}

.vehicle-check-panel {
  margin-bottom: 1rem;
  padding: 1.05rem;
  border: 1px solid rgba(225, 185, 78, .25);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 92% 0%, rgba(225,185,78,.08), transparent 22rem),
    rgba(12, 20, 32, .92);
  box-shadow: 0 12px 34px rgba(0,0,0,.15);
}

.vehicle-check-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.vehicle-check-progress {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 0 .42rem;
  min-width: 140px;
  text-align: right;
}

.vehicle-check-progress strong {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.35rem;
}

.vehicle-check-progress span {
  color: var(--muted);
  font-size: .66rem;
}

.vehicle-check-progress button {
  grid-column: 1 / -1;
  justify-self: end;
  margin-top: .2rem;
  border: 0;
  color: #8ba0ba;
  background: transparent;
  font-size: .63rem;
  cursor: pointer;
}

.vehicle-check-progress button:hover {
  color: var(--accent);
}

.vehicle-check-progressbar {
  height: 5px;
  margin: .9rem 0;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(111, 137, 168, .16);
}

.vehicle-check-progressbar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c99d2e, #f0c95b);
  transition: width .18s ease;
}

.vehicle-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.vehicle-check-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 84px;
  padding: .7rem;
  border: 1px solid rgba(111, 137, 168, .16);
  border-radius: 9px;
  background: rgba(7, 13, 22, .4);
  transition: border-color .15s ease, background .15s ease;
}

.vehicle-check-item.complete {
  border-color: rgba(54, 185, 126, .35);
  background: rgba(54, 185, 126, .055);
}

.vehicle-check-item label {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: .65rem;
  align-items: center;
  min-width: 0;
  cursor: pointer;
}

.vehicle-check-item input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.vehicle-check-mark {
  position: relative;
  width: 21px;
  height: 21px;
  border: 1px solid #425873;
  border-radius: 6px;
  background: #0a1422;
}

.vehicle-check-item input:focus-visible + .vehicle-check-mark {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.vehicle-check-item input:checked + .vehicle-check-mark {
  border-color: #36b97e;
  background: #168153;
}

.vehicle-check-item input:checked + .vehicle-check-mark::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 4px;
  top: 6px;
  left: 5px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: rotate(-45deg);
}

.vehicle-check-item label strong,
.vehicle-check-item label small {
  display: block;
}

.vehicle-check-item label strong {
  color: #eef3fa;
  font-size: .76rem;
}

.vehicle-check-item label small {
  margin-top: .18rem;
  color: #8094ae;
  font-size: .65rem;
  line-height: 1.4;
}

.vehicle-check-link {
  margin-left: .65rem;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-size: .62rem;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.vehicle-check-link:hover {
  text-decoration: underline;
}

.vehicle-guide-toolbar {
  margin-bottom: .65rem;
}

.vehicle-guide-controls {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  align-items: start;
  margin-bottom: .7rem;
}

.vehicle-filter-row {
  display: flex;
  gap: .42rem;
  margin: 0;
  overflow-x: auto;
  padding-bottom: .18rem;
}

.vehicle-filter-row .chip {
  flex: 0 0 auto;
}

.vehicle-expand-controls {
  display: flex;
  flex: 0 0 auto;
  gap: .4rem;
}

.vehicle-stage-nav {
  position: sticky;
  top: 62px;
  z-index: 8;
  display: flex;
  gap: .42rem;
  margin-bottom: .85rem;
  padding: .5rem;
  overflow-x: auto;
  border: 1px solid rgba(111, 137, 168, .17);
  border-radius: 10px;
  background: rgba(7, 14, 24, .94);
  box-shadow: 0 10px 28px rgba(0,0,0,.2);
  backdrop-filter: blur(12px);
}

.vehicle-stage-nav button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .42rem;
  flex: 0 0 auto;
  min-height: 38px;
  padding: .45rem .62rem;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #8fa3bc;
  background: transparent;
  cursor: pointer;
}

.vehicle-stage-nav button:hover,
.vehicle-stage-nav button.active {
  border-color: rgba(225, 185, 78, .25);
  color: #f2f5f9;
  background: rgba(225, 185, 78, .08);
}

.vehicle-stage-nav button > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 6px;
  color: var(--accent);
  background: rgba(225, 185, 78, .1);
  font-family: var(--mono);
  font-size: .58rem;
}

.vehicle-stage-nav button strong {
  font-size: .65rem;
  white-space: nowrap;
}

.vehicle-guide-content {
  display: grid;
  gap: 1rem;
}

.vehicle-guide-group {
  scroll-margin-top: 122px;
  padding: .8rem;
  border: 1px solid rgba(111, 137, 168, .18);
  border-radius: var(--radius);
  background: rgba(12, 20, 32, .84);
  box-shadow: 0 12px 34px rgba(0,0,0,.13);
}

.vehicle-guide-group-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .8rem;
  padding: .2rem .25rem .8rem;
}

.vehicle-stage-number {
  display: grid;
  min-width: 68px;
  min-height: 34px;
  place-items: center;
  border: 1px solid rgba(225, 185, 78, .23);
  border-radius: 7px;
  color: var(--accent);
  background: rgba(225, 185, 78, .075);
  font-family: var(--mono);
  font-size: .61rem;
  font-weight: 800;
  text-transform: uppercase;
}

.vehicle-guide-group-head h2 {
  margin: 0;
  color: #f1f4f8;
  font-size: 1.02rem;
}

.vehicle-guide-group-head p {
  margin: .2rem 0 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.4;
}

.vehicle-stage-range {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .64rem;
  white-space: nowrap;
}

.vehicle-guide-cards {
  display: grid;
  gap: .55rem;
}

.vehicle-guide-card {
  scroll-margin-top: 122px;
  overflow: clip;
  border: 1px solid rgba(111, 137, 168, .17);
  border-left: 3px solid var(--guide-color, #59718f);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(17, 28, 43, .97), rgba(11, 19, 31, .97));
  transform: none !important;
}

.vehicle-guide-card:hover {
  transform: none !important;
  border-color: rgba(111, 137, 168, .3);
  border-left-color: var(--guide-color, #59718f);
}

.vehicle-card-required { --guide-color: #d9b34a; }
.vehicle-card-conditional { --guide-color: #4d91e8; }
.vehicle-card-recommended { --guide-color: #36b97e; }
.vehicle-card-optional { --guide-color: #8294ad; }
.vehicle-card-prohibited { --guide-color: #e45f6b; }

.vehicle-guide-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .75rem;
  min-height: 88px;
  padding: .78rem .85rem;
  cursor: pointer;
  list-style: none;
}

.vehicle-guide-summary::-webkit-details-marker {
  display: none;
}

.vehicle-guide-number {
  display: grid;
  width: 48px;
  min-height: 48px;
  place-items: center;
  align-content: center;
  border: 1px solid color-mix(in srgb, var(--guide-color) 48%, transparent);
  border-radius: 9px;
  color: var(--guide-color);
  background: color-mix(in srgb, var(--guide-color) 10%, transparent);
  font-family: var(--mono);
  font-weight: 800;
}

.vehicle-guide-number small,
.vehicle-guide-number strong {
  display: block;
  line-height: 1;
}

.vehicle-guide-number small {
  margin-bottom: .25rem;
  font-size: .48rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.vehicle-guide-number strong {
  font-size: .88rem;
}

.vehicle-guide-title {
  display: block;
  min-width: 0;
}

.vehicle-guide-kicker {
  display: block;
  color: #6681a2;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.vehicle-guide-title strong {
  display: block;
  margin-top: .15rem;
  color: #f0f4fa;
  font-size: .93rem;
}

.vehicle-guide-title small {
  display: block;
  margin-top: .18rem;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.45;
}

.vehicle-guide-meta {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: .35rem;
}

.vehicle-guide-meta .mono {
  color: #6c809b;
  font-size: .6rem;
}

.vehicle-status-badge {
  border-color: color-mix(in srgb, var(--guide-color) 45%, transparent);
  color: var(--guide-color);
  background: color-mix(in srgb, var(--guide-color) 10%, transparent);
}

.vehicle-status-required { --guide-color: #d9b34a; }
.vehicle-status-conditional { --guide-color: #4d91e8; }
.vehicle-status-recommended { --guide-color: #36b97e; }
.vehicle-status-optional { --guide-color: #8294ad; }
.vehicle-status-prohibited { --guide-color: #e45f6b; }

.vehicle-guide-toggle {
  width: 9px;
  height: 9px;
  border-right: 2px solid #7186a2;
  border-bottom: 2px solid #7186a2;
  transform: rotate(45deg);
  transition: transform .16s ease;
}

.vehicle-guide-card[open] .vehicle-guide-toggle {
  transform: rotate(225deg);
}

.vehicle-guide-card[open] .vehicle-guide-summary {
  border-bottom: 1px solid rgba(111, 137, 168, .14);
  background: rgba(225, 185, 78, .025);
}

.vehicle-guide-body {
  display: grid;
  gap: .85rem;
  padding: .85rem;
}

.vehicle-guide-decision-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.vehicle-guide-decision,
.vehicle-guide-warning {
  min-width: 0;
  padding: .78rem .82rem;
  border: 1px solid rgba(111, 137, 168, .16);
  border-radius: 8px;
  background: rgba(5, 11, 19, .34);
}

.vehicle-guide-decision {
  border-color: rgba(54, 185, 126, .24);
  background: rgba(54, 185, 126, .045);
}

.vehicle-guide-warning {
  border-color: rgba(228, 95, 107, .23);
  background: rgba(228, 95, 107, .04);
}

.vehicle-guide-decision span,
.vehicle-guide-warning span {
  display: block;
  margin-bottom: .35rem;
  color: #36b97e;
  font-size: .58rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.vehicle-guide-warning span {
  color: #e87680;
}

.vehicle-guide-decision strong,
.vehicle-guide-warning strong {
  display: block;
  color: #d7e1ed;
  font-size: .74rem;
  font-weight: 650;
  line-height: 1.5;
}

.vehicle-guide-rule {
  padding: .75rem .8rem;
  border: 1px solid rgba(111, 137, 168, .14);
  border-radius: 8px;
  background: rgba(5, 11, 19, .34);
}

.vehicle-guide-rule-label {
  display: block;
  margin-bottom: .45rem;
  color: var(--guide-color, var(--accent));
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.vehicle-guide-rule ul,
.vehicle-variant-card ul {
  margin: 0;
  padding-left: 1.05rem;
}

.vehicle-guide-rule li {
  margin: .34rem 0;
  color: #c7d3e2;
  font-size: .79rem;
  line-height: 1.6;
}

.vehicle-guide-media {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  gap: .65rem;
}

.vehicle-guide-media-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vehicle-guide-media figure,
.vehicle-variant-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(111, 137, 168, .17);
  border-radius: 9px;
  background: rgba(5, 11, 19, .38);
}

.vehicle-guide-media img,
.vehicle-variant-card img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  background: #080d15;
}

.vehicle-guide-media figcaption {
  padding: .48rem .6rem;
  color: #788da8;
  font-size: .65rem;
}

.vehicle-variant-helper {
  padding: .78rem .82rem;
  border: 1px solid rgba(77, 145, 232, .2);
  border-radius: 8px;
  background: rgba(77, 145, 232, .045);
}

.vehicle-variant-helper h3 {
  margin: .18rem 0 0;
  font-size: .88rem;
}

.vehicle-variant-helper p {
  margin: .32rem 0 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.5;
}

.vehicle-variant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.vehicle-variant-card {
  display: grid;
  grid-template-columns: minmax(140px, .85fr) minmax(0, 1fr);
  align-items: stretch;
}

.vehicle-variant-card img {
  height: 100%;
  min-height: 160px;
  object-fit: cover;
}

.vehicle-variant-card > div {
  padding: .7rem;
}

.vehicle-variant-card h3 {
  margin: .2rem 0 .42rem;
  font-size: .84rem;
}

.vehicle-variant-card li {
  margin: .2rem 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.4;
}

.vehicle-guide-source-note {
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .vehicle-start-here {
    grid-template-columns: 1fr;
  }

  .vehicle-variant-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .vehicle-legend,
  .vehicle-check-grid,
  .vehicle-guide-decision-grid,
  .vehicle-guide-media-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-check-head,
  .vehicle-guide-group-head {
    grid-template-columns: 1fr;
  }

  .vehicle-check-progress {
    justify-self: start;
    text-align: left;
  }

  .vehicle-check-progress button {
    justify-self: start;
  }

  .vehicle-guide-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .vehicle-expand-controls {
    align-self: flex-start;
  }

  .vehicle-stage-nav {
    top: 56px;
  }

  .vehicle-stage-number {
    justify-self: start;
  }

  .vehicle-stage-range {
    white-space: normal;
  }

  .vehicle-guide-summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .58rem;
  }

  .vehicle-guide-meta {
    grid-column: 2;
    align-items: flex-start;
    flex-direction: row;
  }

  .vehicle-guide-toggle {
    grid-column: 3;
    grid-row: 1;
  }

  .vehicle-variant-card {
    grid-template-columns: 1fr;
  }

  .vehicle-variant-card img {
    max-height: 240px;
  }

  .vehicle-check-item {
    grid-template-columns: 1fr;
    gap: .55rem;
  }

  .vehicle-check-link {
    justify-self: start;
    margin-left: 2.85rem;
  }
}

/* ---------- Publiczne widoki ---------- */

.pubbar {
  min-height: 72px;
  border-bottom-color: rgba(117,143,175,.16);
  background: rgba(7, 13, 22, .88);
  backdrop-filter: blur(18px);
}

.pubbar .brand-logo {
  filter: drop-shadow(0 5px 12px rgba(0,0,0,.5));
}

.container-pub {
  max-width: 1140px;
}

/* ============================================================
   STRONA GŁÓWNA — FILMOWY HERO PSB
   ============================================================ */
.home-cinematic {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border: 1px solid rgba(225, 185, 78, .2);
  border-radius: 18px;
  background:
    radial-gradient(circle at 78% 35%, rgba(40, 75, 111, .28), transparent 38%),
    #050d18;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .32);
  color: #f4f7fb;
  isolation: isolate;
}

.home-cinematic-video,
.home-cinematic-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.home-cinematic-video {
  z-index: -3;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.home-cinematic-overlay {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(3, 10, 19, .96) 0%, rgba(3, 10, 19, .82) 48%, rgba(3, 10, 19, .42) 100%),
    linear-gradient(180deg, rgba(3, 10, 19, .25) 0%, rgba(3, 10, 19, .08) 46%, rgba(3, 10, 19, .94) 100%);
  pointer-events: none;
}

.home-cinematic-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, .32fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  min-height: 510px;
  padding: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: 2rem;
}

.home-cinematic-copy {
  max-width: 720px;
}

.home-cinematic-eyebrow {
  display: block;
  margin-bottom: 1rem;
  color: #efc64d;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .19em;
  text-transform: uppercase;
}

.home-cinematic h1 {
  max-width: 700px;
  margin: 0;
  color: #f8fafc;
  font-size: clamp(2.6rem, 6.2vw, 4.8rem);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.home-cinematic-copy > p {
  max-width: 650px;
  margin: 1.4rem 0 1.8rem;
  color: #c2cfdd;
  font-size: clamp(.98rem, 1.6vw, 1.12rem);
  line-height: 1.7;
}

.home-cinematic-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.home-cinematic-actions .btn-primary,
.home-cinematic-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .75rem 1.15rem;
  border-radius: 10px;
  font-weight: 800;
}

.home-cinematic-secondary {
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(7, 17, 31, .58);
  color: #edf3f9;
  backdrop-filter: blur(10px);
  transition: border-color .16s, background .16s, color .16s;
}

.home-cinematic-secondary:hover {
  border-color: rgba(225, 185, 78, .58);
  background: rgba(12, 25, 42, .82);
  color: #fff;
}

.home-cinematic-seal {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: 1.6rem;
  border: 1px solid rgba(239, 198, 77, .24);
  border-radius: 18px;
  background: rgba(5, 14, 26, .56);
  text-align: center;
  backdrop-filter: blur(14px);
}

.home-cinematic-seal img {
  width: min(150px, 100%);
  height: auto;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, .58));
}

.home-cinematic-seal span {
  color: #efc64d;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.home-cinematic-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 1.5rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  background: rgba(5, 14, 26, .8);
  backdrop-filter: blur(14px);
}

.home-cinematic-steps > div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: .75rem;
  row-gap: .18rem;
  padding: 1.1rem 1.25rem;
}

.home-cinematic-steps > div + div {
  border-left: 1px solid rgba(255, 255, 255, .1);
}

.home-cinematic-steps span {
  grid-row: 1 / 3;
  color: #efc64d;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 800;
}

.home-cinematic-steps strong {
  color: #f5f8fb;
  font-size: .88rem;
}

.home-cinematic-steps small {
  color: #8fa4bb;
  font-size: .72rem;
  line-height: 1.4;
}

@media (max-width: 800px) {
  .home-cinematic {
    min-height: 0;
  }

  .home-cinematic-main {
    grid-template-columns: 1fr;
    min-height: 470px;
    padding: 3rem 1.4rem 2rem;
  }

  .home-cinematic-seal {
    display: none;
  }

  .home-cinematic h1 {
    font-size: clamp(2.25rem, 12vw, 3.5rem);
  }

  .home-cinematic-steps {
    grid-template-columns: 1fr;
    margin: 0 1rem 1rem;
  }

  .home-cinematic-steps > div + div {
    border-top: 1px solid rgba(255, 255, 255, .1);
    border-left: 0;
  }
}

@media (max-width: 520px) {
  .home-cinematic {
    border-radius: 14px;
  }

  .home-cinematic-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .home-cinematic-actions .btn-primary,
  .home-cinematic-secondary {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-cinematic-video {
    display: none;
  }
}

/* ---------- Responsywność ---------- */

@media (max-width: 1180px) {
  .command-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(270px, .75fr);
  }
}

@media (max-width: 920px) {
  .sidebar {
    width: min(286px, 88vw);
    position: fixed;
    top: 0;
    height: 100vh;
  }

  body.nav-collapsed .sidebar {
    width: min(286px, 88vw);
  }

  body.nav-collapsed .side-brand-text,
  body.nav-collapsed .side-label,
  body.nav-collapsed .nav-text,
  body.nav-collapsed .side-user-meta {
    display: flex;
  }

  body.nav-collapsed .side-label {
    display: block;
  }

  body.nav-collapsed .side-nav a {
    justify-content: flex-start;
    padding-inline: .58rem;
  }

  body.nav-collapsed .side-user {
    grid-template-columns: 38px minmax(0, 1fr) 34px;
    justify-content: flex-start;
    padding-inline: .9rem;
  }

  body.nav-collapsed .side-user > .avatar {
    display: block;
  }

  body.nav-collapsed .side-user-menu-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + .65rem);
    left: auto;
  }

  body.nav-collapsed .side-user-menu-panel::after {
    right: 10px;
    bottom: -6px;
    left: auto;
    border: 0;
    border-right: 1px solid #2b3b51;
    border-bottom: 1px solid #2b3b51;
  }

  .sidebar-collapse {
    display: none;
  }

  .nav-toggle {
    display: grid;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding-inline: 1rem;
  }
}

@media (max-width: 700px) {
  .container {
    padding: 1.25rem .8rem 2rem;
  }

  .command-stats {
    grid-template-columns: 1fr 1fr;
  }

  .command-stat {
    min-height: 110px;
  }

  .dashboard-date {
    display: none;
  }

  .panel {
    padding: 1rem;
  }

  .container > .table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
  }

  .table-shell .table {
    min-width: 700px;
  }
}

/* ---------- Obieg i autentyczność dokumentów ---------- */

.document-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}

.progress-step {
  position: relative;
  min-height: 76px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-content: center;
  gap: .1rem .55rem;
  padding: .7rem .8rem;
  color: var(--faint);
}

.progress-step:not(:last-child) {
  border-right: 1px solid var(--border-soft);
}

.progress-step > span {
  grid-row: 1 / 3;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 800;
}

.progress-step strong {
  color: var(--muted);
  font-size: .78rem;
}

.progress-step small {
  font-size: .65rem;
}

.progress-step.complete {
  background: linear-gradient(115deg, rgba(69, 201, 138, .08), transparent);
  color: var(--muted);
}

.progress-step.complete > span {
  border-color: rgba(69, 201, 138, .4);
  background: rgba(69, 201, 138, .12);
  color: var(--ok);
}

.progress-step.complete strong {
  color: var(--text);
}

/* ---------- Obieg pochwał ---------- */

.commendation-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}

.commendation-metric {
  position: relative;
  min-height: 112px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: .15rem .7rem;
  padding: 1rem 1.05rem;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: linear-gradient(130deg, var(--surface), rgba(217, 179, 74, .035));
  color: var(--muted);
}

.commendation-metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--border);
}

.commendation-metric:hover,
.commendation-metric.active {
  border-color: rgba(217, 179, 74, .42);
  background: linear-gradient(130deg, var(--surface-2), rgba(217, 179, 74, .08));
}

.commendation-metric.active::before { background: var(--accent); }
.commendation-metric > span { align-self: end; color: var(--text); font-size: .78rem; font-weight: 800; }
.commendation-metric > strong {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.8rem;
}
.commendation-metric > small { color: var(--faint); font-size: .68rem; }

.commendation-register .panel-head { align-items: flex-start; }
.commendation-register .panel-head p { margin: .25rem 0 0 .75rem; }

/* Google Sheets, Chain of Command i Kody Radiowe */
.sheet-page-head,
.command-page-head,
.radio-page-head {
  align-items: flex-start;
}

.integration-state {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .7rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(8, 17, 31, .72);
  font-size: .78rem;
  font-weight: 800;
}

.integration-state > span {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, .09);
}

.integration-state.is-ready > span {
  background: #31c48d;
  box-shadow: 0 0 0 5px rgba(49, 196, 141, .1);
}

.sheet-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin: 1rem 0;
}

.sheet-flow article {
  display: flex;
  gap: .8rem;
  min-height: 92px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(17, 29, 46, .96), rgba(9, 18, 31, .94));
}

.sheet-flow-code {
  color: var(--gold);
  font: 800 .72rem/1.3 var(--mono, monospace);
}

.sheet-flow article div {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.sheet-flow article strong {
  color: var(--text);
  font-size: .88rem;
}

.sheet-flow article small {
  color: var(--muted);
  line-height: 1.45;
}

.sheet-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, .7fr);
  gap: 1rem;
  align-items: stretch;
}

.sheet-control,
.sheet-summary,
.sheet-preview,
.sheet-history {
  margin-bottom: 1rem;
}

.sheet-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin: 1rem 0;
}

.sheet-config-grid > div {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-width: 0;
  padding: .8rem;
  border: 1px solid rgba(126, 155, 192, .13);
  border-radius: 10px;
  background: rgba(5, 13, 24, .48);
}

.sheet-config-grid span,
.sheet-stat span,
.sheet-pending span {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sheet-config-grid strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: .83rem;
}

.sheet-action-row,
.sheet-apply {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.sheet-summary {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.sheet-stat {
  display: flex;
  align-items: baseline;
  gap: .7rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--line);
}

.sheet-stat strong {
  color: var(--text);
  font-size: 1.6rem;
}

.sheet-pending {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .3rem .8rem;
  padding: .9rem;
  border: 1px solid rgba(225, 180, 59, .22);
  border-radius: 11px;
  background: rgba(225, 180, 59, .05);
}

.sheet-pending strong {
  grid-row: span 2;
  color: var(--gold);
  font-size: 1.5rem;
}

.sheet-pending small {
  color: var(--muted);
}

.sheet-preview-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .55rem;
  margin: 1rem 0;
}

.sheet-preview-metrics > div {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(4, 12, 22, .48);
}

.sheet-preview-metrics strong {
  color: var(--text);
  font-size: 1.45rem;
}

.sheet-preview-metrics span {
  color: var(--muted);
  font-size: .72rem;
}

.sheet-preview-metrics .is-new strong { color: #31c48d; }
.sheet-preview-metrics .is-change strong { color: var(--gold); }

.sheet-warning {
  margin: 1rem 0;
  border: 1px solid rgba(245, 158, 11, .25);
  border-radius: 11px;
  background: rgba(245, 158, 11, .045);
}

.sheet-warning summary {
  padding: .8rem 1rem;
  color: #f6c85f;
  cursor: pointer;
  font-weight: 800;
}

.sheet-warning ul,
.sheet-run-details ul {
  margin: 0;
  padding: 0 1.25rem 1rem 2rem;
  color: var(--muted);
  font-size: .8rem;
}

.sheet-change-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  max-height: 420px;
  overflow: auto;
  padding-right: .25rem;
}

.sheet-change-list article {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 13, 24, .5);
}

.sheet-change-list article div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .2rem;
}

.sheet-change-list small { color: var(--muted); }

.sheet-change-kind {
  flex: 0 0 auto;
  padding: .28rem .45rem;
  border-radius: 6px;
  color: var(--gold);
  background: rgba(225, 180, 59, .1);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.sheet-change-kind.is-new {
  color: #4ade80;
  background: rgba(34, 197, 94, .1);
}

.sheet-apply {
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid rgba(225, 180, 59, .28);
  border-radius: 12px;
  background: rgba(225, 180, 59, .045);
}

.sheet-apply div {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.sheet-apply small { color: var(--muted); }

.sheet-run-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.sheet-run-list details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 13, 24, .45);
}

.sheet-run-list summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
  cursor: pointer;
}

.sheet-run-list summary > span:last-child {
  color: var(--muted);
  font-size: .76rem;
}

.sheet-run-details {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  padding: 0 .85rem .85rem;
  color: var(--muted);
  font-size: .76rem;
}

.sheet-run-error {
  flex-basis: 100%;
  color: #fb7185;
}

.command-sync-meta,
.radio-total {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 .45rem;
  min-width: 185px;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 17, 31, .72);
}

.command-sync-meta strong,
.radio-total strong {
  grid-row: span 2;
  align-self: center;
  color: var(--gold);
  font-size: 1.8rem;
}

.command-sync-meta span,
.radio-total span {
  color: var(--text);
  font-size: .78rem;
  font-weight: 800;
}

.command-sync-meta small,
.radio-total small {
  color: var(--muted);
  font-size: .67rem;
}

.command-units {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .6rem;
  margin: 1rem 0;
}

.command-units article {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 60px;
  padding: .7rem .85rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(13, 25, 41, .8);
}

.command-units strong { color: var(--gold); font-size: 1.2rem; }
.command-units span { color: var(--muted); font-size: .76rem; line-height: 1.35; }

.command-chart-head {
  align-items: flex-start;
  gap: 1rem;
}

.command-chart-actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: .75rem;
}

.command-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .55rem .9rem;
  color: var(--muted);
  font-size: .68rem;
}

.command-legend > span {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.command-legend-line {
  display: inline-block;
  width: 22px;
  height: 1px;
  background: rgba(225, 180, 59, .65);
}

.command-legend-check {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  color: #68e0ac;
  background: rgba(34, 197, 94, .12);
  font-style: normal;
  font-weight: 900;
}

.command-tree-toggle-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  gap: .48rem;
  white-space: nowrap;
}

.command-tree-toggle-symbol {
  color: var(--gold);
  font-size: 1rem;
  line-height: 1;
}

.command-chart-shell {
  overflow: hidden;
  margin-top: .8rem;
  border: 1px solid rgba(126, 155, 192, .14);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 0, rgba(225, 180, 59, .07), transparent 34%),
    linear-gradient(180deg, rgba(5, 14, 25, .85), rgba(8, 18, 31, .58));
}

.command-chart-scroll {
  overflow-x: auto;
  padding: 1.35rem 1rem 1.1rem;
  scrollbar-color: rgba(225, 180, 59, .3) rgba(3, 11, 20, .45);
}

.command-chart-scroll:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -3px;
}

.command-org-tree {
  width: max-content;
  min-width: 100%;
}

.command-org-tree ul {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 34px 0 0;
}

.command-org-tree li {
  position: relative;
  min-width: 270px;
  padding: 34px 10px 0;
  list-style: none;
  text-align: center;
}

.command-org-tree li::before,
.command-org-tree li::after {
  content: "";
  position: absolute;
  top: 0;
  right: 50%;
  width: 50%;
  height: 34px;
  border-top: 1px solid rgba(225, 180, 59, .48);
}

.command-org-tree li::after {
  right: auto;
  left: 50%;
  border-left: 1px solid rgba(225, 180, 59, .48);
}

.command-org-tree li:only-child::before,
.command-org-tree li:only-child::after {
  display: none;
}

.command-org-tree li:only-child {
  padding-top: 34px;
}

.command-org-tree li:first-child::before,
.command-org-tree li:last-child::after {
  border: 0;
}

.command-org-tree li:last-child::before {
  border-right: 1px solid rgba(225, 180, 59, .48);
  border-radius: 0 7px 0 0;
}

.command-org-tree li:first-child::after {
  border-radius: 7px 0 0;
}

.command-org-tree ul ul::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 34px;
  border-left: 1px solid rgba(225, 180, 59, .48);
}

.command-org-tree > .command-tree-root {
  padding-top: 0;
}

.command-org-tree > .command-tree-root::before,
.command-org-tree > .command-tree-root > li::before,
.command-org-tree > .command-tree-root > li::after {
  display: none;
}

.command-org-tree > .command-tree-root > li {
  padding-top: 0;
}

.command-org-card {
  position: relative;
  z-index: 1;
  width: 250px;
  min-height: 164px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(126, 155, 192, .2);
  border-top: 2px solid rgba(225, 180, 59, .55);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(17, 32, 51, .98), rgba(8, 18, 31, .98));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
  text-align: left;
}

.command-org-card.is-command-root {
  width: 278px;
  border-color: rgba(225, 180, 59, .42);
  border-top-color: #e1b43b;
  background:
    radial-gradient(circle at 100% 0, rgba(225, 180, 59, .13), transparent 44%),
    linear-gradient(145deg, rgba(21, 37, 57, .99), rgba(8, 18, 31, .99));
  box-shadow: 0 16px 38px rgba(0, 0, 0, .25), 0 0 0 1px rgba(225, 180, 59, .05);
}

.command-org-card-top {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem .75rem .2rem;
}

.command-unit-code {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: .25rem .42rem;
  border: 1px solid rgba(225, 180, 59, .25);
  border-radius: 6px;
  color: var(--gold);
  background: rgba(225, 180, 59, .07);
  font: 900 .61rem/1 var(--mono, monospace);
  letter-spacing: .05em;
}

.command-level-label {
  color: #647f9f;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.command-source-check {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: auto;
  border: 1px solid rgba(74, 222, 128, .2);
  border-radius: 50%;
  color: #68e0ac;
  background: rgba(34, 197, 94, .09);
  font-size: .65rem;
  font-weight: 900;
}

.command-org-position {
  display: block;
  min-height: 34px;
  padding: .25rem .75rem 0;
  color: var(--gold);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .035em;
  line-height: 1.35;
  text-transform: uppercase;
}

.command-org-card h3 {
  margin: .45rem .75rem .25rem;
  color: var(--text);
  font-size: .9rem;
  line-height: 1.3;
}

.command-org-card p {
  margin: 0 .75rem .7rem;
  color: #a9bfdc;
  font-size: .76rem;
}

.command-org-card footer {
  padding: .55rem .75rem;
  border-top: 1px solid rgba(126, 155, 192, .12);
  color: var(--muted);
  background: rgba(3, 11, 20, .32);
  font-size: .65rem;
  line-height: 1.35;
}

.command-chart-hint {
  margin: 0;
  padding: .55rem .8rem;
  border-top: 1px solid rgba(126, 155, 192, .11);
  color: #647f9f;
  background: rgba(3, 10, 18, .42);
  font-size: .66rem;
  text-align: center;
}

.command-vertical-tree {
  padding: 1rem;
}

.command-branch-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.command-branch-node {
  position: relative;
  min-width: 0;
  list-style: none;
}

.command-branch-roots {
  display: grid;
  gap: .85rem;
}

.command-branch {
  --unit-color: #d9b34a;
  --unit-soft: rgba(217, 179, 74, .09);
  min-width: 0;
}

.command-branch.unit-command-staff {
  --unit-color: #4f7fc9;
  --unit-soft: rgba(36, 77, 141, .18);
}

.command-branch.unit-professional-standards {
  --unit-color: #ff4b4b;
  --unit-soft: rgba(255, 0, 0, .1);
}

.command-branch.unit-internal-affairs {
  --unit-color: #dc2626;
  --unit-soft: rgba(181, 0, 0, .13);
}

.command-branch.unit-human-resources {
  --unit-color: #b45cff;
  --unit-soft: rgba(148, 0, 255, .13);
}

.command-branch.unit-patrol {
  --unit-color: #5b9cff;
  --unit-soft: rgba(74, 139, 226, .13);
}

.command-branch.unit-professional-development {
  --unit-color: #69a94f;
  --unit-soft: rgba(49, 95, 26, .15);
}

.command-branch.unit-field-training {
  --unit-color: #c93434;
  --unit-soft: rgba(181, 0, 0, .12);
}

.command-branch.unit-accreditation {
  --unit-color: #7fbd63;
  --unit-soft: rgba(87, 147, 64, .14);
}

.command-branch.unit-special-operations {
  --unit-color: #a9a9a9;
  --unit-soft: rgba(104, 104, 104, .14);
}

.command-branch.unit-criminal-investigations {
  --unit-color: #c4752c;
  --unit-soft: rgba(151, 74, 0, .14);
}

.command-branch.unit-metropolitan {
  --unit-color: #f4df31;
  --unit-soft: rgba(255, 240, 0, .1);
}

.command-branch.unit-swat {
  --unit-color: #f2f5f8;
  --unit-soft: rgba(255, 255, 255, .07);
}

.command-branch.unit-canine {
  --unit-color: #c49a1d;
  --unit-soft: rgba(152, 116, 0, .15);
}

.command-branch > summary {
  list-style: none;
}

.command-branch > summary::-webkit-details-marker {
  display: none;
}

.command-branch-card {
  display: grid;
  grid-template-columns:
    minmax(90px, .28fr)
    minmax(0, 1.15fr)
    minmax(0, .8fr)
    minmax(0, .72fr)
    minmax(96px, .32fr);
  gap: .75rem;
  align-items: center;
  min-height: 92px;
  padding: .75rem .85rem;
  border: 1px solid rgba(126, 155, 192, .2);
  border-left: 3px solid var(--unit-color);
  border-radius: 12px;
  background:
    linear-gradient(105deg, var(--unit-soft), rgba(8, 18, 31, .98) 54%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .14);
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}

.command-branch-card:hover {
  border-color: var(--unit-color);
}

.command-branch.is-command-root > .command-branch-card {
  border-color: var(--unit-color);
  border-left-color: var(--unit-color);
  background:
    radial-gradient(circle at 100% 0, var(--unit-soft), transparent 34%),
    linear-gradient(105deg, var(--unit-soft), rgba(8, 18, 31, .99) 58%);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .2);
}

.command-branch.is-leaf > .command-branch-card {
  cursor: default;
}

.command-branch-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
}

.command-branch-person,
.command-branch-service,
.command-branch-supervisor {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .24rem;
}

.command-branch-person small,
.command-branch-service small,
.command-branch-supervisor small {
  color: #647f9f;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .075em;
  line-height: 1.35;
  text-transform: uppercase;
}

.command-branch-person > small {
  color: var(--unit-color);
}

.command-branch-person > strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: .88rem;
}

.command-branch-service > strong,
.command-branch-supervisor > strong {
  overflow-wrap: anywhere;
  color: #b8cbe3;
  font-size: .76rem;
}

.command-branch-service > span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: .68rem;
}

.command-branch-toggle {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .35rem;
  padding: .48rem .55rem;
  border: 1px solid color-mix(in srgb, var(--unit-color) 28%, transparent);
  border-radius: 8px;
  color: var(--muted);
  background: var(--unit-soft);
}

.command-branch-toggle > strong {
  color: var(--unit-color);
  font-size: .92rem;
}

.command-branch-toggle > small {
  font-size: .58rem;
  line-height: 1.25;
}

.command-branch-toggle > i {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--unit-color);
  border-bottom: 1.5px solid var(--unit-color);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}

.command-branch:not([open]) > .command-branch-card .command-branch-toggle > i {
  transform: rotate(-45deg) translateY(1px);
}

.command-branch-end {
  justify-self: end;
  padding: .38rem .5rem;
  border: 1px solid rgba(126, 155, 192, .13);
  border-radius: 7px;
  color: #647f9f;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.command-branch-children {
  position: relative;
  display: grid;
  gap: .65rem;
  margin: .7rem 0 0 27px;
  padding: 0 0 0 27px;
  border-left: 1px solid color-mix(in srgb, var(--unit-color) 52%, transparent);
}

.command-branch-children > .command-branch-node::before {
  content: "";
  position: absolute;
  top: 45px;
  left: -27px;
  width: 27px;
  border-top: 1px solid color-mix(in srgb, var(--unit-color) 52%, transparent);
}

.command-branch .command-unit-code {
  border-color: color-mix(in srgb, var(--unit-color) 38%, transparent);
  color: var(--unit-color);
  background: var(--unit-soft);
}

.command-branch-children > .command-branch-node:last-child::after {
  content: "";
  position: absolute;
  top: 46px;
  bottom: 0;
  left: -28px;
  width: 2px;
  background: #071321;
}

.radio-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, .55fr);
  gap: 1.5rem;
  overflow: hidden;
  margin-bottom: 1rem;
  padding: clamp(1.35rem, 2.2vw, 2rem);
  border: 1px solid rgba(126, 155, 192, .18);
  border-left: 3px solid var(--gold);
  border-radius: 16px;
  background:
    radial-gradient(circle at 88% 12%, rgba(52, 124, 211, .2), transparent 30%),
    linear-gradient(125deg, rgba(16, 34, 56, .98), rgba(5, 14, 25, .99) 64%);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .2);
}

.radio-hero::after {
  content: "";
  position: absolute;
  right: -75px;
  bottom: -105px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(225, 180, 59, .08);
  border-radius: 50%;
  box-shadow:
    0 0 0 40px rgba(225, 180, 59, .025),
    0 0 0 80px rgba(225, 180, 59, .018);
  pointer-events: none;
}

.radio-hero-copy,
.radio-overview {
  position: relative;
  z-index: 1;
}

.radio-signal-label {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  margin-bottom: .75rem;
  color: #84b9f5;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.radio-signal-label i {
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: #4e9df5;
  box-shadow: 0 0 0 5px rgba(78, 157, 245, .1), 0 0 16px rgba(78, 157, 245, .6);
}

.radio-hero h1 {
  margin: .2rem 0 .45rem;
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  letter-spacing: -.045em;
}

.radio-hero-copy > p {
  max-width: 760px;
  margin: 0;
  color: #a9bed8;
  font-size: .92rem;
  line-height: 1.65;
}

.radio-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin-top: 1.25rem;
}

.radio-principles > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .24rem;
  padding: .72rem .8rem;
  border: 1px solid rgba(126, 155, 192, .14);
  border-radius: 10px;
  background: rgba(4, 12, 22, .42);
}

.radio-principles strong {
  color: #f2c952;
  font-size: .75rem;
  text-transform: uppercase;
}

.radio-principles small {
  color: var(--muted);
  font-size: .67rem;
  line-height: 1.4;
}

.radio-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  align-self: center;
}

.radio-overview article {
  display: flex;
  min-height: 108px;
  flex-direction: column;
  justify-content: center;
  padding: 1rem;
  border: 1px solid rgba(126, 155, 192, .17);
  border-radius: 12px;
  background: rgba(4, 12, 22, .66);
}

.radio-overview strong {
  color: var(--gold);
  font-size: 2rem;
  line-height: 1;
}

.radio-overview span,
.radio-overview > small {
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.4;
}

.radio-overview span { margin-top: .45rem; }
.radio-overview > small {
  grid-column: 1 / -1;
  text-align: center;
}

.radio-workbench {
  margin-bottom: 1rem;
}

.radio-workbench-head,
.radio-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.radio-workbench-head {
  margin-bottom: .85rem;
}

.radio-workbench-head h2 {
  margin: .15rem 0 .15rem;
}

.radio-workbench-head p { margin: 0; }

.radio-search-tip {
  flex: 0 0 auto;
  padding: .48rem .65rem;
  border: 1px solid rgba(225, 180, 59, .18);
  border-radius: 999px;
  color: #dcb849;
  background: rgba(225, 180, 59, .055);
  font-size: .67rem;
  font-weight: 800;
}

.radio-search {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(200px, .35fr) auto auto;
  gap: .6rem;
}

.radio-search-field {
  position: relative;
  min-width: 0;
}

.radio-search-field > span {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: .9rem;
  width: 13px;
  height: 13px;
  border: 2px solid #6e86a5;
  border-radius: 50%;
  transform: translateY(-58%);
  pointer-events: none;
}

.radio-search-field > span::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 6px;
  border-top: 2px solid #6e86a5;
  transform: rotate(45deg);
}

.radio-search-field input {
  width: 100%;
  padding-left: 2.7rem;
}

.radio-category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .85rem;
  padding-top: .85rem;
  border-top: 1px solid rgba(126, 155, 192, .11);
}

.radio-category-nav a {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  min-height: 34px;
  padding: .42rem .62rem;
  border: 1px solid rgba(126, 155, 192, .16);
  border-radius: 8px;
  color: #91a7c2;
  background: rgba(4, 12, 22, .4);
  font-size: .68rem;
  font-weight: 800;
  text-decoration: none;
  transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}

.radio-category-nav a:hover,
.radio-category-nav a.active {
  border-color: rgba(225, 180, 59, .38);
  color: #f1c957;
  background: rgba(225, 180, 59, .07);
}

.radio-category-nav a span {
  min-width: 22px;
  padding: .14rem .3rem;
  border-radius: 5px;
  color: #b8cbe3;
  background: rgba(126, 155, 192, .1);
  font: 800 .6rem/1.25 var(--mono, monospace);
  text-align: center;
}

.radio-results-bar {
  margin: 1.15rem 0 .7rem;
  padding: 0 .15rem;
}

.radio-results-bar > div:first-child {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.radio-results-bar strong {
  color: var(--text);
  font-size: .86rem;
}

.radio-directory-actions {
  display: flex;
  gap: .45rem;
}

.radio-directory {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.radio-category {
  --radio-category-color: #d9b34a;
  --radio-category-soft: rgba(217, 179, 74, .07);
  overflow: hidden;
  border: 1px solid rgba(126, 155, 192, .16);
  border-radius: 13px;
  background: linear-gradient(120deg, var(--radio-category-soft), rgba(8, 18, 31, .96) 28%);
  box-shadow: 0 9px 24px rgba(0, 0, 0, .1);
}

.radio-category.radio-tone-1 {
  --radio-category-color: #5b9cff;
  --radio-category-soft: rgba(74, 139, 226, .07);
}

.radio-category.radio-tone-2 {
  --radio-category-color: #68c69f;
  --radio-category-soft: rgba(49, 196, 141, .06);
}

.radio-category.radio-tone-3 {
  --radio-category-color: #b779eb;
  --radio-category-soft: rgba(183, 121, 235, .06);
}

.radio-category.radio-tone-4 {
  --radio-category-color: #f08c58;
  --radio-category-soft: rgba(240, 140, 88, .06);
}

.radio-category.radio-tone-5 {
  --radio-category-color: #8aa6c8;
  --radio-category-soft: rgba(138, 166, 200, .06);
}

.radio-category summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .85rem;
  min-height: 72px;
  padding: .8rem 1rem;
  border-left: 3px solid var(--radio-category-color);
  cursor: pointer;
  list-style: none;
}

.radio-category summary::-webkit-details-marker { display: none; }

.radio-category summary > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .18rem;
}

.radio-category summary strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: .96rem;
}

.radio-category-index {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--radio-category-color) 35%, transparent);
  border-radius: 9px;
  color: var(--radio-category-color);
  background: var(--radio-category-soft);
  font: 900 .7rem/1 var(--mono, monospace);
}

.radio-category-count {
  flex: 0 0 auto;
  padding: .35rem .55rem;
  border: 1px solid rgba(126, 155, 192, .14);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(4, 12, 22, .35);
  font-size: .67rem;
}

.radio-category-chevron {
  width: 9px;
  height: 9px;
  margin: 0 .25rem;
  border-right: 1.5px solid var(--radio-category-color);
  border-bottom: 1.5px solid var(--radio-category-color);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}

.radio-category:not([open]) .radio-category-chevron {
  transform: rotate(-45deg) translateY(1px);
}

.radio-code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: .55rem;
  padding: 0 .8rem .8rem;
}

.radio-code-card {
  display: grid;
  grid-template-columns: minmax(96px, .34fr) minmax(0, 1fr);
  gap: .8rem;
  align-items: stretch;
  min-height: 86px;
  padding: .65rem;
  border: 1px solid rgba(126, 155, 192, .12);
  border-radius: 10px;
  background: rgba(3, 11, 20, .58);
  transition: border-color .16s ease, background-color .16s ease;
}

.radio-code-card:hover {
  border-color: color-mix(in srgb, var(--radio-category-color) 30%, transparent);
  background: rgba(7, 18, 31, .8);
}

.radio-code-heading,
.radio-code-meaning {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.radio-code-heading {
  gap: .35rem;
}

.radio-code-heading small,
.radio-code-meaning small {
  color: #607b9d;
  font-size: .55rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.radio-code-value {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: .5rem .65rem;
  border: 1px solid color-mix(in srgb, var(--radio-category-color) 38%, transparent);
  border-radius: 8px;
  color: var(--radio-category-color);
  background: var(--radio-category-soft);
  font: 900 .88rem/1.2 var(--mono, monospace);
  text-align: center;
  cursor: copy;
  transition: transform .14s ease, color .14s ease, background-color .14s ease;
}

.radio-code-value:hover,
.radio-code-value:focus-visible {
  color: #07111f;
  background: var(--radio-category-color);
  transform: translateY(-1px);
}

.radio-code-value.is-copied {
  color: #06140e;
  background: #63d9a3;
  border-color: #63d9a3;
}

.radio-code-meaning {
  justify-content: center;
  gap: .36rem;
  padding: .25rem .15rem;
}

.radio-code-card p {
  margin: 0;
  overflow-wrap: anywhere;
  color: #c0d0e4;
  font-size: .78rem;
  line-height: 1.48;
}

.radio-copy-status {
  position: fixed;
  z-index: 80;
  right: 1rem;
  bottom: 1rem;
  margin: 0;
  padding: 0;
  color: transparent;
  pointer-events: none;
}

.radio-copy-status:not(:empty) {
  padding: .65rem .8rem;
  border: 1px solid rgba(49, 196, 141, .32);
  border-radius: 9px;
  color: #87e6bc;
  background: rgba(5, 24, 18, .96);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
  font-size: .72rem;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .sheet-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet-preview-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .radio-hero { grid-template-columns: 1fr; }
  .radio-overview { max-width: 520px; }
  .command-chart-head { flex-direction: column; }
  .command-chart-actions {
    width: 100%;
    align-items: flex-start;
  }
  .command-legend { justify-content: flex-start; }
  .command-branch-card {
    grid-template-columns: minmax(90px, .3fr) minmax(0, 1fr) minmax(0, .72fr) minmax(100px, .36fr);
  }
  .command-branch-supervisor {
    grid-column: 2 / 4;
    grid-row: 2;
    padding-top: .6rem;
    border-top: 1px solid rgba(126, 155, 192, .12);
  }
  .command-branch-toggle,
  .command-branch-end {
    grid-column: 4;
    grid-row: 1 / 3;
  }
}

@media (max-width: 760px) {
  .sheet-flow,
  .sheet-dashboard,
  .sheet-config-grid,
  .sheet-change-list,
  .radio-code-grid {
    grid-template-columns: 1fr;
  }
  .sheet-preview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet-action-row,
  .sheet-apply {
    align-items: stretch;
    flex-direction: column;
  }
  .sheet-run-list summary { grid-template-columns: auto 1fr; }
  .sheet-run-list summary > span:last-child { grid-column: 2; }
  .radio-workbench-head,
  .radio-results-bar {
    align-items: flex-start;
    flex-direction: column;
  }
  .radio-search-tip { align-self: flex-start; }
  .radio-principles { grid-template-columns: 1fr; }
  .radio-overview {
    width: 100%;
    max-width: none;
  }
  .radio-directory-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .radio-category summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .radio-category-count {
    grid-column: 2;
    justify-self: start;
  }
  .radio-category-chevron {
    grid-column: 3;
    grid-row: 1 / 3;
  }
  .command-sync-meta,
  .radio-total { width: 100%; }
  .command-vertical-tree { padding: .7rem; }
  .command-branch-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: .6rem .75rem;
    min-height: 0;
  }
  .command-branch-identity {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    max-width: 95px;
  }
  .command-branch-person {
    grid-column: 2;
    grid-row: 1;
  }
  .command-branch-service {
    grid-column: 2;
    grid-row: 2;
    padding-top: .55rem;
    border-top: 1px solid rgba(126, 155, 192, .12);
  }
  .command-branch-supervisor {
    grid-column: 2;
    grid-row: 3;
    padding-top: .55rem;
    border-top: 1px solid rgba(126, 155, 192, .12);
  }
  .command-branch-toggle,
  .command-branch-end {
    grid-column: 1 / 3;
    grid-row: 4;
    justify-self: stretch;
  }
  .command-branch-children {
    margin-left: 13px;
    padding-left: 18px;
  }
  .command-branch-children > .command-branch-node::before {
    left: -18px;
    width: 18px;
  }
  .command-branch-children > .command-branch-node:last-child::after {
    left: -19px;
  }
  .radio-search { grid-template-columns: 1fr; }
  .radio-code-card { grid-template-columns: minmax(72px, .25fr) 1fr; }
}
.commendation-table td strong,
.commendation-table td small { display: block; }
.commendation-table td small { margin-top: .2rem; }
.commendation-owner { color: var(--muted); font-size: .76rem; }
.commendation-flow-notice { margin-bottom: 1rem; }
.commendation-layout { grid-template-columns: minmax(0, 1.5fr) minmax(330px, .72fr); }
.commendation-citation {
  margin: .75rem 0 1.2rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(217, 179, 74, .22);
  border-left: 3px solid var(--accent);
  border-radius: 9px;
  background: rgba(217, 179, 74, .035);
}
.commendation-citation p { margin: .4rem 0 0; line-height: 1.65; }
.commendation-ledger { display: grid; gap: .7rem; }
.commendation-ledger > h2 { margin-bottom: .2rem; }

.approval-record {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: .75rem;
  padding: .8rem;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, .018);
}

.approval-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--faint);
  font-family: var(--mono);
  font-size: .65rem;
  font-weight: 900;
  margin-top: .12rem;
}

.approval-record .approval-mark {
  display: grid;
  place-items: center;
  line-height: 1;
  text-align: center;
}
.approval-mark.complete {
  border-color: rgba(69, 201, 138, .42);
  background: rgba(69, 201, 138, .1);
  color: var(--ok);
}
.approval-copy {
  min-width: 0;
}
.approval-record small,
.approval-record strong,
.approval-record span,
.approval-record time { display: block; }
.approval-record small {
  color: var(--faint);
  font-size: .62rem;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: .055em;
  overflow-wrap: anywhere;
}
.approval-record strong {
  margin-top: .28rem;
  color: var(--text);
  font-size: .8rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.approval-record .approval-role {
  margin-top: .14rem;
  color: var(--muted);
  font-size: .69rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.approval-record time {
  margin-top: .22rem;
  color: var(--faint);
  font-size: .66rem;
}
.approval-note {
  padding: .75rem .85rem;
  border-left: 2px solid var(--border);
  background: rgba(255, 255, 255, .015);
}
.approval-note strong { color: var(--muted); font-size: .68rem; text-transform: uppercase; }
.approval-note p { margin: .35rem 0 0; font-size: .78rem; }
.command-signature-panel {
  border-color: rgba(217, 179, 74, .46);
  background: linear-gradient(145deg, var(--surface), rgba(217, 179, 74, .065));
}
.commendation-reject > summary { color: var(--danger); }

@media (max-width: 1040px) {
  .commendation-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commendation-layout { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .commendation-overview { grid-template-columns: 1fr; }
  .commendation-metric { min-height: 88px; }
  .commendation-progress { grid-template-columns: 1fr 1fr; }
  .commendation-progress .progress-step:nth-child(2) { border-right: 0; }
  .commendation-progress .progress-step:nth-child(-n+2) { border-bottom: 1px solid var(--border-soft); }
}

.verification-panel {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) minmax(260px, .7fr) auto;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(69, 201, 138, .34);
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(69, 201, 138, .09), rgba(16, 24, 37, .9));
}

.verification-mark,
.verify-seal {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(69, 201, 138, .14);
  color: var(--ok);
  font-weight: 900;
}

.verification-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(69, 201, 138, .4);
  font-size: 1.2rem;
}

.verification-panel h2 {
  margin: .15rem 0;
  font-size: 1rem;
}

.verification-panel p {
  margin: 0;
  font-size: .74rem;
}

.verification-panel dl {
  min-width: 0;
  margin: 0;
}

.verification-panel dl > div {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: .5rem;
  margin: .25rem 0;
}

.verification-panel dt {
  color: var(--muted);
  font-size: .67rem;
}

.verification-panel dd {
  min-width: 0;
  margin: 0;
  font-size: .7rem;
}

.verification-hash,
.verify-hash {
  overflow-wrap: anywhere;
}

.version-entry {
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: rgba(255, 255, 255, .014);
}

.version-entry + .version-entry {
  margin-top: .45rem;
}

.version-entry > summary {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .65rem;
  padding: .6rem .7rem;
  cursor: pointer;
}

.version-entry > summary small {
  color: var(--muted);
}

.version-entry > p,
.version-diff {
  margin: 0 .7rem .7rem;
}

.version-diff {
  display: grid;
  gap: .45rem;
}

.version-diff > div {
  display: grid;
  grid-template-columns: minmax(120px, .55fr) 1fr 1fr;
  gap: .6rem;
  padding: .55rem;
  border-radius: 7px;
  background: var(--bg-2);
  font-size: .72rem;
}

.diff-before,
.diff-after {
  padding-left: .5rem;
  overflow-wrap: anywhere;
  border-left: 2px solid var(--danger);
  color: #e9a1a7;
}

.diff-after {
  border-color: var(--ok);
  color: #8fe0b8;
}

.verify-shell {
  min-height: calc(100vh - 230px);
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

.verify-card {
  width: min(680px, 100%);
  padding: clamp(1.2rem, 4vw, 2.4rem);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(145deg, var(--surface), #0c1420);
  box-shadow: var(--shadow);
  text-align: center;
}

.verify-seal {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border: 2px solid rgba(69, 201, 138, .42);
  font-size: 2rem;
}

.verify-invalid .verify-seal {
  border-color: rgba(240, 100, 112, .45);
  background: rgba(240, 100, 112, .12);
  color: var(--danger);
}

.verify-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  margin: 1.25rem 0;
  text-align: left;
}

.verify-details > div {
  padding: .7rem;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: rgba(255, 255, 255, .018);
}

.verify-details dt {
  margin-bottom: .3rem;
  color: var(--muted);
  font-size: .67rem;
  text-transform: uppercase;
}

.verify-details dd {
  margin: 0;
}

.verify-code {
  margin: 1.2rem 0;
  color: var(--accent);
}

@media (max-width: 920px) {
  .verification-panel {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .verification-panel dl,
  .verification-panel .btn-ghost {
    grid-column: 2;
  }
}

@media (max-width: 620px) {
  .document-progress {
    grid-template-columns: 1fr 1fr;
  }

  .progress-step:nth-child(2) {
    border-right: 0;
  }

  .progress-step:nth-child(-n+2) {
    border-bottom: 1px solid var(--border-soft);
  }

  .version-entry > summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .version-diff > div,
  .verify-details {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .top-eyebrow {
    display: none;
  }

  .topbar .btn-sm {
    min-height: 34px;
    padding-inline: .65rem;
    font-size: .7rem;
  }

  .command-stats {
    grid-template-columns: 1fr;
  }

  .command-stat {
    min-height: 98px;
  }

  .priority-item,
  .activity-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .priority-meta {
    grid-column: 2;
  }

  .dashboard-mini-stats {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ---------- Centrum pracy, wyszukiwanie i niezawodność ---------- */

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.nav-count {
  min-width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  margin-left: auto;
  padding: 0 .3rem;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: .62rem;
  font-weight: 800;
}

.top-search {
  min-width: 230px;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .45rem .55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(7, 14, 24, .7);
  color: var(--muted);
  cursor: pointer;
}

.top-search:hover {
  border-color: #415673;
  color: var(--text);
}

.top-search .nav-icon-wrap {
  width: 1.3rem;
  height: 1.3rem;
  border: 0;
  background: transparent;
}

.top-search kbd {
  margin-left: auto;
  padding: .15rem .38rem;
  border: 1px solid var(--border);
  border-bottom-color: #50627a;
  border-radius: 5px;
  background: var(--surface);
  color: var(--faint);
  font: 700 .65rem/1.2 inherit;
}

.task-bell {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(7, 14, 24, .7);
  color: var(--muted);
}

.task-bell:hover {
  color: var(--accent);
  border-color: rgba(225, 185, 78, .45);
}

.task-bell > span {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--bg-2);
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: .58rem;
  font-weight: 800;
}

.command-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  padding: min(13vh, 7rem) 1rem 1rem;
  background: rgba(2, 7, 13, .78);
  backdrop-filter: blur(9px);
}

body.command-open {
  overflow: hidden;
}

.command-dialog {
  width: min(760px, 100%);
  max-height: min(680px, 78vh);
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #34475f;
  border-radius: 16px;
  background: #0c1421;
  box-shadow: 0 34px 100px rgba(0, 0, 0, .58), 0 0 0 1px rgba(225, 185, 78, .05);
}

.command-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border-soft);
}

.command-head .nav-icon {
  color: var(--accent);
}

.command-head input {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.02rem;
  box-shadow: none;
}

.command-head input:focus {
  outline: 0;
  box-shadow: none;
}

.command-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.command-results {
  min-height: 180px;
  overflow-y: auto;
  padding: .7rem;
}

.command-results h3 {
  margin: .65rem .55rem .35rem;
  color: var(--faint);
  font-size: .63rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.command-result {
  min-height: 58px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  padding: .65rem .75rem;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--text);
}

.command-result:hover,
.command-result:focus {
  border-color: var(--border);
  background: var(--surface-2);
}

.command-result-type {
  color: var(--accent);
  font-size: .67rem;
  font-weight: 800;
  text-transform: uppercase;
}

.command-result strong,
.command-result small {
  display: block;
}

.command-result small {
  margin-top: .18rem;
  color: var(--muted);
  font-size: .76rem;
}

.command-hint {
  padding: 2.4rem 1rem;
  color: var(--muted);
  text-align: center;
}

.command-foot {
  display: flex;
  gap: 1rem;
  padding: .55rem 1rem;
  border-top: 1px solid var(--border-soft);
  color: var(--faint);
  font-size: .65rem;
}

.task-summary {
  display: flex;
  gap: .55rem;
}

.task-summary > span {
  min-width: 90px;
  padding: .65rem .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.task-summary strong {
  color: var(--text);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(290px, .75fr);
  gap: 1rem;
}

.task-list,
.activity-feed,
.search-result-list,
.service-grid {
  display: grid;
  gap: .55rem;
}

.task-card {
  position: relative;
  min-height: 74px;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: .8rem;
  padding: .8rem .9rem .8rem 1rem;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: linear-gradient(100deg, rgba(255, 255, 255, .016), rgba(255, 255, 255, .03));
  color: var(--text);
}

.task-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--blue);
}

.task-card.task-pilne::before { background: var(--danger); }
.task-card.task-wysokie::before { background: var(--review); }
.task-card:hover { border-color: #3a4e68; background: var(--surface-2); }
.task-type { color: var(--accent); font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.task-copy strong, .task-copy small, .task-side small { display: block; }
.task-copy small, .task-side small { margin-top: .25rem; color: var(--muted); font-size: .75rem; }
.task-side { text-align: right; }

.activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: .65rem;
  padding-bottom: .75rem;
}

.activity-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  bottom: -3px;
  width: 1px;
  background: var(--border);
}

.activity-dot {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  margin-top: .28rem;
  border: 2px solid #102039;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 2px rgba(90, 157, 248, .18);
}

.activity-item strong,
.activity-item small,
.activity-item time {
  display: block;
}

.activity-item strong { font-size: .76rem; text-transform: capitalize; }
.activity-item small { margin: .18rem 0; color: var(--muted); font-size: .72rem; }
.activity-item time { color: var(--faint); font-size: .65rem; }

.global-search-page {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  margin-bottom: 1rem;
  padding: .6rem;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}

.global-search-page input {
  min-height: 42px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.search-groups {
  display: grid;
  gap: 1rem;
}

.search-result {
  min-height: 62px;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  align-items: center;
  gap: .8rem;
  padding: .7rem .8rem;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: rgba(255, 255, 255, .015);
  color: var(--text);
}

.search-result:hover { border-color: #40536d; background: var(--surface-2); }
.search-result-type { color: var(--accent); font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.search-result strong, .search-result small { display: block; }
.search-result small { margin-top: .2rem; color: var(--muted); font-size: .75rem; }

.service-card {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  padding: .7rem;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: rgba(255, 255, 255, .015);
}

.service-card strong,
.service-card small { display: block; }
.service-card small { margin-top: .15rem; color: var(--muted); font-size: .7rem; }
.service-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 4px rgba(240, 100, 112, .1); }
.service-dot.online { background: var(--ok); box-shadow: 0 0 0 4px rgba(69, 201, 138, .1); }

.policy-list {
  display: grid;
  gap: .55rem;
}

.policy-list > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--border-soft);
}

.policy-list span { color: var(--muted); text-align: right; }

@media (max-width: 920px) {
  .top-search { min-width: 40px; width: 40px; padding: .45rem; justify-content: center; }
  .top-search > span, .top-search kbd { display: none; }
  .workspace-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .task-card { grid-template-columns: minmax(0, 1fr) auto; }
  .task-type { grid-column: 1 / -1; }
  .search-result, .command-result { grid-template-columns: minmax(0, 1fr) auto; }
  .search-result-type, .command-result-type { grid-column: 1 / -1; }
  .command-foot { display: none; }
  .command-overlay { padding: 3.5rem .5rem .5rem; }
  .global-search-page { grid-template-columns: auto minmax(0, 1fr); }
  .global-search-page .btn-primary { grid-column: 1 / -1; }
}

/* ---------- Profil funkcjonariusza 360° ---------- */

.case-create-layout {
  align-items: start;
}

.case-create-layout > .panel {
  width: 100%;
  margin-bottom: 1rem;
}

.case-classification-info,
.case-security-summary {
  margin: .75rem 0 1rem;
}

[data-case-classification-reason][hidden],
[data-case-classification-info][hidden] {
  display: none !important;
}

.case-classification-info > div,
.case-security-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: .75rem;
  padding: .8rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .018);
}

.case-classification-info p,
.case-security-summary p {
  margin: .2rem 0 0;
}

.case-subject-summary,
.workflow-status-card {
  margin: .75rem 0 1rem;
  padding: .9rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .018);
}

.case-subject-summary p,
.workflow-status-card p {
  margin: .3rem 0 0;
}

.workflow-status-approved {
  border-color: rgba(46, 160, 103, .42);
  background: rgba(46, 160, 103, .07);
}

.workflow-status-final {
  border-color: rgba(217, 179, 74, .42);
  background: linear-gradient(135deg, rgba(217, 179, 74, .08), rgba(46, 160, 103, .045));
}

.case-edit-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.case-edit-fieldset:disabled {
  opacity: .72;
}

.officer-timeline-panel {
  margin-bottom: 1rem;
}

.timeline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: .75rem 0 1rem;
}

.filter-chip {
  min-height: 32px;
  padding: .35rem .7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .018);
  color: var(--muted);
  font: inherit;
  font-size: .7rem;
  font-weight: 700;
  text-transform: capitalize;
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: rgba(225, 185, 78, .5);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- Rejestr poświadczeń, szkoleń i akredytacji ---------- */

.credential-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.credential-filter {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, .32fr) auto auto;
  align-items: end;
  gap: .75rem;
  margin-bottom: 1rem;
}

.credential-filter .field {
  margin: 0;
}

.credential-create-grid {
  align-items: start;
  margin-bottom: 1rem;
}

.credential-create-grid > .workflow-card {
  width: 100%;
  margin: 0;
}

.credential-scope {
  padding: .75rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .018);
}

.credential-scope > summary {
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
}

.credential-scope[open] > summary {
  margin-bottom: .75rem;
}

.credential-register {
  margin-bottom: 1rem;
}

.credential-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: .75rem;
}

.credential-card {
  min-width: 0;
  align-self: start;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(18, 27, 42, .97), rgba(10, 17, 28, .97));
  box-shadow: inset 3px 0 0 rgba(225, 185, 78, .38);
  overflow: hidden;
  transition: border-color .16s ease, background .16s ease;
}

.credential-card-qualification {
  box-shadow: inset 3px 0 0 rgba(74, 144, 226, .55);
}

.credential-card[open] {
  border-color: rgba(225, 185, 78, .3);
}

.credential-card-qualification[open] {
  border-color: rgba(90, 157, 248, .35);
}

.credential-card-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: .75rem;
  min-height: 82px;
  padding: .85rem 1rem;
  list-style: none;
  cursor: pointer;
  transition: background .14s ease;
}

.credential-card-summary::-webkit-details-marker {
  display: none;
}

.credential-card-summary:hover {
  background: rgba(255, 255, 255, .025);
}

.credential-card-summary::after {
  content: "›";
  color: var(--faint);
  font-size: 1.25rem;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform .16s ease, color .16s ease;
}

.credential-card[open] > .credential-card-summary {
  background: rgba(255, 255, 255, .018);
}

.credential-card[open] > .credential-card-summary::after {
  color: var(--accent);
  transform: rotate(90deg);
}

.credential-card-summary > :first-child {
  display: grid;
  min-width: 0;
  gap: .16rem;
}

.credential-card-title {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: .91rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credential-summary-person {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: .68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credential-card-summary > .badge,
.credential-card-summary > .badge-stack {
  justify-self: end;
}

.credential-card-body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border-soft);
}

.credential-card-body > .credential-person {
  margin-top: 0;
  padding-top: .8rem;
  border-top: 0;
}

.density-compact .credential-card {
  min-height: 0;
  padding: 0;
  border-radius: 9px;
}

.density-compact .credential-card-summary {
  min-height: 68px;
  padding: .62rem .75rem;
}

.credential-card-head,
.credential-person,
.credential-actions,
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
}

.credential-card-head {
  align-items: flex-start;
}

.credential-card-head h3 {
  margin: .2rem 0 0;
  font-size: .98rem;
  overflow-wrap: anywhere;
}

.credential-type {
  display: block;
  color: var(--faint);
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.credential-person {
  align-items: flex-start;
  flex-direction: column;
  margin-top: .8rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border-soft);
}

.credential-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
  margin: .85rem 0 0;
}

.credential-meta > div {
  min-width: 0;
  padding: .55rem .65rem;
  border: 1px solid rgba(122, 145, 177, .12);
  border-radius: 8px;
  background: rgba(0, 0, 0, .12);
}

.credential-meta dt {
  margin-bottom: .18rem;
  color: var(--faint);
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.credential-meta dd {
  margin: 0;
  color: var(--text);
  font-size: .76rem;
  overflow-wrap: anywhere;
}

.credential-expiring {
  color: var(--accent) !important;
  font-weight: 800;
}

.credential-note,
.credential-alert {
  margin: .75rem 0 0;
  padding: .65rem .75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.credential-alert {
  border: 1px solid rgba(224, 85, 99, .28);
  background: rgba(224, 85, 99, .07);
  color: #e7a2aa;
}

.credential-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: .85rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border-soft);
}

.credential-editor {
  position: relative;
}

.credential-editor > summary {
  list-style: none;
  padding: .45rem .65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 750;
  cursor: pointer;
}

.credential-editor > summary::-webkit-details-marker {
  display: none;
}

.credential-editor[open] {
  flex-basis: 100%;
  width: 100%;
  margin-top: .35rem;
  padding: .8rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(2, 8, 16, .55);
}

.credential-editor[open] > summary {
  display: inline-flex;
  margin-bottom: .75rem;
  color: var(--accent);
}

.credential-profile-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: .8rem 0 1rem;
}

.credential-profile-summary span {
  padding: .5rem .7rem;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  color: var(--muted);
  font-size: .72rem;
}

.credential-profile-summary strong {
  color: var(--text);
}

.credential-profile-sections {
  display: grid;
  gap: 1.2rem;
}

.section-title-row {
  margin-bottom: .65rem;
}

.section-title-row h3 {
  margin: 0;
  font-size: .88rem;
}

.credential-history-panel {
  margin-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.credential-history-panel > summary {
  padding: 1rem 0 0;
  color: var(--accent);
  font-size: .76rem;
  font-weight: 800;
  cursor: pointer;
}

.credential-history-register {
  padding: 0;
  overflow: hidden;
}

.credential-section-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: .75rem;
  min-height: 72px;
  padding: .9rem 1.15rem;
  list-style: none;
  cursor: pointer;
}

.credential-section-summary::-webkit-details-marker {
  display: none;
}

.credential-section-summary::after {
  content: "›";
  color: var(--faint);
  font-size: 1.3rem;
  line-height: 1;
  transition: transform .16s ease, color .16s ease;
}

.credential-history-register[open] > .credential-section-summary {
  border-bottom: 1px solid var(--border-soft);
}

.credential-history-register[open] > .credential-section-summary::after {
  color: var(--accent);
  transform: rotate(90deg);
}

.credential-section-summary h2,
.credential-section-summary .page-kicker {
  margin-bottom: 0;
}

.credential-section-summary h2 {
  padding-left: .65rem;
  border-left: 3px solid var(--accent);
  color: #f1f5fa;
  font-size: 1rem;
}

.credential-section-summary .page-kicker {
  margin-bottom: .22rem;
}

.credential-history-register-body {
  padding: 0 1.15rem .75rem;
}

.credential-history {
  display: grid;
  margin-top: .75rem;
}

.credential-history article {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: .7rem;
  align-items: center;
  min-height: 58px;
  padding: .55rem .2rem;
  border-bottom: 1px solid var(--border-soft);
}

.credential-history article:last-child {
  border-bottom: 0;
}

.credential-history article > div {
  display: grid;
  gap: .15rem;
}

.credential-history article strong {
  font-size: .76rem;
  text-transform: capitalize;
}

.credential-history article small {
  color: var(--muted);
  font-size: .69rem;
  overflow-wrap: anywhere;
}

@media (max-width: 1120px) {
  .credential-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .credential-filter {
    grid-template-columns: 1fr 1fr;
  }

  .credential-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .credential-stats,
  .credential-filter,
  .credential-meta {
    grid-template-columns: 1fr;
  }

  .credential-filter .btn-primary,
  .credential-filter .btn-ghost {
    width: 100%;
  }

  .credential-history article {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .credential-history article > .muted {
    grid-column: 2;
  }
}

/* ---------- Komunikacja wewnętrzna i panel bota ---------- */

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 38px;
  padding: .56rem .78rem;
  border: 1px solid #2a3b51;
  border-radius: 8px;
  color: #c7d4e4;
  background: #101b2a;
  font-size: .72rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: #4a617e;
  color: #fff;
  background: #152235;
}

.btn-secondary.btn-sm {
  min-height: 30px;
  padding: .38rem .58rem;
  font-size: .65rem;
}

.communication-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.communication-page-head .btn-secondary .action-icon {
  width: 16px;
  height: 16px;
}

.communication-layout,
.bot-control-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.communication-side-stack {
  display: grid;
  gap: 1rem;
}

.communication-compose-panel,
.bot-compose-panel,
.communication-ledger,
.bot-queue-panel {
  margin-bottom: 0;
}

.communication-form,
.bot-message-form {
  display: grid;
  gap: 1rem;
}

.communication-form .field,
.bot-message-form .field {
  margin-bottom: 0;
}

.form-grid {
  display: grid;
  gap: .8rem;
}

.form-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.communication-fieldset {
  min-width: 0;
  margin: 0;
  padding: .9rem;
  border: 1px solid rgba(111, 137, 168, .2);
  border-radius: 10px;
  background: rgba(5, 11, 19, .24);
}

.communication-fieldset legend {
  padding: 0 .45rem;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
}

.audience-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.choice-card {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}

.choice-card > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.choice-card > span {
  position: relative;
  display: block;
  min-height: 76px;
  padding: .78rem .85rem .78rem 2.45rem;
  border: 1px solid rgba(111, 137, 168, .19);
  border-radius: 9px;
  background: rgba(10, 18, 30, .72);
  transition: border-color .15s ease, background .15s ease;
}

.choice-card > span::before {
  content: "";
  position: absolute;
  top: .9rem;
  left: .85rem;
  display: block;
  width: 12px;
  height: 12px;
  border: 2px solid #526984;
  border-radius: 50%;
}

.choice-card > input:checked + span {
  border-color: rgba(225, 185, 78, .55);
  background: rgba(225, 185, 78, .07);
}

.choice-card > input:checked + span::before {
  border-color: #e1b94e;
  box-shadow: inset 0 0 0 3px #0d1827;
  background: #e1b94e;
}

.choice-card > input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.choice-card strong,
.choice-card small {
  display: block;
}

.choice-card strong {
  color: #edf3fa;
  font-size: .76rem;
}

.choice-card small {
  margin-top: .25rem;
  color: var(--muted);
  font-size: .65rem;
  line-height: 1.4;
}

.audience-targets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin-top: .8rem;
}

.audience-targets[hidden] {
  display: none;
}

.audience-target-column {
  min-width: 0;
  padding: .75rem;
  border: 1px solid rgba(111, 137, 168, .15);
  border-radius: 9px;
  background: rgba(7, 13, 22, .38);
}

.field-head {
  margin-bottom: .55rem;
}

.field-head strong,
.field-head small {
  display: block;
}

.field-head strong {
  color: #e9eff7;
  font-size: .74rem;
}

.field-head small {
  margin-top: .2rem;
  color: var(--muted);
  font-size: .61rem;
  line-height: 1.4;
}

.target-check-list {
  display: grid;
  gap: .3rem;
  max-height: 310px;
  overflow-y: auto;
  padding-right: .2rem;
}

.target-check-list label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: .55rem;
  min-height: 40px;
  margin: 0;
  padding: .42rem .5rem;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #c8d4e3;
  background: rgba(13, 23, 36, .65);
  font-size: .68rem;
  cursor: pointer;
}

.target-check-list label:hover {
  border-color: rgba(111, 137, 168, .24);
}

.target-check-list input,
.stable-check input {
  position: relative;
  appearance: none;
  width: 17px;
  height: 17px;
  margin: 0;
  border: 1px solid #455b76;
  border-radius: 5px;
  background: #091321;
  transform: none !important;
  transition: border-color .12s ease, background .12s ease;
}

.target-check-list input:checked,
.stable-check input:checked {
  border-color: #36b97e;
  background: #168153;
}

.target-check-list input:checked::after,
.stable-check input:checked::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 7px;
  height: 4px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: rotate(-45deg);
}

.target-check-list input:focus-visible,
.stable-check input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.target-check-list label > span strong,
.target-check-list label > span small {
  display: block;
}

.target-check-list label > span small {
  margin-top: .1rem;
  color: var(--muted);
  font-size: .58rem;
}

.stable-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
  margin: 0;
  padding: .72rem .78rem;
  border: 1px solid rgba(111, 137, 168, .18);
  border-radius: 9px;
  background: rgba(7, 13, 22, .34);
  cursor: pointer;
}

.stable-check-mark {
  display: none;
}

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

.stable-check strong {
  color: #eaf0f8;
  font-size: .72rem;
}

.stable-check small {
  margin-top: .16rem;
  color: var(--muted);
  font-size: .62rem;
}

.communication-guidance h2,
.configured-channel-panel h2,
.discord-preview-panel h2 {
  margin: .2rem 0 .65rem;
  font-size: .96rem;
}

.communication-guidance ol {
  margin: .65rem 0 0;
  padding-left: 1.15rem;
}

.communication-guidance li {
  margin: .5rem 0;
  color: #aebed1;
  font-size: .7rem;
  line-height: 1.5;
}

.announcement-admin-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
}

.announcement-admin-card {
  --announcement-color: #4d91e8;
  padding: .82rem;
  border: 1px solid rgba(111, 137, 168, .18);
  border-left: 3px solid var(--announcement-color);
  border-radius: 9px;
  background: rgba(9, 17, 28, .62);
}

.announcement-admin-card.is-archived {
  opacity: .62;
}

.announcement-admin-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: .7rem;
}

.announcement-admin-card h3 {
  margin: .18rem 0 0;
  color: #edf3fa;
  font-size: .86rem;
}

.announcement-tone {
  color: var(--announcement-color);
  font-size: .57rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.announcement-admin-card > .prose {
  margin: .65rem 0;
  color: #b8c6d7;
  font-size: .71rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.announcement-admin-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
  margin: 0 0 .7rem;
}

.announcement-admin-meta div {
  min-width: 0;
  padding: .48rem;
  border-radius: 7px;
  background: rgba(4, 10, 17, .35);
}

.announcement-admin-meta dt {
  color: #627d9e;
  font-size: .54rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.announcement-admin-meta dd {
  margin: .18rem 0 0;
  overflow-wrap: anywhere;
  color: #c5d1df;
  font-size: .64rem;
  line-height: 1.4;
}

.announcement-admin-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .75rem;
  padding-top: .7rem;
  border-top: 1px solid var(--border-soft);
}

.announcement-admin-actions form {
  margin: 0;
}

.announcement-edit-layout .communication-compose-panel {
  min-width: 0;
}

.announcement-edit-actions {
  align-items: center;
  flex-wrap: wrap;
}

.announcement-informacja { --announcement-color: #4d91e8; }
.announcement-ważne { --announcement-color: #d9b34a; }
.announcement-pilne { --announcement-color: #e45f6b; }
.announcement-sukces { --announcement-color: #36b97e; }

.dashboard-announcements {
  margin-bottom: 1rem;
  padding: .9rem;
  border: 1px solid rgba(111, 137, 168, .2);
  border-radius: var(--radius);
  background: rgba(12, 20, 32, .9);
}

.dashboard-announcements-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .7rem;
}

.dashboard-announcements-head h2 {
  margin: .18rem 0 0;
  font-size: 1rem;
}

.dashboard-announcement-list {
  display: grid;
  gap: .55rem;
}

.dashboard-announcement {
  --announcement-color: #4d91e8;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: .72rem;
  align-items: start;
  padding: .72rem;
  border: 1px solid color-mix(in srgb, var(--announcement-color) 25%, transparent);
  border-left: 3px solid var(--announcement-color);
  border-radius: 9px;
  background: color-mix(in srgb, var(--announcement-color) 4%, rgba(7, 14, 24, .82));
}

.dashboard-announcement-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  color: var(--announcement-color);
  background: color-mix(in srgb, var(--announcement-color) 10%, transparent);
}

.dashboard-announcement-mark .action-icon {
  width: 16px;
  height: 16px;
}

.dashboard-announcement-meta {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  color: #6f86a2;
  font-size: .57rem;
}

.dashboard-announcement-meta span:first-child {
  color: var(--announcement-color);
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dashboard-announcement-copy h3 {
  margin: .22rem 0;
  color: #f0f4fa;
  font-size: .84rem;
}

.dashboard-announcement-copy > .prose {
  margin: 0;
  color: #bcc9d9;
  font-size: .71rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.dashboard-announcement-copy > small {
  display: block;
  margin-top: .35rem;
  color: #6f84a0;
  font-size: .59rem;
}

.dashboard-announcement-action {
  align-self: center;
}

.announcement-read {
  display: block;
  max-width: 150px;
  color: #36b97e;
  font-size: .61rem;
  text-align: right;
}

.bot-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .7rem;
  margin-bottom: 1rem;
}

.bot-status-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: .65rem;
  align-items: center;
  min-height: 90px;
  padding: .75rem;
  border: 1px solid rgba(111, 137, 168, .18);
  border-radius: 10px;
  background: rgba(12, 20, 32, .9);
}

.bot-status-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  color: #8296af;
  background: rgba(130, 150, 175, .1);
}

.bot-status-card.is-online .bot-status-icon,
.bot-status-icon.sent {
  color: #36b97e;
  background: rgba(54, 185, 126, .1);
}

.bot-status-card.is-offline .bot-status-icon,
.bot-status-icon.failed {
  color: #e45f6b;
  background: rgba(228, 95, 107, .1);
}

.bot-status-icon.queued {
  color: #d9b34a;
  background: rgba(217, 179, 74, .1);
}

.bot-status-icon .action-icon {
  width: 18px;
  height: 18px;
}

.bot-status-card small,
.bot-status-card strong,
.bot-status-card span {
  display: block;
}

.bot-status-card small {
  color: #65809f;
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.bot-status-card strong {
  margin-top: .18rem;
  color: #edf2f9;
  font-size: .86rem;
}

.bot-status-card span {
  margin-top: .15rem;
  color: var(--muted);
  font-size: .59rem;
}

.bot-color-field {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: .45rem;
}

.bot-color-field input[type="color"] {
  width: 44px;
  height: 42px;
  padding: 3px;
  cursor: pointer;
}

.discord-message-preview {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: .65rem;
  padding: .8rem;
  border: 1px solid #25272c;
  border-radius: 9px;
  background: #313338;
  color: #dbdee1;
  font-family: "Segoe UI", sans-serif;
}

.discord-bot-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #17345c;
}

.discord-bot-avatar .action-icon {
  width: 20px;
  height: 20px;
}

.discord-author {
  display: flex;
  gap: .35rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: .7rem;
}

.discord-author strong {
  color: #f2f3f5;
}

.discord-author span {
  padding: .08rem .25rem;
  border-radius: 3px;
  color: #fff;
  background: #5865f2;
  font-size: .47rem;
  font-weight: 800;
}

.discord-author time {
  color: #949ba4;
  font-size: .54rem;
}

.discord-plain-content {
  margin: .25rem 0;
  color: #dbdee1;
  font-size: .68rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.discord-embed-preview {
  min-width: 0;
  margin-top: .35rem;
  padding: .68rem .72rem;
  border-left: 4px solid #d9b34a;
  border-radius: 4px;
  background: #2b2d31;
}

.discord-embed-preview strong {
  display: block;
  color: #f2f3f5;
  font-size: .75rem;
  overflow-wrap: anywhere;
}

.discord-embed-preview p {
  margin: .3rem 0;
  color: #dbdee1;
  font-size: .66rem;
  line-height: 1.48;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.discord-embed-preview small {
  display: block;
  padding-top: .35rem;
  color: #b5bac1;
  font-size: .54rem;
}

.configured-channel-list {
  display: grid;
  gap: .35rem;
}

.configured-channel-list > div {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: .08rem .5rem;
  align-items: center;
  padding: .52rem;
  border-radius: 7px;
  background: rgba(7, 13, 22, .42);
}

.configured-channel-list .status-dot {
  grid-row: 1 / 3;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.configured-channel-list .status-dot.online {
  background: #36b97e;
  box-shadow: 0 0 8px rgba(54, 185, 126, .4);
}

.configured-channel-list .status-dot.offline {
  background: #e45f6b;
}

.configured-channel-list strong {
  color: #d9e2ed;
  font-size: .67rem;
}

.configured-channel-list small {
  color: #7187a3;
  font-family: var(--mono);
  font-size: .55rem;
}

.configured-channel-panel > .tiny {
  margin: .7rem 0 0;
  line-height: 1.45;
}

.bot-queue-table td > small {
  display: block;
  margin-top: .16rem;
  color: var(--muted);
  font-size: .57rem;
}

.bot-queue-status.status-queued,
.bot-queue-status.status-processing {
  color: #e5bd54;
  background: rgba(217, 179, 74, .12);
}

.bot-queue-status.status-sent {
  color: #49c98b;
  background: rgba(54, 185, 126, .12);
}

.bot-queue-status.status-failed {
  color: #ef7b86;
  background: rgba(228, 95, 107, .12);
}

.bot-queue-status.status-cancelled {
  color: #94a4b8;
  background: rgba(130, 148, 173, .12);
}

.bot-queue-error {
  max-width: 260px;
  color: #e9828c !important;
  overflow-wrap: anywhere;
}

.table-actions form {
  margin: 0;
}

@media (max-width: 1100px) {
  .bot-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .communication-layout,
  .bot-control-layout {
    grid-template-columns: 1fr;
  }

  .communication-side-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .communication-page-head,
  .dashboard-announcements-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid-2,
  .audience-mode-grid,
  .audience-targets,
  .announcement-admin-list,
  .communication-side-stack {
    grid-template-columns: 1fr;
  }

  .dashboard-announcement {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .dashboard-announcement-action {
    grid-column: 2;
    justify-self: start;
  }

  .announcement-read {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 520px) {
  .bot-status-grid,
  .announcement-admin-meta {
    grid-template-columns: 1fr;
  }
}

.officer-timeline {
  display: grid;
  gap: .45rem;
}

.timeline-entry {
  --timeline-color: var(--accent);
  min-height: 72px;
  display: grid;
  grid-template-columns: 132px 3px minmax(0, 1fr) auto;
  align-items: center;
  gap: .9rem;
  padding: .65rem .75rem .65rem .45rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(4, 12, 22, .22);
  transition: border-color .16s ease, background-color .16s ease;
}

.timeline-entry:hover {
  border-color: var(--border-soft);
  background: rgba(255, 255, 255, .018);
}

.timeline-entry[data-timeline-type*="kwalifik" i] {
  --timeline-color: #5da9ff;
}

.timeline-entry[data-timeline-type*="pochwa" i] {
  --timeline-color: #35c98a;
}

.timeline-entry[data-timeline-type*="skarg" i],
.timeline-entry[data-timeline-type*="dyscypl" i] {
  --timeline-color: #e96572;
}

.timeline-entry[data-timeline-type*="kontrol" i] {
  --timeline-color: #9c8cff;
}

.timeline-entry[data-timeline-type*="dokument" i] {
  --timeline-color: #63c4d6;
}

.timeline-entry time {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  min-height: 34px;
  padding: .35rem .55rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(3, 10, 19, .42);
  color: var(--muted);
  font-size: .7rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
}

.timeline-accent {
  align-self: stretch;
  width: 3px;
  min-height: 48px;
  border-radius: 999px;
  background: var(--timeline-color);
}

.timeline-marker {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: 10px;
  height: 10px;
  border: 2px solid #0f1d30;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(225, 185, 78, .12);
}

.timeline-entry-copy {
  min-width: 0;
}

.timeline-entry-copy strong,
.timeline-entry-copy small {
  display: block;
}

.timeline-entry-copy a {
  color: var(--text);
}

.timeline-entry-copy a:hover {
  color: var(--accent);
}

.timeline-entry-copy small {
  margin-top: .18rem;
  color: var(--muted);
  font-size: .74rem;
}

.timeline-kind {
  display: block;
  margin-bottom: .18rem;
  color: var(--timeline-color);
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.timeline-empty {
  display: grid;
  grid-template-columns: 3px minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  min-height: 96px;
  margin-top: .85rem;
  padding: 1rem 1.15rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: rgba(4, 12, 22, .2);
}

.timeline-empty-accent {
  align-self: stretch;
  min-height: 48px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), rgba(225, 185, 78, .16));
}

.timeline-empty > div {
  display: grid;
  gap: .2rem;
}

.timeline-empty strong {
  color: var(--text);
  font-size: .8rem;
}

.timeline-empty small {
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.45;
}

@media (max-width: 700px) {
  .timeline-entry {
    grid-template-columns: 3px minmax(0, 1fr) auto;
    align-items: start;
    column-gap: .75rem;
    row-gap: .45rem;
    padding: .7rem;
  }

  .timeline-entry time {
    grid-column: 2 / -1;
    grid-row: 1;
    justify-self: start;
    min-height: 28px;
    padding: .25rem .45rem;
    text-align: left;
    white-space: normal;
  }

  .timeline-accent {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .timeline-entry-copy {
    grid-column: 2;
    grid-row: 2;
  }

  .timeline-entry > .badge {
    grid-column: 3;
    grid-row: 2;
    align-self: start;
  }
}

@media (max-width: 520px) {
  .timeline-entry {
    grid-template-columns: 3px minmax(0, 1fr);
  }

  .timeline-entry > .badge {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .credential-card-summary {
    grid-template-columns: minmax(0, 1fr) 16px;
    min-height: 70px;
  }

  .credential-card-summary > .badge,
  .credential-card-summary > .badge-stack {
    grid-column: 1;
    justify-self: start;
  }

  .credential-card-summary > .badge-stack {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .credential-card-summary::after {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .credential-section-summary {
    grid-template-columns: minmax(0, 1fr) 16px;
  }

  .credential-section-summary > .badge {
    grid-column: 1;
    justify-self: start;
  }

  .credential-section-summary::after {
    grid-column: 2;
    grid-row: 1 / 3;
  }
}
