.stage-ribbon {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 36px;
  padding: 6px 12px;
  background: #f0b429;
  color: #1a1405;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-align: center;
}
.stage-ribbon a { color: #1a1405; text-decoration: underline; }
.stage-ribbon.hidden { display: none; }
body.has-stage-ribbon { --stage-ribbon-offset: 36px; }

:root {
  color-scheme: light;
  --ink: #111827;
  --text: #172033;
  --muted: #657386;
  --line: #d9e1ec;
  --paper: #ffffff;
  --wash: #f4f7fb;
  --blue: #1f78d1;
  --blue-soft: #dcefff;
  --green: #1d7f5a;
  --green-soft: #ddf2e8;
  --red: #d92d42;
  --red-soft: #f8d7dd;
  --amber: #b7791f;
  --amber-soft: #fff3d6;
  --shadow: 0 8px 26px rgba(17, 24, 39, 0.08);
  --sidebar: #111827;
  --hover: #f5faff;
  --soft-panel: #fbfdff;
  /* Premium B tokens (design.md) — optional accent layer */
  --accent-premium: #c9a227;
  --surface-premium: #1a1a22;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f0f4fa;
  --text: #dbe5f1;
  --muted: #9aabc0;
  --line: #344255;
  --paper: #182230;
  --wash: #0e1621;
  --blue: #63aef2;
  --blue-soft: #183b59;
  --green: #5bd19e;
  --green-soft: #173d31;
  --red: #ff7180;
  --red-soft: #4b2028;
  --amber: #f3bd62;
  --amber-soft: #49381a;
  --shadow: 0 8px 26px rgba(0, 0, 0, 0.24);
  --sidebar: #080d14;
  --hover: #223247;
  --soft-panel: #141e2b;
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

.training-downloads {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft-panel);
}

.training-downloads h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.training-download-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.training-download {
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--text);
  text-decoration: none;
}

.training-download:hover {
  border-color: var(--blue);
  background: var(--hover);
}

.training-download strong,
.training-download small {
  display: block;
}

.training-download small {
  margin-top: 4px;
  color: var(--muted);
}

.training-access-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft-panel);
}

.training-access-card + .training-access-card {
  margin-top: 12px;
}

.training-access-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.training-access-head small {
  color: var(--muted);
}

.training-access-users {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.training-access-users label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.owner-kpi-simple {
  border: 1px solid rgba(31, 120, 209, 0.25);
  background: linear-gradient(135deg, var(--paper), var(--soft-panel));
}

.owner-kpi-simple-head strong {
  color: var(--muted);
  font-size: 13px;
}

.owner-kpi-simple-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 10px;
}

.owner-kpi-details {
  margin: 14px 0 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
}

.owner-kpi-details > summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 650;
  list-style: none;
}

.owner-kpi-details > summary::-webkit-details-marker {
  display: none;
}

.owner-kpi-simple-grid-secondary {
  margin-top: 10px;
  opacity: 0.96;
}

.owner-kpi-card {
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.04);
}

.owner-kpi-card span,
.owner-kpi-card small {
  display: block;
  color: var(--muted);
}

.owner-kpi-card span {
  font-weight: 700;
  font-size: 12px;
}

.owner-kpi-card strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1;
}

.owner-kpi-card.good {
  border-color: rgba(29, 127, 90, 0.35);
  background: var(--green-soft);
}

.owner-kpi-card.warn {
  border-color: rgba(183, 121, 31, 0.35);
  background: var(--amber-soft);
}

.owner-kpi-card.bad {
  border-color: rgba(217, 45, 66, 0.35);
  background: var(--red-soft);
}

.qb-metric-card {
  display: grid;
  gap: 6px;
  align-content: start;
}

.qb-metric-card__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.qb-metric-card__ours {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 750;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.qb-metric-card__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0;
}

.qb-metric-card__meta dt {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.qb-metric-card__meta dd {
  margin: 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.qb-metric-card__source,
.qb-metric-card small {
  font-size: 11px;
  color: var(--muted);
}

.qb-metric-card__edit {
  min-height: 44px;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 650;
}

.qb-metric-card--adjusted {
  border-color: color-mix(in srgb, var(--qb-accent, #00e5a0) 45%, var(--line));
}

.qb-metric-card--empty .qb-metric-card__ours {
  color: var(--muted);
}

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

.metric-adjust-modal.hidden {
  display: none;
}

.metric-adjust-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.metric-adjust-card {
  position: relative;
  z-index: 1;
  width: min(440px, calc(100vw - 32px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  display: grid;
  gap: 12px;
}

.metric-adjust-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.profit-month-label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.profit-cost-input {
  width: 100%;
  min-height: 44px;
}

.training-role-ladder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.training-role-ladder__item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  display: grid;
  gap: 4px;
}

.training-role-ladder__item strong {
  font-size: 13px;
}

.training-role-ladder__item span,
.training-role-ladder__item small {
  color: var(--muted);
  font-size: 12px;
}

.staff-training-progress {
  margin-top: 12px;
}

.owner-kpi-insights {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.owner-kpi-insights div {
  padding: 10px 12px;
  border-left: 4px solid var(--blue);
  border-radius: 10px;
  background: var(--paper);
  color: var(--text);
}

.kpi-data-guide {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(29, 127, 90, 0.25);
  background: var(--paper);
}

.kpi-data-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi-data-guide-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--green-soft);
}

.kpi-data-guide-grid article.kpi-data-guide-value {
  background: var(--paper);
  border-color: rgba(31, 120, 209, 0.28);
}

.kpi-data-guide-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 13px;
}

.kpi-data-guide-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.kpi-guide-number {
  margin: 2px 0 8px;
  color: var(--ink);
  font-size: 32px;
  line-height: 1;
  font-weight: 800;
}

@media (max-width: 920px) {
  .kpi-data-guide-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 921px) and (max-width: 1180px) {
  .kpi-data-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--wash);
  color: var(--text);
  font-family: Aptos, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
}

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

/* Верхняя панель — 2 строки: бренд/юзер + навигация */
.app-header {
  position: sticky;
  top: 0;
  z-index: 80;
  overflow: visible;
  background: var(--sidebar);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

.app-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 16px;
  min-height: 52px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-header-start {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-width: 0;
}

.app-header-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 10px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.user-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
  justify-content: flex-end;
}

.brand-compact .brand-text {
  min-width: 0;
}

.side {
  background: var(--sidebar);
  color: #fff;
}

.brand-compact {
  padding: 0;
  border-bottom: 0;
  gap: 10px;
}

.brand-compact .brand-mark {
  width: 36px;
  height: 36px;
  font-size: 13px;
}

.brand-compact .brand-title {
  font-size: 15px;
  line-height: 1.1;
}

.brand-compact .brand-subtitle {
  font-size: 11px;
}

.club-picker-inline {
  padding: 0;
  gap: 0;
  min-width: 0;
}

.club-picker-inline select {
  width: auto;
  min-width: 130px;
  max-width: 200px;
  height: 36px;
  font-size: 12px;
}

@media (min-width: 1025px) {
  .top-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    min-height: 44px;
    padding: 6px 12px;
    overflow: visible;
    position: relative;
    z-index: 2;
  }
}

@media (max-width: 1024px) {
  .top-nav.qb-top-nav {
    width: min(320px, 92vw);
    min-height: 0;
    padding: 10px 8px 24px;
  }
}

.top-nav::-webkit-scrollbar {
  height: 4px;
}

.top-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.tabs {
  display: flex;
  gap: 4px;
}

.nav-group {
  position: relative;
  flex: 0 0 auto;
}

.nav-group[open] {
  z-index: 220;
}

.nav-group > summary {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  user-select: none;
}

.nav-group > summary:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.nav-group > summary::-webkit-details-marker {
  display: none;
}

.nav-group > summary::after {
  content: "▾";
  margin-left: 6px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
}

.nav-group:not([open]) > summary::after {
  content: "▾";
}

.nav-group.has-active > summary,
.nav-group.active > summary {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-group-finance > summary,
.nav-group-settings > summary,
.nav-group-archive > summary {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
}

.nav-group-finance:not(.has-active) > summary,
.nav-group-settings:not(.has-active) > summary,
.nav-group-archive:not(.has-active) > summary {
  background: rgba(255, 255, 255, 0.03);
}

.nav-group-finance > summary::after,
.nav-group-settings > summary::after,
.nav-group-archive > summary::after {
  color: rgba(255, 255, 255, 0.28);
}

.nav-group-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 230;
  display: none;
  flex-direction: column;
  gap: 2px;
  min-width: 200px;
  padding: 6px;
  border-radius: 10px;
  background: #1a2332;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

.nav-group[open] .nav-group-menu {
  display: flex;
}

.nav-group .tab.tab-sub {
  height: 36px;
  margin-left: 0;
  width: 100%;
  font-size: 13px;
  text-align: left;
}

.tab.tab-secondary {
  height: 36px;
  margin-left: 0;
  width: 100%;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
}

.nav-group.hidden,
.nav-group-owner.hidden {
  display: none;
}

.nav-group .tab {
  margin-left: 0;
  width: 100%;
}

.nav-analytics-menu,
.nav-finance-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-analytics-primary,
.nav-finance-primary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.nav-sub-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel);
}

.nav-sub-group > summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.nav-sub-group > summary::-webkit-details-marker {
  display: none;
}

.nav-sub-group > summary::after {
  content: "▾";
  float: right;
  opacity: 0.6;
}

.nav-sub-group:not([open]) > summary::after {
  transform: rotate(-90deg);
}

.nav-sub-group-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 4px 6px;
}

.nav-sub-group.has-active > summary,
.nav-sub-group:has(.tab.active) > summary {
  color: var(--ink);
}

.sync-state.is-loading { color: #ffe08a; }
.sync-state.is-warn { color: #ffd699; }
.sync-state.is-error { color: #ffb4bc; }
.sync-state.is-ok { color: #b8f5d8; }

.data-empty-state {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--soft-panel);
  text-align: center;
}

.data-empty-state strong {
  color: var(--ink);
  font-size: 15px;
}

.data-empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.data-empty-state--error {
  border-color: rgba(217, 45, 66, 0.35);
  background: var(--red-soft);
}

.data-empty-state--warn {
  border-color: rgba(183, 121, 31, 0.35);
  background: rgba(183, 121, 31, 0.08);
}

.data-empty-state--loading {
  border-style: solid;
}

.data-empty-state .secondary-button,
.data-empty-state .text-button {
  justify-self: center;
}

.kpi-hint {
  position: relative;
  display: inline-block;
  margin-left: 4px;
  vertical-align: middle;
}

.kpi-hint > summary {
  list-style: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--wash);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  cursor: pointer;
}

.kpi-hint > summary::-webkit-details-marker {
  display: none;
}

.kpi-hint[open] > summary {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--hover);
}

.kpi-hint-body {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  width: min(280px, 70vw);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: left;
}

.kpi-hint-body strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 13px;
}

.kpi-hint-body p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.kpi-hint-body p:last-child {
  margin-bottom: 0;
}

.kpi-hint-body em {
  color: var(--text);
  font-style: normal;
  font-weight: 600;
}

.empty-cell {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.sync-box-inline {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-top: 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
  max-width: 100%;
}

.sync-box-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sync-box-inline .sync-row {
  margin-bottom: 0;
  gap: 8px;
}

.sync-box-inline .sync-text {
  min-width: 0;
  line-height: 1.2;
}

.sync-box-inline .sync-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.sync-box-inline .sync-state {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
}

.refresh-button-compact {
  width: 100%;
  height: 28px;
  min-width: 0;
  flex-shrink: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1;
  align-self: stretch;
}

.user-box-inline {
  display: block;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  flex: 0 1 auto;
  min-width: 0;
}

.user-panel .role-preview-switch:not(.hidden) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-top: 0;
  padding: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.09);
  flex-shrink: 0;
}

.user-panel .role-preview-switch button {
  min-width: 72px;
  min-height: 28px;
  padding: 4px 6px;
  font-size: 10px;
}

.user-panel .user-logout {
  margin-top: 0;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  white-space: nowrap;
}

.user-box-inline .user-name {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.user-box-inline .user-role {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: none;
}

.user-box-inline .role-preview-switch {
  display: none;
}

.user-box-inline .device-certificate {
  display: none;
}

.user-panel .device-certificate:not(.hidden) {
  margin-top: 0;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(46, 204, 113, 0.12);
  font-size: 10px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.sync-box-compact {
  padding: 6px 10px;
}

.sync-box-compact .sync-box-head {
  gap: 8px;
}

.sync-box-compact .sync-state {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
}

.user-panel-compact {
  flex-wrap: nowrap;
  gap: 6px;
}

.user-panel-compact .user-box-inline {
  padding: 4px 10px;
}

.user-panel-compact .user-logout {
  padding: 6px 10px;
  font-size: 12px;
}

.app-header .sidebar-kanban {
  display: none;
}

.sidebar-kanban {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.sidebar-kanban-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-kanban-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  font: inherit;
  color: var(--ink);
  font-weight: 700;
  text-align: left;
}

.sidebar-kanban-chevron {
  color: var(--muted);
  font-size: 12px;
}

.sidebar-kanban-open {
  color: var(--muted);
}

.sidebar-kanban-body {
  margin-top: 8px;
}

.sidebar-kanban-body.is-collapsed {
  display: none;
}

.sidebar-kanban-board {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.sidebar-kanban-card {
  flex: 0 0 auto;
  width: min(200px, 70vw);
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.sidebar-kanban-card:hover {
  border-color: var(--blue);
  background: var(--hover);
}

.sidebar-kanban-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-kanban-card-meta {
  font-size: 11px;
  color: var(--muted);
}

.sidebar-kanban-empty {
  padding: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.sidebar-kanban-quick {
  margin-top: 8px;
}

.sidebar-kanban-quick input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--paper);
  color: var(--text);
}

.sidebar-kanban-quick input:focus {
  outline: 2px solid var(--blue-soft);
  border-color: var(--blue);
}

.status-pill.hidden {
  display: none !important;
}

.topbar-main .role-mode-banner.hidden {
  display: none !important;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--blue);
  font-weight: 800;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
}

.brand-subtitle {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  margin-top: 2px;
}

.club-picker {
  display: grid;
  gap: 6px;
  padding: 0 8px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
}

.club-picker select {
  width: 100%;
  border-color: rgba(255, 255, 255, 0.16);
  background: #202a3d;
  color: #fff;
}

/* legacy vertical nav rules — переопределены top-nav выше */
.legacy-side-nav .tabs {
  display: grid;
  gap: 6px;
  overflow-y: auto;
}

.tab {
  height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  text-align: left;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  cursor: pointer;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.tab.active {
  background: #fff;
  color: #111827;
  font-weight: 700;
}

.sync-box {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.user-box {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.user-name {
  color: #fff;
  font-weight: 800;
}

.user-role {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.role-preview-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-top: 9px;
  padding: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.09);
}

.role-preview-switch button {
  min-width: 0;
  min-height: 30px;
  padding: 5px 6px;
  border: 0;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.role-preview-switch button.active {
  color: var(--ink);
  background: #fff;
}

.user-logout {
  margin-top: 8px;
  border: 0;
  padding: 0;
  color: #9dcaf2;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #111827;
}

body.qb-gate-open .app-shell {
  display: none !important;
}

.auth-panel {
  position: relative;
  width: min(420px, 100%);
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.auth-theme-switch {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 3px;
}

.auth-theme-switch button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  color: var(--muted);
  background: var(--paper);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.auth-theme-switch button.active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.auth-panel h1 {
  margin: 16px 0;
  font-size: 22px;
}

.auth-note {
  margin: -4px 0 16px;
  color: var(--muted);
  line-height: 1.5;
}

.auth-steps {
  margin: -6px 0 16px;
  padding-left: 20px;
  color: var(--text);
  line-height: 1.45;
}

.auth-steps li + li {
  margin-top: 4px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.auth-form input {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
}

.sync-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}

.sync-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.sync-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #44c58a;
  box-shadow: 0 0 0 4px rgba(68, 197, 138, 0.12);
}

.sync-dot.loading {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(183, 121, 31, 0.16);
}

.sync-dot.offline {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(217, 45, 66, 0.16);
}

.connection-panel {
  margin: 0 24px 16px;
  min-height: 62px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #f0c8ce;
  border-radius: 8px;
  background: #fff5f6;
  color: var(--text);
}

.connection-panel.loading {
  border-color: #ead8a8;
  background: #fffaf0;
}

.connection-panel.degraded {
  border-color: #e8d4a0;
  background: #fffbf0;
}

.sync-dot.degraded {
  background: #f5a623;
  box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.18);
}

.connection-panel.degraded {
  border-color: #e8d4a0;
  background: #fffbf0;
}

.sync-dot.degraded {
  background: #f5a623;
  box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.18);
}

body.app-offline .quick-action,
body.app-offline [data-open-today-shift] {
  pointer-events: none;
  opacity: 0.52;
  cursor: not-allowed;
}

body.app-offline .quick-action.quick-action-incident {
  opacity: 0.72;
}

.connection-panel strong,
.connection-panel span {
  display: block;
}

.connection-panel span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.connection-indicator {
  width: 10px;
  height: 10px;
  margin: 0 !important;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(217, 45, 66, 0.12);
}

.connection-panel.loading .connection-indicator {
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(183, 121, 31, 0.12);
}

.sync-state {
  margin-top: 2px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.device-certificate {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin-top: 8px;
  color: #c9f7df;
  font-size: 11px;
  line-height: 1.35;
}

.device-certificate span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.certificate-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.15);
}

.device-item code {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.network-access {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.network-access > div:first-child span,
.network-access > div:first-child code {
  display: block;
}

.network-access > div:first-child span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.network-access code {
  margin-top: 5px;
  color: var(--blue);
  font-size: 20px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.network-access ol {
  margin: 0;
  padding-left: 22px;
  color: var(--text);
  line-height: 1.7;
}

.sync-path {
  margin: 6px 0 12px;
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.refresh-button {
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
  font-weight: 700;
}

.main {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  padding: 18px 22px 40px;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
}

h1 {
  font-size: 24px;
  line-height: 1.15;
}

h2 {
  font-size: 15px;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
}

.topbar-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.role-mode-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--soft-panel);
  max-width: fit-content;
}

.role-mode-banner strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}

.role-mode-banner span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.role-mode-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.role-mode-banner.is-leader .role-mode-dot {
  background: var(--accent-premium, #c9a227);
}

.role-mode-banner.is-admin .role-mode-dot {
  background: var(--blue);
}

.simple-guide {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--wash);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.simple-guide.is-dismissed {
  display: none;
}

.simple-guide p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  flex: 1;
}

.simple-guide-dismiss {
  flex-shrink: 0;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.simple-guide-dismiss:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.role-mode-banner.is-compact span {
  display: none;
}

.auth-lead {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 36ch;
}

.nav-group-admin .tab.tab-sub {
  min-height: 44px;
  font-size: 14px;
}

.section-term-guide {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 10px;
  background: linear-gradient(90deg, var(--blue-soft) 0%, var(--soft-panel) 22%, var(--paper) 100%);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.04);
}

html[data-theme="dark"] .section-term-guide {
  background: linear-gradient(90deg, var(--blue-soft) 0%, var(--soft-panel) 28%, var(--paper) 100%);
  box-shadow: none;
}

.section-term-guide__inner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px 10px 11px;
}

.section-term-guide__icon {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1.45;
  opacity: 0.9;
}

.section-term-guide__body {
  flex: 1;
  min-width: 0;
}

.section-term-guide__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.section-term-guide__badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--blue) 24%, var(--line));
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.section-term-guide__dismiss {
  flex-shrink: 0;
  min-height: auto;
  padding: 2px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}

.section-term-guide__dismiss:hover {
  background: var(--hover);
  color: var(--ink);
}

.section-term-guide__def,
.section-term-guide__why {
  margin: 0;
  line-height: 1.45;
}

.section-term-guide__def {
  font-size: 13px;
  color: var(--ink);
}

.section-term-guide__def strong {
  font-weight: 700;
}

.section-term-guide__why {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.section-term-guide__why-label {
  font-weight: 600;
  color: var(--text);
}

.global-search-wrap {
  position: relative;
  min-width: min(320px, 100%);
}

.global-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 12px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow);
  cursor: text;
}

.global-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.global-search-icon {
  flex-shrink: 0;
  color: var(--muted);
}

.global-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 8px 0;
  font: inherit;
  color: var(--ink);
}

.global-search input:focus {
  outline: none;
  box-shadow: none;
}

.global-search-kbd {
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.global-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 120;
  max-height: min(420px, 60vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  padding: 6px;
}

.global-search-results.hidden {
  display: none;
}

.global-search-empty {
  padding: 14px 12px;
  color: var(--muted);
  font-size: 13px;
}

.global-search-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.global-search-item:hover,
.global-search-item.active {
  background: color-mix(in srgb, var(--accent) 10%, var(--paper));
}

.global-search-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.global-search-item-top strong {
  font-size: 14px;
  color: var(--ink);
}

.global-search-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
}

.global-search-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.theme-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
}

.theme-switch button {
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  padding: 0 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.theme-switch button.active {
  color: #fff;
  background: var(--blue);
}

.custom-period {
  display: flex;
  align-items: end;
  gap: 8px;
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.custom-period label,
.editor-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.custom-period input,
.editor-form input,
.editor-form select,
.editor-form textarea {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 10px;
  outline: none;
}

.editor-form textarea {
  min-height: 120px;
  height: auto;
  padding-top: 9px;
  padding-bottom: 9px;
  resize: vertical;
  font: inherit;
}

.custom-period input:focus,
.editor-form input:focus,
.editor-form select:focus,
.editor-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 120, 209, 0.12);
}

.creatable-field {
  display: grid;
  gap: 6px;
}

.creatable-field select {
  width: 100%;
}

.creatable-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.creatable-add-row.hidden {
  display: none;
}

.creatable-add-row input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 10px;
  font: inherit;
  outline: none;
}

.creatable-add-row input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 120, 209, 0.12);
}

.creatable-confirm {
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.creatable-confirm:hover {
  filter: brightness(1.05);
}

.creatable-field select option[value="__add_new__"] {
  font-weight: 700;
  color: var(--blue);
}

.control-stats,
.incident-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.control-stat {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.control-stat strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 22px;
}

.control-incidents-section {
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.control-incidents-section > .incident-summary {
  margin-top: 0;
}

.incident-template-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 8px;
  padding: 12px;
}

.incident-template {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
  text-align: left;
  font-weight: 800;
}

.incident-template strong,
.incident-template span {
  display: block;
}

.incident-template span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.incident-template:hover {
  border-color: var(--blue);
  background: var(--hover);
}

.incident-template.critical {
  border-left: 4px solid var(--red);
}

.shift-checklist,
.announcement-list,
.bar-operations,
.incident-board {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.shift-check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.shift-check input {
  width: 18px;
  height: 18px;
}

.announcement-item,
.bar-operation,
.incident-card {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.announcement-head,
.incident-card-head,
.bar-operation {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.compact-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 0 12px 12px;
}

.compact-form input {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
}

.bar-operation-name,
.incident-card-title {
  color: var(--ink);
  font-weight: 800;
}

.bar-operation-status,
.incident-meta {
  color: var(--muted);
  font-size: 12px;
}

.bar-operation-status.bad { color: var(--red); }
.bar-operation-status.warn { color: var(--amber); }
.bar-operation-status.good { color: var(--green); }

.incident-composer {
  border-left: 4px solid var(--red);
  scroll-margin-top: 16px;
}

.incident-card.severity-критическая {
  border-left: 4px solid var(--red);
}

.incident-card.severity-высокая {
  border-left: 4px solid var(--amber);
}

.incident-instruction {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  line-height: 1.5;
}

.incident-duplicate-note {
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid var(--amber);
  border-radius: 6px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 12px;
  font-weight: 700;
}

.incident-comment {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text);
  background: var(--wash);
  font-size: 12px;
}

.shift-incident-preview {
  display: grid;
  gap: 7px;
  padding: 0 12px 12px;
}

.shift-incident-preview-head,
.shift-incident-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shift-incident-row {
  width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--paper);
  cursor: pointer;
  text-align: left;
}

.shift-incident-row:hover {
  border-color: var(--blue);
  background: var(--hover);
}

.empty.compact {
  padding: 8px 0 0;
}

.incident-checks {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.incident-checks label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--text);
  font-size: 12px;
}

.incident-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

html[data-theme="dark"] .custom-period,
html[data-theme="dark"] .auth-panel,
html[data-theme="dark"] .custom-period input,
html[data-theme="dark"] .editor-form input,
html[data-theme="dark"] .editor-form select,
html[data-theme="dark"] .editor-form textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] .control-stat,
html[data-theme="dark"] .shift-check,
html[data-theme="dark"] .announcement-item,
html[data-theme="dark"] .bar-operation,
html[data-theme="dark"] .incident-card,
html[data-theme="dark"] .health-item,
html[data-theme="dark"] .wiki-layout,
html[data-theme="dark"] td,
html[data-theme="dark"] .task-item,
html[data-theme="dark"] .task-action,
html[data-theme="dark"] .summary-chip,
html[data-theme="dark"] .handover-item,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .purchase-request,
html[data-theme="dark"] .device-item,
html[data-theme="dark"] .shift-filter select,
html[data-theme="dark"] .training-module,
html[data-theme="dark"] .moderation-item,
html[data-theme="dark"] .goal-item,
html[data-theme="dark"] .handover-form textarea,
html[data-theme="dark"] .handover-form select,
html[data-theme="dark"] .creatable-add-row input,
html[data-theme="dark"] .creatable-add-row input,
html[data-theme="dark"] .create-details,
html[data-theme="dark"] .reminder-item,
html[data-theme="dark"] .kanban-card,
html[data-theme="dark"] .kanban-column-head,
html[data-theme="dark"] .kanban-modal-panel,
html[data-theme="dark"] .kanban-quick-add input:focus,
html[data-theme="dark"] .kanban-column-title-input {
  background: var(--paper);
}

html[data-theme="dark"] .wiki-list {
  background: var(--soft-panel);
}

html[data-theme="dark"] .wiki-layout {
  background: var(--paper);
}

html[data-theme="dark"] .wiki-article {
  background: var(--paper);
  color: var(--text);
}

html[data-theme="dark"] .wiki-article h2,
html[data-theme="dark"] .wiki-summary,
html[data-theme="dark"] .wiki-content {
  color: var(--text);
}

html[data-theme="dark"] .wiki-link.active,
html[data-theme="dark"] .wiki-link:hover {
  background: var(--hover);
  color: var(--text);
}

html[data-theme="dark"] .wiki-link.passed strong {
  color: var(--green);
}

html[data-theme="dark"] .training-wiki-preview .wiki-content {
  color: var(--text);
}

html[data-theme="dark"] .text-button {
  color: var(--blue);
  background: var(--blue-soft);
}

html[data-theme="dark"] .secondary-button {
  border-color: #315978;
  color: #a9d6ff;
  background: #17324a;
}

.wiki-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 520px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper);
  color: var(--text);
}

.wiki-list {
  border-right: 1px solid var(--line);
  background: var(--soft-panel);
  overflow-y: auto;
}

.wiki-link {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.wiki-link.active,
.wiki-link:hover {
  background: var(--hover);
}

.wiki-link.active strong,
.wiki-link:hover strong {
  color: var(--text);
}

.wiki-link strong,
.wiki-link span {
  display: block;
}

.wiki-link span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.wiki-article {
  padding: 24px;
  background: var(--paper);
  color: var(--text);
}

.wiki-article h2 {
  font-size: 22px;
  color: var(--text);
}

.wiki-summary {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.5;
}

.wiki-category {
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.wiki-content {
  margin-top: 18px;
  color: var(--text);
  line-height: 1.65;
  white-space: pre-line;
}

.documents-toolbar {
  margin-bottom: 12px;
}

.documents-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.documents-sidebar {
  position: sticky;
  top: 12px;
}

.documents-folder-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.documents-folder-item {
  display: grid;
  gap: 6px;
}

.documents-folder-btn {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--paper);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.documents-folder-btn.active,
.documents-folder-btn:hover {
  border-color: var(--blue);
  background: #edf6ff;
}

.documents-folder-btn strong,
.documents-folder-btn span {
  display: block;
}

.documents-folder-btn span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.documents-folder-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.documents-inner {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 14px;
}

.documents-list {
  border-right: 1px solid var(--line);
  background: #fbfdff;
  overflow-y: auto;
}

.documents-link {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.documents-link.active,
.documents-link:hover {
  background: #edf6ff;
}

.documents-link strong,
.documents-link span {
  display: block;
}

.documents-link span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.documents-article {
  padding: 24px;
  border: 0;
  box-shadow: none;
}

.documents-meta {
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.documents-content {
  margin-top: 16px;
  line-height: 1.65;
  white-space: pre-line;
}

.documents-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.documents-attachment {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}

.documents-attachment:hover {
  border-color: var(--blue);
}

.documents-attachment span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.documents-attachment small {
  flex: 0 0 auto;
  color: var(--muted);
}

.documents-acl-form fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin: 0;
}

.documents-acl-group {
  display: grid;
  gap: 8px;
}

.documents-acl-users {
  display: grid;
  gap: 8px;
}

.documents-acl-user-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
}

html[data-theme="dark"] .documents-inner,
html[data-theme="dark"] .documents-folder-btn {
  background: var(--paper);
}

html[data-theme="dark"] .documents-list {
  background: var(--soft-panel);
}

.role-guide {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.role-guide > div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.role-guide strong,
.role-guide span {
  display: block;
}

.role-guide span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.secondary-button,
.link-button {
  min-height: 38px;
  border-radius: 8px;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 700;
}

.secondary-button {
  border: 1px solid #b9d8f5;
  color: #155d9e;
  background: #eef7ff;
}

.link-button {
  border: 0;
  color: var(--muted);
  background: transparent;
}

select,
input[type="search"] {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

select:focus,
input[type="search"]:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 120, 209, 0.12);
}

.status-pill {
  min-width: 126px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 12px;
  background: var(--amber-soft);
  color: #7a4b00;
  font-weight: 700;
  font-size: 12px;
}

.status-pill.ready {
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.error {
  background: var(--red-soft);
  color: #7f1d1d;
}

.status-pill.warn {
  background: var(--amber-soft);
  color: #7a4b00;
}

.status-pill.done {
  background: var(--green-soft);
  color: var(--green);
}

.admin-fines-panel {
  margin-bottom: 16px;
}

.admin-fines-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.admin-fines-totals .summary-chip span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.handover-prev-errors {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.handover-prev-errors strong {
  display: block;
  margin-bottom: 8px;
}

.fine-error-item {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 13px;
}

.fine-error-item.open {
  border-left: 3px solid var(--amber);
}

.admin-fine-form {
  margin-top: 12px;
}

html[data-theme="dark"] .handover-prev-errors {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric {
  min-height: 92px;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric.good {
  border-top: 3px solid var(--green);
}

.metric.warn {
  border-top: 3px solid var(--amber);
}

.metric.bad {
  border-top: 3px solid var(--red);
}

.metric-grid.compact,
.metric-grid.metric-grid-compact {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

#view-overview .metric-grid.metric-grid-compact {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

#view-overview .metric-grid.metric-grid-compact .metric {
  min-height: 72px;
}

#view-overview .metric-grid.metric-grid-compact .metric-value {
  font-size: 20px;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.metric-value {
  margin-top: 8px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.metric-unit {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.kpi-workflow {
  margin-bottom: 14px;
  padding: 14px 16px;
}

.kpi-workflow-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.kpi-workflow-head h2 {
  margin: 0;
  font-size: 18px;
}

.kpi-workflow-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.kpi-workflow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kpi-workflow-step {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.kpi-workflow-step.done {
  border-color: rgba(34, 139, 87, 0.35);
  background: rgba(34, 139, 87, 0.06);
}

.kpi-workflow-num {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--blue);
  background: var(--wash);
  border: 1px solid var(--line);
}

.kpi-workflow-step.done .kpi-workflow-num {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.kpi-workflow-step strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.kpi-workflow-step span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.kpi-empty-banner {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(196, 84, 26, 0.35);
  background: rgba(196, 84, 26, 0.08);
}

.kpi-empty-banner p {
  margin: 6px 0 10px;
  color: var(--text);
  font-size: 13px;
}

.kpi-empty-banner code {
  font-size: 12px;
}

.kpi-period-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.kpi-period-toolbar-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.kpi-period-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.kpi-preset-btn {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--wash);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.kpi-preset-btn.is-active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.kpi-sticky-summary {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.kpi-sticky-score {
  min-width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  border: 2px solid var(--blue);
}

.kpi-sticky-score.good { border-color: var(--green); }
.kpi-sticky-score.warn { border-color: var(--amber); }
.kpi-sticky-score.bad { border-color: var(--red); }

.kpi-sticky-revenue {
  font-weight: 800;
  font-size: 15px;
}

.kpi-sticky-period {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45%;
}

.kpi-data-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.kpi-data-badge.warn {
  color: #8a4b00;
  background: rgba(245, 166, 35, 0.18);
  border: 1px solid rgba(245, 166, 35, 0.45);
}

.kpi-trend-empty p {
  margin: 0 0 6px;
}

.kpi-periods-details {
  margin-top: 14px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  overflow: hidden;
}

.kpi-periods-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.kpi-periods-summary em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.kpi-periods-details .table-wrap {
  padding: 0 14px 14px;
}

.platform-sidebar-note {
  margin: 8px 12px 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--wash);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.kpi-scoreboard {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--paper), var(--soft-panel));
  box-shadow: var(--shadow);
}

.kpi-score-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.kpi-score-main.good { --kpi-accent: var(--green); }
.kpi-score-main.warn { --kpi-accent: var(--amber); }
.kpi-score-main.bad { --kpi-accent: var(--red); }

.kpi-score-value {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  border: 4px solid var(--kpi-accent, var(--blue));
  background: var(--paper);
}

.kpi-score-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.kpi-score-hint {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.kpi-score-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kpi-score-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--wash);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--text);
}

.kpi-pillars {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.kpi-pillar {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.kpi-pillar.good { border-top: 3px solid var(--green); }
.kpi-pillar.warn { border-top: 3px solid var(--amber); }
.kpi-pillar.bad { border-top: 3px solid var(--red); }

.kpi-pillar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-pillar-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-pillar-score {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.kpi-pillar-value {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
}

.kpi-pillar-target,
.kpi-pillar-detail {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.kpi-pillar-bar {
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: var(--wash);
  overflow: hidden;
}

.kpi-pillar-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.kpi-pillar.good .kpi-pillar-bar span { background: var(--green); }
.kpi-pillar.warn .kpi-pillar-bar span { background: var(--amber); }
.kpi-pillar.bad .kpi-pillar-bar span { background: var(--red); }

.kpi-trend-panel {
  margin-bottom: 14px;
}

.kpi-trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 160px;
  padding: 8px 4px 0;
  overflow-x: auto;
}

.kpi-trend-bar {
  flex: 1 0 28px;
  max-width: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 140px;
}

.kpi-trend-bar span {
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--blue), color-mix(in srgb, var(--blue) 55%, transparent));
  min-height: 8px;
}

.kpi-trend-bar em {
  font-style: normal;
  font-size: 10px;
  color: var(--muted);
}

.kpi-metric-grid {
  grid-template-columns: repeat(5, minmax(140px, 1fr));
}

.kpi-targets-form {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

@media (max-width: 1100px) {
  .kpi-pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kpi-targets-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .kpi-workflow-steps {
    grid-template-columns: 1fr;
  }

  .kpi-period-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .kpi-period-pills {
    width: 100%;
  }

  .kpi-preset-btn {
    flex: 1 1 calc(50% - 4px);
  }

  .kpi-sticky-summary.is-visible {
    display: flex;
    position: sticky;
    top: 8px;
    z-index: 5;
  }

  .kpi-sticky-period {
    max-width: 38%;
  }

  .kpi-pillars,
  .kpi-metric-grid,
  .kpi-targets-form {
    grid-template-columns: 1fr;
  }

  .kpi-scoreboard {
    flex-direction: column;
    align-items: flex-start;
  }
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 14px;
  margin-bottom: 14px;
}

.owner-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 14px;
}

.control-quick-actions {
  margin-bottom: 16px;
  padding: 14px 16px;
}

.control-quick-actions .quick-actions {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.quick-actions-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.quick-actions-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.quick-actions-panel p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.quick-action {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  text-align: left;
  color: var(--text);
  background: var(--soft-panel);
  cursor: pointer;
}

.quick-action:hover {
  border-color: var(--blue);
  background: var(--hover);
}

.quick-action strong,
.quick-action span {
  display: block;
}

.quick-action strong {
  color: var(--ink);
  font-size: 14px;
}

.quick-action span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.quick-action.critical {
  border-color: rgba(217, 45, 66, 0.35);
  background: var(--red-soft);
}

.quick-action.quick-action-incident {
  border-color: #d9e1ec;
  border-left: 3px solid #d92d42;
  background: var(--paper, #fff);
}

.quick-action.quick-action-incident:hover {
  border-color: rgba(217, 45, 66, 0.35);
  background: #fff8f9;
}

.quick-action.quick-action-incident strong {
  color: var(--ink);
}

body.app-offline .quick-action,
body.app-offline [data-open-today-shift] {
  pointer-events: none;
  opacity: 0.52;
  cursor: not-allowed;
}

body.app-offline .quick-action.quick-action-incident {
  opacity: 0.72;
}

.quick-action.warn {
  border-color: rgba(217, 140, 45, 0.35);
  background: rgba(217, 140, 45, 0.08);
}

.quick-action.good {
  border-color: rgba(34, 150, 90, 0.35);
  background: rgba(34, 150, 90, 0.08);
}

.quick-actions-panel.owner-home .quick-actions {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

@media (max-width: 960px) {
  .quick-actions-panel.owner-home .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .quick-actions-panel.owner-home .quick-actions {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }
}

.health-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.health-item {
  min-height: 66px;
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.health-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.health-item.good .health-dot { background: var(--green); }
.health-item.warn .health-dot { background: var(--amber); }
.health-item.bad .health-dot { background: var(--red); }

.health-title {
  color: var(--ink);
  font-weight: 800;
}

.health-detail {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
}

.panel-head {
  min-height: 46px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.panel-head-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.panel-head span {
  color: var(--muted);
  font-size: 12px;
}

.text-button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 0 9px;
  background: #edf4fb;
  color: #155d9e;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.text-button:hover {
  background: var(--blue-soft);
}

.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.toolbar input {
  width: min(460px, 50vw);
}

.table-wrap {
  overflow: auto;
  max-height: 520px;
}

.table-wrap.tall {
  max-height: calc(100vh - 210px);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--ink);
  color: #fff;
  text-align: left;
  font-weight: 700;
  border: 1px solid #263244;
  padding: 8px 9px;
  white-space: nowrap;
}

td {
  border: 1px solid var(--line);
  padding: 7px 9px;
  vertical-align: top;
  background: #fff;
  color: var(--text);
}

tr:nth-child(even) td {
  background: #fbfdff;
}

html[data-theme="dark"] td {
  background: var(--paper);
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="dark"] tr:nth-child(even) td {
  background: var(--soft-panel);
  color: var(--text);
}

html[data-theme="dark"] th {
  background: var(--wash);
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="dark"] .tab.active,
html[data-theme="dark"] .nav-group .tab.tab-sub.active {
  background: #2a3d52;
  color: #fff;
}

html[data-theme="dark"] .nav-group .tab.tab-sub:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

html[data-theme="dark"] .role-preview-switch button.active {
  background: #2a3d52;
  color: #fff;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
}

.badge.good {
  color: var(--green);
  background: var(--green-soft);
}

.badge.warn {
  color: #7a4b00;
  background: var(--amber-soft);
}

.badge.bad {
  color: #7f1d1d;
  background: var(--red-soft);
}

.bar-list {
  padding: 12px 14px 16px;
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 120px minmax(140px, 1fr) 92px;
  align-items: center;
  gap: 10px;
}

.bar-name {
  font-weight: 700;
  color: var(--ink);
}

.bar-track {
  height: 12px;
  border-radius: 999px;
  background: #e8eef6;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
}

.bar-value {
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.task-list {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.task-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.task-item.done {
  opacity: 0.7;
}

.task-actions {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}

.task-action {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 9px;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.task-action.primary {
  border-color: #b9d8f5;
  color: #155d9e;
  background: #eef7ff;
}

.task-action.complete {
  border-color: #b8ddcb;
  color: var(--green);
  background: #effaf4;
}

.task-summary {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.summary-chip {
  min-width: 140px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.summary-chip strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 20px;
}

.summary-chip .chip-note {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
}

.alert-list,
.purchase-preview,
.handover-history {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.alert-item,
.purchase-item,
.handover-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.alert-item {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 9px;
}

.alert-mark {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--amber);
}

.alert-item.bad .alert-mark { background: var(--red); }
.alert-item.good .alert-mark { background: var(--green); }

.alert-title,
.purchase-name,
.handover-title {
  color: var(--ink);
  font-weight: 700;
}

.handover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.icon-button {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.icon-button:hover {
  border-color: #f0b2bb;
  color: var(--red);
  background: #fff5f6;
}

.alert-detail,
.purchase-meta,
.handover-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.purchase-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.purchase-qty {
  color: var(--blue);
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
}

.purchase-request-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.purchase-request {
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #fff;
}

.purchase-request.срочная {
  border-left-color: var(--red);
}

.purchase-request.важная {
  border-left-color: var(--amber);
}

.purchase-request.низкая {
  border-left-color: var(--muted);
}

.purchase-request-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.purchase-request-head strong,
.purchase-request-head span {
  display: block;
}

.purchase-request-head span,
.purchase-request-meta,
.purchase-request-comment {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.device-code {
  margin: 12px;
  padding: 14px;
  border: 1px solid #b9d8f5;
  border-radius: 8px;
  background: #eef7ff;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.device-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.device-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.device-item strong,
.device-item span {
  display: block;
}

.device-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.purchase-request-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.purchase-request-comment {
  color: var(--text);
  line-height: 1.45;
}

.source-details {
  margin-bottom: 14px;
}

.advanced-details {
  border-radius: 8px;
}

.source-details > summary {
  width: fit-content;
  padding: 8px 0;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.source-panel {
  margin-top: 6px;
}

.order-table-wrap {
  max-height: 340px;
}

.shift-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
}

.shift-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shift-filter select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 28px 0 9px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

#shiftEditorPanel {
  margin-bottom: 14px;
}

.shift-editor-form {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.training-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.training-list-panel,
.training-content-panel {
  min-height: 560px;
}

.training-list {
  display: grid;
}

.training-module {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.training-module:hover,
.training-module.active {
  background: #eef7ff;
}

.training-module.active {
  box-shadow: inset 3px 0 0 var(--blue);
}

.training-module.passed {
  background: #f3fbf5;
}

.training-module.passed .training-number.passed {
  background: #198754;
}

.training-module.locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.training-module.locked:hover {
  background: #fff;
}

.wiki-link.passed strong {
  color: #198754;
}

.wiki-link.locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.training-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-weight: 800;
}

.training-module strong,
.training-module small {
  display: block;
}

.training-module strong {
  color: var(--ink);
  font-size: 13px;
}

.training-module small {
  margin-top: 4px;
  color: var(--muted);
}

#trainingLesson,
.training-quiz,
.training-result {
  padding: 18px;
}

.training-curriculum-intro {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.training-curriculum-intro-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.training-curriculum-blocks-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.training-curriculum-rules {
  margin: 0 0 10px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.training-curriculum-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.training-level-chip {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.training-curriculum-block {
  margin-bottom: 12px;
  padding: 10px 10px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}

.training-curriculum-block.is-current {
  border-color: color-mix(in srgb, var(--blue) 55%, var(--line));
  box-shadow: inset 3px 0 0 var(--blue);
}

.training-curriculum-block.is-complete {
  opacity: 0.92;
}

.training-curriculum-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 0 4px;
}

.training-curriculum-block-head strong {
  display: block;
  font-size: 14px;
}

.training-curriculum-block-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.training-curriculum-block-progress {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.training-curriculum-practice {
  margin: 0 4px 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue) 8%, var(--surface));
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
}

.training-curriculum-practice span {
  display: block;
  margin-bottom: 2px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.training-curriculum-practice-inline {
  margin: 10px 0 0;
}

.training-curriculum-modules {
  display: grid;
  gap: 6px;
}

.shift-training-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--blue) 45%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--blue) 10%, var(--surface));
}

.shift-training-banner-copy {
  display: grid;
  gap: 2px;
}

.shift-training-banner-copy strong {
  font-size: 13px;
}

.shift-training-banner-copy span {
  color: var(--muted);
  font-size: 12px;
}

.shift-training-inline-alert {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue) 12%, var(--surface));
}

.shift-training-inline-alert strong {
  font-size: 13px;
}

.shift-training-inline-alert span {
  color: var(--muted);
  font-size: 12px;
}

.shift-training-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}

.shift-training-modal-card {
  width: min(420px, 100%);
  padding: 18px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.shift-training-modal-card p {
  margin: 10px 0 14px;
  color: var(--muted);
  line-height: 1.45;
}

.shift-training-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.shift-training-gate .topbar {
  outline: 2px solid color-mix(in srgb, var(--blue) 35%, transparent);
  outline-offset: -2px;
}

body.shift-training-gate .shift-training-banner {
  position: relative;
  z-index: 2;
  border-width: 2px;
  border-color: color-mix(in srgb, var(--blue) 70%, var(--line));
  background: color-mix(in srgb, var(--blue) 18%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 10%, transparent);
}

body.shift-training-gate .shift-training-banner-copy strong {
  color: var(--ink);
  font-size: 14px;
}

.training-kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

#trainingLesson h2 {
  margin: 7px 0;
  color: var(--ink);
  font-size: 24px;
}

.training-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.training-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.training-image {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.training-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.training-image figcaption {
  padding: 9px 11px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .training-image-grid {
    grid-template-columns: 1fr;
  }
}

.lesson-steps {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-left: 22px;
  line-height: 1.5;
}

.training-wiki-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.training-wiki-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.training-wiki-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
}

.training-wiki-link:hover {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 8%, var(--surface));
}

.training-wiki-link.active {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 14%, var(--surface));
}

.training-wiki-link.passed {
  border-color: rgba(52, 211, 153, 0.45);
  color: var(--green);
}

.training-wiki-gate {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.08);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.training-rules {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel);
  font-size: 13px;
  line-height: 1.45;
}

.training-rules strong {
  display: block;
  margin-bottom: 8px;
}

.training-rules ol {
  margin: 0;
  padding-left: 18px;
}

.training-rules li + li {
  margin-top: 6px;
}

.training-wiki-gate--quiz {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
}

.training-wiki-progress {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.training-wiki-preview-actions {
  margin-top: 14px;
}

.training-wiki-preview {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--blue) 4%, var(--surface));
}

.training-wiki-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.funnel-stages {
  margin: 18px 0 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--blue) 4%, var(--surface));
}

.funnel-stages-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.funnel-stages-head h3 {
  margin: 0;
  font-size: 15px;
}

.funnel-stages-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.funnel-stage-list {
  display: grid;
  gap: 12px;
}

.funnel-stage {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.funnel-stage-context {
  opacity: 0.82;
}

.funnel-stage-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.funnel-stage-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 12%, var(--surface));
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.funnel-stage-top strong {
  display: block;
  font-size: 15px;
}

.funnel-stage-top small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.4;
}

.funnel-stage-meta {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
}

.funnel-stage-meta div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
}

.funnel-stage-meta dt {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.funnel-stage-meta dd {
  margin: 0;
  line-height: 1.45;
}

.funnel-stage-block {
  margin-top: 10px;
}

.funnel-stage-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.funnel-stage-block ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.45;
}

.funnel-checklist li::marker {
  content: "□ ";
}

.funnel-stage-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.funnel-stage-wiki {
  font-size: 12px;
  padding: 5px 10px;
}

.training-quiz {
  border-top: 1px solid var(--line);
}

.quiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.quiz-head h3 {
  margin: 0;
  color: var(--ink);
}

.quiz-head span {
  color: var(--muted);
  font-size: 12px;
}

.quiz-question {
  display: grid;
  gap: 7px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.quiz-question legend {
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 800;
}

.quiz-question label {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: var(--text);
  cursor: pointer;
}

.quiz-question input {
  margin-top: 3px;
}

.training-quiz .primary-button {
  margin-top: 14px;
  padding: 0 16px;
}

.training-result {
  border-top: 1px solid var(--line);
  background: #f7fafc;
}

.training-result > strong {
  color: var(--ink);
  font-size: 18px;
}

.feedback-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.feedback-item {
  border-left: 3px solid var(--green);
  padding-left: 10px;
  color: var(--green);
  font-weight: 800;
}

.feedback-item.bad {
  border-left-color: var(--red);
  color: var(--red);
}

.feedback-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

.training-mistakes {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 12px;
}

.mistake-title {
  color: var(--ink);
  font-weight: 800;
}

.mistake-row {
  display: grid;
  gap: 3px;
  border-left: 3px solid var(--amber);
  padding: 8px 10px;
  background: #fffaf0;
}

.mistake-row strong,
.mistake-row span,
.mistake-row small {
  overflow-wrap: anywhere;
}

.mistake-row strong {
  color: var(--ink);
  font-size: 13px;
}

.mistake-row span {
  color: var(--text, #334155);
  font-size: 13px;
  line-height: 1.4;
}

.mistake-row small {
  color: var(--muted);
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  border-radius: 10px;
  padding: 0 6px;
  color: #fff;
  background: var(--red);
  font-size: 11px;
  font-weight: 800;
}

.moderation-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
}

.moderation-form {
  grid-template-columns: 1fr 1fr;
}

.moderation-queue {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.moderation-item {
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 6px;
  padding: 12px;
  background: #fff;
}

.moderation-item.approved { border-left-color: var(--green); }
.moderation-item.rejected { border-left-color: var(--red); }

.moderation-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.moderation-head strong,
.moderation-head small {
  display: block;
}

.moderation-head strong {
  color: var(--ink);
}

.moderation-head small {
  margin-top: 4px;
  color: var(--muted);
}

.moderation-details,
.moderation-comment {
  margin-top: 10px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  line-height: 1.45;
}

.moderation-comment {
  color: var(--muted);
  font-size: 12px;
}

.moderation-revise {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
}

.moderation-revise-panel {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  background: var(--amber-soft);
  border: 1px solid color-mix(in srgb, var(--amber) 35%, var(--line));
}

.moderation-revise-label {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

html[data-theme="dark"] .moderation-revise-panel {
  background: color-mix(in srgb, var(--amber) 16%, var(--paper));
  border-color: color-mix(in srgb, var(--amber) 40%, var(--line));
}
  grid-template-columns: 2fr 1fr 1fr;
}

.goal-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 12px;
}

.goal-item {
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.goal-item.done {
  border-top-color: var(--green);
  opacity: 0.82;
}

.goal-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.goal-head strong,
.goal-head small,
.goal-report strong,
.goal-report span {
  display: block;
}

.goal-head strong {
  color: var(--ink);
}

.goal-head small {
  margin-top: 4px;
  color: var(--muted);
}

.goal-description {
  margin-top: 12px;
  line-height: 1.45;
}

.goal-report {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  border-left: 3px solid var(--green);
  padding: 8px 10px;
  background: #effaf4;
}

.goal-report strong {
  color: var(--green);
  font-size: 12px;
}

.handover-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
}

.handover-shift-context {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.handover-shift-context strong {
  display: block;
  margin-bottom: 4px;
}

.handover-money-head {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.handover-form input[readonly] {
  background: var(--wash);
  color: var(--muted);
  cursor: default;
}

.handover-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.handover-form input,
.handover-form select,
.handover-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 9px 10px;
  outline: none;
  font: inherit;
}

.handover-form textarea {
  min-height: 74px;
  resize: vertical;
}

.handover-form input:focus,
.handover-form select:focus,
.handover-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 120, 209, 0.12);
}

.wide {
  grid-column: 1 / -1;
}

.primary-button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
  font-weight: 800;
}

.create-details {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.create-details > summary {
  padding: 13px 14px;
  color: var(--blue);
  cursor: pointer;
  font-weight: 800;
}

.editor-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
}

.task-editor {
  grid-template-columns: 2fr 1fr 1fr 1fr;
  border-top: 1px solid var(--line);
}

.span-2 {
  grid-column: span 2;
}

.planning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.control-incidents-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.panel-actions {
  padding: 0 12px 12px;
}

.reminder-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.reminder-item {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.reminder-item::before {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--amber);
  content: "";
}

.reminder-item.overdue::before {
  background: var(--red);
}

.reminder-title {
  color: var(--ink);
  font-weight: 700;
}

.reminder-meta,
.form-message {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.form-message {
  min-height: 18px;
  padding: 0 12px 12px;
}

.form-message.good { color: var(--green); }
.form-message.bad { color: var(--red); }

.check-label {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px !important;
  min-height: 38px;
  color: var(--text) !important;
}

.check-label input {
  width: 18px;
  height: 18px;
}

.table-action {
  min-height: 28px;
  border: 1px solid #f0b2bb;
  border-radius: 6px;
  color: var(--red);
  background: #fff5f6;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.task-title {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
}

.task-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.file-grid {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 10px;
}

.file-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.file-label {
  color: var(--muted);
  font-size: 12px;
}

.file-name {
  margin-top: 4px;
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.file-date {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

#view-tasks .kanban-panel {
  margin-top: 0;
}

#view-tasks .kanban-interactive {
  min-height: 480px;
}

.kanban-panel .kanban {
  padding: 0;
}

.kanban {
  display: flex;
  gap: 12px;
  padding: 12px;
  overflow-x: auto;
  align-items: flex-start;
}

.kanban-interactive {
  min-height: 420px;
}

.kanban-column {
  flex: 0 0 280px;
  width: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 280px);
}

.kanban-column.drag-over .kanban-column-body {
  background: var(--blue-soft);
}

.kanban-column-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px 8px 0 0;
}

.kanban-column-title {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-weight: 800;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kanban-column-title-input {
  flex: 1;
  min-width: 0;
  height: 30px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  padding: 0 8px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
  font-weight: 800;
}

.kanban-column-count {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  padding: 0 6px;
  color: var(--muted);
  background: var(--wash);
  font-size: 11px;
  font-weight: 800;
}

.kanban-column-actions {
  display: flex;
  gap: 4px;
}

.kanban-column-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  overflow-y: auto;
  min-height: 120px;
  transition: background 0.15s ease;
}

.kanban-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--paper);
  cursor: grab;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card.dragging {
  opacity: 0.45;
}

.kanban-card.done {
  opacity: 0.78;
}

.kanban-card-title {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
}

.kanban-card-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.kanban-card-notes {
  margin-top: 8px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kanban-card-report {
  margin-top: 8px;
  border-left: 3px solid var(--green);
  padding: 6px 8px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 11px;
  line-height: 1.35;
}

.kanban-quick-add {
  margin-top: auto;
  padding-top: 4px;
}

.kanban-quick-add input {
  width: 100%;
  height: 34px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 0 9px;
  color: var(--text);
  background: transparent;
  font: inherit;
  outline: none;
}

.kanban-quick-add input:focus {
  border-style: solid;
  border-color: var(--blue);
  background: var(--paper);
}

.kanban-add-column {
  flex: 0 0 220px;
  min-height: 120px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  text-align: left;
}

.kanban-add-column:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--hover);
}

.kanban-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
}

.kanban-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 13, 20, 0.55);
}

.kanban-modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.kanban-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.kanban-modal-form {
  grid-template-columns: 1fr 1fr;
}

.kanban-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.lane {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  min-height: 260px;
}

.lane-title {
  height: 38px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--ink);
  font-weight: 800;
  border-bottom: 1px solid var(--line);
}

.lane-items {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.empty {
  padding: 20px;
  color: var(--muted);
}

@media (max-width: 1240px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .two-col,
  .owner-grid,
  .planning-grid,
  .moderation-layout {
    grid-template-columns: 1fr;
  }

  .kanban-column {
    flex-basis: 260px;
    width: 260px;
  }

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

  .incident-template-grid {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .goal-board {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

@media (max-width: 1400px) {
  .app-header-end {
    row-gap: 6px;
  }

  .user-panel {
    max-width: 100%;
  }
}

@media (max-width: 1100px) {
  .app-header-top {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
  }

  .app-header-end {
    width: 100%;
    justify-content: flex-end;
  }

  .user-box-inline .user-name {
    max-width: 140px;
  }
}

@media (max-width: 900px) {
  .app-header-top {
    align-items: flex-start;
  }

  .club-picker-inline select {
    max-width: 130px;
    min-width: 100px;
  }

  .user-box-inline .user-role {
    display: none;
  }

  .sync-box-inline .sync-label {
    display: none;
  }

  .user-panel .role-preview-switch button {
    min-width: 64px;
    font-size: 9px;
  }

  .main {
    padding: 12px 12px 32px;
  }

  .topbar {
    align-items: flex-start;
  }

  .global-search-wrap {
    width: 100%;
  }

  .global-search-kbd {
    display: none;
  }

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

  .health-strip,
  .metric-grid,
  .metric-grid.compact,
  #view-overview .metric-grid,
  .control-stats,
  .incident-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-actions-panel {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shift-layout {
    grid-template-columns: 1fr;
  }

  .training-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .shift-editor-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-editor {
    grid-template-columns: 1fr 1fr;
  }

  .wiki-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .connection-panel {
    margin-inline: 14px;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .connection-panel .secondary-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .topbar {
    display: grid;
    gap: 10px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .theme-switch {
    grid-column: 1 / -1;
  }

  .health-strip,
  .metric-grid,
  .metric-grid.compact,
  #view-overview .metric-grid,
  .file-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

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

  .goal-board,
  .goal-form {
    grid-template-columns: 1fr;
  }

  .wiki-layout {
    display: block;
  }

  .documents-layout {
    grid-template-columns: 1fr;
  }

  .documents-inner {
    display: block;
  }

  .documents-list {
    max-height: 240px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .training-layout {
    display: block;
  }

  .training-list-panel,
  .training-content-panel {
    min-height: 0;
  }

  .training-list-panel {
    margin-bottom: 12px;
  }

  .training-list {
    max-height: 280px;
    overflow-y: auto;
  }

  .shift-filter {
    width: 100%;
    justify-content: space-between;
  }

  .shift-editor-form {
    grid-template-columns: 1fr;
  }

  .wiki-list {
    max-height: 260px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .wiki-article {
    padding: 16px;
  }

  .compact-form {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 82px;
  }

  .metric-value {
    font-size: 22px;
  }

  .task-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .summary-chip {
    min-width: 0;
  }

  .handover-form {
    grid-template-columns: 1fr;
  }

  .custom-period {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .editor-form,
  .task-editor {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .wide {
    grid-column: auto;
  }

  .bar-row {
    grid-template-columns: 92px minmax(100px, 1fr) 58px;
  }

  .panel-head {
    min-height: 46px;
    height: auto;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

/* Langame analytics redesign */
.langame-analytics-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.langame-section-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 72vh;
  overflow: auto;
  padding-right: 4px;
}

.langame-section-group {
  margin: 10px 0 4px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.65;
}

.langame-section-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.langame-section-button.active {
  border-color: var(--accent, #6ea8fe);
  background: rgba(110, 168, 254, 0.12);
}

.langame-section-button span {
  font-size: 12px;
  opacity: 0.72;
}

.langame-section-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.8;
}

.langame-section-meta span {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(127, 127, 127, 0.12);
}

.langame-source-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.langame-source-badge.live {
  color: #0f5132;
  background: #d1e7dd;
}

.langame-source-badge.stub {
  color: #664d03;
  background: #fff3cd;
}

.langame-source-badge.loading {
  color: #055160;
  background: #cff4fc;
}

.langame-source-badge.error {
  color: #842029;
  background: #f8d7da;
}

.langame-health-panel .langame-section-meta {
  margin-bottom: 12px;
}

.langame-health-status-ok {
  color: #0f5132;
}

.langame-health-status-fail {
  color: #842029;
}

.langame-health-row-fail td {
  background: rgba(248, 215, 218, 0.35);
}

.langame-health-row-skip td {
  opacity: 0.72;
}

.langame-toolbar {
  margin: 12px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.langame-date-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.langame-date-label input[type="date"] {
  padding: 6px 8px;
}

.langame-pagination {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.langame-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.langame-field-chip {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  background: rgba(127, 127, 127, 0.08);
  font-size: 12px;
}

button.langame-field-chip {
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

button.langame-field-chip:hover,
button.langame-field-chip:focus-visible {
  border-color: var(--qb-accent, #00e5a0);
  background: var(--qb-accent-subtle, rgba(0, 229, 160, 0.12));
}

button.langame-field-chip:focus-visible {
  outline: 2px solid var(--qb-accent, #00e5a0);
  outline-offset: 2px;
}

.langame-dashboard-groups {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 4px 0 12px;
}

.langame-dashboard-group {
  padding: 12px 14px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  background: rgba(127, 127, 127, 0.06);
}

.langame-dashboard-group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-fg-secondary, rgba(242, 243, 245, 0.82));
  margin-bottom: 10px;
}

.langame-dashboard-group-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#langameStreamsTable td:last-child,
#langameStreamsTable th:last-child {
  min-width: 112px;
  max-width: 180px;
  white-space: normal;
  overflow: visible;
}

#langameStreamsTable .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  word-break: break-word;
}

#langameStreamsTable .text-button:focus-visible {
  outline: 2px solid var(--qb-accent, #00e5a0);
  outline-offset: 2px;
}

.langame-json-cell {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.products-empty-banner {
  margin: 0 0 16px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px dashed var(--border, rgba(255, 255, 255, 0.16));
  background: rgba(127, 127, 127, 0.08);
}

.products-empty-banner p {
  margin: 8px 0 12px;
  opacity: 0.85;
}

.analytics-export-preview {
  margin-top: 16px;
  padding: 14px;
  max-height: 420px;
  overflow: auto;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .langame-analytics-layout {
    grid-template-columns: 1fr;
  }

  .langame-section-list {
    max-height: 240px;
  }

  button.langame-field-chip {
    min-height: 44px;
    padding: 8px 14px;
    font-size: 13px;
  }

  .langame-dashboard-group-chips {
    gap: 10px;
  }

  #langameStreamsTable .text-button {
    min-height: 44px;
    padding: 8px 12px;
  }
}
